Fix fire exploit being extinguished by pAIs, borgs, and simple animals (#60852)

* Fix fire being extinguished by pAIs, borgs, and simple animals

* Add trait TRAIT_NOFIRE_SPREAD

* Add NOFIRE_SPREAD traits to simple and silicon mob types

* Refactor spreadFire proc to use check TRAIT_NOFIRE_SPREAD
This commit is contained in:
Tim
2021-08-19 18:33:43 -05:00
committed by GitHub
parent fe3a1e8688
commit e10d0a02fe
4 changed files with 7 additions and 0 deletions
+1
View File
@@ -199,6 +199,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_PIERCEIMMUNE "pierce_immunity"
#define TRAIT_NODISMEMBER "dismember_immunity"
#define TRAIT_NOFIRE "nonflammable"
#define TRAIT_NOFIRE_SPREAD "no_fire_spreading"
#define TRAIT_NOGUNS "no_guns"
#define TRAIT_NOHUNGER "no_hunger"
#define TRAIT_NOMETABOLISM "no_metabolism"
+4
View File
@@ -1442,6 +1442,10 @@
if(!istype(L))
return
// can't spread fire to mobs that don't catch on fire
if(HAS_TRAIT(L, TRAIT_NOFIRE_SPREAD) || HAS_TRAIT(src, TRAIT_NOFIRE_SPREAD))
return
if(on_fire)
if(L.on_fire) // If they were also on fire
var/firesplit = (fire_stacks + L.fire_stacks)/2
@@ -59,6 +59,7 @@
add_sensors()
ADD_TRAIT(src, TRAIT_ADVANCEDTOOLUSER, ROUNDSTART_TRAIT)
ADD_TRAIT(src, TRAIT_MARTIAL_ARTS_IMMUNE, ROUNDSTART_TRAIT)
ADD_TRAIT(src, TRAIT_NOFIRE_SPREAD, SPECIES_TRAIT)
/mob/living/silicon/Destroy()
QDEL_NULL(radio)
@@ -178,6 +178,7 @@
AddComponent(/datum/component/personal_crafting)
ADD_TRAIT(src, TRAIT_ADVANCEDTOOLUSER, ROUNDSTART_TRAIT)
ADD_TRAIT(src, TRAIT_CAN_STRIP, ROUNDSTART_TRAIT)
ADD_TRAIT(src, TRAIT_NOFIRE_SPREAD, SPECIES_TRAIT)
if(speak)
speak = string_list(speak)