mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
* adds signal and modifies each call of afterattack to call it's inherited proc * uses new macro for sendsignal() * map fuck * skip precommithooks * combine and negate 2 ifs
80 lines
2.0 KiB
Plaintext
80 lines
2.0 KiB
Plaintext
/datum/wires/explosive/New(atom/holder)
|
|
add_duds(2) // In this case duds actually explode.
|
|
..()
|
|
|
|
/datum/wires/explosive/on_pulse(index)
|
|
explode()
|
|
|
|
/datum/wires/explosive/on_cut(index, mend)
|
|
explode()
|
|
|
|
/datum/wires/explosive/proc/explode()
|
|
return
|
|
|
|
|
|
/datum/wires/explosive/c4
|
|
holder_type = /obj/item/grenade/plastic/c4
|
|
randomize = TRUE //Same behaviour since no wire actually disarms it
|
|
|
|
/datum/wires/explosive/c4/interactable(mob/user)
|
|
var/obj/item/grenade/plastic/c4/P = holder
|
|
if(P.open_panel)
|
|
return TRUE
|
|
|
|
/datum/wires/explosive/c4/explode()
|
|
var/obj/item/grenade/plastic/c4/P = holder
|
|
P.prime()
|
|
|
|
|
|
/datum/wires/explosive/pizza
|
|
holder_type = /obj/item/pizzabox
|
|
randomize = TRUE
|
|
|
|
/datum/wires/explosive/pizza/New(atom/holder)
|
|
wires = list(
|
|
WIRE_DISARM
|
|
)
|
|
add_duds(3) // Duds also explode here.
|
|
..()
|
|
|
|
/datum/wires/explosive/pizza/interactable(mob/user)
|
|
var/obj/item/pizzabox/P = holder
|
|
if(P.open && P.bomb)
|
|
return TRUE
|
|
|
|
/datum/wires/explosive/pizza/get_status()
|
|
var/obj/item/pizzabox/P = holder
|
|
var/list/status = list()
|
|
status += "The red light is [P.bomb_active ? "on" : "off"]."
|
|
status += "The green light is [P.bomb_defused ? "on": "off"]."
|
|
return status
|
|
|
|
/datum/wires/explosive/pizza/on_pulse(wire)
|
|
var/obj/item/pizzabox/P = holder
|
|
switch(wire)
|
|
if(WIRE_DISARM) // Pulse to toggle
|
|
P.bomb_defused = !P.bomb_defused
|
|
else // Boom
|
|
explode()
|
|
|
|
/datum/wires/explosive/pizza/on_cut(wire, mend)
|
|
var/obj/item/pizzabox/P = holder
|
|
switch(wire)
|
|
if(WIRE_DISARM) // Disarm and untrap the box.
|
|
if(!mend)
|
|
P.bomb_defused = TRUE
|
|
else
|
|
if(!mend && !P.bomb_defused)
|
|
explode()
|
|
|
|
/datum/wires/explosive/pizza/explode()
|
|
var/obj/item/pizzabox/P = holder
|
|
P.bomb.detonate()
|
|
|
|
|
|
/datum/wires/explosive/gibtonite
|
|
holder_type = /obj/item/twohanded/required/gibtonite
|
|
|
|
/datum/wires/explosive/gibtonite/explode()
|
|
var/obj/item/twohanded/required/gibtonite/P = holder
|
|
P.GibtoniteReaction(null, 2) |