mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Color standardization, vars moved, and signals (#52574)
Defined all the existing light_color values.
Moved their definitions to colors.dm
Made white the default color. It was so already, but that was very obscured.
Moved the atom light-related variables to the atom definition.
Wrapped changes to variables such as light_color into procs that report the event through signals.
Moved the light_on variable to the atom level, also adding a signal for its changing, to represent toggling lights.
Cleaned up a little bit of code in where new variables were defined before redefinitions.
This is all atomization to reduce changes in #52413
None of this affect gameplay at all, it's all code cleaning and refactoring.
There's more colors to standardize, a search for color = will find lots of targets, and I see little need to have both the LIGHT_COLOR and COLOR patterns, but I don't want to make this PR bigger than it already is.
This commit is contained in:
@@ -160,7 +160,7 @@
|
||||
return 1
|
||||
|
||||
if("PC_toggle_light")
|
||||
light_on = !light_on
|
||||
set_light_on(!light_on)
|
||||
if(light_on)
|
||||
set_light(comp_light_luminosity, 1, comp_light_color)
|
||||
else
|
||||
@@ -178,7 +178,7 @@
|
||||
to_chat(user, "<span class='warning'>That color is too dark! Choose a lighter one.</span>")
|
||||
new_color = null
|
||||
comp_light_color = new_color
|
||||
light_color = new_color
|
||||
set_light_color(new_color)
|
||||
update_light()
|
||||
return TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user