Skip to content

Commit

Permalink
[MIRROR] Revert "Merge pull request Baystation12#34315 from CrimsonSh…
Browse files Browse the repository at this point in the history
…rike/Mistborn"
  • Loading branch information
MuckerMayhem authored and SierraHelper committed Nov 19, 2023
1 parent 5c830c6 commit c95d110
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 137 deletions.
2 changes: 0 additions & 2 deletions code/__defines/__renderer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@

#define HEAT_EFFECT_PLANE -4
#define HEAT_EFFECT_TARGET "*heat"
#define COLD_EFFECT_TARGET "*cold"
#define COLD_EFFECT_BACK_TARGET "*coldb"
#define HEAT_COMPOSITE_TARGET "*heatc"
#define WARP_EFFECT_PLANE -3

Expand Down
12 changes: 1 addition & 11 deletions code/__defines/_renderer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ GLOBAL_LIST_EMPTY(zmimic_renderers)
group = RENDER_GROUP_FINAL
plane = RENDER_GROUP_SCENE


/// Render group for stuff OUTSIDE the typical game context - UI, full screen effects, etc.
/atom/movable/renderer/screen_group
name = "Screen Group"
Expand Down Expand Up @@ -278,7 +279,6 @@ GLOBAL_LIST_EMPTY(zmimic_renderers)
mouse_opacity = MOUSE_OPACITY_UNCLICKABLE

var/obj/gas_heat_object = null
var/obj/gas_cold_object = null // Not strictly a heat effect but similar setup so may as well

/atom/movable/renderer/heat/proc/Setup()
var/mob/M = owner
Expand All @@ -289,27 +289,17 @@ GLOBAL_LIST_EMPTY(zmimic_renderers)
if(gas_heat_object)
vis_contents -= gas_heat_object

if(gas_cold_object)
vis_contents -= gas_cold_object

if (quality == GLOB.PREF_LOW)
QDEL_NULL(gas_heat_object)
gas_heat_object = new /obj/heat(null)

QDEL_NULL(gas_cold_object)
gas_cold_object = new /obj/effect/cold_mist_gas(null)
else
QDEL_NULL(gas_heat_object)
QDEL_NULL(gas_cold_object)
gas_cold_object = new /obj/particle_emitter/mist/gas(null)
if (quality == GLOB.PREF_MED)
gas_heat_object = new /obj/particle_emitter/heat(null)
else if (quality == GLOB.PREF_HIGH)
gas_heat_object = new /obj/particle_emitter/heat/high(null)

vis_contents += gas_heat_object
if(config.enable_cold_mist)
vis_contents += gas_cold_object


/atom/movable/renderer/heat/Initialize()
Expand Down
4 changes: 0 additions & 4 deletions code/__defines/atmos.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@
#define CARBON_LIFEFORM_FIRE_RESISTANCE (T0C + 200)
#define CARBON_LIFEFORM_FIRE_DAMAGE 4

#define FOGGING_TEMPERATURE (T0C + 5)
#define MAX_FOG_TEMPERATURE (T0C - 50)

// Phoron fire properties.
#define PHORON_MINIMUM_BURN_TEMPERATURE (T0C + 126) //400 K - autoignite temperature in tanks and canisters - enclosed environments I guess
#define PHORON_FLASHPOINT (T0C + 246) //519 K - autoignite temperature in air if that ever gets implemented.
Expand Down Expand Up @@ -129,4 +126,3 @@
#define GAS_PHORON "phoron"
#define GAS_BORON "boron"
#define GAS_HEAT "heat" //Not a real gas, used for visual effects
#define GAS_COLD "cold" //Not a real gas, used for visual effects
6 changes: 6 additions & 0 deletions code/controllers/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,15 @@

var/static/deletion_starts_paused = TRUE

<<<<<<< ours
// [SIERRA-ADD]
var/static/shutdown_on_reboot = FALSE
// [/SIERRA-ADD]

var/static/enable_cold_mist = FALSE

=======
>>>>>>> theirs

/datum/configuration/New()
load_config()
Expand Down Expand Up @@ -851,6 +854,7 @@
warn_if_staff_same_ip = TRUE
if ("deletion_starts_paused")
deletion_starts_paused = TRUE
<<<<<<< ours
// [SIERRA-ADD]
if ("shutdown_on_reboot")
shutdown_on_reboot = TRUE
Expand All @@ -865,6 +869,8 @@
// [/SIERRA-ADD]
if ("enable_cold_mist")
enable_cold_mist = TRUE
=======
>>>>>>> theirs
else
log_misc("Unknown setting in config/config.txt: '[name]'")

Expand Down
30 changes: 0 additions & 30 deletions code/game/objects/effects/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,33 +139,3 @@
pixel_x = -176
pixel_y = -176
z_flags = ZMM_IGNORE

/obj/effect/cold_mist
icon = 'icons/effects/tile_effects.dmi'
icon_state = "frontfog"
layer = FIRE_LAYER
alpha = 170

/obj/effect/cold_mist/Initialize()
. = ..()
AddOverlays(image(icon = 'icons/effects/tile_effects.dmi', icon_state = "backfog", layer = BELOW_OBJ_LAYER))

//Handling it as an overlay is not layering properly with render targets
/obj/effect/cold_mist_gas_back
icon = 'icons/effects/tile_effects.dmi'
icon_state = "backfog"
layer = BELOW_OBJ_LAYER
render_target = COLD_EFFECT_BACK_TARGET

/obj/effect/cold_mist_gas
icon = 'icons/effects/tile_effects.dmi'
icon_state = "frontfog"
render_target = COLD_EFFECT_TARGET
layer = FIRE_LAYER
appearance_flags = DEFAULT_APPEARANCE_FLAGS | KEEP_TOGETHER
var/obj/effect/cold_mist_gas_back/b = null

/obj/effect/cold_mist_gas/Initialize()
. = ..()
b = new()
vis_contents += b
50 changes: 0 additions & 50 deletions code/game/objects/effects/particles/particles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,6 @@
color = "white"


/particles/mist
name = "mist"
icon = 'icons/effects/particles.dmi'
icon_state = list("steam_1" = 1, "steam_2" = 1, "steam_3" = 1)
count = 500
spawning = 4
lifespan = 5 SECONDS
fade = 1 SECOND
fadein = 1 SECOND
velocity = generator("box", list(-0.5, -0.25, 0), list(0.5, 0.25, 0), NORMAL_RAND)
position = generator("box", list(-20, -16), list(20, -2), UNIFORM_RAND)
friction = 0.2
grow = 0.0015


/particles/mist/back
name = "mist_back"
spawning = 7
position = generator("box", list(-20, -1), list(20, 20), UNIFORM_RAND)
lifespan = 6 SECONDS
fadein = 1.5 SECONDS

/particles/fire_sparks
name = "fire sparks"
width = 500
Expand Down Expand Up @@ -355,31 +333,3 @@

/obj/particle_emitter/heat/high
particle_type = "high heat"


/obj/particle_emitter/mist
particle_type = "mist"
layer = FIRE_LAYER

/obj/particle_emitter/mist/back
particle_type = "mist_back"
layer = BELOW_OBJ_LAYER


/obj/particle_emitter/mist/back/gas
render_target = COLD_EFFECT_BACK_TARGET

/obj/particle_emitter/mist/back/gas/Initialize(mapload, time, _color)
. = ..()
filters += filter(type="alpha", render_source = COLD_EFFECT_TARGET, flags = MASK_INVERSE)


//for cold gas effect
/obj/particle_emitter/mist/gas
render_target = COLD_EFFECT_TARGET
var/obj/particle_emitter/mist/back/b = /obj/particle_emitter/mist/back/gas

/obj/particle_emitter/mist/gas/Initialize(mapload, time, _color)
. = ..()
b = new b(null)
vis_contents += b
19 changes: 0 additions & 19 deletions code/modules/xgm/xgm_gas_data.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,3 @@ var/global/datum/xgm_gas_data/gas_data
. = ..()
icon = null
icon_state = null

/obj/effect/gas_cold_back
render_source = COLD_EFFECT_BACK_TARGET
plane = DEFAULT_PLANE
layer = BELOW_OBJ_LAYER

/obj/gas_overlay/cold
name = "gas"
desc = "You shouldn't be clicking this."
gas_id = GAS_COLD
render_source = COLD_EFFECT_TARGET
var/obj/effect/gas_cold_back/b = null

/obj/gas_overlay/cold/Initialize(mapload, gas)
. = ..()
icon = null
icon_state = null
b = new()
vis_contents += b
26 changes: 5 additions & 21 deletions code/modules/xgm/xgm_gas_mixture.dm
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@
for(var/obj/gas_overlay/O in graphic)
if(istype(O, /obj/gas_overlay/heat))
continue
if(istype(O, /obj/gas_overlay/cold))
continue
if(gas[O.gas_id] <= gas_data.overlay_limit[O.gas_id])
LAZYADD(graphic_remove, O)
for(var/g in gas_data.overlay_limit)
Expand All @@ -361,20 +359,13 @@
LAZYADD(graphic_add, tile_overlay)
. = 0

var/heat_overlay = get_tile_overlay(GAS_HEAT)
var/tile_overlay = get_tile_overlay(GAS_HEAT)
//If it's hot add something
if(temperature >= CARBON_LIFEFORM_FIRE_RESISTANCE)
if(!(heat_overlay in graphic))
LAZYADD(graphic_add, heat_overlay)
else if (heat_overlay in graphic)
LAZYADD(graphic_remove, heat_overlay)

var/cold_overlay = get_tile_overlay(GAS_COLD)
if(temperature <= FOGGING_TEMPERATURE && (return_pressure() >= (ONE_ATMOSPHERE / 4)))
if(!(cold_overlay in graphic))
LAZYADD(graphic_add, cold_overlay)
else if (cold_overlay in graphic)
LAZYADD(graphic_remove, cold_overlay)
if(!(tile_overlay in graphic))
LAZYADD(graphic_add, tile_overlay)
else if (tile_overlay in graphic)
LAZYADD(graphic_remove, tile_overlay)

//Apply changes
if(graphic_add && length(graphic_add))
Expand All @@ -391,11 +382,6 @@
if(new_alpha != O.alpha)
O.update_alpha_animation(new_alpha)
continue
if(istype(O, /obj/gas_overlay/cold))
var/new_alpha = clamp(max(125, 200 * (1 - ((temperature - MAX_FOG_TEMPERATURE) / (FOGGING_TEMPERATURE - MAX_FOG_TEMPERATURE)))), 125, 200)
if(new_alpha != O.alpha)
O.update_alpha_animation(new_alpha)
continue
var/concentration_mod = clamp(gas[O.gas_id] / total_moles, 0.1, 1)
var/new_alpha = min(230, round(pressure_mod * concentration_mod * 180, 5))
if(new_alpha != O.alpha)
Expand All @@ -405,8 +391,6 @@
if(!LAZYACCESS(tile_overlay_cache, gas_id))
if(gas_id == GAS_HEAT) //Not a real gas but functionally same thing
LAZYSET(tile_overlay_cache, gas_id, new/obj/gas_overlay/heat(null, GAS_HEAT))
if(gas_id == GAS_COLD) //Not a real gas but functionally same thing
LAZYSET(tile_overlay_cache, gas_id, new/obj/gas_overlay/cold(null, GAS_COLD))
else
LAZYSET(tile_overlay_cache, gas_id, new/obj/gas_overlay(null, gas_id))
return tile_overlay_cache[gas_id]
Expand Down
Binary file modified icons/effects/particles.dmi
Binary file not shown.
Binary file modified icons/effects/tile_effects.dmi
Binary file not shown.

0 comments on commit c95d110

Please sign in to comment.