mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Fixes Telepad Double Attack (#12557)
This commit is contained in:
@@ -61,37 +61,45 @@
|
||||
desc = "A telepad used by the Rapid Crate Sender."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "pad-idle"
|
||||
anchored = 1
|
||||
anchored = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 500
|
||||
var/stage = 0
|
||||
/obj/machinery/telepad_cargo/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
|
||||
/obj/machinery/telepad_cargo/attackby(obj/item/I, mob/user, params)
|
||||
if(iswrench(I))
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class = 'caution'> The [src] can now be moved.</span>")
|
||||
else if(!anchored)
|
||||
anchored = 1
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class = 'caution'> The [src] is now secured.</span>")
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
return
|
||||
if(isscrewdriver(I))
|
||||
if(stage == 0)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class = 'caution'> You unscrew the telepad's tracking beacon.</span>")
|
||||
stage = 1
|
||||
else if(stage == 1)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class = 'caution'> You screw in the telepad's tracking beacon.</span>")
|
||||
stage = 0
|
||||
if(istype(W, /obj/item/weldingtool) && stage == 1)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
return
|
||||
if(iswelder(I) && stage == 1)
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class = 'caution'> You disassemble the telepad.</span>")
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
new /obj/item/stack/sheet/glass(loc)
|
||||
qdel(src)
|
||||
|
||||
|
||||
///TELEPAD CALLER///
|
||||
/obj/item/telepad_beacon
|
||||
|
||||
Reference in New Issue
Block a user