Primitive Colorgrading (#17844)

* extremely basic color grading for areas

* fixes

* tint

* dmm

* colorgrading weather

* did it for the meme

* outdoor transition fix
This commit is contained in:
Will
2025-06-12 11:13:48 -04:00
committed by GitHub
parent 238ae79e6c
commit da577085aa
7 changed files with 60 additions and 5 deletions
+5
View File
@@ -1195,6 +1195,11 @@
return
colors_to_blend += M.client_color
if(!colors_to_blend.len) // Modifiers take priority over passive area blending, to prevent changes on every area entered
var/location_grade = get_location_color_tint() // Area or weather!
if(location_grade)
colors_to_blend += location_grade
if(colors_to_blend.len)
var/final_color
if(colors_to_blend.len == 1) // If it's just one color we can skip all of this work.
+6 -4
View File
@@ -273,14 +273,12 @@ default behaviour is:
handle_footstep(loc)
if(!forced && movetime && !is_incorporeal())
SSmotiontracker?.ping(src) // Incase of before init "turf enter gravity" this is ?, unfortunately.
// Begin VOREstation edit
if(is_shifted)
is_shifted = FALSE
pixel_x = default_pixel_x
pixel_y = default_pixel_y
layer = initial(layer)
plane = initial(plane)
// End VOREstation edit
if(pulling) // we were pulling a thing and didn't lose it during our move.
var/pull_dir = get_dir(src, pulling)
@@ -307,11 +305,9 @@ default behaviour is:
return
else if(lastarea?.get_gravity() == 0)
inertial_drift()
//VOREStation Edit Start
else if(flying)
inertial_drift()
make_floating(1)
//VOREStation Edit End
else if(!isspace(loc))
inertia_dir = 0
make_floating(0)
@@ -319,6 +315,12 @@ default behaviour is:
layer = HIDING_LAYER
plane = OBJ_PLANE
// Update client color if we're moving from an indoor turf to an outdoor one or vice versa. Needed to make weather blending update in mixed indoor/outdoor turfed areas
var/turf/old_turf = oldloc
var/turf/new_turf = loc
if(istype(old_turf) && old_turf.is_outdoors() != new_turf.is_outdoors())
update_client_color()
/mob/living/proc/inertial_drift()
if(x > 1 && x < (world.maxx) && y > 1 && y < (world.maxy))
if(Process_Spacemove(1))
+16 -1
View File
@@ -1235,9 +1235,24 @@
// This is for inheritence since /mob/living will serve most cases. If you need ghosts to use this you'll have to implement that yourself.
/mob/proc/update_client_color()
if(client && client.color)
animate(client, color = null, time = 10)
animate(client, color = get_location_color_tint(), time = 10)
return
/mob/proc/get_location_color_tint()
PROTECTED_PROC(TRUE)
SHOULD_NOT_OVERRIDE(TRUE)
var/turf/T = get_turf(src)
var/area/A = get_area(src)
if(!T || !A)
return null
if(T.is_outdoors()) // check weather
var/datum/planet/P = LAZYACCESS(SSplanets.z_to_planet, T.z)
var/weather_tint = P?.weather_holder.current_weather.get_color_tint()
if(weather_tint) // But not if the weather has no blending!
return weather_tint
// If not weather based then just area's
return A.get_color_tint()
/mob/proc/swap_hand()
return