mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-26 18:13:35 +00:00
[MIRROR] adds custom light option for robots (#9338)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4d91a0fe19
commit
afa20d1479
@@ -379,7 +379,7 @@
|
||||
|
||||
/mob/living/silicon/robot/handle_light()
|
||||
if(lights_on)
|
||||
set_light(integrated_light_power, 1, "#FFFFFF")
|
||||
set_light(integrated_light_power, 1, robot_light_col)
|
||||
return TRUE
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
|
||||
|
||||
var/lights_on = 0 // Is our integrated light on?
|
||||
var/robot_light_col = "#FFFFFF"
|
||||
var/used_power_this_tick = 0
|
||||
var/sight_mode = 0
|
||||
var/custom_name = ""
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
data["max_charge"] = R.cell?.maxcharge
|
||||
data["health"] = R.health
|
||||
data["max_health"] = R.getMaxHealth()
|
||||
data["light_color"] = R.robot_light_col
|
||||
|
||||
data["weapon_lock"] = R.weapon_lock
|
||||
|
||||
@@ -111,6 +112,11 @@
|
||||
var/mob/living/silicon/robot/R = host
|
||||
|
||||
switch(action)
|
||||
if("set_light_col")
|
||||
var/new_color = params["value"]
|
||||
if(findtext(new_color, GLOB.is_color))
|
||||
R.robot_light_col = new_color
|
||||
. = TRUE
|
||||
if("select_module")
|
||||
R.pick_module()
|
||||
. = TRUE
|
||||
|
||||
Reference in New Issue
Block a user