Files
kiwistation/code/game/objects/items/weapons/implants/implant_explosive.dm
T
phil235 0efb30434a Fixes not being able to move during jaunting if you are cuffed and pulled.
Greenglow decal no longer disappears after 2 minutes.
Fixes runtime with explosive implant activation.
Fixes stunbaton infinite cell charge, the baton now turns off if you try using it after its cell has been deleted somehow.
Fixes bloody pulled mob leaving a blood trail in zero G.
Shortens the guardian battlecry message when attacking to lower chat spam.
Items in Morph now disperses a bit on death instead of being all on the same tile.
After reaching a limit of 50 items, morph swallowing items deletes them instead of putting them inside the morph.
Monkeys can no longer modify the hand labeller's text to communicate.
Fixes carbon,radium,uranium 's reaction_turf creating multiple decal on a tile, it now checks if there's already a decal of the relevant type and (for radium and uranium) only transfers reagent to it if it finds one.
2015-10-08 00:48:00 +02:00

120 lines
3.8 KiB
Plaintext

/obj/item/weapon/implant/explosive
name = "microbomb implant"
desc = "And boom goes the weasel."
icon_state = "explosive"
origin_tech = "materials=2;combat=3;biotech=4;syndicate=4"
var/weak = 2
var/medium = 0.8
var/heavy = 0.4
var/delay = 7
/obj/item/weapon/implant/explosive/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp RX-78 Employee Management Implant<BR>
<b>Life:</b> Activates upon death.<BR>
<b>Important Notes:</b> Explodes<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.<BR>
<b>Special Features:</b> Explodes<BR>
"}
return dat
/obj/item/weapon/implant/explosive/trigger(emote, mob/source)
if(emote == "deathgasp")
activate("death")
/obj/item/weapon/implant/explosive/activate(cause)
if(!cause || !imp_in) return 0
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your microbomb implant? This will cause you to explode!", "Microbomb Implant Confirmation", "Yes", "No") != "Yes")
return 0
heavy = round(heavy)
medium = round(medium)
weak = round(weak)
imp_in << "<span class='notice'>You activate your microbomb implant.</span>"
//If the delay is short, just blow up already jeez
if(delay <= 7)
explosion(src,heavy,medium,weak,weak, flame_range = weak)
if(imp_in)
imp_in.gib()
qdel(src)
return
timed_explosion()
/obj/item/weapon/implant/explosive/implant(mob/source)
var/obj/item/weapon/implant/explosive/imp_e = locate(src.type) in source
if(imp_e && imp_e != src)
imp_e.heavy += heavy
imp_e.medium += medium
imp_e.weak += weak
imp_e.delay += delay
qdel(src)
return 1
return ..()
/obj/item/weapon/implant/explosive/proc/timed_explosion()
imp_in.visible_message("<span class = 'warning'>[imp_in] starts beeping ominously!</span>")
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
if(imp_in && imp_in.stat)
imp_in.visible_message("<span class = 'warning'>[imp_in] doubles over in pain!</span>")
imp_in.Weaken(7)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
explosion(src,heavy,medium,weak,weak, flame_range = weak)
if(imp_in)
imp_in.gib()
qdel(src)
/obj/item/weapon/implant/explosive/macro
name = "macrobomb implant"
desc = "And boom goes the weasel. And everything else nearby."
icon_state = "explosive"
origin_tech = "materials=3;combat=5;biotech=4;syndicate=5"
weak = 16
medium = 8
heavy = 4
delay = 70
/obj/item/weapon/implant/explosive/macro/activate(cause)
if(!cause || !imp_in) return 0
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your macrobomb implant? This will cause you to explode and gib!", "Macrobomb Implant Confirmation", "Yes", "No") != "Yes")
return 0
imp_in << "<span class='notice'>You activate your macrobomb implant.</span>"
timed_explosion()
/obj/item/weapon/implant/explosive/macro/implant(mob/source)
var/obj/item/weapon/implant/explosive/imp_e = locate(src.type) in source
if(imp_e && imp_e != src)
return 0
imp_e = locate(/obj/item/weapon/implant/explosive) in source
if(imp_e && imp_e != src)
heavy += imp_e.heavy
medium += imp_e.medium
weak += imp_e.weak
delay += imp_e.delay
qdel(imp_e)
return ..()
/obj/item/weapon/implanter/explosive
name = "implanter (explosive)"
/obj/item/weapon/implanter/explosive/New()
imp = new /obj/item/weapon/implant/explosive(src)
..()
/obj/item/weapon/implantcase/explosive
name = "implant case - 'Explosive'"
desc = "A glass case containing an explosive implant."
/obj/item/weapon/implantcase/explosive/New()
imp = new /obj/item/weapon/implant/explosive(src)
..()