Merge pull request #7734 from deathride58/fancylightingwave2
Fancy lighting wave 2 - nonbinary colored lighting now applies to gun/helmet flashlights, borgs, bots, welders, and more
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
desc = "It's used to monitor rooms."
|
||||
icon = 'icons/obj/machines/camera.dmi'
|
||||
icon_state = "camera"
|
||||
light_color = "#CDDDFF"
|
||||
use_power = ACTIVE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 10
|
||||
@@ -396,7 +397,7 @@
|
||||
if(cam == src)
|
||||
return
|
||||
if(on)
|
||||
set_light(AI_CAMERA_LUMINOSITY)
|
||||
set_light(AI_CAMERA_LUMINOSITY, 0.8)
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/Initialize(mapload)
|
||||
. = ..()
|
||||
set_light(1)
|
||||
set_light(2, 0.8, "#22FFAA")
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/ex_act()
|
||||
return
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
//src.damtype = "fire"
|
||||
if(show_message)
|
||||
usr.visible_message(show_message)
|
||||
set_light(CANDLE_LUMINOSITY)
|
||||
set_light(CANDLE_LUMINOSITY, 0.8)
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -542,7 +542,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
damtype = "fire"
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
attack_verb = list("burnt", "singed")
|
||||
set_light(1)
|
||||
set_light(2, 0.6, LIGHT_COLOR_FIRE)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
hitsound = "swing_hit"
|
||||
|
||||
@@ -49,6 +49,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/scanmode = PDA_SCANNER_NONE
|
||||
var/fon = FALSE //Is the flashlight function on?
|
||||
var/f_lum = 2.3 //Luminosity for the flashlight function
|
||||
var/f_pow = 0.6 //Power for the flashlight function
|
||||
var/f_col = "#FFCC66" //Color for the flashlight function
|
||||
var/silent = FALSE //To beep or not to beep, that is the question
|
||||
var/toff = FALSE //If TRUE, messenger disabled
|
||||
var/tnote = null //Current Texts
|
||||
@@ -102,7 +104,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
/obj/item/pda/Initialize()
|
||||
. = ..()
|
||||
if(fon)
|
||||
set_light(f_lum)
|
||||
set_light(f_lum, f_pow, f_col)
|
||||
|
||||
GLOB.PDAs += src
|
||||
if(default_cartridge)
|
||||
@@ -739,7 +741,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
set_light(0)
|
||||
else if(f_lum)
|
||||
fon = TRUE
|
||||
set_light(f_lum)
|
||||
set_light(f_lum, f_pow, f_col)
|
||||
update_icon()
|
||||
|
||||
/obj/item/pda/proc/remove_pen()
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
explode()
|
||||
switched_on(user)
|
||||
if(welding)
|
||||
set_light(light_intensity)
|
||||
set_light(light_intensity, 0.75, LIGHT_COLOR_FIRE)
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
icon_state = "hardhat0_yellow"
|
||||
item_state = "hardhat0_yellow"
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
light_color = "#FFCC66"
|
||||
var/power_on = 0.8
|
||||
var/on = FALSE
|
||||
item_color = "yellow" //Determines used sprites: hardhat[on]_[item_color] and hardhat[on]_[item_color]2 (lying down sprite)
|
||||
armor = list("melee" = 15, "bullet" = 5, "laser" = 20,"energy" = 10, "bomb" = 20, "bio" = 10, "rad" = 20, "fire" = 100, "acid" = 50)
|
||||
@@ -29,7 +31,7 @@
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/clothing/head/hardhat/proc/turn_on(mob/user)
|
||||
set_light(brightness_on)
|
||||
set_light(brightness_on, power_on)
|
||||
|
||||
/obj/item/clothing/head/hardhat/proc/turn_off(mob/user)
|
||||
set_light(0)
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
/obj/item/clothing/head/helmet/proc/update_helmlight(mob/user = null)
|
||||
if(F)
|
||||
if(F.on)
|
||||
set_light(F.brightness_on)
|
||||
set_light(F.brightness_on, F.flashlight_power, F.light_color)
|
||||
else
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
user.update_inv_head() //So the mob overlay updates
|
||||
|
||||
if(on)
|
||||
set_light(brightness_on)
|
||||
set_light(brightness_on, 0.8, "#FFCC66")
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
circuit = /obj/item/circuitboard/machine/microwave
|
||||
pass_flags = PASSTABLE
|
||||
light_color = LIGHT_COLOR_YELLOW
|
||||
light_power = 3
|
||||
light_power = 0.9
|
||||
var/operating = FALSE // Is it on?
|
||||
var/dirty = 0 // = {0..100} Does it need cleaning?
|
||||
var/broken = 0 // ={0,1,2} How broken is it???
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
|
||||
var/lamp_max = 10 //Maximum brightness of a borg lamp. Set as a var for easy adjusting.
|
||||
var/lamp_intensity = 0 //Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power.
|
||||
light_color = "#FFCC66"
|
||||
light_power = 0.8
|
||||
var/lamp_cooldown = 0 //Flag for if the lamp is on cooldown after being forcibly disabled.
|
||||
|
||||
var/sight_mode = 0
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
gender = NEUTER
|
||||
mob_biotypes = list(MOB_ROBOTIC)
|
||||
light_range = 3
|
||||
light_power = 0.9
|
||||
light_color = "#CDDDFF"
|
||||
stop_automated_movement = 1
|
||||
wander = 0
|
||||
healable = 0
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
/obj/item/gun/proc/update_gunlight(mob/user = null)
|
||||
if(gun_light)
|
||||
if(gun_light.on)
|
||||
set_light(gun_light.brightness_on)
|
||||
set_light(gun_light.brightness_on, gun_light.flashlight_power, gun_light.light_color)
|
||||
else
|
||||
set_light(0)
|
||||
cut_overlays(flashlight_overlay, TRUE)
|
||||
|
||||
Reference in New Issue
Block a user