mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
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:
@@ -3,7 +3,7 @@
|
||||
desc = "Looks absolutely SHOCKING!"
|
||||
icon_state = "echair0"
|
||||
item_chair = null
|
||||
var/obj/item/assembly/shock_kit/part = null
|
||||
var/obj/item/assembly/shock_kit/shocker = null
|
||||
var/last_time = 1.0
|
||||
var/delay_time = 50
|
||||
var/shocking = FALSE
|
||||
@@ -13,17 +13,17 @@
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
if(sk)
|
||||
part = sk
|
||||
shocker = sk
|
||||
|
||||
if(isnull(part)) //This e-chair was not custom built
|
||||
part = new(src)
|
||||
var/obj/item/clothing/head/helmet/part1 = new(part)
|
||||
var/obj/item/electropack/part2 = new(part)
|
||||
part2.integrated_signaler.frequency = 1445
|
||||
part2.integrated_signaler.code = 6
|
||||
part2.master = part
|
||||
part.part1 = part1
|
||||
part.part2 = part2
|
||||
if(isnull(shocker)) // This e-chair was not custom built.
|
||||
shocker = new(src)
|
||||
var/obj/item/clothing/head/helmet/attached_helmet = new(shocker)
|
||||
var/obj/item/electropack/attached_electropack = new(shocker)
|
||||
attached_electropack.integrated_signaler.frequency = 1445
|
||||
attached_electropack.integrated_signaler.code = 6
|
||||
attached_electropack.master = shocker
|
||||
shocker.attached_helmet = attached_helmet
|
||||
shocker.attached_electropack = attached_electropack
|
||||
|
||||
/obj/structure/chair/e_chair/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -34,9 +34,9 @@
|
||||
var/obj/structure/chair/C = new /obj/structure/chair(loc)
|
||||
I.play_tool_sound(src, 50)
|
||||
C.dir = dir
|
||||
part.loc = loc
|
||||
part.master = null
|
||||
part = null
|
||||
shocker.loc = loc
|
||||
shocker.master = null
|
||||
shocker = null
|
||||
visible_message(SPAN_WARNING("[user] deconstructs [src]."))
|
||||
qdel(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user