From 964bf036975d54426a414d6c0d48fd19574bdbbb Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Sat, 13 Apr 2019 04:44:25 -0400 Subject: [PATCH] icy floors --- code/game/turfs/simulated.dm | 19 ++++++++++++++----- .../chemistry/reagents/pyrotechnic.dm | 6 +++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 51549c1a563..b74ec4107a0 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -35,7 +35,10 @@ else wet_overlay = image('icons/effects/water.dmi', src, "wet_floor_static") else - wet_overlay = image('icons/effects/water.dmi', src, "wet_static") + 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") overlays += wet_overlay spawn(rand(790, 820)) // Purely so for visual effect @@ -74,20 +77,26 @@ switch(src.wet) if(TURF_WET_WATER) - if(!(M.slip("wet floor", 4, 2, tilesSlipped = 0, walkSafely = 1))) + if(!(M.slip("the wet floor", 4, 2, tilesSlipped = 0, walkSafely = 1))) M.inertia_dir = 0 return if(TURF_WET_LUBE) //lube - M.slip("floor", 0, 5, tilesSlipped = 3, walkSafely = 0, slipAny = 1) + M.slip("the floor", 0, 5, tilesSlipped = 3, walkSafely = 0, slipAny = 1) if(TURF_WET_ICE) // Ice - if(!(prob(30) && M.slip("icy floor", 4, 2, tilesSlipped = 1, walkSafely = 1))) + if(M.slip("the icy floor", 4, 2, 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("[M] hits their head on the ice!") + playsound(src, 'sound/weapons/genhit1.ogg', 50, 1) if(TURF_WET_PERMAFROST) // Permafrost - M.slip("icy floor", 0, 5, tilesSlipped = 1, walkSafely = 0, slipAny = 1) + M.slip("the frosted floor", 0, 5, tilesSlipped = 1, walkSafely = 0, slipAny = 1) /turf/simulated/ChangeTurf(var/path) . = ..() diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm index d062de0e761..d611c3c8d86 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm @@ -342,7 +342,11 @@ if(method == TOUCH) M.ExtinguishMob() -/datum/reagent/cryostylane/reaction_turf(turf/T, volume) +/datum/reagent/cryostylane/reaction_turf(turf/simulated/T, volume) + if(!istype(T)) + return + if(volume >= 3) + T.MakeSlippery(TURF_WET_ICE) if(volume >= 5) for(var/mob/living/carbon/slime/M in T) M.adjustToxLoss(rand(15,30))