Merge pull request #32984 from ninjanomnom/thermite-burns

Fixes thermite burning lava
This commit is contained in:
Leo
2017-11-24 18:10:12 -02:00
committed by CitadelStationBot
parent 9f7b3a11c3
commit e9daba0cd3

View File

@@ -3,13 +3,30 @@
var/amount
var/overlay
var/static/list/blacklist = typecacheof(/turf/closed/wall/mineral/diamond)
var/static/list/resistlist = typecacheof(/turf/closed/wall/r_wall)
var/static/list/blacklist = typecacheof(
/turf/open/lava,
/turf/open/space,
/turf/open/water,
/turf/open/chasm,
)
var/static/list/immunelist = typecacheof(
/turf/closed/wall/mineral/diamond,
/turf/closed/indestructible,
/turf/open/indestructible,
)
var/static/list/resistlist = typecacheof(
/turf/closed/wall/r_wall,
)
/datum/component/thermite/Initialize(_amount)
if(!istype(parent, /turf))
return COMPONENT_INCOMPATIBLE
. = COMPONENT_INCOMPATIBLE
CRASH("A thermite component has been applied to an incorrect object. parent: [parent]")
if(blacklist[parent.type])
return COMPONENT_INCOMPATIBLE
if(immunelist[parent.type])
_amount*=0 //Yeah the overlay can still go on it and be cleaned but you arent burning down a diamond wall
if(resistlist[parent.type])
_amount*=0.25