From 74db5df591d2a79a7040af7a75c01077842f5e1a Mon Sep 17 00:00:00 2001 From: phil235 Date: Sat, 11 Oct 2014 15:42:29 +0200 Subject: [PATCH] Adding an ex_act() proc to ore_box so the ores it contains aren't all deleted when the box is deleted by an explosion. --- code/modules/mining/satchel_ore_boxdm.dm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 20636dabd5f..9a18d1543ef 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -82,3 +82,21 @@ usr << "You empty the box." src.updateUsrDialog() return + +obj/structure/ore_box/ex_act(severity) + switch(severity) + if(1.0) + for(var/obj/item/weapon/ore/O in contents) + O.loc = src.loc + O.ex_act(severity++) + qdel(src) + return + if(2.0) + if(prob(50)) + for(var/obj/item/weapon/ore/O in contents) + O.loc = src.loc + O.ex_act(severity++) + qdel(src) + return + if(3.0) + return \ No newline at end of file