fixes runtimes on mage hands regarding their targeting, as well as watersponge division by zero runtime

This commit is contained in:
Phantastic-Swan
2025-08-15 18:42:02 +02:00
parent 8de4e217f7
commit 4f84e371ba
2 changed files with 4 additions and 1 deletions
@@ -49,6 +49,9 @@
if(breath)
var/pressure = breath.return_pressure()
var/total_moles = breath.total_moles()
if (total_moles == 0)
return
#define PP_MOLES(X) ((X / total_moles) * pressure)
#define PP(air, gas) PP_MOLES(air.get_moles(gas))
var/gas_breathed = PP(breath,GAS_H2O)
+1 -1
View File
@@ -158,7 +158,7 @@
/mob/living/simple_animal/hostile/fatten/CanAttack(atom/the_target)
var/mob/living/carbon/target = the_target
if(!istype(the_target)|| !check_target_prefs(target))
if(!istype(target)|| !check_target_prefs(target))
return FALSE
return ..()