Skip to content

Commit

Permalink
bugfix: Abductor Optable Construction Fix (#5789)
Browse files Browse the repository at this point in the history
Abductor Optable Construction Fix
  • Loading branch information
Gottfrei authored Aug 23, 2024
1 parent 6c34289 commit 46e5705
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions code/game/gamemodes/miniantags/abduction/abduction_gear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -764,16 +764,24 @@ Congratulations! You are now trained for invasive xenobiology research!"}
if(user.a_intent == INTENT_HARM)
return ..()

if(istype(I, /obj/item/stack/sheet/mineral/abductor) || istype(I, /obj/item/stack/sheet/mineral/silver))
var/alien_material = istype(I, /obj/item/stack/sheet/mineral/abductor)
if(alien_material || istype(I, /obj/item/stack/sheet/mineral/silver))
add_fingerprint(user)
var/obj/item/stack/sheet/mineral/mineral = I
if(mineral.get_amount() < 1)
to_chat(user, span_warning("You need one sheet of [mineral] to do this!"))
return ATTACK_CHAIN_PROCEED
to_chat(user, span_notice("You start adding [mineral] to [src]..."))
if(!do_after(user, 5 SECONDS, src) || QDELETED(mineral) || !mineral.use(1))
if(!do_after(user, 5 SECONDS * mineral.toolspeed, src, category = DA_CAT_TOOL) || QDELETED(mineral) || !mineral.use(1))
return ATTACK_CHAIN_PROCEED
new /obj/structure/table/abductor(loc)
var/obj/new_table
if(alien_material)
new_table = new /obj/structure/table/abductor(loc)
else
new_table = new /obj/machinery/optable/abductor(loc)
to_chat(user, span_notice("You have completed the construction of [new_table]."))
transfer_fingerprints_to(new_table)
new_table.add_fingerprint(user)
qdel(src)
return ATTACK_CHAIN_BLOCKED_ALL

Expand All @@ -797,6 +805,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}


/obj/machinery/optable/abductor
name = "alien operating table"
icon = 'icons/obj/abductor.dmi'
icon_state = "bed"
no_icon_updates = 1 //no icon updates for this; it's static.
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/OpTable.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/machinery/optable
name = "Operating Table"
name = "operating table"
desc = "Used for advanced medical procedures."
icon = 'icons/obj/surgery.dmi'
icon_state = "table2-idle"
Expand Down

0 comments on commit 46e5705

Please sign in to comment.