mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-13 18:33:22 +00:00
81 lines
2.1 KiB
Plaintext
81 lines
2.1 KiB
Plaintext
/turf/simulated
|
|
name = "station"
|
|
var/wet = 0
|
|
var/image/wet_overlay = null
|
|
|
|
var/thermite = 0
|
|
oxygen = MOLES_O2STANDARD
|
|
nitrogen = MOLES_N2STANDARD
|
|
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
|
|
var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to
|
|
|
|
|
|
|
|
/turf/simulated/proc/burn_tile()
|
|
|
|
/turf/simulated/proc/MakeSlippery(wet_setting = TURF_WET_WATER) // 1 = Water, 2 = Lube, 3 = Ice
|
|
if(wet >= wet_setting)
|
|
return
|
|
wet = wet_setting
|
|
if(wet_setting != TURF_DRY)
|
|
if(wet_overlay)
|
|
overlays -= wet_overlay
|
|
wet_overlay = null
|
|
var/turf/simulated/floor/F = src
|
|
if(istype(F))
|
|
wet_overlay = image('icons/effects/water.dmi', src, "wet_floor_static")
|
|
else
|
|
wet_overlay = image('icons/effects/water.dmi', src, "wet_static")
|
|
overlays += wet_overlay
|
|
|
|
spawn(rand(790, 820)) // Purely so for visual effect
|
|
if(!istype(src, /turf/simulated)) //Because turfs don't get deleted, they change, adapt, transform, evolve and deform. they are one and they are all.
|
|
return
|
|
MakeDry(wet_setting)
|
|
|
|
/turf/simulated/proc/MakeDry(wet_setting = TURF_WET_WATER)
|
|
if(wet > wet_setting)
|
|
return
|
|
wet = TURF_DRY
|
|
if(wet_overlay)
|
|
overlays -= wet_overlay
|
|
|
|
/turf/simulated/Entered(atom/A, atom/OL)
|
|
..()
|
|
if (istype(A,/mob/living/carbon))
|
|
var/mob/living/carbon/M = A
|
|
switch(wet)
|
|
if(TURF_WET_WATER)
|
|
if(!M.slip(3, 1, null, NO_SLIP_WHEN_WALKING))
|
|
M.inertia_dir = 0
|
|
return
|
|
if(TURF_WET_LUBE)
|
|
M.slip(0, 7, null, (SLIDE|GALOSHES_DONT_HELP))
|
|
return
|
|
if(TURF_WET_ICE)
|
|
M.slip(0, 4, null, (SLIDE|NO_SLIP_WHEN_WALKING))
|
|
return
|
|
|
|
|
|
/turf/simulated/ChangeTurf(var/path)
|
|
. = ..()
|
|
smooth_icon_neighbors(src)
|
|
|
|
/turf/simulated/proc/is_shielded()
|
|
|
|
/turf/simulated/contents_explosion(severity, target)
|
|
var/affecting_level
|
|
if(severity == 1)
|
|
affecting_level = 1
|
|
else if(is_shielded())
|
|
affecting_level = 3
|
|
else if(intact)
|
|
affecting_level = 2
|
|
else
|
|
affecting_level = 1
|
|
|
|
for(var/V in contents)
|
|
var/atom/A = V
|
|
if(A.level >= affecting_level)
|
|
A.ex_act(severity, target)
|