Changes the powerfist to work off pressure (#23069)

* the power of the ideal gas law

* define R
This commit is contained in:
Bjamcham
2023-11-04 16:35:00 -04:00
committed by GitHub
parent 14fbf2b4a9
commit 29351efba7
+3 -2
View File
@@ -14,7 +14,8 @@
origin_tech = "combat=5;powerstorage=3;syndicate=3"
var/click_delay = 1.5
var/fisto_setting = 1
var/gasperfist = 0.5
///base pressure in kpa used by the powerfist per hit
var/gasperfist = 17.5
var/obj/item/tank/internals/tank = null //Tank used for the gauntlet's piston-ram.
/obj/item/melee/powerfist/Destroy()
@@ -89,7 +90,7 @@
if(!tank)
to_chat(user, "<span class='warning'>[src] can't operate without a source of gas!</span>")
return
if(tank && !tank.air_contents.boolean_remove(gasperfist * fisto_setting))
if(tank && !tank.air_contents.boolean_remove(((gasperfist * fisto_setting) * tank.air_contents.return_volume()) / (R_IDEAL_GAS_EQUATION * tank.air_contents.return_temperature())))
to_chat(user, "<span class='warning'>[src]'s piston-ram lets out a weak hiss, it needs more gas!</span>")
playsound(loc, 'sound/effects/refill.ogg', 50, 1)
return