Fix welders using fuel when clicking on tiles (#65762)

Fixes #49664

Welders now conserve fuel when you accidentally click on tiles.
This commit is contained in:
Tim
2022-03-30 07:29:36 -05:00
committed by GitHub
parent 04816c3ed6
commit d2e76e82e5
+5 -7
View File
@@ -136,14 +136,12 @@
if(!proximity)
return
if(isOn())
if(isOn() && !QDELETED(attacked_atom) && isliving(attacked_atom)) // can't ignite something that doesn't exist
handle_fuel_and_temps(1, user)
if(!QDELETED(attacked_atom) && isliving(attacked_atom)) // can't ignite something that doesn't exist
var/mob/living/attacked_mob = attacked_atom
if(attacked_mob.IgniteMob())
message_admins("[ADMIN_LOOKUPFLW(user)] set [key_name_admin(attacked_mob)] on fire with [src] at [AREACOORD(user)]")
log_game("[key_name(user)] set [key_name(attacked_mob)] on fire with [src] at [AREACOORD(user)]")
var/mob/living/attacked_mob = attacked_atom
if(attacked_mob.IgniteMob())
message_admins("[ADMIN_LOOKUPFLW(user)] set [key_name_admin(attacked_mob)] on fire with [src] at [AREACOORD(user)]")
log_game("[key_name(user)] set [key_name(attacked_mob)] on fire with [src] at [AREACOORD(user)]")
if(!status && attacked_atom.is_refillable())
reagents.trans_to(attacked_atom, reagents.total_volume, transfered_by = user)