Files
Alan 25aac32c63 Migrate /obj/item/assembly to the new attack chain. (#31987)
* Migrate /obj/item/assembly to the new attack chain.

* Migrate more procs.

* Add parent calls to activate_self().

* Add parent call to activate_self() in noise sensor.

* Apply CRUNCH's style suggestions.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

* Change igniter attack to interact_with_atom().

* Restore assembly UIs.

* Ensure assembly interact procs fire, ensure fingerprints.

---------

Signed-off-by: Alan <alfalfascout@users.noreply.github.com>
Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
2026-05-17 18:42:49 +00:00

50 lines
1.3 KiB
Plaintext

/obj/item/assembly/shock_kit
name = "electrohelmet assembly"
desc = "This appears to be made from both an electropack and a helmet."
icon = 'icons/obj/assemblies.dmi'
icon_state = "shock_kit"
var/obj/item/clothing/head/helmet/part1 = null
var/obj/item/electropack/part2 = null
var/status = FALSE
w_class = WEIGHT_CLASS_HUGE
/obj/item/assembly/shock_kit/Destroy()
QDEL_NULL(part1)
QDEL_NULL(part2)
return ..()
/obj/item/assembly/shock_kit/wrench_act(mob/living/user, obj/item/I)
if(status)
return
. = TRUE
var/turf/T = get_turf(src)
part1?.forceMove(T)
part2?.forceMove(T)
part1?.master = null
part2?.master = null
part1 = null
part2 = null
visible_message(SPAN_NOTICE("[user] disassembles [src]."))
qdel(src)
return TRUE
/obj/item/assembly/shock_kit/screwdriver_act(mob/user, obj/item/I)
status = !status
to_chat(user, SPAN_NOTICE("[src] is now [status ? "secured" : "unsecured"]!"))
add_fingerprint(user)
return TRUE
/obj/item/assembly/shock_kit/activate_self(mob/user)
if(!user)
return ..()
if(!part1 || !part2)
return
part1.activate_self(user)
part2.attack_self__legacy__attackchain(user, status)
add_fingerprint(user)
/obj/item/assembly/shock_kit/proc/shock_invoke()
if(istype(loc, /obj/structure/chair/e_chair))
var/obj/structure/chair/e_chair/C = loc
C.shock()