Coloured lighting & related stuff (#3555)

Makes all light tubes & bulbs have colour according to the light they emit. There are 6 preset colours: RGB CMY. Any other color is possible by simply changing the already present brightness_color variable. This PR makes it so it actually changes the color of the item and wall object too.
    Added two new colour defines used only along with preset coloured lights.
    Coloured lights are only obtainable by random maintenace loot, cargo spawn or trader.
    Added box of randomly mixed light colours and box for every preset light colour.
    Removed two sets of redundant defines.
    Converted light item New() to Initialize() (hopefully correctly).
    Made couple tiny tweaks to the lights code.

EDIT, 7. Oct 2017:

    When you hit light machinery or item with paint, it will change it's brightness_color var, instead of the color var.
    Paint buckets can now paint items and people again.
    You can now wash paint off by spraying yourself with fire extinguisher or otherwise covering yourself in water.

EDIT, 8. Oct 2017:

    Removed one apparently unused global list.
    Converted pain bucket New to Initialize and changed it's pathing style.
    Shower can now wash paint too.
    Fixed paint bucket sprites to be bit more dynamic and fixed the in hand sprite. Also added bucket lid.
This commit is contained in:
TheGreatJorge
2017-10-10 18:46:24 +02:00
committed by Werner
parent a3b0a30890
commit 0aff2d8785
17 changed files with 343 additions and 122 deletions
+2
View File
@@ -73,6 +73,8 @@
#define LIGHT_COLOR_BROWN "#966432" //Clear brown, mostly dim. rgb(150, 100, 50)
#define LIGHT_COLOR_ORANGE "#FA9632" //Mostly pure orange. rgb(250, 150, 50)
#define LIGHT_COLOR_PURPLE "#A97FAA" //Soft purple. rgb(169, 127, 170)
#define LIGHT_COLOR_VIOLET "#B43CB8" //Deep purple. rgb(180, 60, 184)
#define LIGHT_COLOR_SCARLET "#E85656" //Light red. rgb(232, 86, 86)
//These ones aren't a direct colour like the ones above, because nothing would fit
#define LIGHT_COLOR_FIRE "#FAA019" //Warm orange color, leaning strongly towards yellow. rgb(250, 160, 25)
+1 -1
View File
@@ -646,7 +646,7 @@
SearchVar(default_medbay_channels)
SearchVar(rod_recipes)
SearchVar(NO_EMAG_ACT)
SearchVar(cached_icons)
SearchVar(last_chew)
SearchVar(hazard_overlays)
SearchVar(tape_roll_applications)
SearchVar(malftransformermade)
+1
View File
@@ -78,6 +78,7 @@
/obj/item/weapon/circuitboard/mecha/ripley = TRADER_BLACKLIST,
/obj/item/weapon/circuitboard/mecha/phazon = TRADER_BLACKLIST,
/obj/item/weapon/circuitboard/broken = TRADER_BLACKLIST,
/obj/item/weapon/storage/box/lights/colored = TRADER_SUBTYPES_ONLY,
/obj/item/stack/cable_coil = TRADER_SUBTYPES_ONLY,
/obj/item/stack/cable_coil/cyborg = TRADER_BLACKLIST,
/obj/item/stack/cable_coil/random = TRADER_BLACKLIST,
@@ -32,11 +32,6 @@
//
// The explosion cannot insta-kill anyone with 30% or more health.
#define LIGHT_OK 0
#define LIGHT_EMPTY 1
#define LIGHT_BROKEN 2
#define LIGHT_BURNED 3
/obj/item/device/lightreplacer
@@ -257,9 +252,4 @@
if(uses > 0)
return 1
else
return 0
#undef LIGHT_OK
#undef LIGHT_EMPTY
#undef LIGHT_BROKEN
#undef LIGHT_BURNED
return 0
+55 -50
View File
@@ -1,13 +1,11 @@
//NEVER USE THIS IT SUX -PETETHEGOAT
//THE GOAT WAS RIGHT - RKF
var/global/list/cached_icons = list()
/obj/item/weapon/reagent_containers/glass/paint
desc = "It's a paint bucket."
name = "paint bucket"
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
icon_state = "paint_empty"
item_state = "paintcan"
matter = list(DEFAULT_WALL_MATERIAL = 200)
w_class = 3.0
@@ -16,61 +14,68 @@ var/global/list/cached_icons = list()
volume = 60
unacidable = 0
flags = OPENCONTAINER
var/paint_type = "red"
var/paint_reagent = null //name of the reagent responsible for colouring the paint
var/paint_type = null //used for colouring detective technicolor coat and hat
attack(mob/M as mob, mob/user as mob, def_zone)
if(istype(M, /mob/living/))
user.visible_message("<span class='warning'>\The [M] has been splashed with something by [user] to no effect!</span>")
reagents.trans_to_turf(M.loc, 5)
return
/obj/item/weapon/reagent_containers/glass/paint/Initialize()
. = ..()
if(paint_type && lentext(paint_type) > 0)
name = paint_type + " " + name
reagents.add_reagent("water", volume*3/5)
reagents.add_reagent("plasticide", volume/5)
if(paint_reagent)
reagents.add_reagent(paint_reagent, volume/5)
reagents.handle_reactions()
update_icon()
afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity)
return
if(istype(target) && reagents.total_volume > 5)
user.visible_message("<span class='warning'>\The [target] has been splashed with something by [user]!</span>")
reagents.trans_to_turf(target, 5)
return
/obj/item/weapon/reagent_containers/glass/paint/update_icon()
cut_overlays()
if(!is_open_container())
add_overlay("paint_lid")
else if(reagents.total_volume)
var/image/I = image(icon, "paint_full")
I.color = reagents.get_color()
add_overlay(I)
New()
if(paint_type && lentext(paint_type) > 0)
name = paint_type + " " + name
..()
reagents.add_reagent("water", volume*3/5)
reagents.add_reagent("plasticide", volume/5)
if(paint_type == "white") //why don't white crayons exist
reagents.add_reagent("aluminum", volume/5)
else if (paint_type == "black")
reagents.add_reagent("carbon", volume/5)
else
reagents.add_reagent("crayon_dust_[paint_type]", volume/5)
reagents.handle_reactions()
/obj/item/weapon/reagent_containers/glass/paint/on_reagent_change()
update_icon()
red
icon_state = "paint_red"
paint_type = "red"
/obj/item/weapon/reagent_containers/glass/paint/pickup(mob/user)
..()
update_icon()
yellow
icon_state = "paint_yellow"
paint_type = "yellow"
/obj/item/weapon/reagent_containers/glass/paint/dropped(mob/user)
..()
update_icon()
green
icon_state = "paint_green"
paint_type = "green"
/obj/item/weapon/reagent_containers/glass/paint/attack_hand()
..()
update_icon()
blue
icon_state = "paint_blue"
paint_type = "blue"
/obj/item/weapon/reagent_containers/glass/paint/red
paint_reagent = "crayon_dust_red"
paint_type = "red"
purple
icon_state = "paint_violet"
paint_type = "purple"
/obj/item/weapon/reagent_containers/glass/paint/yellow
paint_reagent = "crayon_dust_yellow"
paint_type = "yellow"
black
icon_state = "paint_black"
paint_type = "black"
/obj/item/weapon/reagent_containers/glass/paint/green
paint_reagent = "crayon_dust_green"
paint_type = "green"
white
icon_state = "paint_white"
paint_type = "white"
/obj/item/weapon/reagent_containers/glass/paint/blue
paint_reagent = "crayon_dust_blue"
paint_type = "blue"
/obj/item/weapon/reagent_containers/glass/paint/purple
paint_reagent = "crayon_dust_purple"
paint_type = "purple"
/obj/item/weapon/reagent_containers/glass/paint/black
paint_reagent = "carbon"
paint_type = "black"
/obj/item/weapon/reagent_containers/glass/paint/white
paint_reagent = "aluminum"
paint_type = "white"
@@ -773,6 +773,101 @@
for(var/i = 0; i < 7; i++)
new /obj/item/weapon/light/bulb(src)
/obj/item/weapon/storage/box/lights/coloredmixed
name = "box of colored lights"
icon_state = "lightmixed"
/obj/item/weapon/storage/box/lights/coloredmixed/fill()
..()
var/static/list/tube_colors = list(
/obj/item/weapon/light/tube/colored/red,
/obj/item/weapon/light/tube/colored/green,
/obj/item/weapon/light/tube/colored/blue,
/obj/item/weapon/light/tube/colored/magenta,
/obj/item/weapon/light/tube/colored/yellow,
/obj/item/weapon/light/tube/colored/cyan
)
var/static/list/bulbs_colors = list(
/obj/item/weapon/light/bulb/colored/red,
/obj/item/weapon/light/bulb/colored/green,
/obj/item/weapon/light/bulb/colored/blue,
/obj/item/weapon/light/bulb/colored/magenta,
/obj/item/weapon/light/bulb/colored/yellow,
/obj/item/weapon/light/bulb/colored/cyan
)
for(var/i = 0, i < 14, i++)
var/type = pick(tube_colors)
new type(src)
for(var/i = 0, i < 7, i++)
var/type = pick(bulbs_colors)
new type(src)
/obj/item/weapon/storage/box/lights/colored/red
name = "box of red lights"
icon_state = "lightmixed"
/obj/item/weapon/storage/box/lights/colored/red/fill()
..()
for(var/i = 0, i < 14, i++)
new /obj/item/weapon/light/tube/colored/red(src)
for(var/i = 0, i < 7, i++)
new /obj/item/weapon/light/bulb/colored/red(src)
/obj/item/weapon/storage/box/lights/colored/green
name = "box of green lights"
icon_state = "lightmixed"
/obj/item/weapon/storage/box/lights/colored/green/fill()
..()
for(var/i = 0, i < 14, i++)
new /obj/item/weapon/light/tube/colored/green(src)
for(var/i = 0, i < 7, i++)
new /obj/item/weapon/light/bulb/colored/green(src)
/obj/item/weapon/storage/box/lights/colored/blue
name = "box of blue lights"
icon_state = "lightmixed"
/obj/item/weapon/storage/box/lights/colored/blue/fill()
..()
for(var/i = 0, i < 14, i++)
new /obj/item/weapon/light/tube/colored/blue(src)
for(var/i = 0, i < 7, i++)
new /obj/item/weapon/light/bulb/colored/blue(src)
/obj/item/weapon/storage/box/lights/colored/cyan
name = "box of cyan lights"
icon_state = "lightmixed"
/obj/item/weapon/storage/box/lights/colored/cyan/fill()
..()
for(var/i = 0, i < 14, i++)
new /obj/item/weapon/light/tube/colored/cyan(src)
for(var/i = 0, i < 7, i++)
new /obj/item/weapon/light/bulb/colored/cyan(src)
/obj/item/weapon/storage/box/lights/colored/yellow
name = "box of yellow lights"
icon_state = "lightmixed"
/obj/item/weapon/storage/box/lights/colored/yellow/fill()
..()
for(var/i = 0, i < 14, i++)
new /obj/item/weapon/light/tube/colored/yellow(src)
for(var/i = 0, i < 7, i++)
new /obj/item/weapon/light/bulb/colored/yellow(src)
/obj/item/weapon/storage/box/lights/colored/magenta
name = "box of magenta lights"
icon_state = "lightmixed"
/obj/item/weapon/storage/box/lights/colored/magenta/fill()
..()
for(var/i = 0, i < 14, i++)
new /obj/item/weapon/light/tube/colored/magenta(src)
for(var/i = 0, i < 7, i++)
new /obj/item/weapon/light/bulb/colored/magenta(src)
/obj/item/weapon/storage/box/freezer
name = "portable freezer"
desc = "This nifty shock-resistant device will keep your 'groceries' nice and non-spoiled."
+7
View File
@@ -795,6 +795,13 @@
/obj/item/weapon/storage/box/condimentbottles = 0.2,
/obj/item/weapon/storage/box/mousetraps = 0.3,
/obj/item/weapon/storage/box/lights = 0.5,
/obj/item/weapon/storage/box/lights/coloredmixed = 0.2,
/obj/item/weapon/storage/box/lights/colored/red = 0.1,
/obj/item/weapon/storage/box/lights/colored/green = 0.1,
/obj/item/weapon/storage/box/lights/colored/blue = 0.1,
/obj/item/weapon/storage/box/lights/colored/cyan = 0.1,
/obj/item/weapon/storage/box/lights/colored/yellow = 0.1,
/obj/item/weapon/storage/box/lights/colored/magenta = 0.1,
/obj/item/weapon/contraband/poster = 1.3,
/obj/item/device/magnetic_lock/security = 0.3,
/obj/item/device/magnetic_lock/engineering = 0.3,
@@ -303,6 +303,17 @@
else
O.clean_blood()
if(istype(O, /obj/item/weapon/light))
var/obj/item/weapon/light/L = O
L.brightness_color = initial(L.brightness_color)
L.update()
else if(istype(O, /obj/machinery/light))
var/obj/machinery/light/L = O
L.brightness_color = initial(L.brightness_color)
L.update()
O.color = initial(O.color)
if(isturf(loc))
var/turf/tile = loc
loc.clean_blood()
+11 -1
View File
@@ -543,7 +543,17 @@ var/list/global/random_stock_large = list(
if (prob(50))
new /obj/item/weapon/storage/box/lights/mixed(L)
if (prob(25))
new /obj/item/weapon/storage/box/lights/mixed(L)
new /obj/item/weapon/storage/box/lights/coloredmixed(L)
if (prob(15))
var/type = pick(list(
/obj/item/weapon/storage/box/lights/colored/red,
/obj/item/weapon/storage/box/lights/colored/green,
/obj/item/weapon/storage/box/lights/colored/blue,
/obj/item/weapon/storage/box/lights/colored/cyan,
/obj/item/weapon/storage/box/lights/colored/yellow,
/obj/item/weapon/storage/box/lights/colored/magenta
))
new type(L)
if("aid")
new /obj/random/firstaid(L)
if("flame")
+2
View File
@@ -670,6 +670,8 @@ var/list/worths = list(
/obj/item/target = 15,
/obj/item/inflatable = 30,
/obj/item/roller = 80,
/obj/item/weapon/light/tube/colored = 20,
/obj/item/weapon/light/bulb/colored = 15,
/obj/item/rig_module/grenade_launcher = 1500,
/obj/item/rig_module/mounted/energy_blade = 5000,
/obj/item/rig_module/mounted/thermalldrill = 2500,
+121 -52
View File
@@ -3,12 +3,6 @@
// consists of light fixtures (/obj/machinery/light) and light tube/bulb items (/obj/item/weapon/light)
#define LIGHTING_POWER_FACTOR 40 //20W per unit luminosity
// status values shared between lighting fixtures and items
#define LIGHT_OK 0
#define LIGHT_EMPTY 1
#define LIGHT_BROKEN 2
#define LIGHT_BURNED 3
#define LIGHT_BULB_TEMPERATURE 400 //K - used value for a 60W bulb
/obj/machinery/light_construct
@@ -95,10 +89,10 @@
if(isscrewdriver(W))
if (src.stage == 2)
switch(fixture_type)
if ("tube")
src.icon_state = "tube-empty"
if("tube")
src.icon_state = "tube_empty"
if("bulb")
src.icon_state = "bulb-empty"
src.icon_state = "bulb_empty"
src.stage = 3
user.visible_message("[user.name] closes [src]'s casing.", \
"You close [src]'s casing.", "You hear a noise.")
@@ -108,7 +102,7 @@
if("tube")
newlight = new /obj/machinery/light/built(src.loc)
if ("bulb")
if("bulb")
newlight = new /obj/machinery/light/small/built(src.loc)
newlight.dir = src.dir
@@ -133,7 +127,7 @@
name = "light fixture"
icon = 'icons/obj/lighting.dmi'
var/base_state = "tube" // base description and icon_state
icon_state = "tube1"
icon_state = "tube_empty"
desc = "A lighting fixture."
anchored = 1
layer = 5 // They were appearing under mobs which is a little weird - Ostaf
@@ -154,6 +148,7 @@
var/status = LIGHT_OK // LIGHT_OK, _EMPTY, _BURNED or _BROKEN
var/flickering = 0
var/light_type = /obj/item/weapon/light/tube // the type of light item
var/obj/item/weapon/light/inserted_light = /obj/item/weapon/light/tube
var/fitting = "tube"
var/switchcount = 0 // count of number of times switched on/off
// this is used to calc the probability the light burns out
@@ -171,6 +166,7 @@
brightness_color = LIGHT_COLOR_TUNGSTEN
desc = "A small lighting fixture."
light_type = /obj/item/weapon/light/bulb
inserted_light = /obj/item/weapon/light/bulb
supports_nightmode = FALSE
/obj/machinery/light/small/emergency
@@ -187,6 +183,7 @@
name = "spotlight"
fitting = "large tube"
light_type = /obj/item/weapon/light/tube/large
inserted_light = /obj/item/weapon/light/tube/large
brightness_range = 12
brightness_power = 4
supports_nightmode = FALSE
@@ -223,22 +220,29 @@
return ..()
/obj/machinery/light/update_icon()
cut_overlays()
icon_state = "[base_state]_empty"
switch(status) // set icon_states
if(LIGHT_OK)
icon_state = "[base_state][on]"
var/image/I = image(icon, "[base_state][on]")
I.color = brightness_color
add_overlay(I)
if (supports_nightmode && nightmode && on)
color = "#d2d2d2"
else
color = null
if(LIGHT_EMPTY)
icon_state = "[base_state]-empty"
on = 0
if(LIGHT_BURNED)
icon_state = "[base_state]-burned"
var/image/I = image(icon, "[base_state]_burned")
I.color = brightness_color
add_overlay(I)
on = 0
if(LIGHT_BROKEN)
icon_state = "[base_state]-broken"
var/image/I = image(icon, "[base_state]_broken")
I.color = brightness_color
add_overlay(I)
on = 0
if (!on)
@@ -260,7 +264,10 @@
else if( prob( min(60, switchcount*switchcount*0.01) ) )
if(status == LIGHT_OK && trigger)
status = LIGHT_BURNED
icon_state = "[base_state]-burned"
cut_overlays()
var/image/I = image(icon, "[base_state]_burned")
I.color = brightness_color
add_overlay(I)
on = 0
set_light(0)
else
@@ -345,9 +352,10 @@
brightness_range = L.brightness_range
brightness_power = L.brightness_power
brightness_color = L.brightness_color
inserted_light = L.type
on = has_power()
update()
user.drop_item() //drop the item to update overlays and such
qdel(L)
@@ -497,7 +505,7 @@
user << "You remove the light [fitting]."
// create a light tube/bulb item and put it in the user's hand
var/obj/item/weapon/light/L = new light_type()
var/obj/item/weapon/light/L = new inserted_light()
L.status = status
L.rigged = rigged
L.brightness_range = brightness_range
@@ -513,6 +521,8 @@
user.put_in_active_hand(L) //puts it in our active hand
inserted_light = null
status = LIGHT_EMPTY
update()
@@ -524,7 +534,7 @@
user << "You telekinetically remove the light [fitting]."
// create a light tube/bulb item and put it in the user's hand
var/obj/item/weapon/light/L = new light_type()
var/obj/item/weapon/light/L = new inserted_light()
L.status = status
L.rigged = rigged
L.brightness_range = brightness_range
@@ -539,6 +549,8 @@
L.add_fingerprint(user)
L.loc = loc
inserted_light = null
status = LIGHT_EMPTY
update()
@@ -637,41 +649,90 @@
force = 2
throwforce = 5
w_class = 1
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched
matter = list(DEFAULT_WALL_MATERIAL = 60)
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/switchcount = 0 // number of times switched
var/rigged = 0 // true if rigged to explode
var/brightness_range = 2 //how much light it gives off
var/brightness_power = 1
var/brightness_color = null
var/brightness_color = LIGHT_COLOR_HALOGEN
var/lighttype = null
var/randomize_range = TRUE
/obj/item/weapon/light/tube
name = "light tube"
desc = "A replacement light tube."
icon_state = "ltube"
base_state = "ltube"
icon_state = "ltube_preset"//preset state for mapping
item_state = "c_tube"
matter = list("glass" = 100)
brightness_range = 8
brightness_power = 0.8
lighttype = "tube"
/obj/item/weapon/light/tube/colored/red
name = "red light tube"
brightness_color = LIGHT_COLOR_SCARLET
/obj/item/weapon/light/tube/colored/green
name = "green light tube"
brightness_color = LIGHT_COLOR_GREEN
/obj/item/weapon/light/tube/colored/blue
name = "blue light tube"
brightness_color = LIGHT_COLOR_BLUE
/obj/item/weapon/light/tube/colored/magenta
name = "magenta light tube"
brightness_color = LIGHT_COLOR_VIOLET
/obj/item/weapon/light/tube/colored/yellow
name = "yellow light tube"
brightness_color = LIGHT_COLOR_YELLOW
/obj/item/weapon/light/tube/colored/cyan
name = "cyan light tube"
brightness_color = LIGHT_COLOR_CYAN
/obj/item/weapon/light/tube/large
w_class = 2
name = "large light tube"
brightness_range = 15
brightness_power = 6
randomize_range = FALSE
/obj/item/weapon/light/bulb
name = "light bulb"
desc = "A replacement light bulb."
icon_state = "lbulb"
base_state = "lbulb"
icon_state = "lbulb_preset"//preset state for mapping
item_state = "contvapour"
matter = list("glass" = 100)
brightness_range = 5
brightness_power = 0.75
brightness_color = "#a0a080"
lighttype = "bulb"
/obj/item/weapon/light/bulb/colored/red
name = "red light bulb"
brightness_color = LIGHT_COLOR_SCARLET
/obj/item/weapon/light/bulb/colored/green
name = "green light bulb"
brightness_color = LIGHT_COLOR_GREEN
/obj/item/weapon/light/bulb/colored/blue
name = "blue light bulb"
brightness_color = LIGHT_COLOR_BLUE
/obj/item/weapon/light/bulb/colored/magenta
name = "magenta light bulb"
brightness_color = LIGHT_COLOR_VIOLET
/obj/item/weapon/light/bulb/colored/yellow
name = "yellow light bulb"
brightness_color = LIGHT_COLOR_YELLOW
/obj/item/weapon/light/bulb/colored/cyan
name = "cyan light bulb"
brightness_color = LIGHT_COLOR_CYAN
/obj/item/weapon/light/throw_impact(atom/hit_atom)
..()
@@ -680,37 +741,45 @@
/obj/item/weapon/light/bulb/fire
name = "fire bulb"
desc = "A replacement fire bulb."
icon_state = "fbulb"
base_state = "fbulb"
icon_state = "flight"
item_state = "egg4"
matter = list("glass" = 100)
brightness_range = 8
brightness_power = 0.8
randomize_range = FALSE
// update the icon state and description of the light
/obj/item/weapon/light/proc/update()
switch(status)
if(LIGHT_OK)
icon_state = base_state
desc = "A replacement [name]."
if(LIGHT_BURNED)
icon_state = "[base_state]-burned"
desc = "A burnt-out [name]."
if(LIGHT_BROKEN)
icon_state = "[base_state]-broken"
desc = "A broken [name]."
/obj/item/weapon/light/New()
..()
switch(name)
if("light tube")
brightness_range = rand(6,9)
if("light bulb")
brightness_range = rand(4,6)
/obj/item/weapon/light/Initialize()
. = ..()
if(randomize_range)
switch(lighttype)
if("tube")
brightness_range = rand(6,9)
if("bulb")
brightness_range = rand(4,6)
update()
// update the icon state and description of the light
/obj/item/weapon/light/proc/update()
cut_overlays()
switch(status)
if(LIGHT_OK)
icon_state = "l[lighttype]_attachment"
var/image/I = image(icon, "l[lighttype]")
I.color = brightness_color
add_overlay(I)
desc = "A replacement [name]."
if(LIGHT_BURNED)
icon_state = "l[lighttype]_attachment"
var/image/I = image(icon, "l[lighttype]_burned")
I.color = brightness_color
add_overlay(I)
desc = "A burnt-out [name]."
if(LIGHT_BROKEN)
icon_state = "l[lighttype]_attachment_broken"
var/image/I = image(icon, "l[lighttype]_broken")
I.color = brightness_color
add_overlay(I)
desc = "A broken [name]."
// attack bulb/tube with object
// if a syringe, can inject phoron to make it explode
@@ -161,6 +161,7 @@
if(!istype(T))
return
T.color = initial(T.color)
var/datum/gas_mixture/environment = T.return_air()
var/min_temperature = T0C + 100 // 100C, the boiling point of water
@@ -182,13 +183,24 @@
T.wet_floor(1)
/datum/reagent/water/touch_obj(var/obj/O)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O
if(!cube.wrapped)
cube.Expand()
if(istype(O))
O.color = initial(O.color)
if(istype(O, /obj/item/weapon/light))
var/obj/item/weapon/light/L = O
L.brightness_color = initial(L.brightness_color)
L.update()
else if(istype(O, /obj/machinery/light))
var/obj/machinery/light/L = O
L.brightness_color = initial(L.brightness_color)
L.update()
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O
if(!cube.wrapped)
cube.Expand()
/datum/reagent/water/touch_mob(var/mob/living/L, var/amount)
if(istype(L))
/datum/reagent/water/touch_mob(var/mob/M, var/amount)
if(istype(M) && isliving(M))
var/mob/living/L = M
var/needed = L.fire_stacks * 10
if(amount > needed)
L.fire_stacks = 0
@@ -198,6 +210,9 @@
L.adjust_fire_stacks(-(amount / 10))
remove_self(amount)
if(istype(M) && !istype(M, /mob/dead))
M.color = initial(M.color)
/datum/reagent/water/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
if(istype(M, /mob/living/carbon/slime))
var/mob/living/carbon/slime/S = M
@@ -64,7 +64,21 @@
T.color = color
/datum/reagent/paint/touch_obj(var/obj/O)
if(istype(O))
//special checks for special items
if(istype(O, /obj/item/weapon/reagent_containers))
return
else if(istype(O, /obj/item/weapon/light))
var/obj/item/weapon/light/L = O
L.brightness_color = color
L.update()
else if(istype(O, /obj/machinery/light))
var/obj/machinery/light/L = O
L.brightness_color = color
L.update()
else if(istype(O, /obj/item/clothing/suit/storage/det_trench/technicolor) || istype(O, /obj/item/clothing/head/det/technicolor))
return
else if(istype(O))
O.color = color
/datum/reagent/paint/touch_mob(var/mob/M)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 33 KiB