mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-24 17:22:23 +00:00
* thermite now melts different walls for different times, using its reagent volume * Update code/game/turfs/simulated/walls.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * review fixes --------- Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
123 lines
3.7 KiB
Plaintext
123 lines
3.7 KiB
Plaintext
#define WATER_WEAKEN_TIME 4 SECONDS //Weaken time for slipping on water
|
|
/turf/simulated
|
|
name = "station"
|
|
var/wet = 0
|
|
var/image/wet_overlay = null
|
|
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/break_tile()
|
|
return
|
|
|
|
/turf/simulated/proc/burn_tile()
|
|
return
|
|
|
|
/turf/simulated/cleaning_act(mob/user, atom/cleaner, cleanspeed = 50, text_verb = "clean", text_description = " with [cleaner].", text_targetname = name)
|
|
if(!..())
|
|
return
|
|
|
|
if(!cleaner.can_clean())
|
|
return
|
|
|
|
clean_blood()
|
|
for(var/obj/effect/O in src)
|
|
if(O.is_cleanable())
|
|
qdel(O)
|
|
|
|
/turf/simulated/water_act(volume, temperature, source)
|
|
. = ..()
|
|
|
|
if(volume >= 3)
|
|
MakeSlippery()
|
|
|
|
var/hotspot = (locate(/obj/effect/hotspot) in src)
|
|
if(hotspot)
|
|
var/datum/gas_mixture/lowertemp = remove_air(air.total_moles())
|
|
lowertemp.temperature = max(min(lowertemp.temperature-2000,lowertemp.temperature / 2), 0)
|
|
lowertemp.react()
|
|
assume_air(lowertemp)
|
|
qdel(hotspot)
|
|
|
|
/*
|
|
* Makes a turf slippery using the given parameters
|
|
* @param wet_setting The type of slipperyness used
|
|
* @param time Time the turf is slippery. If null it will pick a random time between 790 and 820 ticks. If INFINITY then it won't dry up ever
|
|
*/
|
|
/turf/simulated/proc/MakeSlippery(wet_setting = TURF_WET_WATER, time = null) // 1 = Water, 2 = Lube, 3 = Ice, 4 = Permafrost
|
|
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))
|
|
if(wet_setting >= TURF_WET_ICE)
|
|
wet_overlay = image('icons/effects/water.dmi', src, "ice_floor")
|
|
else
|
|
wet_overlay = image('icons/effects/water.dmi', src, "wet_floor_static")
|
|
else
|
|
if(wet_setting >= TURF_WET_ICE)
|
|
wet_overlay = image('icons/effects/water.dmi', src, "ice_floor")
|
|
else
|
|
wet_overlay = image('icons/effects/water.dmi', src, "wet_static")
|
|
wet_overlay.plane = FLOOR_OVERLAY_PLANE
|
|
overlays += wet_overlay
|
|
if(time == INFINITY)
|
|
return
|
|
if(!time)
|
|
time = rand(790, 820)
|
|
addtimer(CALLBACK(src, PROC_REF(MakeDry), wet_setting), time)
|
|
|
|
/turf/simulated/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, ignoreRest = 0)
|
|
..()
|
|
if(!ignoreRest)
|
|
if(ishuman(A))
|
|
var/mob/living/carbon/human/M = A
|
|
if(IS_HORIZONTAL(M))
|
|
return 1
|
|
|
|
if(M.flying)
|
|
return ..()
|
|
|
|
switch(src.wet)
|
|
if(TURF_WET_WATER)
|
|
if(!(M.slip("the wet floor", WATER_WEAKEN_TIME, tilesSlipped = 0, walkSafely = 1)))
|
|
M.inertia_dir = 0
|
|
return
|
|
|
|
if(TURF_WET_LUBE) //lube
|
|
M.slip("the floor", 10 SECONDS, tilesSlipped = 3, walkSafely = 0, slipAny = 1)
|
|
|
|
|
|
if(TURF_WET_ICE) // Ice
|
|
if(M.slip("the icy floor", 8 SECONDS, tilesSlipped = 0, walkSafely = 0))
|
|
M.inertia_dir = 0
|
|
if(prob(5))
|
|
var/obj/item/organ/external/affected = M.get_organ("head")
|
|
if(affected)
|
|
M.apply_damage(5, BRUTE, "head")
|
|
M.visible_message("<span class='warning'><b>[M]</b> hits their head on the ice!</span>")
|
|
playsound(src, 'sound/weapons/genhit1.ogg', 50, 1)
|
|
|
|
if(TURF_WET_PERMAFROST) // Permafrost
|
|
M.slip("the frosted floor", 10 SECONDS, tilesSlipped = 1, walkSafely = 0, slipAny = 1)
|
|
|
|
/turf/simulated/ChangeTurf(path, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE, copy_existing_baseturf = TRUE)
|
|
. = ..()
|
|
QUEUE_SMOOTH_NEIGHBORS(src)
|
|
|
|
/turf/simulated/proc/is_shielded()
|
|
|
|
#undef WATER_WEAKEN_TIME
|