mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Adds toolspeed var, which is a multiplier on how 'fast' the tool works. 0.5 means it goes twice as fast. Adds usesound var, which determines what sound is used when a tool is being used. Changes a lot of code to use those two vars instead. Adds 'ayyy' tools, which are ported from /tg/'s abductor gamemode. They're currently admin only but I might make them obtainable by xenoarch later. Adds powertools, also from /tg/. CE starts with them in a new toolbelt that spawns in their locker, ported from (you guessed it) /tg/. Changes welder sprites to look nicer, ported yet again from /tg/. Modified the blue welder slightly so it can be the electric welder sprite. Adds various sounds from /tg/, for tools and welders.
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_state = "shock_kit"
|
|
var/obj/item/clothing/head/helmet/part1 = null
|
|
var/obj/item/device/radio/electropack/part2 = null
|
|
var/status = 0
|
|
w_class = ITEMSIZE_HUGE
|
|
flags = CONDUCT
|
|
|
|
/obj/item/assembly/shock_kit/Destroy()
|
|
qdel(part1)
|
|
qdel(part2)
|
|
..()
|
|
return
|
|
|
|
/obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if(istype(W, /obj/item/weapon/wrench) && !status)
|
|
var/turf/T = loc
|
|
if(ismob(T))
|
|
T = T.loc
|
|
part1.loc = T
|
|
part2.loc = T
|
|
part1.master = null
|
|
part2.master = null
|
|
part1 = null
|
|
part2 = null
|
|
qdel(src)
|
|
return
|
|
if(istype(W, /obj/item/weapon/screwdriver))
|
|
status = !status
|
|
to_chat(user, "<span class='notice'>[src] is now [status ? "secured" : "unsecured"]!</span>")
|
|
playsound(src, W.usesound, 50, 1)
|
|
add_fingerprint(user)
|
|
return
|
|
|
|
/obj/item/assembly/shock_kit/attack_self(mob/user as mob)
|
|
part1.attack_self(user, status)
|
|
part2.attack_self(user, status)
|
|
add_fingerprint(user)
|
|
return
|
|
|
|
/obj/item/assembly/shock_kit/receive_signal()
|
|
if(istype(loc, /obj/structure/bed/chair/e_chair))
|
|
var/obj/structure/bed/chair/e_chair/C = loc
|
|
C.shock()
|
|
return
|