mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
exploit gone (#21605)
This commit is contained in:
@@ -89,7 +89,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.remove(gasperfist * fisto_setting))
|
||||
if(tank && !tank.air_contents.boolean_remove(gasperfist * fisto_setting))
|
||||
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
|
||||
|
||||
@@ -111,6 +111,12 @@ What are the archived variables for?
|
||||
|
||||
return TRUE
|
||||
|
||||
/// Only removes the gas if we have more than the amount
|
||||
/datum/gas_mixture/proc/boolean_remove(amount)
|
||||
if(amount > total_moles())
|
||||
return FALSE
|
||||
return remove(amount)
|
||||
|
||||
///Proportionally removes amount of gas from the gas_mixture.
|
||||
///Returns: gas_mixture with the gases removed
|
||||
/datum/gas_mixture/proc/remove(amount)
|
||||
|
||||
Reference in New Issue
Block a user