Adding var/list/atom_colours to /atom .

The var will be used to store the various coloring that happen for the atom so that we can separate paint coloring from color that must be inherent to the atom (an initial color for example), or from certain coloring effect like revenant's blight, mob electrocution's black color, admin edit of the color var, green color from holding the greentext item, etc.
The list has four elements, used for four categories:
ADMIN_COLOUR_PRIORITY for admin varedits and very rate color effect like holding the greentext item (and other effects that should prime over any other potential source of coloring even temporary effects).
TEMPORARY_COLOUR_PRIORITY for short color effects like revenant blight on mob, mob electrocution making you all black for a couple seconds, effects that should be appearing above paint coloring.
WASHABLE_COLOUR_PRIORITY for pretty much all paint coloring like colorful reagent on mobs, coloring turfs with paint, etc.
FIXED_COLOUR_PRIORITY for color inherent to the atom, like a blob's color, any object with a color value given in its definition.

Fixes electocution animation on mob not making the mob all black (with the skeleton overlay blinking over it)
Spray cleaner and soap can now wash paint off mobs, turfs and objects.
This commit is contained in:
phil235
2016-10-19 01:51:30 +02:00
committed by phil235
parent c5e7e0ed2a
commit 240f3a4c49
86 changed files with 326 additions and 209 deletions

View File

@@ -546,3 +546,10 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
#define ATTACK_EFFECT_BITE "bite"
#define ATTACK_EFFECT_MECHFIRE "mech_fire"
#define ATTACK_EFFECT_MECHTOXIN "mech_toxin"
//different types of atom colorations
#define ADMIN_COLOUR_PRIORITY 1 //only used by rare effects like greentext coloring mobs and when admins varedit color
#define TEMPORARY_COLOUR_PRIORITY 2 //e.g. purple effect of the revenant on a mob, black effect when mob electrocuted
#define WASHABLE_COLOUR_PRIORITY 3 //color splashed onto an atom (e.g. paint on turf)
#define FIXED_COLOUR_PRIORITY 4 //color inherent to the atom (e.g. blob color)

View File

@@ -1303,10 +1303,10 @@ proc/pick_closest_path(value)
if(!istype(C))
return
var/old_color = C.color
C.color = flash_color
spawn(0)
animate(C, color = initial(C.color), time = flash_time)
animate(C, color = old_color, time = flash_time)
#define RANDOM_COLOUR (rgb(rand(0,255),rand(0,255),rand(0,255)))

View File

@@ -435,8 +435,70 @@ var/list/blood_splatter_icons = list()
dir = newdir
/atom/on_varedit(modified_var)
..()
if(!Debug2)
admin_spawned = TRUE
switch(modified_var)
if("color")
add_atom_colour(color, ADMIN_COLOUR_PRIORITY)
/atom/proc/mech_melee_attack(obj/mecha/M)
return
/*
Atom Colour Priority System
A System that gives finer control over which atom colour to colour the atom with.
The "highest priority" one is always displayed as opposed to the default of
"whichever was set last is displayed"
*/
/atom
var/list/atom_colours //used to store the different colors on an atom
//its inherent color, the colored paint applied on it, special color effect etc...
/*
Adds an instance of colour_type to the atom's atom_colours list
*/
/atom/proc/add_atom_colour(coloration, colour_priority)
if(!atom_colours)
atom_colours = list("", "", "", "") //four priority levels currently.
if(!coloration)
return
if(colour_priority > atom_colours.len)
return
atom_colours[colour_priority] = coloration
update_atom_colour()
/*
Removes an instance of colour_type from the atom's atom_colours list
*/
/atom/proc/remove_atom_colour(colour_priority)
if(!atom_colours)
atom_colours = list("", "", "", "")
if(colour_priority > atom_colours.len)
return
atom_colours[colour_priority] = ""
update_atom_colour()
/*
Resets the atom's color to null, and then sets it to the highest priority
colour available
*/
/atom/proc/update_atom_colour()
if(!atom_colours)
atom_colours = list("", "", "", "")
color = null
for(var/C in atom_colours)
if(islist(C))
var/list/L = C
if(L.len)
color = L
return
else if(C != "")
color = C
return

View File

@@ -288,6 +288,7 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "vial"
color = "#FF69B4" // HOT PINK
atom_colours = list("", "", "", "#FF69B4")
veil_msg = "<span class='warning'>You sense an adorable presence lurking just beyond the veil...</span>"
objective_verb = "Hug and Tickle"

View File

@@ -20,9 +20,9 @@
/mob/living/simple_animal/hostile/blob/update_icons()
if(overmind)
color = overmind.blob_reagent_datum.color
add_atom_colour(overmind.blob_reagent_datum.color, FIXED_COLOUR_PRIORITY)
else
color = initial(color)
remove_atom_colour(FIXED_COLOUR_PRIORITY)
/mob/living/simple_animal/hostile/blob/Destroy()
if(overmind)
@@ -174,9 +174,9 @@
/mob/living/simple_animal/hostile/blob/blobspore/update_icons()
if(overmind)
color = overmind.blob_reagent_datum.complementary_color
add_atom_colour(overmind.blob_reagent_datum.complementary_color, FIXED_COLOUR_PRIORITY)
else
color = initial(color)
remove_atom_colour(FIXED_COLOUR_PRIORITY)
if(is_zombie)
cut_overlays()
overlays = human_overlays

View File

@@ -1,7 +1,7 @@
/obj/structure/blob/core
name = "blob core"
icon = 'icons/mob/blob.dmi'
icon_state = "blank_blob"
icon_state = "blob"
desc = "A huge, pulsating yellow mass."
obj_integrity = 400
max_integrity = 400
@@ -32,11 +32,7 @@
/obj/structure/blob/core/update_icon()
cut_overlays()
color = null
var/image/I = new('icons/mob/blob.dmi', "blob")
if(overmind)
I.color = overmind.blob_reagent_datum.color
add_overlay(I)
..()
var/image/C = new('icons/mob/blob.dmi', "blob_core_overlay")
add_overlay(C)

View File

@@ -1,7 +1,7 @@
/obj/structure/blob/node
name = "blob node"
icon = 'icons/mob/blob.dmi'
icon_state = "blank_blob"
icon_state = "blob"
desc = "A large, pulsating yellow mass."
obj_integrity = 200
max_integrity = 200
@@ -20,13 +20,9 @@
/obj/structure/blob/node/update_icon()
cut_overlays()
color = null
var/image/I = new('icons/mob/blob.dmi', "blob")
if(overmind)
I.color = overmind.blob_reagent_datum.color
src.add_overlay(I)
..()
var/image/C = new('icons/mob/blob.dmi', "blob_node_overlay")
src.add_overlay(C)
add_overlay(C)
/obj/structure/blob/node/Destroy()
blob_nodes -= src
@@ -35,4 +31,4 @@
/obj/structure/blob/node/Life()
Pulse_Area(overmind, 10, 3, 2)
color = null

View File

@@ -83,9 +83,9 @@
/obj/structure/blob/update_icon() //Updates color based on overmind color if we have an overmind.
if(overmind)
color = overmind.blob_reagent_datum.color
add_atom_colour(overmind.blob_reagent_datum.color, FIXED_COLOUR_PRIORITY)
else
color = null
remove_atom_colour(FIXED_COLOUR_PRIORITY)
/obj/structure/blob/process()
Life()

View File

@@ -365,8 +365,9 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed
L.dizziness = min(L.dizziness + 20, 100)
L.Weaken(1)
invoker.visible_message("<span class='warning'>[invoker] is suddenly covered with a thin layer of dark purple smoke!</span>")
invoker.color = "#AF0AAF"
animate(invoker, color = initial(invoker.color), time = flee_time+grace_period)
var/invoker_old_color = invoker.color
invoker.add_atom_colour("#AF0AAF", TEMPORARY_COLOUR_PRIORITY)
animate(invoker, color = invoker_old_color, time = flee_time+grace_period)
if(chant_number != chant_amount) //if this is the last chant, we don't have a movement period because the chant is over
var/endtime = world.time + flee_time
var/starttime = world.time
@@ -1135,7 +1136,7 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed
<span class='userdanger'>You feel limitless power surging through you!</span>")
playsound(invoker, 'sound/magic/clockwork/invoke_general.ogg', 50, 0)
playsound(invoker, 'sound/magic/lightning_chargeup.ogg', 100, 0)
animate(invoker, color = list(rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(0,0,0)), time = 88) //Gradual advancement to extreme brightness
animate(invoker, color = "#FFFF00", time = 88) //Gradual advancement to extreme brightness
sleep(88)
if(invoker)
invoker.visible_message("<span class='warning'>Massive bolts of energy emerge from across [invoker]'s body!</span>", \
@@ -1143,7 +1144,7 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed
<span class='userdanger'>TOO... MUCH! CAN'T... TAKE IT!</span>")
playsound(invoker, 'sound/magic/lightningbolt.ogg', 100, 0)
if(invoker.stat == CONSCIOUS)
animate(invoker, color = initial(invoker.color), time = 10)
invoker.update_atom_colour()
for(var/mob/living/L in view(7, invoker))
if(is_servant_of_ratvar(L))
continue

View File

@@ -211,6 +211,7 @@
icon = 'icons/effects/effects.dmi'
icon_state = "cocoon_large3"
color = rgb(10,120,10)
atom_colours = list("", "", "", rgb(10,120,10))
density = 1
var/hatch_time = 0

View File

@@ -343,16 +343,6 @@
if(iscarbon(mob))
if(ishuman(mob))
var/mob/living/carbon/human/H = mob
if(H.dna && H.dna.species)
H.dna.species.handle_mutant_bodyparts(H,"#1d2953")
H.dna.species.handle_hair(H,"#1d2953")
var/old_color = H.color
H.color = "#1d2953"
spawn(20)
if(H && H.dna && H.dna.species)
H.dna.species.handle_mutant_bodyparts(H)
H.dna.species.handle_hair(H)
H.color = old_color
var/blightfound = 0
for(var/datum/disease/revblight/blight in H.viruses)
blightfound = 1
@@ -367,11 +357,11 @@
else
mob.adjustToxLoss(5)
for(var/obj/structure/spacevine/vine in T) //Fucking with botanists, the ability.
vine.color = "#823abb"
vine.add_atom_colour("#823abb", TEMPORARY_COLOUR_PRIORITY)
PoolOrNew(/obj/effect/overlay/temp/revenant, vine.loc)
QDEL_IN(vine, 10)
for(var/obj/structure/glowshroom/shroom in T)
shroom.color = "#823abb"
shroom.add_atom_colour("#823abb", TEMPORARY_COLOUR_PRIORITY)
PoolOrNew(/obj/effect/overlay/temp/revenant, shroom.loc)
QDEL_IN(shroom, 10)
for(var/obj/machinery/hydroponics/tray in T)

View File

@@ -14,14 +14,11 @@
severity = BIOHAZARD
var/stagedamage = 0 //Highest stage reached.
var/finalstage = 0 //Because we're spawning off the cure in the final stage, we need to check if we've done the final stage's effects.
var/old_color = ""
/datum/disease/revblight/cure()
if(affected_mob)
affected_mob.color = old_color
affected_mob.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
affected_mob << "<span class='notice'>You feel better.</span>"
if(affected_mob.dna && affected_mob.dna.species)
affected_mob.dna.species.handle_mutant_bodyparts(affected_mob)
..()
/datum/disease/revblight/stage_act()
@@ -56,12 +53,8 @@
affected_mob << "<span class='revenbignotice'>You feel like [pick("nothing's worth it anymore", "nobody ever needed your help", "nothing you did mattered", "everything you tried to do was worthless")].</span>"
affected_mob.adjustStaminaLoss(45)
PoolOrNew(/obj/effect/overlay/temp/revenant, affected_mob.loc)
if(affected_mob.dna && affected_mob.dna.species)
affected_mob.dna.species.handle_mutant_bodyparts(affected_mob,"#1d2953")
affected_mob.dna.species.handle_hair(affected_mob,"#1d2953")
affected_mob.visible_message("<span class='warning'>[affected_mob] looks terrifyingly gaunt...</span>", "<span class='revennotice'>You suddenly feel like your skin is <i>wrong</i>...</span>")
old_color = affected_mob.color
affected_mob.color = "#1d2953"
addtimer(src, "cure", 100, FALSE)
affected_mob.visible_message("<span class='warning'>[affected_mob] looks terrifyingly gaunt...</span>", "<span class='revennotice'>You suddenly feel like your skin is <i>wrong</i>...</span>")
affected_mob.add_atom_colour("#1d2953", TEMPORARY_COLOUR_PRIORITY)
addtimer(src, "cure", 100, FALSE)
else
return

View File

@@ -516,13 +516,12 @@ This is here to make the tiles around the station mininuke change when it's arme
going delta! It looks like they're comitting suicide.</span>")
playsound(user.loc, 'sound/machines/Alarm.ogg', 50, -1, 1)
var/end_time = world.time + 100
var/orig_color = user.color
while(world.time < end_time)
if(!user)
return
user.color = RANDOM_COLOUR
user.add_atom_colour(RANDOM_COLOUR, ADMIN_COLOUR_PRIORITY)
sleep(1)
user.color = orig_color
user.remove_atom_colour(ADMIN_COLOUR_PRIORITY)
user.visible_message("<span class='suicide'>[user] was destroyed \
by the nuclear blast!</span>")
return OXYLOSS

View File

@@ -179,7 +179,7 @@
qdel(src)
/obj/machinery/door/window/narsie_act()
color = "#7D1919"
add_atom_colour("#7D1919", FIXED_COLOUR_PRIORITY)
/obj/machinery/door/window/ratvar_act()
new/obj/machinery/door/window/clockwork(src.loc, dir)

View File

@@ -54,7 +54,7 @@ Buildable meters
if(make_from)
src.setDir(make_from.dir)
src.pipename = make_from.name
src.color = make_from.color
add_atom_colour(make_from.color, FIXED_COLOUR_PRIORITY)
if(make_from.type in pipe_types)
src.pipe_type = make_from.type

View File

@@ -65,6 +65,7 @@
name = "Invoker's Shield"
desc = "A weak shield summoned by cultists to protect them while they carry out delicate rituals"
color = "red"
atom_colours = list("", "", "", "red")
obj_integrity = 20
max_integrity = 20
mouse_opacity = 0

View File

@@ -76,7 +76,7 @@
if(WM.color_source)
if(istype(WM.color_source,/obj/item/toy/crayon))
var/obj/item/toy/crayon/CR = WM.color_source
color = CR.paint_color
add_atom_colour(CR.paint_color, WASHABLE_COLOUR_PRIORITY)
/mob/living/simple_animal/pet/dog/corgi/machine_wash(obj/machinery/washing_machine/WM)
gib()

View File

@@ -16,6 +16,7 @@
max_equip = 2
step_energy_drain = 3
color = "#87878715"
atom_colours = list("", "", "", "#87878715")
stepsound = null
turnsound = null
opacity = 0

View File

@@ -103,6 +103,7 @@
name = "\improper Reticence wreckage"
icon_state = "reticence-broken"
color = "#87878715"
atom_colours = list("", "", "", "#87878715")
/obj/structure/mecha_wreckage/ripley
name = "\improper Ripley wreckage"

View File

@@ -25,6 +25,7 @@
src.transform = M
color = main
atom_colours[FIXED_COLOUR_PRIORITY] = main
/obj/effect/decal/cleanable/crayon/gang
@@ -37,14 +38,12 @@
qdel(src)
var/area/territory = get_area(location)
var/color
gang = G
color = G.color_hex
var/newcolor = G.color_hex
icon_state = G.name
G.territory_new |= list(territory.type = territory.name)
..(location, color, icon_state, e_name, rotation)
..(location, newcolor, icon_state, e_name, rotation)
/obj/effect/decal/cleanable/crayon/gang/Destroy()
var/area/territory = get_area(src)

View File

@@ -105,7 +105,7 @@
var/obj/effect/particle_effect/foam/F = PoolOrNew(src.type, T)
F.amount = amount
reagents.copy_to(F, (reagents.total_volume))
F.color = color
F.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
F.metal = metal
@@ -164,7 +164,7 @@
var/obj/effect/particle_effect/foam/F = PoolOrNew(effect_type, location)
var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount)
F.color = foamcolor
F.add_atom_colour(foamcolor, FIXED_COLOUR_PRIORITY)
F.amount = amount
F.metal = metal

View File

@@ -84,7 +84,7 @@
reagents.copy_to(S, reagents.total_volume)
S.setDir(pick(cardinal))
S.amount = amount-1
S.color = color
S.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
S.lifetime = lifetime
if(S.amount>0)
if(opaque)
@@ -150,6 +150,7 @@
/obj/effect/particle_effect/smoke/freezing
name = "nanofrost smoke"
color = "#B2FFFF"
atom_colours= list("", "", "", "#B2FFFF")
opaque = 0
/datum/effect_system/smoke_spread/freezing
@@ -200,6 +201,7 @@
/obj/effect/particle_effect/smoke/sleeping
color = "#9C3636"
atom_colours = list("", "", "", "#9C3636")
lifetime = 10
/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
@@ -297,7 +299,7 @@
/datum/effect_system/smoke_spread/chem/start()
var/color = mix_color_from_reagents(chemholder.reagents.reagent_list)
var/mixcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
if(holder)
location = get_turf(holder)
var/obj/effect/particle_effect/smoke/chem/S = new effect_type(location)
@@ -305,8 +307,8 @@
if(chemholder.reagents.total_volume > 1) // can't split 1 very well
chemholder.reagents.copy_to(S, chemholder.reagents.total_volume)
if(color)
S.color = color // give the smoke color, if it has any to begin with
if(mixcolor)
S.add_atom_colour(mixcolor, FIXED_COLOUR_PRIORITY) // give the smoke color, if it has any to begin with
S.amount = amount
if(S.amount)
S.spread_smoke() //calling process right now so the smoke immediately attacks mobs.

View File

@@ -115,6 +115,7 @@
desc = "You feel angry just looking at it."
duration = 1200 //2min
color = "red"
atom_colours = list("", "", "", "red")
/obj/effect/mine/pickup/bloodbath/mineEffect(mob/living/carbon/victim)
if(!victim.client || !istype(victim))
@@ -149,6 +150,7 @@
name = "Blue Orb"
desc = "You feel better just looking at it."
color = "blue"
atom_colours = list("", "", "", "blue")
/obj/effect/mine/pickup/healing/mineEffect(mob/living/carbon/victim)
if(!victim.client || !istype(victim))
@@ -160,6 +162,7 @@
name = "Yellow Orb"
desc = "You feel faster just looking at it."
color = "yellow"
atom_colours = list("", "", "", "yellow")
duration = 300
/obj/effect/mine/pickup/speed/mineEffect(mob/living/carbon/victim)

View File

@@ -30,7 +30,7 @@
desc = "[initial(desc)] It's been pushed over."
icon = initial(icon)
icon_state = "cutout_pushed_over"
color = initial(color)
remove_atom_colour(FIXED_COLOUR_PRIORITY)
alpha = initial(alpha)
pushed_over = TRUE
@@ -94,7 +94,7 @@
alpha = 255
icon = initial(icon)
if(!deceptive)
color = "#FFD7A7"
add_atom_colour("#FFD7A7", FIXED_COLOUR_PRIORITY)
switch(new_appearance)
if("Assistant")
name = "[pick(first_names_male)] [pick(last_names)]"

View File

@@ -660,7 +660,7 @@
if(istype(target, /obj/structure/window))
if(actually_paints)
target.color = paint_color
target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
if(color_hex2num(paint_color) < 255)
target.SetOpacity(255)
else

View File

@@ -27,9 +27,9 @@
return
var/obj/machinery/atmospherics/pipe/P = A
P.color = modes[mode]
P.add_atom_colour(modes[mode], FIXED_COLOUR_PRIORITY)
P.pipe_color = modes[mode]
P.stored.color = modes[mode]
P.stored.add_atom_colour(modes[mode], FIXED_COLOUR_PRIORITY)
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
P.update_node_icon() //updates the neighbors

View File

@@ -111,7 +111,7 @@
return
user.visible_message("[user] chants deeply and waves their staff!")
if(do_after(user, 20,1,src))
target.color = conversion_color //wololo
target.add_atom_colour(conversion_color, WASHABLE_COLOUR_PRIORITY) //wololo
staffcooldown = world.time
/obj/item/weapon/godstaff/red

View File

@@ -542,9 +542,9 @@ var/global/list/RPD_recipes=list(
return 0
var/obj/machinery/atmospherics/pipe/P = A
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
P.color = paint_colors[paint_color]
P.add_atom_colour(paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
P.pipe_color = paint_colors[paint_color]
P.stored.color = paint_colors[paint_color]
P.stored.add_atom_colour(paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
//P.update_icon()
P.update_node_icon()

View File

@@ -59,6 +59,7 @@
name = "bluespace cryptographic sequencer"
desc = "It's a blue card with a magnetic strip attached to some circuitry. It appears to have some sort of transmitter attached to it."
color = rgb(40, 130, 255)
atom_colours = list("", "", "", rgb(40, 130, 255))
origin_tech = "bluespace=4;magnets=4;syndicate=5"
prox_check = FALSE

View File

@@ -121,7 +121,6 @@
name = "eradication beam"
icon_state = "chronobolt"
range = CHRONO_BEAM_RANGE
color = null
nodamage = 1
var/obj/item/weapon/gun/energy/chrono_gun/gun = null

View File

@@ -457,7 +457,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/lighter/greyscale/New()
var/image/I = image(icon,"lighter-overlay")
I.color = color2hex(randomColor(1))
var/newcolor = color2hex(randomColor(1))
add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
add_overlay(I)
/obj/item/weapon/lighter/greyscale/ignition_effect(atom/A, mob/user)

View File

@@ -65,13 +65,16 @@
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
qdel(target)
else if(ishuman(target) && user.zone_selected == "mouth")
var/mob/living/carbon/human/H = user
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
H.lip_style = null //removes lipstick
H.update_body()
return
else if(istype(target, /obj/structure/window))
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
if(do_after(user, src.cleanspeed, target = target))
user << "<span class='notice'>You clean \the [target.name].</span>"
target.color = initial(target.color)
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
target.SetOpacity(initial(target.opacity))
else
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
@@ -79,6 +82,7 @@
user << "<span class='notice'>You clean \the [target.name].</span>"
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
target.clean_blood()
target.wash_cream()
return

View File

@@ -86,7 +86,8 @@
return
if(!istype(target) || isspaceturf(target))
return
target.color = "#" + item_color
var/newcolor = "#" + item_color
target.add_atom_colour(newcolor, WASHABLE_COLOUR_PRIORITY)
/obj/item/weapon/paint/paint_remover
gender = PLURAL
@@ -97,4 +98,4 @@
if(!proximity)
return
if(istype(target) && target.color != initial(target.color))
target.color = initial(target.color)
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)

View File

@@ -55,17 +55,17 @@
/obj/item/weapon/storage/toolbox/electrical/New()
..()
var/color = pick("red","yellow","green","blue","pink","orange","cyan","white")
var/pickedcolor = pick("red","yellow","green","blue","pink","orange","cyan","white")
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/t_scanner(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/stack/cable_coil(src,30,color)
new /obj/item/stack/cable_coil(src,30,color)
new /obj/item/stack/cable_coil(src,30,pickedcolor)
new /obj/item/stack/cable_coil(src,30,pickedcolor)
if(prob(5))
new /obj/item/clothing/gloves/color/yellow(src)
else
new /obj/item/stack/cable_coil(src,30,color)
new /obj/item/stack/cable_coil(src,30,pickedcolor)
/obj/item/weapon/storage/toolbox/syndicate
name = "suspicious looking toolbox"
@@ -93,12 +93,12 @@
/obj/item/weapon/storage/toolbox/drone/New()
..()
var/color = pick("red","yellow","green","blue","pink","orange","cyan","white")
var/pickedcolor = pick("red","yellow","green","blue","pink","orange","cyan","white")
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/stack/cable_coil(src,30,color)
new /obj/item/stack/cable_coil(src,30,pickedcolor)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/multitool(src)

View File

@@ -320,7 +320,7 @@
S.set_up(2, src.loc, blasting=1)
S.start()
var/obj/effect/decal/cleanable/flour/F = new /obj/effect/decal/cleanable/flour(src.loc)
F.color = "#B2FFFF"
F.add_atom_colour("#B2FFFF", FIXED_COLOUR_PRIORITY)
F.name = "nanofrost residue"
F.desc = "Residue left behind from a nanofrost detonation. Perhaps there was a fire here?"
playsound(src,'sound/effects/bamf.ogg',100,1)

View File

@@ -173,35 +173,35 @@ var/highlander_claymores = 0
if(2)
user << "<span class='notice'>Another falls before you. Another soul fuses with your own. Another notch in the blade.</span>"
new_name = "double-notched claymore"
color = rgb(255, 235, 235)
add_atom_colour(rgb(255, 235, 235), ADMIN_COLOUR_PRIORITY)
if(3)
user << "<span class='notice'>You're beginning to</span> <span class='danger'><b>relish</b> the <b>thrill</b> of <b>battle.</b></span>"
new_name = "triple-notched claymore"
color = rgb(255, 215, 215)
add_atom_colour(rgb(255, 215, 215), ADMIN_COLOUR_PRIORITY)
if(4)
user << "<span class='notice'>You've lost count of</span> <span class='boldannounce'>how many you've killed.</span>"
new_name = "many-notched claymore"
color = rgb(255, 195, 195)
add_atom_colour(rgb(255, 195, 195), ADMIN_COLOUR_PRIORITY)
if(5)
user << "<span class='boldannounce'>Five voices now echo in your mind, cheering the slaughter.</span>"
new_name = "battle-tested claymore"
color = rgb(255, 175, 175)
add_atom_colour(rgb(255, 175, 175), ADMIN_COLOUR_PRIORITY)
if(6)
user << "<span class='boldannounce'>Is this what the vikings felt like? Visions of glory fill your head as you slay your sixth foe.</span>"
new_name = "battle-scarred claymore"
color = rgb(255, 155, 155)
add_atom_colour(rgb(255, 155, 155), ADMIN_COLOUR_PRIORITY)
if(7)
user << "<span class='boldannounce'>Kill. Butcher. <i>Conquer.</i></span>"
new_name = "vicious claymore"
color = rgb(255, 135, 135)
add_atom_colour(rgb(255, 135, 135), ADMIN_COLOUR_PRIORITY)
if(8)
user << "<span class='userdanger'>IT NEVER GETS OLD. THE <i>SCREAMING</i>. THE <i>BLOOD</i> AS IT <i>SPRAYS</i> ACROSS YOUR <i>FACE.</i></span>"
new_name = "bloodthirsty claymore"
color = rgb(255, 115, 115)
add_atom_colour(rgb(255, 115, 115), ADMIN_COLOUR_PRIORITY)
if(9)
user << "<span class='userdanger'>ANOTHER ONE FALLS TO YOUR BLOWS. ANOTHER WEAKLING UNFIT TO LIVE.</span>"
new_name = "gore-stained claymore"
color = rgb(255, 95, 95)
add_atom_colour(rgb(255, 95, 95), ADMIN_COLOUR_PRIORITY)
if(10)
user.visible_message("<span class='warning'>[user]'s eyes light up with a vengeful fire!</span>", \
"<span class='userdanger'>YOU FEEL THE POWER OF VALHALLA FLOWING THROUGH YOU! <i>THERE CAN BE ONLY ONE!!!</i></span>")
@@ -209,7 +209,7 @@ var/highlander_claymores = 0
new_name = "GORE-DRENCHED CLAYMORE OF [pick("THE WHIMSICAL SLAUGHTER", "A THOUSAND SLAUGHTERED CATTLE", "GLORY AND VALHALLA", "ANNIHILATION", "OBLITERATION")]"
icon_state = "claymore_valhalla"
item_state = "cultblade"
color = initial(color)
remove_atom_colour(ADMIN_COLOUR_PRIORITY)
name = new_name
playsound(user, 'sound/items/Screwdriver2.ogg', 50, 1)

View File

@@ -128,6 +128,7 @@
desc = "It looks comfy.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "comfychair"
color = rgb(255,255,255)
atom_colours = list("", "", "", rgb(255,255,255))
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
@@ -150,18 +151,23 @@
/obj/structure/chair/comfy/brown
color = rgb(255,113,0)
atom_colours = list("", "", "", rgb(255,113,0))
/obj/structure/chair/comfy/beige
color = rgb(255,253,195)
atom_colours = list("", "", "", rgb(255,253,195))
/obj/structure/chair/comfy/teal
color = rgb(0,255,255)
atom_colours = list("", "", "", rgb(0,255,255))
/obj/structure/chair/comfy/black
color = rgb(167,164,153)
atom_colours = list("", "", "", rgb(167,164,153))
/obj/structure/chair/comfy/lime
color = rgb(255,251,0)
atom_colours = list("", "", "", rgb(255,251,0))
/obj/structure/chair/office
anchored = 0

View File

@@ -85,7 +85,8 @@
S.icon = icon
S.icon_state = icon_state
S.overlays = overlays
S.color = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
var/newcolor = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
S.add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
return 1
/mob/living/carbon/monkey/petrify(statue_timer)

View File

@@ -541,6 +541,7 @@
icon = 'icons/obj/watercloset.dmi'
icon_state = "open"
color = "#ACD1E9" //Default color, didn't bother hardcoding other colors, mappers can and should easily change it.
atom_colours = list("", "", "", "#ACD1E9")
alpha = 200 //Mappers can also just set this to 255 if they want curtains that can't be seen through
layer = WALL_OBJ_LAYER
anchored = 1

View File

@@ -55,9 +55,9 @@
/obj/structure/window/narsie_act()
color = NARSIE_WINDOW_COLOUR
add_atom_colour(NARSIE_WINDOW_COLOUR, FIXED_COLOUR_PRIORITY)
for(var/obj/item/weapon/shard/shard in debris)
shard.color = NARSIE_WINDOW_COLOUR
shard.add_atom_colour(NARSIE_WINDOW_COLOUR, FIXED_COLOUR_PRIORITY)
/obj/structure/window/ratvar_act()
if(!fulltile)
@@ -444,7 +444,7 @@
level = 3
/obj/structure/window/shuttle/narsie_act()
color = "#3C3434"
add_atom_colour("#3C3434", FIXED_COLOUR_PRIORITY)
/obj/structure/window/shuttle/tinted
opacity = TRUE

View File

@@ -159,3 +159,50 @@
desc = "Time seems to flow very slowly around these tiles"
floor_tile = /obj/item/stack/tile/sepia
// VINE FLOOR
/turf/open/floor/vines
color = "#aa77aa"
atom_colours = list("", "", "", "#aa77aa")
icon_state = "vinefloor"
broken_states = list()
//All of this shit is useless for vines
/turf/open/floor/vines/attackby()
return
/turf/open/floor/vines/burn_tile()
return
/turf/open/floor/vines/break_tile()
return
/turf/open/floor/vines/make_plating()
return
/turf/open/floor/vines/break_tile_to_plating()
return
/turf/open/floor/vines/ex_act(severity, target)
..()
if(severity < 3 || target == src)
ChangeTurf(src.baseturf)
/turf/open/floor/vines/narsie_act()
if(prob(20))
ChangeTurf(src.baseturf) //nar sie eats this shit
/turf/open/floor/vines/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
if(prob(50))
ChangeTurf(src.baseturf)
/turf/open/floor/vines/ChangeTurf(turf/open/floor/T)
for(var/obj/structure/spacevine/SV in src)
qdel(SV)
. = ..()
UpdateAffectingLights()

View File

@@ -200,8 +200,8 @@
T.icon_state = icon_state
if(T.icon != icon)
T.icon = icon
if(T.color != color)
T.color = color
T.atom_colours = atom_colours.Copy()
T.update_atom_colour()
if(T.dir != dir)
T.dir = dir
T.transform = transform
@@ -229,8 +229,8 @@
T.icon_state = icon_state
if(T.icon != icon)
T.icon = icon
if(T.color != color)
T.color = color
T.atom_colours = atom_colours.Copy()
T.update_atom_colour()
if(T.dir != dir)
T.dir = dir
T.transform = transform

View File

@@ -57,8 +57,8 @@
T.icon_state = icon_state
if(T.icon != icon)
T.icon = icon
if(T.color != color)
T.color = color
T.atom_colours = atom_colours.Copy()
T.update_atom_colour()
if(T.dir != dir)
T.setDir(dir)
T.transform = transform

View File

@@ -363,8 +363,8 @@
T.icon_state = icon_state
if(T.icon != icon)
T.icon = icon
if(T.color != color)
T.color = color
T.atom_colours = atom_colours.Copy()
T.update_atom_colour()
if(T.dir != dir)
T.setDir(dir)
return T

View File

@@ -216,11 +216,11 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/on_construction(pipe_type, obj_color)
if(can_unwrench)
color = obj_color
add_atom_colour(obj_color, FIXED_COLOUR_PRIORITY)
pipe_color = obj_color
stored.setDir(src.dir )//need to define them here, because the obj directions...
stored.pipe_type = pipe_type //... were not set at the time the stored pipe was created
stored.color = obj_color
stored.add_atom_colour(obj_color, FIXED_COLOUR_PRIORITY)
var/turf/T = loc
level = T.intact ? 2 : 1
atmosinit()

View File

@@ -14,7 +14,7 @@
if(NODE1)
icon_state = "he_intact"
var/obj/machinery/atmospherics/node = NODE1
color = node.color
add_atom_colour(node.color, FIXED_COLOUR_PRIORITY)
else
icon_state = "he_exposed"

View File

@@ -11,7 +11,7 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/New()
..()
color = "#404040"
add_atom_colour("#404040", FIXED_COLOUR_PRIORITY)
/obj/machinery/atmospherics/pipe/heat_exchanging/can_be_node(obj/machinery/atmospherics/pipe/heat_exchanging/target)
if(!istype(target))

View File

@@ -14,7 +14,7 @@
buckle_lying = -1
/obj/machinery/atmospherics/pipe/New()
color = pipe_color
add_atom_colour(pipe_color, FIXED_COLOUR_PRIORITY)
volume = 35 * device_type
..()

View File

@@ -295,6 +295,7 @@
icon = 'icons/obj/rune.dmi'
icon_state = "1"
color = rgb(0,0,255)
atom_colours = list("", "", "", rgb(0,0,255))
/obj/structure/ladder/unbreakable/rune/update_icon()
return

View File

@@ -216,6 +216,7 @@ obj/effect/mob_spawn/human/syndicatesoldier/coldres/alive/female
minbodytemp = 0
maxbodytemp = 1500
color = rgb(114,228,250)
atom_colours = list("", "", "", rgb(114,228,250))
/mob/living/simple_animal/hostile/poison/giant_spider/nurse/ice
name = "giant ice spider"
@@ -223,6 +224,7 @@ obj/effect/mob_spawn/human/syndicatesoldier/coldres/alive/female
minbodytemp = 0
maxbodytemp = 1500
color = rgb(114,228,250)
atom_colours = list("", "", "", rgb(114,228,250))
/mob/living/simple_animal/hostile/poison/giant_spider/hunter/ice
name = "giant ice spider"
@@ -230,14 +232,17 @@ obj/effect/mob_spawn/human/syndicatesoldier/coldres/alive/female
minbodytemp = 0
maxbodytemp = 1500
color = rgb(114,228,250)
atom_colours = list("", "", "", rgb(114,228,250))
//objs//--
/obj/structure/flora/rock/icy
name = "icy rock"
color = rgb(114,228,250)
atom_colours = list("", "", "", rgb(114,228,250))
/obj/structure/flora/rock/pile/icy
name = "icey rocks"
color = rgb(114,228,250)
atom_colours = list("", "", "", rgb(114,228,250))

View File

@@ -100,7 +100,8 @@
materials = list(MAT_GLASS = 500)
/obj/item/rupee/New()
color = color2hex(pick(10;"green", 5;"blue", 3;"red", 1;"purple"))
var/newcolor = color2hex(pick(10;"green", 5;"blue", 3;"red", 1;"purple"))
add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
..()
/obj/item/rupee/Crossed(mob/M)

View File

@@ -7,6 +7,11 @@
icon_state = "beanie" //Default white
item_color = "beanie"
/obj/item/clothing/head/beanie/New()
..()
if(color)
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
/obj/item/clothing/head/beanie/black
name = "black beanie"
icon_state = "beanie"

View File

@@ -132,7 +132,8 @@
name = "kitty ears"
desc = "A pair of kitty ears. Meow!"
icon_state = "kitty"
color = "#999"
color = "#999999"
atom_colours = list("", "", "", "#999999")
dog_fashion = /datum/dog_fashion/head/kitty
@@ -143,7 +144,7 @@
/obj/item/clothing/head/kitty/update_icon(mob/living/carbon/human/user)
if(istype(user))
color = "#[user.hair_color]"
add_atom_colour("#[user.hair_color]", FIXED_COLOUR_PRIORITY)
/obj/item/clothing/head/hardhat/reindeer

View File

@@ -268,6 +268,11 @@
item_color = "scarf"
dog_fashion = /datum/dog_fashion/head
/obj/item/clothing/tie/scarf/New()
..()
if(color)
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
/obj/item/clothing/tie/scarf/black
name = "black scarf"
icon_state = "scarf"

View File

@@ -30,7 +30,7 @@
/datum/spacevine_mutation/proc/add_mutation_to_vinepiece(obj/structure/spacevine/holder)
holder.mutations |= src
holder.color = hue
holder.add_atom_colour(hue, FIXED_COLOUR_PRIORITY)
/datum/spacevine_mutation/proc/process_mutation(obj/structure/spacevine/holder)
return
@@ -74,49 +74,6 @@
hue = "#aa77aa"
quality = POSITIVE
/turf/open/floor/vines
color = "#aa77aa"
icon_state = "vinefloor"
broken_states = list()
//All of this shit is useless for vines
/turf/open/floor/vines/attackby()
return
/turf/open/floor/vines/burn_tile()
return
/turf/open/floor/vines/break_tile()
return
/turf/open/floor/vines/make_plating()
return
/turf/open/floor/vines/break_tile_to_plating()
return
/turf/open/floor/vines/ex_act(severity, target)
..()
if(severity < 3 || target == src)
ChangeTurf(src.baseturf)
/turf/open/floor/vines/narsie_act()
if(prob(20))
ChangeTurf(src.baseturf) //nar sie eats this shit
/turf/open/floor/vines/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
if(prob(50))
ChangeTurf(src.baseturf)
/turf/open/floor/vines/ChangeTurf(turf/open/floor/T)
for(var/obj/structure/spacevine/SV in src)
qdel(SV)
. = ..()
UpdateAffectingLights()
/datum/spacevine_mutation/space_covering
var/static/list/coverable_turfs
@@ -509,7 +466,8 @@
return
if(parent)
SV.mutations |= parent.mutations
SV.color = parent.color
var/parentcolor = parent.atom_colours[FIXED_COLOUR_PRIORITY]
SV.add_atom_colour(parentcolor, FIXED_COLOUR_PRIORITY)
if(prob(mutativness))
var/datum/spacevine_mutation/randmut = pick(mutations_list - SV.mutations)
randmut.add_mutation_to_vinepiece(SV)

View File

@@ -44,14 +44,14 @@
last_holder = user
if(!(user in color_altered_mobs))
color_altered_mobs += user
user.color = "#00FF00"
user.add_atom_colour("#00FF00", ADMIN_COLOUR_PRIORITY)
START_PROCESSING(SSobj, src)
..()
/obj/item/weapon/greentext/dropped(mob/living/user as mob)
if(user in color_altered_mobs)
user << "<span class='warning'>A sudden wave of failure washes over you...</span>"
user.color = "#FF0000" //ya blew it
user.add_atom_colour("#FF0000", ADMIN_COLOUR_PRIORITY) //ya blew it
last_holder = null
new_holder = null
STOP_PROCESSING(SSobj, src)
@@ -74,7 +74,7 @@
if(last_holder && last_holder != new_holder) //Somehow it was swiped without ever getting dropped
last_holder << "<span class='warning'>A sudden wave of failure washes over you...</span>"
last_holder.color = "#FF0000"
last_holder.add_atom_colour("#FF0000", ADMIN_COLOUR_PRIORITY)
last_holder = new_holder //long live the king
/obj/item/weapon/greentext/Destroy(force)
@@ -87,7 +87,7 @@
var/message = "<span class='warning'>A dark temptation has passed from this world"
if(M in color_altered_mobs)
message += " and you're finally able to forgive yourself"
M.color = initial(M.color)
M.remove_atom_colour(ADMIN_COLOUR_PRIORITY)
message += "...</span>"
// can't skip the mob check as it also does the decolouring
if(!quiet)

View File

@@ -46,6 +46,7 @@
name = "chaos magicarp"
desc = "50% carp, 100% magic, 150% horrible."
color = "#00FFFF"
atom_colours = list("", "", "", "#00FFFF")
maxHealth = 75
health = 75

View File

@@ -18,6 +18,11 @@
desc = "A bloody burger."
bonus_reagents = list("vitamin" = 4)
/obj/item/weapon/reagent_containers/food/snacks/burger/New()
..()
if(color)
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
/obj/item/weapon/reagent_containers/food/snacks/burger/human/CheckParts(list/parts_list)
..()
var/obj/item/weapon/reagent_containers/food/snacks/meat/M = locate(/obj/item/weapon/reagent_containers/food/snacks/meat/steak/plain/human) in contents

View File

@@ -316,7 +316,7 @@
/obj/machinery/smartfridge/drying_rack/proc/rack_dry()
for(var/obj/item/weapon/reagent_containers/food/snacks/S in contents)
if(S.dried_type == S.type)//if the dried type is the same as the object's type, don't bother creating a whole new item...
S.color = "#ad7257"
S.add_atom_colour("#ad7257", FIXED_COLOUR_PRIORITY)
S.dry = 1
S.loc = get_turf(src)
else

View File

@@ -19,17 +19,19 @@
/obj/item/weapon/deck/New()
. = ..()
var/color
var/cardcolor
var/datum/playingcard/card
for (var/suit in list("spades", "clubs", "diamonds", "hearts"))
if (suit == "spades" || suit == "clubs") color = "black_"
else color = "red_"
if (suit == "spades" || suit == "clubs")
cardcolor = "black_"
else
cardcolor = "red_"
for (var/number in list("ace", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"))
card = new()
card.name = "[number] of [suit]"
card.card_icon = "[color]num"
card.card_icon = "[cardcolor]num"
card.suit = suit
card.number = number
@@ -38,7 +40,7 @@
for (var/number in list("jack", "queen", "king"))
card = new()
card.name = "[number] of [suit]"
card.card_icon = "[color]col"
card.card_icon = "[cardcolor]col"
card.suit = suit
card.number = number

View File

@@ -111,9 +111,9 @@
/obj/item/weapon/reagent_containers/food/snacks/egg/loaded/New()
..()
var/color = pick("blue","green","mime","orange","purple","rainbow","red","yellow")
icon_state = "egg-[color]"
item_color = "[color]"
var/eggcolor = pick("blue","green","mime","orange","purple","rainbow","red","yellow")
icon_state = "egg-[eggcolor]"
item_color = "[eggcolor]"
/obj/item/weapon/reagent_containers/food/snacks/egg/proc/dispensePrize(turf/where)
var/won = pick(/obj/item/clothing/head/bunnyhead,

View File

@@ -256,7 +256,7 @@
if(self_sustaining)
if(istype(src, /obj/machinery/hydroponics/soil))
color = rgb(255, 175, 0)
add_atom_colour(rgb(255, 175, 0), FIXED_COLOUR_PRIORITY)
else
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "gaia_blessing")
SetLuminosity(3)

View File

@@ -720,6 +720,7 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll2"
color = "#FF0000"
atom_colours = list("", "", "", "#FF0000")
desc = "Mark your target for death. "
var/used = FALSE
@@ -743,7 +744,7 @@
survive.owner = L.mind
L.mind.objectives += survive
L << "<span class='userdanger'>You've been marked for death! Don't let the demons get you!</span>"
L.color = "#FF0000"
L.add_atom_colour("#FF0000", ADMIN_COLOUR_PRIORITY)
spawn()
var/obj/effect/mine/pickup/bloodbath/B = new(L)
B.mineEffect(L)

View File

@@ -145,15 +145,14 @@
/mob/living/proc/exit_blood_effect(obj/effect/decal/cleanable/B)
playsound(get_turf(src), 'sound/magic/exit_blood.ogg', 100, 1, -1)
var/oldcolor = src.color
//Makes the mob have the color of the blood pool it came out of
if(istype(B, /obj/effect/decal/cleanable/xenoblood))
src.color = rgb(43, 186, 0)
add_atom_colour(rgb(43, 186, 0), TEMPORARY_COLOUR_PRIORITY)
else
src.color = rgb(149, 10, 10)
add_atom_colour(rgb(149, 10, 10), TEMPORARY_COLOUR_PRIORITY)
// but only for a few seconds
spawn(30)
src.color = oldcolor
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
/mob/living/proc/phasein(obj/effect/decal/cleanable/B)
if(src.notransform)

View File

@@ -712,9 +712,11 @@
/mob/living/carbon/human/proc/electrocution_animation(anim_duration)
//Handle mutant parts if possible
if(dna && dna.species)
add_atom_colour("black", TEMPORARY_COLOUR_PRIORITY)
add_overlay("electrocuted_base")
spawn(anim_duration)
if(src)
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
overlays -= "electrocuted_base"
else //or just do a generic animation

View File

@@ -259,7 +259,7 @@
drying_agent = new(src)
drying_agent.reagents.add_reagent("drying_agent", 250)
drying_agent.name = "drying agent spray"
drying_agent.color = "#A000A0"
drying_agent.add_atom_colour("#A000A0", FIXED_COLOUR_PRIORITY)
modules += drying_agent
emag = new /obj/item/weapon/reagent_containers/spray(src)

View File

@@ -26,4 +26,5 @@
/mob/living/simple_animal/butterfly/New()
..()
color = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
var/newcolor = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)

View File

@@ -46,7 +46,7 @@
M.icon_state = icon_dead
M.name = name
if(toast)
M.color = "#3A3A3A"
M.add_atom_colour("#3A3A3A", FIXED_COLOUR_PRIORITY)
M.desc = "It's toast."
qdel(src)
else

View File

@@ -101,7 +101,7 @@ var/global/list/parasites = list() //all currently existing/living guardians
bubble_icon = "[namedatum.bubbleicon]"
if (namedatum.stainself)
color = namedatum.colour
add_atom_colour(namedatum.colour, FIXED_COLOUR_PRIORITY)
//Special case holocarp, because #snowflake code
if(theme == "carp")

View File

@@ -103,7 +103,7 @@
/obj/structure/recieving_pad/New(loc, mob/living/simple_animal/hostile/guardian/healer/G)
. = ..()
if(G.namedatum)
color = G.namedatum.colour
add_atom_colour(G.namedatum.colour, FIXED_COLOUR_PRIORITY)
/obj/structure/recieving_pad/proc/disappear()
visible_message("[src] vanishes!")

View File

@@ -347,6 +347,7 @@
icon_aggro = "bloodbrood"
attacktext = "pierces"
color = "#C80000"
atom_colours = list("", "", "" ,"#C80000")
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood/death()
if(loc) // Splash the turf we are on with blood
@@ -401,7 +402,8 @@
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood/proc/link_host(mob/living/carbon/C)
faction = list("\ref[src]", "\ref[C]") // Hostile to everyone except the host.
C.transfer_blood_to(src, 30)
color = mix_color_from_reagents(reagents.reagent_list)
var/newcolor = mix_color_from_reagents(reagents.reagent_list)
add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
/mob/living/simple_animal/hostile/asteroid/goliath
name = "goliath"
@@ -947,7 +949,7 @@
/mob/living/simple_animal/hostile/asteroid/gutlunch/gubbuck/New()
..()
color = pick("#E39FBB", "#D97D64", "#CF8C4A")
add_atom_colour(pick("#E39FBB", "#D97D64", "#CF8C4A"), FIXED_COLOUR_PRIORITY)
resize = 0.85
update_transform()

View File

@@ -79,4 +79,5 @@
maxHealth = 75
health = 75
color = rgb(114,228,250)
atom_colours = list("", "", "", rgb(114,228,250))
loot = list(/obj/effect/decal/remains/human{color = rgb(114,228,250)})

View File

@@ -885,11 +885,11 @@
speak += pick("...[longest_survival].", "The things I've seen!", "I have lived many lives!", "What are you before me?")
desc += " Old as sin, and just as loud. Claimed to be [rounds_survived]."
speak_chance = 20 //His hubris has made him more annoying/easier to justify killing
color = "#EEEE22"
add_atom_colour("#EEEE22", FIXED_COLOUR_PRIORITY)
else if(rounds_survived == longest_deathstreak)
speak += pick("What are you waiting for!", "Violence breeds violence!", "Blood! Blood!", "Strike me down if you dare!")
desc += " The squawks of [-rounds_survived] dead parrots ring out in your ears..."
color = "#BB7777"
add_atom_colour("#BB7777", FIXED_COLOUR_PRIORITY)
else if(rounds_survived > 0)
speak += pick("...again?", "No, It was over!", "Let me out!", "It never ends!")
desc += " Over [rounds_survived] shifts without a \"terrible\" \"accident\"!"
@@ -945,6 +945,7 @@
name = "The Ghost of Poly"
desc = "Doomed to squawk the earth."
color = "#FFFFFF77"
atom_colours = list("", "", "", "#FFFFFF77")
speak_chance = 20
status_flags = GODMODE
incorporeal_move = 1

View File

@@ -190,9 +190,9 @@ By design, d1 is the smallest direction and d2 is the highest
if("white")
icon = 'icons/obj/power_cond/power_cond_white.dmi'
/obj/structure/cable/proc/update_stored(var/length = 1, var/color = "red")
/obj/structure/cable/proc/update_stored(length = 1, colorC = "red")
stored.amount = length
stored.item_color = color
stored.item_color = colorC
stored.update_icon()
////////////////////////////////////////////

View File

@@ -121,6 +121,7 @@
name = "hilarious firing pin"
desc = "Advanced clowntech that can convert any firearm into a far more useful object."
color = "yellow"
atom_colours = list("", "", "", "yellow")
fail_message = "<span class='warning'>HONK!</span>"
force_replace = 1

View File

@@ -346,6 +346,7 @@
S.icon_state = P.icon_state
S.overlays = P.overlays
S.color = P.color
S.atom_colours = P.atom_colours.Copy()
if(L.mind)
L.mind.transfer_to(S)
S << "<span class='userdanger'>You are an animate statue. You cannot move when monitored, but are nearly invincible and deadly when unobserved! Do not harm [firer.name], your creator.</span>"

View File

@@ -2,7 +2,7 @@
if(!istype(reagent_list))
return
var/color
var/mixcolor
var/vol_counter = 0
var/vol_temp
@@ -10,12 +10,12 @@
vol_temp = R.volume
vol_counter += vol_temp
if(!color)
color = R.color
if(!mixcolor)
mixcolor = R.color
else if (length(color) >= length(R.color))
color = BlendRGB(color, R.color, vol_temp/vol_counter)
else if (length(mixcolor) >= length(R.color))
mixcolor = BlendRGB(mixcolor, R.color, vol_temp/vol_counter)
else
color = BlendRGB(R.color, color, vol_temp/vol_counter)
mixcolor = BlendRGB(R.color, mixcolor, vol_temp/vol_counter)
return color
return mixcolor

View File

@@ -86,11 +86,11 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/beer/green/on_mob_life(mob/living/M)
if(M.color != color)
M.color = color
M.add_atom_colour(color, TEMPORARY_COLOUR_PRIORITY)
return ..()
/datum/reagent/consumable/ethanol/beer/green/on_mob_delete(mob/living/M)
M.color = initial(M.color)
M.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
/datum/reagent/consumable/ethanol/kahlua
name = "Kahlua"

View File

@@ -843,10 +843,12 @@
qdel(O)
else
if(O)
O.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
O.clean_blood()
/datum/reagent/space_cleaner/reaction_turf(turf/T, reac_volume)
if(reac_volume >= 1)
T.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
T.clean_blood()
for(var/obj/effect/decal/cleanable/C in T)
qdel(C)
@@ -856,6 +858,7 @@
/datum/reagent/space_cleaner/reaction_mob(mob/M, method=TOUCH, reac_volume)
if(method == TOUCH || method == VAPOR)
M.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(ishuman(M))
@@ -1180,23 +1183,23 @@
/datum/reagent/colorful_reagent/on_mob_life(mob/living/M)
if(M && isliving(M))
M.color = pick(random_color_list)
M.add_atom_colour(pick(random_color_list), WASHABLE_COLOUR_PRIORITY)
..()
return
/datum/reagent/colorful_reagent/reaction_mob(mob/living/M, reac_volume)
if(M && isliving(M))
M.color = pick(random_color_list)
M.add_atom_colour(pick(random_color_list), WASHABLE_COLOUR_PRIORITY)
..()
/datum/reagent/colorful_reagent/reaction_obj(obj/O, reac_volume)
if(O)
O.color = pick(random_color_list)
O.add_atom_colour(pick(random_color_list), WASHABLE_COLOUR_PRIORITY)
..()
/datum/reagent/colorful_reagent/reaction_turf(turf/T, reac_volume)
if(T)
T.color = pick(random_color_list)
T.add_atom_colour(pick(random_color_list), WASHABLE_COLOUR_PRIORITY)
..()
/datum/reagent/hair_dye

View File

@@ -350,7 +350,8 @@
V.vehicle_move_delay = 0
user <<"<span class='notice'>You slather the red gunk over the [C], making it faster.</span>"
C.color = "#FF0000"
C.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
C.add_atom_colour("#FF0000", FIXED_COLOUR_PRIORITY)
qdel(src)
@@ -375,7 +376,8 @@
return ..()
user <<"<span class='notice'>You slather the blue gunk over the [C], fireproofing it.</span>"
C.name = "fireproofed [C.name]"
C.color = "#000080"
C.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
C.add_atom_colour("#000080", FIXED_COLOUR_PRIORITY)
C.max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
C.heat_protection = C.body_parts_covered
C.resistance_flags |= FIRE_PROOF
@@ -645,11 +647,13 @@
name = "cerulean prints"
desc = "A one use yet of blueprints made of jelly like organic material. Renaming an area to 'Xenobiology Lab' will extend the reach of the management console."
color = "#2956B2"
atom_colours = list("", "", "", "#2956B2")
/obj/item/areaeditor/blueprints/slime/edit_area()
var/success = ..()
var/area/A = get_area(src)
if(success)
for(var/turf/T in A)
T.color = "#2956B2"
T.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
T.add_atom_colour("#2956B2", FIXED_COLOUR_PRIORITY)
qdel(src)

View File

@@ -75,6 +75,7 @@
icon_state = "blob"
icon = 'icons/mob/blob.dmi'
color = rgb(145, 150, 0)
atom_colours = list("", "", "", rgb(145, 150, 0))
/obj/effect/gluttony/CanPass(atom/movable/mover, turf/target, height=0)//So bullets will fly over and stuff.
if(height==0)

View File

@@ -95,7 +95,7 @@
// New sleepers
for(var/i in found - sleepers)
var/mob/living/L = i
L.color = "#800080"
L.add_atom_colour("#800080", TEMPORARY_COLOUR_PRIORITY)
L.visible_message("<span class='revennotice'>A strange purple glow wraps itself around [L] as [L.p_they()] suddenly fall[L.p_s()] unconscious.</span>",
"<span class='revendanger'>[desc]</span>")
// Don't let them sit suround unconscious forever
@@ -109,7 +109,7 @@
// Missing sleepers
for(var/i in sleepers - found)
var/mob/living/L = i
L.color = initial(L.color)
L.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
L.visible_message("<span class='revennotice'>The glow from [L] fades \
away.</span>")
L.grab_ghost()

View File

@@ -126,7 +126,7 @@
stat_allowed = 1
marked_item.name = "Ensouled [marked_item.name]"
marked_item.desc = "A terrible aura surrounds this item, its very existence is offensive to life itself..."
marked_item.color = "#003300"
marked_item.add_atom_colour("#003300", ADMIN_COLOUR_PRIORITY)
M << "<span class='userdanger'>With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!</span>"
M.set_species(/datum/species/skeleton)
current_body = M.mind.current

View File

@@ -65,6 +65,7 @@
desc = "A distortion in spacetime. You can hear faint music..."
icon_state = "wave1"
color = "#8A2BE2"
atom_colours = list("", "", "", "#8A2BE2")
var/obj/effect/cross_action/spacetime_dist/linked_dist
var/busy = FALSE
var/sound

View File

@@ -550,4 +550,5 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "severedtail"
color = "#161"
atom_colours = list("", "", "", "#161")
var/markings = "Smooth"

View File

@@ -33,7 +33,7 @@
if("spines" in L.dna.features)
L.dna.features -= "spines"
var/obj/item/severedtail/S = new(get_turf(target))
S.color = "#[L.dna.features["mcolor"]]"
S.add_atom_colour("#[L.dna.features["mcolor"]]", FIXED_COLOUR_PRIORITY)
S.markings = "[L.dna.features["tail"]]"
L.update_body()
return 1