mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-01 05:02:33 +00:00
* refactor: Attack chain, initial setup. * migrate curtain to make dreamchecker happy * update thurible * don't call attacked_by separately for legacy attack chain * remove duplicate proc * condense similar code, put allowances for legacy code in new procs * update docs, include diagram source * add comment on how to update diagram * fix admonition * mindflayer updates * remove commented out code * clarify all steps * after_attack should be overridable * whoops * retrofit recent changes * duh, can't restrict this yet because of tool_acts * i hate ore bags with the fire of a thousand suns * return correct value for object attack logic * Various cleanups. We don't want to attempt to pull stuff out of `/obj/item/attackby`, because those pieces are part of the related objects' migrations, not `/obj/item` itself. Attempting to do this causes knockon effects where things expected to call e.g. `/obj/item/storage/attackby` in the call chain were not ferried over to the new item interaction code, because the related objects hadn't actually been migrated over yet. I've used refactoring /obj/vehicle as the example for migrating `attackby` methods instead. * simplify some argument names * fuck it * make it do the thing * Rename CI module call * Prove that CI works * improve test output * aaand fix it again * fix curtain tool interactions * fix compile error * fix compile error * Better docs, introduce migration plan tool.
48 lines
1.3 KiB
Plaintext
48 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
|
|
flags = CONDUCT
|
|
|
|
/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 class='notice'>[user] disassembles [src].</span>")
|
|
qdel(src)
|
|
return TRUE
|
|
|
|
/obj/item/assembly/shock_kit/screwdriver_act(mob/user, obj/item/I)
|
|
status = !status
|
|
to_chat(user, "<span class='notice'>[src] is now [status ? "secured" : "unsecured"]!</span>")
|
|
add_fingerprint(user)
|
|
return TRUE
|
|
|
|
/obj/item/assembly/shock_kit/attack_self__legacy__attackchain(mob/user as mob)
|
|
part1.attack_self__legacy__attackchain(user, status)
|
|
part2.attack_self__legacy__attackchain(user, status)
|
|
add_fingerprint(user)
|
|
return
|
|
|
|
/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()
|