diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm index d8f04b55a00..35926a93285 100644 --- a/code/ZAS/Turf.dm +++ b/code/ZAS/Turf.dm @@ -6,9 +6,9 @@ /turf/simulated/proc/update_graphic(list/graphic_add = null, list/graphic_remove = null) if (LAZYLEN(graphic_add)) - add_overlay(graphic_add.Copy(), TRUE) // We need to copy because SSoverlay will mutate this list & add appearance objects. + vis_contents += graphic_add if(LAZYLEN(graphic_remove)) - cut_overlay(graphic_remove.Copy(), TRUE) + vis_contents -= graphic_remove /turf/proc/update_air_properties() var/block diff --git a/code/defines/gases.dm b/code/defines/gases.dm index 7c20f5e910c..39cc9ada196 100644 --- a/code/defines/gases.dm +++ b/code/defines/gases.dm @@ -31,7 +31,7 @@ //and following a N/Z ratio of 1.5, the molar mass of a monatomic gas is: molar_mass = 0.405 // kg/mol - tile_overlay = "plasma-purple" + tile_overlay = "phoron" overlay_limit = 0.7 flags = XGM_GAS_FUEL | XGM_GAS_CONTAMINANT diff --git a/code/modules/xgm/xgm_gas_data.dm b/code/modules/xgm/xgm_gas_data.dm index 75785bf20fd..9123a272daa 100644 --- a/code/modules/xgm/xgm_gas_data.dm +++ b/code/modules/xgm/xgm_gas_data.dm @@ -9,8 +9,10 @@ var/list/specific_heat = list() //Molar mass of the gas. Used for calculating specific entropy. var/list/molar_mass = list() - //Tile overlays. /images, created from references to 'icons/effects/tile_effects.dmi' + //Tile overlays. /obj/effect/gas_overlay, created from references to 'icons/effects/tile_effects.dmi' var/list/tile_overlay = list() + //Optional color for tile overlay + var/list/tile_overlay_color = list() //Overlay limits. There must be at least this many moles for the overlay to appear. var/list/overlay_limit = list() //Flags. @@ -22,7 +24,8 @@ var/specific_heat = 20 // J/(mol*K) var/molar_mass = 0.032 // kg/mol - var/tile_overlay = null + var/tile_overlay = "generic" + var/tile_color = null var/overlay_limit = null var/flags = 0 @@ -39,8 +42,29 @@ gas_data.name[gas.id] = gas.name gas_data.specific_heat[gas.id] = gas.specific_heat gas_data.molar_mass[gas.id] = gas.molar_mass - if(gas.tile_overlay) gas_data.tile_overlay[gas.id] = image('icons/effects/tile_effects.dmi', gas.tile_overlay, FLY_LAYER) - if(gas.overlay_limit) gas_data.overlay_limit[gas.id] = gas.overlay_limit + if(gas.overlay_limit) + gas_data.overlay_limit[gas.id] = gas.overlay_limit + var/obj/effect/gas_overlay/I = new() + if(gas.tile_overlay) + I.icon_state = gas.tile_overlay + if(gas.tile_color) + gas_data.tile_overlay_color[gas.id] = gas.tile_color + I.color = gas.tile_color + gas_data.tile_overlay[gas.id] = I gas_data.flags[gas.id] = gas.flags return 1 + +/obj/effect/gas_overlay + name = "gas" + desc = "You shouldn't be clicking this." + icon = 'icons/effects/tile_effects.dmi' + icon_state = "generic" + layer = LIGHTING_LAYER - 1 + appearance_flags = RESET_COLOR + mouse_opacity = 0 + +/obj/effect/gas_overlay/Initialize() + . = ..() + animate(src, alpha = 175, time = 10, easing = SINE_EASING | EASE_OUT, loop = -1) + animate(alpha = 255, time = 10, easing = SINE_EASING | EASE_IN, loop = -1) \ No newline at end of file diff --git a/html/changelogs/geeves-gas_overlay.yml b/html/changelogs/geeves-gas_overlay.yml new file mode 100644 index 00000000000..b0099d52808 --- /dev/null +++ b/html/changelogs/geeves-gas_overlay.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Updated the look of some gasses hanging in the air." \ No newline at end of file diff --git a/icons/effects/tile_effects.dmi b/icons/effects/tile_effects.dmi index b08f1ac3dec..dd06df99d70 100644 Binary files a/icons/effects/tile_effects.dmi and b/icons/effects/tile_effects.dmi differ