Update canister.dm

This commit is contained in:
ReoDaProtovali
2023-05-09 15:47:15 -05:00
parent 2ae53b3171
commit 776fc7ab8d
+18 -2
View File
@@ -239,6 +239,22 @@ update_flag
..()
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool)) //Vorestart: Deconstructable Canisters
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0, user))
to_chat(user, "The welding tool must be on to complete this task.")
return
if(air_contents.return_pressure() > 1 && !destroyed)
to_chat(user, "<span class ='warning'>\The [src]'s internal pressure is too high! Empty the canister before attempting to weld it apart.")
return
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You deconstruct the [src].</span>")
new /obj/item/stack/material/steel( src.loc, 10)
qdel(src)
return
//Voreend
if(!W.is_wrench() && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
visible_message("<span class='warning'>\The [user] hits \the [src] with \a [W]!</span>")
src.health -= W.force
@@ -332,7 +348,7 @@ update_flag
pressure = 10*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input")
pressure = tgui_input_number(usr, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure, 10*ONE_ATMOSPHERE, ONE_ATMOSPHERE/10)
pressure = tgui_input_number(usr, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure, 10*ONE_ATMOSPHERE, ONE_ATMOSPHERE/10)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
@@ -452,4 +468,4 @@ update_flag
/obj/machinery/portable_atmospherics/canister/take_damage(var/damage)
src.health -= damage
healthcheck()
healthcheck()