[MIRROR] Color standardization, vars moved, and signals (#194)

* 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.

* Color standardization, vars moved, and signals

Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
SkyratBot
2020-08-04 12:20:31 +02:00
committed by GitHub
co-authored by Rohesie
parent 2a0db9c922
commit 5fd8cb072e
78 changed files with 355 additions and 281 deletions
@@ -20,12 +20,12 @@
sharpness = SHARP_EDGED
actions_types = list(/datum/action/item_action/toggle_light)
obj_flags = UNIQUE_RENAME
light_on = FALSE
var/list/trophies = list()
var/charged = TRUE
var/charge_time = 15
var/detonation_damage = 50
var/backstab_bonus = 30
var/light_on = FALSE
var/brightness_on = 5
var/wielded = FALSE // track wielded status on item
@@ -148,7 +148,7 @@
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, TRUE)
/obj/item/kinetic_crusher/ui_action_click(mob/user, actiontype)
light_on = !light_on
set_light_on(!light_on)
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
update_brightness(user)
update_icon()
@@ -191,7 +191,7 @@
base_build_path = /obj/machinery/smartfridge/survival_pod
light_range = 5
light_power = 1.2
light_color = "#DDFFD3"
light_color = COLOR_VERY_PALE_LIME_GREEN
max_n_of_items = 10
pixel_y = -4
flags_1 = NODECONSTRUCT_1
+1 -1
View File
@@ -35,8 +35,8 @@
healable = 0
loot = list(/obj/effect/decal/cleanable/robot_debris)
del_on_death = TRUE
light_on = FALSE
var/mode = MINEDRONE_COLLECT
var/light_on = 0
var/obj/item/gun/energy/kinetic_accelerator/minebot/stored_gun
/mob/living/simple_animal/hostile/mining_drone/Initialize()