Migrate electropack to the new attack chain. (#32266)

* Migrate electropack to the new attack chain.

* Cleanup. Add interact_with_atom to electropack.

* Apply suggestions from CRUNCH review

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

* Make electropack activatable when inside shock kit.

---------

Signed-off-by: Alan <alfalfascout@users.noreply.github.com>
Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
This commit is contained in:
Alan
2026-08-01 06:08:21 +00:00
committed by GitHub
co-authored by CRUNCH
parent cdfade46e3
commit 26e17ac960
3 changed files with 76 additions and 53 deletions
+19 -15
View File
@@ -3,14 +3,14 @@
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/obj/item/clothing/head/helmet/attached_helmet = null
var/obj/item/electropack/attached_electropack = null
var/status = FALSE
w_class = WEIGHT_CLASS_HUGE
/obj/item/assembly/shock_kit/Destroy()
QDEL_NULL(part1)
QDEL_NULL(part2)
QDEL_NULL(attached_helmet)
QDEL_NULL(attached_electropack)
return ..()
/obj/item/assembly/shock_kit/wrench_act(mob/living/user, obj/item/I)
@@ -18,30 +18,34 @@
return
. = TRUE
var/turf/T = get_turf(src)
part1?.forceMove(T)
part2?.forceMove(T)
part1?.master = null
part2?.master = null
part1 = null
part2 = null
attached_helmet?.forceMove(T)
attached_electropack?.forceMove(T)
attached_helmet?.master = null
attached_electropack?.master = null
attached_helmet = null
attached_electropack = 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"]!"))
if(status)
to_chat(user, SPAN_NOTICE("You ready and secure [src]!"))
else
to_chat(user, SPAN_NOTICE("You unsecure [src] with [I] so it can be attached!"))
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)
if(!attached_helmet || !attached_electropack)
return NONE
attached_helmet.activate_self(user)
attached_electropack.activate_self(user)
add_fingerprint(user)
return ITEM_INTERACT_COMPLETE
/obj/item/assembly/shock_kit/proc/shock_invoke()
if(istype(loc, /obj/structure/chair/e_chair))