diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index edf7e0fc32b..66e2156b37a 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -60,7 +60,7 @@ if(nadeassembly) nadeassembly.attack_self(user) return - var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num + var/newtime = input(usr, "Please set the timer.", "Timer", det_time) as num if(user.is_in_active_hand(src)) newtime = Clamp(newtime, 10, 60000) det_time = newtime @@ -231,3 +231,36 @@ CB.prime() ..() + +/obj/item/grenade/plastic/x4/thermite + name = "T4" + desc = "A wall breaching charge, containing fuel, metal oxide and metal powder mixed in just the right way. One hell of a combination. Effective against walls, ineffective against airlocks..." + det_time = 2 + +/obj/item/grenade/plastic/x4/thermite/prime() + var/turf/location + if(target) + if(!QDELETED(target)) + location = get_turf(target) + target.overlays -= image_overlay + else + location = get_turf(src) + if(location) + var/datum/effect_system/smoke_spread/smoke = new + smoke.set_up(8,0, location, aim_dir) + if(target && target.density) + var/turf/T = get_step(location, aim_dir) + for(var/turf/simulated/wall/W in range(1, location)) + W.thermitemelt(speed = 30) + addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3) + addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3) + else + addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3) + addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3) + + + if(isliving(target)) + var/mob/living/M = target + M.adjust_fire_stacks(2) + M.IgniteMob() + qdel(src) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index a24e6f2953f..c22c7530505 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -200,7 +200,10 @@ for(var/i=0, iThe thermite starts melting through the wall.") + if(user) + to_chat(user, "The thermite starts melting through the wall.") - spawn(100) + spawn(wait) if(O) qdel(O) return