Files
Bubberstation/code/game/objects/items/devices/doorCharge.dm
phil235 f6db08af2e Contents_explosion() tweaks (#20934)
* When any object is hit by an explosion, we no longer always call ex_act() on all its contents indiscriminately.
The default contents_explosion() does nothing and it's overriden for certain objects only like storage items, machines with occupants, mechs.

I've also overriden handle_atom_del() for many objects so that any sudden deletion of an object referenced in an object var of its container properly nullifies such references, avoiding potential runtime and updating the container's icon_state (e.g. admin-delete a mixer's beaker and the mixer's sprite updates immediately).

I've tweaked bomb effect on worn clothes, having some armor but not 100% now still protects your clothes somewhat.

Fixes some arguments of ex_act in living/ex_act() and other mobs.

* derp and map fixes.

* dem map fixes, man.

* More work on code that use implants, simplified now that we can use the "implants" carbon var.

* some fixes

* more typos and fixes.
2016-10-16 10:01:37 +13:00

41 lines
1.2 KiB
Plaintext

/obj/item/device/doorCharge
name = "airlock charge"
desc = null //Different examine for traitors
item_state = "electronic"
icon_state = "doorCharge"
w_class = 2
throw_range = 4
throw_speed = 1
flags = NOBLUDGEON
force = 3
attack_verb = list("blown up", "exploded", "detonated")
materials = list(MAT_METAL=50, MAT_GLASS=30)
origin_tech = "syndicate=1;combat=3;engineering=3"
/obj/item/device/doorCharge/ex_act(severity, target)
switch(severity)
if(1)
visible_message("<span class='warning'>[src] detonates!</span>")
explosion(src.loc,0,2,1,flame_range = 4)
qdel(src)
if(2)
if(prob(50))
ex_act(1)
if(3)
if(prob(25))
ex_act(1)
/obj/item/device/doorCharge/Destroy()
if(istype(loc, /obj/machinery/door/airlock))
var/obj/machinery/door/airlock/A = loc
if(A.charge == src)
A.charge = null
return ..()
/obj/item/device/doorCharge/examine(mob/user)
..()
if(user.mind in ticker.mode.traitors) //No nuke ops because the device is excluded from nuclear
user << "A small explosive device that can be used to sabotage airlocks to cause an explosion upon opening. To apply, remove the airlock's maintenance panel and place it within."
else
user << "A small, suspicious object that feels lukewarm when held."