mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Merge pull request #11297 from Fox-McCloud/update-gas-overlay
Updates and Fixes Gas Overlays and Icy Floor Change
This commit is contained in:
@@ -66,8 +66,6 @@
|
||||
|
||||
air.temperature = temperature
|
||||
|
||||
update_visuals()
|
||||
|
||||
/turf/simulated/Destroy()
|
||||
visibilityChanged()
|
||||
QDEL_NULL(active_hotspot)
|
||||
@@ -209,6 +207,8 @@
|
||||
|
||||
air.react()
|
||||
|
||||
update_visuals()
|
||||
|
||||
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
hotspot_expose(air.temperature, CELL_VOLUME)
|
||||
for(var/atom/movable/item in src)
|
||||
@@ -219,13 +219,6 @@
|
||||
if(consider_superconductivity(starting = 1))
|
||||
remove = 0
|
||||
|
||||
if(air.temperature < T0C && air.return_pressure() > 10)
|
||||
icy = 1
|
||||
else if(air.temperature > T0C)
|
||||
icy = 0
|
||||
|
||||
update_visuals()
|
||||
|
||||
if(!excited_group && remove == 1)
|
||||
SSair.remove_from_active(src)
|
||||
|
||||
@@ -237,27 +230,19 @@
|
||||
archived_cycle = SSair.times_fired
|
||||
|
||||
/turf/simulated/proc/update_visuals()
|
||||
if(icy && !icyoverlay)
|
||||
overlays |= icemaster
|
||||
icyoverlay = icemaster
|
||||
else if(icyoverlay && !icy)
|
||||
icyoverlay = null
|
||||
overlays -= icemaster
|
||||
|
||||
var/new_overlay_type = tile_graphic()
|
||||
if(new_overlay_type == atmos_overlay_type)
|
||||
return
|
||||
var/atmos_overlay = get_atmos_overlay_by_name(atmos_overlay_type)
|
||||
if(atmos_overlay)
|
||||
overlays -= atmos_overlay
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
vis_contents -= atmos_overlay
|
||||
|
||||
atmos_overlay = get_atmos_overlay_by_name(new_overlay_type)
|
||||
if(atmos_overlay)
|
||||
overlays += atmos_overlay
|
||||
vis_contents += atmos_overlay
|
||||
atmos_overlay_type = new_overlay_type
|
||||
|
||||
/turf/simulated/proc/get_atmos_overlay_by_name(var/name)
|
||||
/turf/simulated/proc/get_atmos_overlay_by_name(name)
|
||||
switch(name)
|
||||
if("plasma")
|
||||
return plmaster
|
||||
@@ -266,13 +251,13 @@
|
||||
return null
|
||||
|
||||
/turf/simulated/proc/tile_graphic()
|
||||
if(!air)
|
||||
return
|
||||
if(air.toxins > MOLES_PLASMA_VISIBLE)
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
return "plasma"
|
||||
|
||||
var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in air.trace_gases
|
||||
if(sleeping_agent && (sleeping_agent.moles > 1))
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
return "sleeping_agent"
|
||||
return null
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
var/global/obj/effect/overlay/plmaster = null
|
||||
var/global/obj/effect/overlay/slmaster = null
|
||||
var/global/obj/effect/overlay/icemaster = null
|
||||
|
||||
// Event Manager, the manager for events.
|
||||
var/datum/event_manager/event_manager = new()
|
||||
|
||||
@@ -362,20 +362,18 @@ SUBSYSTEM_DEF(air)
|
||||
plmaster = new /obj/effect/overlay()
|
||||
plmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
plmaster.icon_state = "plasma"
|
||||
plmaster.layer = FLY_LAYER
|
||||
plmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
plmaster.anchored = TRUE // should only appear in vis_contents, but to be safe
|
||||
plmaster.layer = FLY_LAYER
|
||||
plmaster.appearance_flags = TILE_BOUND
|
||||
|
||||
slmaster = new /obj/effect/overlay()
|
||||
slmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
slmaster.icon_state = "sleeping_agent"
|
||||
slmaster.layer = FLY_LAYER
|
||||
slmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
icemaster = new /obj/effect/overlay()
|
||||
icemaster.icon = 'icons/turf/overlays.dmi'
|
||||
icemaster.icon_state = "snowfloor"
|
||||
icemaster.layer = TURF_LAYER + 0.1
|
||||
icemaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
slmaster.anchored = TRUE // should only appear in vis_contents, but to be safe
|
||||
slmaster.layer = FLY_LAYER
|
||||
slmaster.appearance_flags = TILE_BOUND
|
||||
|
||||
#undef SSAIR_PIPENETS
|
||||
#undef SSAIR_ATMOSMACHINERY
|
||||
@@ -383,4 +381,4 @@ SUBSYSTEM_DEF(air)
|
||||
#undef SSAIR_EXCITEDGROUPS
|
||||
#undef SSAIR_HIGHPRESSURE
|
||||
#undef SSAIR_HOTSPOTS
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
@@ -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("<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("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)
|
||||
. = ..()
|
||||
|
||||
@@ -91,8 +91,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
return
|
||||
|
||||
/turf/simulated/floor/proc/update_icon()
|
||||
if(air)
|
||||
update_visuals()
|
||||
update_visuals()
|
||||
overlays -= current_overlay
|
||||
if(current_overlay)
|
||||
overlays.Add(current_overlay)
|
||||
|
||||
@@ -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))
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 4.1 KiB |
Reference in New Issue
Block a user