[MIRROR] ports matrix recolouring, Ports Colourmate update, ports simple mob/robot recolouring from CHOMP (#7997)

Co-authored-by: Casey <a.roaming.shadow@gmail.com>
Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
CHOMPStation2
2024-03-18 09:43:40 -07:00
committed by GitHub
parent 5061d322c1
commit 93d48c1680
34 changed files with 687 additions and 1274 deletions

View File

@@ -8,4 +8,4 @@
///color inherent to the atom (e.g. blob color)
#define FIXED_COLOUR_PRIORITY 4
///how many priority levels there are.
#define COLOUR_PRIORITY_AMOUNT 4
#define COLOUR_PRIORITY_AMOUNT 4

4
code/__defines/lum.dm Normal file
View File

@@ -0,0 +1,4 @@
//Luma coefficients suggested for HDTVs. If you change these, make sure they add up to 1.
#define LUMA_R 0.213
#define LUMA_G 0.715
#define LUMA_B 0.072

View File

@@ -33,8 +33,3 @@
#define VANTAG_VORE_DE "vantag_vore_de"
#define VANTAG_VORE_DD "vantag_vore_dd"
#define VANTAG_VORE_DA "vantag_vore_da"
// ColorMate states
#define COLORMATE_TINT 1
#define COLORMATE_HSV 2
#define COLORMATE_MATRIX 3

View File

@@ -14,6 +14,11 @@
#define VANTAG_KIDNAP "vantag_kidnap"
#define VANTAG_KILL "vantag_kill"
// ColorMate states
#define COLORMATE_TINT 1
#define COLORMATE_HSV 2
#define COLORMATE_MATRIX 3
#define DEPARTMENT_OFFDUTY "Off-Duty"
#define ANNOUNCER_NAME "Facility PA"

View File

@@ -80,7 +80,7 @@
Blend(M, ICON_ADD)
/proc/BlendRGB(rgb1, rgb2, amount)
var/list/RGB1 = ReadRGB(rgb1) //CHOMPEdit - Better rgb blend
var/list/RGB1 = ReadRGB(rgb1)
var/list/RGB2 = ReadRGB(rgb2)
// add missing alpha if needed

View File

@@ -27,7 +27,7 @@
var/icon/west = get_flat_icon(N, WEST, no_anim = no_anim)
qdel(N)
//Starts with a blank icon because of byond bugs.
var/icon/full = icon('modular_chomp/icons/system/blank_32x32.dmi', "")
var/icon/full = icon('icons/system/blank_32x32.dmi', "")
full.Insert(north, dir = NORTH)
full.Insert(south, dir = SOUTH)
full.Insert(east, dir = EAST)
@@ -45,7 +45,7 @@
/proc/_get_flat_icon(image/A, defdir, no_anim, deficon, start)
// start with blank image
var/static/icon/template = icon('modular_chomp/icons/system/blank_32x32.dmi', "")
var/static/icon/template = icon('icons/system/blank_32x32.dmi', "")
#define BLANK icon(template)
@@ -265,4 +265,4 @@
#undef INDEX_Y_LOW
#undef INDEX_Y_HIGH
#undef BLANK
#undef BLANK

View File

@@ -235,6 +235,10 @@ world
Higher value means brighter color
*/
/**
* Porting the icons_ch.dm file straight from chompstation as I do not want to risk breaking stuff.
*/
/**
* reads RGB or RGBA values to list
* @return list(r, g, b) or list(r, g, b, a), values 0 to 255.

View File

@@ -183,6 +183,88 @@
var/hex_to_work_on = copytext(hex,5,7)
return hex2num(hex_to_work_on)
/**
* Convert HSL to RGB
*/
/proc/hsl2rgb(hue, saturation, lightness)
var/red
var/green
var/blue
if(saturation == 0)
red = lightness * 255
green = red
blue = red
else
var/a;var/b;
if(lightness < 0.5)
b = lightness * (1 + saturation)
else
b = (lightness + saturation) - (saturation * lightness)
a = 2 * lightness - b
red = round(255 * hue2rgb(a, b, hue + (1/3)), 1)
green = round(255 * hue2rgb(a, b, hue), 1)
blue = round(255 * hue2rgb(a, b, hue - (1/3)), 1)
return list(red, green, blue)
/**
* Convert RBG to HSL
*/
/proc/rgb2hsl(red, green, blue)
red /= 255
green /= 255
blue /= 255
var/max = max(red, green, blue)
var/min = min(red, green, blue)
var/range = max - min
var/hue = 0
var/saturation = 0
var/lightness = 0
lightness = (max + min) / 2
if(range != 0)
if(lightness < 0.5)
saturation = range / (max + min)
else
saturation = range / (2 - max - min)
var/dred = ((max - red) / (6 * max)) + 0.5
var/dgreen = ((max - green) / (6 * max)) + 0.5
var/dblue = ((max - blue) / (6 * max)) + 0.5
if(max == red)
hue = dblue - dgreen
else if(max == green)
hue = dred - dblue + (1 / 3)
else
hue = dgreen - dred + (2 / 3)
if(hue < 0)
hue++
else if(hue > 1)
hue--
return list(hue, saturation, lightness)
/**
* Convert hue to RGB
*/
/proc/hue2rgb(a, b, hue)
if(hue < 0)
hue++
else if(hue > 1)
hue--
if(6*hue < 1)
return (a + (b - a) * 6 * hue)
if(2*hue < 1)
return b
if(3*hue < 2)
return (a + (b - a) * ((2 / 3) - hue) * 6)
return a
// heat2color functions. Adapted from: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
/proc/heat2color(temp)
return rgb(heat2color_r(temp), heat2color_g(temp), heat2color_b(temp))
@@ -211,6 +293,53 @@
else
. = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
/**
* Assumes format #RRGGBB #rrggbb
*/
/proc/color_hex2num(A)
if(!A || length(A) != length_char(A))
return 0
var/R = hex2num(copytext(A, 2, 4))
var/G = hex2num(copytext(A, 4, 6))
var/B = hex2num(copytext(A, 6, 8))
return R+G+B
/**
*! Word of warning:
* Using a matrix like this as a color value will simplify it back to a string after being set.
*/
/proc/color_hex2color_matrix(string)
var/length = length(string)
if((length != 7 && length != 9) || length != length_char(string))
return color_matrix_identity()
var/r = hex2num(copytext(string, 2, 4)) / 255
var/g = hex2num(copytext(string, 4, 6)) / 255
var/b = hex2num(copytext(string, 6, 8)) / 255
var/a = 1
if(length == 9)
a = hex2num(copytext(string, 8, 10)) / 255
if(!isnum(r) || !isnum(g) || !isnum(b) || !isnum(a))
return color_matrix_identity()
return list(
r,0,0,0,0,
g,0,0,0,0,
b,0,0,0,0,
a,0,0,0,0,
)
/**
* Will drop all values not on the diagonal.
*/
/proc/color_matrix2color_hex(list/the_matrix)
if(!istype(the_matrix) || the_matrix.len != 20)
return "#ffffffff"
return rgb(
the_matrix[1] * 255, // R
the_matrix[6] * 255, // G
the_matrix[11] * 255, // B
the_matrix[16] * 255, // A
)
// Very ugly, BYOND doesn't support unix time and rounding errors make it really hard to convert it to BYOND time.
// returns "YYYY-MM-DD" by default
/proc/unix2date(timestamp, seperator = "-")

View File

@@ -306,6 +306,10 @@ var/list/gamemode_cache = list()
var/static/invoke_youtubedl = null
//Enables/Disables the appropriate mob type from obtaining the verb on spawn. Still allows admins to manually give it to them.
var/static/allow_robot_recolor = FALSE
var/static/allow_simple_mob_recolor = FALSE
var/static/asset_transport
var/static/cache_assets = FALSE
@@ -1017,6 +1021,13 @@ var/list/gamemode_cache = list()
if("asset_cdn_url")
config.asset_cdn_url = value
//ChompEDIT - these belong here
if("allow_robot_recolor")
config.allow_robot_recolor = 1
if("allow_simple_mob_recolor")
config.allow_simple_mob_recolor = 1
//ChompEDIT End
else
log_misc("Unknown setting in configuration: '[name]'")
@@ -1085,6 +1096,12 @@ var/list/gamemode_cache = list()
if("loadout_whitelist")
config.loadout_whitelist = text2num(value)
/* //ChompEDIT - wrong place
if("allow_robot_recolor")
config.allow_robot_recolor = 1
if("allow_simple_mob_recolor")
config.allow_simple_mob_recolor = 1
*/
else
log_misc("Unknown setting in configuration: '[name]'")

View File

@@ -380,3 +380,88 @@
. |= GLOB.bitfields[bitfield][flag]
else
return
/datum/browser/modal/color_matrix_picker
var/color_matrix
/datum/browser/modal/color_matrix_picker/New(mob/user, message, title, button1 = "Ok", button2, button3, stealfocus = TRUE, timeout = 0, list/values)
if(!user)
return
if(!values)
values = list(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
if(values.len < 12)
values.len = 12
var/list/output = list()
output += "<form><input type='hidden' name='src' value='[REF(src)]'>"
output += "[message]"
#define MATRIX_FIELD(field, default) "<b><label for='[##field]'>[##field]</label></b> <input type='number' step='0.001' name='[field]' value='[default]'>"
output += "<br><br>"
output += MATRIX_FIELD("rr", values[1])
output += MATRIX_FIELD("gr", values[4])
output += MATRIX_FIELD("br", values[7])
output += "<br><br>"
output += MATRIX_FIELD("rg", values[2])
output += MATRIX_FIELD("gg", values[5])
output += MATRIX_FIELD("bg", values[8])
output += "<br><br>"
output += MATRIX_FIELD("rb", values[3])
output += MATRIX_FIELD("gb", values[6])
output += MATRIX_FIELD("bb", values[9])
output += "<br><br>"
output += MATRIX_FIELD("cr", values[10])
output += MATRIX_FIELD("cg", values[11])
output += MATRIX_FIELD("cb", values[12])
output += "<br><br>"
#undef MATRIX_FIELD
output += {"</ul><div style="text-align:center">
<button type="submit" name="button" value="1" style="font-size:large;float:[( button2 ? "left" : "right" )]">[button1]</button>"}
if (button2)
output += {"<button type="submit" name="button" value="2" style="font-size:large;[( button3 ? "" : "float:right" )]">[button2]</button>"}
if (button3)
output += {"<button type="submit" name="button" value="3" style="font-size:large;float:right">[button3]</button>"}
output += {"</form></div>"}
..(user, ckey("[user]-[message]-[title]-[world.time]-[rand(1,10000)]"), title, 800, 400, src, stealfocus, timeout)
set_content(output.Join(""))
/datum/browser/modal/color_matrix_picker/Topic(href, list/href_list)
if(href_list["close"] || !user)
opentime = 0
return
if(href_list["button"])
var/button = text2num(href_list["button"])
if(ISINRANGE(button, 1, 3))
selectedbutton = button
var/list/cm = rgb_construct_color_matrix(
text2num(href_list["rr"]),
text2num(href_list["rg"]),
text2num(href_list["rb"]),
text2num(href_list["gr"]),
text2num(href_list["gg"]),
text2num(href_list["gb"]),
text2num(href_list["br"]),
text2num(href_list["bg"]),
text2num(href_list["bb"]),
text2num(href_list["cr"]),
text2num(href_list["cg"]),
text2num(href_list["cb"])
)
if(cm)
color_matrix = cm
opentime = 0
close()
/proc/color_matrix_picker(mob/user, message, title, button1 = "Ok", button2, button3, stealfocus, timeout = 10 MINUTES, list/values)
if(!istype(user))
if(istype(user, /client))
var/client/C = user
user = C.mob
else
return
var/datum/browser/modal/color_matrix_picker/B = new(user, message, title, button1, button2, button3, stealfocus, timeout, values)
B.open()
B.wait()
return list("button" = B.selectedbutton, "matrix" = B.color_matrix)

View File

@@ -34,12 +34,6 @@
. = ..()
/datum/ColorMate/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ColorMate", name)
ui.open()
/datum/ColorMate/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ColorMate", src.name)

View File

@@ -140,4 +140,4 @@ GLOBAL_REAL_VAR(_appearance_var_list) = list(
DEBUG_APPEARANCE_VAR(transform)
DEBUG_APPEARANCE_VAR(underlays)
// DEBUG_APPEARANCE_VAR(vis_flags)
#undef DEBUG_APPEARANCE_VAR
#undef DEBUG_APPEARANCE_VAR

View File

@@ -49,6 +49,13 @@
var/chat_color_darkened
/// The chat color var, without alpha.
var/chat_color_hover
//! Colors
/**
* used to store the different colors on an atom
*
* its inherent color, the colored paint applied on it, special color effect etc...
*/
var/list/atom_colours
/atom/New(loc, ...)
// Don't call ..() unless /datum/New() ever exists
@@ -731,3 +738,51 @@
// Airflow and ZAS zones now uses CanZASPass() instead of this proc.
/atom/proc/CanPass(atom/movable/mover, turf/target)
return !density
//! ## 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"
*/
/// 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.len)
atom_colours = list()
atom_colours.len = COLOUR_PRIORITY_AMOUNT //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, coloration)
if(!atom_colours)
atom_colours = list()
atom_colours.len = COLOUR_PRIORITY_AMOUNT //four priority levels currently.
if(colour_priority > atom_colours.len)
return
if(coloration && atom_colours[colour_priority] != coloration)
return //if we don't have the expected color (for a specific priority) to remove, do nothing
atom_colours[colour_priority] = null
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()
atom_colours.len = COLOUR_PRIORITY_AMOUNT //four priority levels currently.
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

@@ -1,64 +1,81 @@
/* CHOMPStation edit - File overidden. See modular_chomp/code/game/machinery/colormate.dm
// I'm honestly pretty sure that short of stuffing five million things into this
// there's absolutely no way it could ever have any performance impact
// Given that all it does is set the color var
// But just in case it's cursed in some arcane horrible way
// I'm going to leave this limit here
#define MAX_PROCESSING 10 // Arbitrary performance insurance
/obj/machinery/gear_painter
name = "Color Mate"
desc = "A machine to give your apparel a fresh new color! Recommended to use with white items for best results."
desc = "A machine to give your apparel a fresh new color!"
icon = 'icons/obj/vending_vr.dmi'
icon_state = "colormate"
density = TRUE
anchored = TRUE
var/list/processing = list()
var/atom/movable/inserted
var/activecolor = "#FFFFFF"
var/list/color_matrix_last
var/active_mode = COLORMATE_HSV
var/build_hue = 0
var/build_sat = 1
var/build_val = 1
/// Allow holder'd mobs
var/allow_mobs = TRUE
/// Minimum lightness for normal mode
var/minimum_normal_lightness = 50
/// Minimum lightness for matrix mode, tested using 4 test colors of full red, green, blue, white.
var/minimum_matrix_lightness = 75
/// Minimum matrix tests that must pass for something to be considered a valid color (see above)
var/minimum_matrix_tests = 2
/// Temporary messages
var/temp
var/list/allowed_types = list(
/obj/item/clothing,
/obj/item/weapon/storage/backpack,
/obj/item/weapon/storage/belt,
/obj/item/device/radio/headset
)
/obj/item/clothing,
/obj/item/weapon/storage/backpack,
/obj/item/weapon/storage/belt,
/obj/item/toy
)
/obj/machinery/gear_painter/Initialize(mapload)
. = ..()
color_matrix_last = list(
1, 0, 0,
0, 1, 0,
0, 0, 1,
0, 0, 0,
)
/obj/machinery/gear_painter/update_icon()
if(panel_open)
icon_state = "colormate_open"
else if(inoperable())
icon_state = "colormate_off"
else if(processing.len)
else if(inserted)
icon_state = "colormate_active"
else
icon_state = "colormate"
/obj/machinery/gear_painter/Destroy()
for(var/atom/movable/O in processing)
O.forceMove(drop_location())
processing.Cut()
if(inserted) //please i beg you do not drop nulls
inserted.forceMove(drop_location())
return ..()
/obj/machinery/gear_painter/attackby(obj/item/W, mob/user)
if(LAZYLEN(processing) >= MAX_PROCESSING)
to_chat(user, "<span class='warning'>The machine is full.</span>")
/obj/machinery/gear_painter/attackby(obj/item/I, mob/living/user)
if(inserted)
to_chat(user, SPAN_WARNING("The machine is already loaded."))
return
if(default_deconstruction_screwdriver(user, W))
if(default_deconstruction_screwdriver(user, I))
return
if(default_deconstruction_crowbar(user, W))
if(default_deconstruction_crowbar(user, I))
return
if(default_unfasten_wrench(user, W, 40))
if(default_unfasten_wrench(user, I, 40))
return
if(is_type_in_list(W, allowed_types) && !inoperable())
user.visible_message("<span class='notice'>[user] inserts \the [W] into the Color Mate receptable.</span>")
user.drop_from_inventory(W)
W.forceMove(src)
processing |= W
if(is_type_in_list(I, allowed_types) && !inoperable())
user.visible_message("<span class='notice'>[user] inserts \the [I] into the Color Mate receptable.</span>")
user.drop_from_inventory(I)
I.forceMove(src)
inserted = I
SStgui.update_uis(src)
else
..()
update_icon()
return ..()
/obj/machinery/gear_painter/attack_hand(mob/user)
if(..())
@@ -71,50 +88,209 @@
ui = new(user, src, "ColorMate", name)
ui.open()
/obj/machinery/gear_painter/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
var/list/data = ..()
/obj/machinery/gear_painter/proc/insert_mob(mob/victim, mob/user)
if(inserted)
return
if(user)
visible_message(SPAN_WARNING("[user] stuffs [victim] into [src]!"))
inserted = victim
inserted.forceMove(src)
var/list/items = list()
for(var/atom/movable/O in processing)
items.Add("[O]")
data["items"] = items
/obj/machinery/gear_painter/AllowDrop()
return FALSE
data["activecolor"] = activecolor
return data
// /obj/machinery/gear_painter/handle_atom_del(atom/movable/AM)
// if(AM == inserted)
// inserted = null
// return ..()
/obj/machinery/gear_painter/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
if(..())
return TRUE
add_fingerprint(usr)
switch(action)
if("select")
var/newcolor = input(usr, "Choose a color.", "", activecolor) as color|null
if(newcolor)
activecolor = newcolor
. = TRUE
if("paint")
for(var/atom/movable/O in processing)
O.color = activecolor
CHECK_TICK
playsound(src, 'sound/effects/spray3.ogg', 50, 1)
. = TRUE
if("clear")
for(var/atom/movable/O in processing)
O.color = initial(O.color)
CHECK_TICK
playsound(src, 'sound/effects/spray3.ogg', 50, 1)
. = TRUE
if("eject")
for(var/atom/movable/O in processing)
O.forceMove(drop_location())
CHECK_TICK
processing.Cut()
. = TRUE
/obj/machinery/gear_painter/AltClick(mob/user)
. = ..()
drop_item()
/obj/machinery/gear_painter/proc/drop_item()
if(!oview(1,src))
return
if(!inserted)
return
to_chat(usr, SPAN_NOTICE("You remove [inserted] from [src]"))
inserted.forceMove(drop_location())
var/mob/living/user = usr
if(istype(user))
user.put_in_hands(inserted)
inserted = null
update_icon()
/*
SStgui.update_uis(src)
/obj/machinery/gear_painter/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ColorMate", src.name)
ui.set_autoupdate(FALSE) //This might be a bit intensive, better to not update it every few ticks
ui.open()
/obj/machinery/gear_painter/tgui_data(mob/user)
. = list()
.["activemode"] = active_mode
.["matrixcolors"] = list(
"rr" = color_matrix_last[1],
"rg" = color_matrix_last[2],
"rb" = color_matrix_last[3],
"gr" = color_matrix_last[4],
"gg" = color_matrix_last[5],
"gb" = color_matrix_last[6],
"br" = color_matrix_last[7],
"bg" = color_matrix_last[8],
"bb" = color_matrix_last[9],
"cr" = color_matrix_last[10],
"cg" = color_matrix_last[11],
"cb" = color_matrix_last[12],
)
.["buildhue"] = build_hue
.["buildsat"] = build_sat
.["buildval"] = build_val
if(temp)
.["temp"] = temp
if(inserted)
.["item"] = list()
.["item"]["name"] = inserted.name
.["item"]["sprite"] = icon2base64(get_flat_icon(inserted,dir=SOUTH,no_anim=TRUE))
.["item"]["preview"] = icon2base64(build_preview())
else
.["item"] = null
/obj/machinery/gear_painter/tgui_act(action, params)
. = ..()
if(.)
return
if(inserted)
switch(action)
if("switch_modes")
active_mode = text2num(params["mode"])
return TRUE
if("choose_color")
var/chosen_color = input(usr, "Choose a color: ", "ColorMate colour picking", activecolor) as color|null
if(chosen_color)
activecolor = chosen_color
return TRUE
if("paint")
do_paint(usr)
temp = "Painted Successfully!"
return TRUE
if("drop")
temp = ""
drop_item()
return TRUE
if("clear")
inserted.remove_atom_colour(FIXED_COLOUR_PRIORITY)
playsound(src, 'sound/effects/spray3.ogg', 50, 1)
temp = "Cleared Successfully!"
return TRUE
if("set_matrix_color")
color_matrix_last[params["color"]] = params["value"]
return TRUE
if("set_hue")
build_hue = clamp(text2num(params["buildhue"]), 0, 360)
return TRUE
if("set_sat")
build_sat = clamp(text2num(params["buildsat"]), -10, 10)
return TRUE
if("set_val")
build_val = clamp(text2num(params["buildval"]), -10, 10)
return TRUE
/obj/machinery/gear_painter/proc/do_paint(mob/user)
var/color_to_use
switch(active_mode)
if(COLORMATE_TINT)
color_to_use = activecolor
if(COLORMATE_MATRIX)
color_to_use = rgb_construct_color_matrix(
text2num(color_matrix_last[1]),
text2num(color_matrix_last[2]),
text2num(color_matrix_last[3]),
text2num(color_matrix_last[4]),
text2num(color_matrix_last[5]),
text2num(color_matrix_last[6]),
text2num(color_matrix_last[7]),
text2num(color_matrix_last[8]),
text2num(color_matrix_last[9]),
text2num(color_matrix_last[10]),
text2num(color_matrix_last[11]),
text2num(color_matrix_last[12]),
)
if(COLORMATE_HSV)
color_to_use = color_matrix_hsv(build_hue, build_sat, build_val)
color_matrix_last = color_to_use
if(!color_to_use || !check_valid_color(color_to_use, user))
to_chat(user, SPAN_NOTICE("Invalid color."))
return FALSE
inserted.add_atom_colour(color_to_use, FIXED_COLOUR_PRIORITY)
playsound(src, 'sound/effects/spray3.ogg', 50, 1)
return TRUE
/// Produces the preview image of the item, used in the UI, the way the color is not stacking is a sin.
/obj/machinery/gear_painter/proc/build_preview()
if(inserted) //sanity
var/list/cm
switch(active_mode)
if(COLORMATE_MATRIX)
cm = rgb_construct_color_matrix(
text2num(color_matrix_last[1]),
text2num(color_matrix_last[2]),
text2num(color_matrix_last[3]),
text2num(color_matrix_last[4]),
text2num(color_matrix_last[5]),
text2num(color_matrix_last[6]),
text2num(color_matrix_last[7]),
text2num(color_matrix_last[8]),
text2num(color_matrix_last[9]),
text2num(color_matrix_last[10]),
text2num(color_matrix_last[11]),
text2num(color_matrix_last[12]),
)
if(!check_valid_color(cm, usr))
return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
if(COLORMATE_TINT)
if(!check_valid_color(activecolor, usr))
return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
if(COLORMATE_HSV)
cm = color_matrix_hsv(build_hue, build_sat, build_val)
color_matrix_last = cm
if(!check_valid_color(cm, usr))
return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
var/cur_color = inserted.color
inserted.color = null
inserted.color = (active_mode == COLORMATE_TINT ? activecolor : cm)
var/icon/preview = get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
inserted.color = cur_color
temp = ""
. = preview
/obj/machinery/gear_painter/proc/check_valid_color(list/cm, mob/user)
if(!islist(cm)) // normal
var/list/HSV = ReadHSV(RGBtoHSV(cm))
if(HSV[3] < minimum_normal_lightness)
temp = "[cm] is too dark (Minimum lightness: [minimum_normal_lightness])"
return FALSE
return TRUE
else // matrix
// We test using full red, green, blue, and white
// A predefined number of them must pass to be considered valid
var/passed = 0
#define COLORTEST(thestring, thematrix) passed += (ReadHSV(RGBtoHSV(RGBMatrixTransform(thestring, thematrix)))[3] >= minimum_matrix_lightness)
COLORTEST("FF0000", cm)
COLORTEST("00FF00", cm)
COLORTEST("0000FF", cm)
COLORTEST("FFFFFF", cm)
#undef COLORTEST
if(passed < minimum_matrix_tests)
temp = "Matrix is too dark. (passed [passed] out of [minimum_matrix_tests] required tests. Minimum lightness: [minimum_matrix_lightness])."
return FALSE
return TRUE

View File

@@ -237,4 +237,4 @@ list(0.393,0.349,0.272,0, 0.769,0.686,0.534,0, 0.189,0.168,0.131,0, 0,0,0,1, 0,0
return rgba_construct_color_matrix(0.39, 0.39, 0.39, 0, 0.5, 0.5, 0.5, 0, 0.11, 0.11, 0.11, 0, 0, 0, 0, 1, max(-0.5, (L1[1] - 255) / 255), max(-0.5, (L1[2] - 255) / 255), max(-0.5, (L1[3] - 255) / 255), 0)
else
// alpha
return rgba_construct_color_matrix(0.39, 0.39, 0.39, 0, 0.5, 0.5, 0.5, 0, 0.11, 0.11, 0.11, 0, 0, 0, 0, 0, max(-0.5, (L1[1] - 255) / 255), max(-0.5, (L1[2] - 255) / 255), max(-0.5, (L1[3] - 255) / 255), L1[4] / 255)
return rgba_construct_color_matrix(0.39, 0.39, 0.39, 0, 0.5, 0.5, 0.5, 0, 0.11, 0.11, 0.11, 0, 0, 0, 0, 0, max(-0.5, (L1[1] - 255) / 255), max(-0.5, (L1[2] - 255) / 255), max(-0.5, (L1[3] - 255) / 255), L1[4] / 255)

View File

@@ -224,7 +224,8 @@ var/list/admin_verbs_server = list(
/client/proc/recipe_dump,
/client/proc/panicbunker,
/client/proc/paranoia_logging,
/client/proc/ip_reputation
/client/proc/ip_reputation,
/client/proc/toggle_spawning_with_recolour
)
var/list/admin_verbs_debug = list(

View File

@@ -121,3 +121,20 @@
usr << browse(dat, "window=library")
onclose(usr, "library")
/client/proc/toggle_spawning_with_recolour()
set name = "Toggle Simple/Robot recolour verb"
set desc = "Makes it so new robots/simple_mobs spawn with a verb to recolour themselves for this round. You must set them separately."
set category = "Server"
if(!check_rights(R_SERVER))
return
var/which = tgui_alert(usr, "Which do you want to toggle?", "Choose Recolour Toggle", list("Robot", "Simple Mob"))
switch(which)
if("Robot")
config.allow_robot_recolor = !config.allow_robot_recolor
to_chat(usr, "You have [config.allow_robot_recolor ? "enabled" : "disabled"] newly spawned cyborgs to spawn with the recolour verb")
if("Simple Mob")
config.allow_simple_mob_recolor = !config.allow_simple_mob_recolor
to_chat(usr, "You have [config.allow_simple_mob_recolor ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb")

View File

@@ -40,14 +40,48 @@
/datum/gear_tweak/color/tweak_item(var/obj/item/I, var/metadata)
if(valid_colors && !(metadata in valid_colors))
return
//CHOMPEdit start
if(!metadata || (metadata == "#ffffff"))
return
if(istype(I))
I.add_atom_colour(metadata, FIXED_COLOUR_PRIORITY)
else
I.color = metadata // fuck off underwear
//CHOMPEdit end
I.color = metadata
GLOBAL_DATUM_INIT(gear_tweak_free_matrix_recolor, /datum/gear_tweak/matrix_recolor, new)
/datum/gear_tweak/matrix_recolor
/datum/gear_tweak/matrix_recolor/get_contents(var/metadata)
if(islist(metadata) && length(metadata))
return "Matrix Recolor: [english_list(metadata)]"
return "Matrix Recolor"
/datum/gear_tweak/matrix_recolor/get_default()
return null
/datum/gear_tweak/matrix_recolor/get_metadata(user, metadata)
var/list/returned = color_matrix_picker(user, "Pick a color matrix for this item", "Matrix Recolor", "Ok", "Erase", "Cancel", TRUE, 10 MINUTES, islist(metadata) && metadata)
var/list/L = returned["matrix"]
if(returned["button"] == 3)
return metadata
if((returned["button"] == 2) || !islist(L) || !ISINRANGE(L.len, 9, 20))
return list()
var/identity = TRUE
var/static/list/ones = list(1, 5, 9)
for(var/i in 1 to L.len)
if(L[i] != ((i in ones)? 1 : 0))
identity = FALSE
break
return identity? list() : L
/datum/gear_tweak/matrix_recolor/tweak_item(obj/item/I, metadata)
. = ..()
if(!islist(metadata) || (length(metadata) < 12))
return
if(istype(I))
I.add_atom_colour(metadata, FIXED_COLOUR_PRIORITY)
else
I.color = metadata
/*
* Path adjustment

View File

@@ -116,6 +116,8 @@
/mob/living/proc/lend_prey_control
)
var/has_recoloured = FALSE
/mob/living/silicon/robot/New(loc, var/unfinished = 0)
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
@@ -177,6 +179,8 @@
hud_list[IMPTRACK_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_IMPTRACK)
hud_list[SPECIALROLE_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_SPECIAL)
/mob/living/silicon/robot/LateInitialize()
. = ..()
update_icon()
@@ -832,6 +836,18 @@
module.Destroy()
module = null
updatename("Default")
has_recoloured = FALSE
/mob/living/silicon/robot/proc/ColorMate()
set name = "Recolour Module"
set category = "Robot Commands"
set desc = "Allows to recolour once."
if(!has_recoloured)
var/datum/ColorMate/recolour = new /datum/ColorMate(usr)
recolour.tgui_interact(usr)
return
to_chat(usr, "You've already recoloured yourself once. Ask for a module reset for another.")
/mob/living/silicon/robot/attack_hand(mob/user)
@@ -1312,10 +1328,14 @@
/mob/living/silicon/robot/proc/add_robot_verbs()
src.verbs |= robot_verbs_default
src.verbs |= silicon_subsystems
if(config.allow_robot_recolor)
src.verbs |= /mob/living/silicon/robot/proc/ColorMate
/mob/living/silicon/robot/proc/remove_robot_verbs()
src.verbs -= robot_verbs_default
src.verbs -= silicon_subsystems
if(config.allow_robot_recolor)
src.verbs -= /mob/living/silicon/robot/proc/ColorMate //ChompEDIT - probable copypaste error
// Uses power from cyborg's cell. Returns 1 on success or 0 on failure.
// Properly converts using CELLRATE now! Amount is in Joules.

View File

@@ -176,6 +176,8 @@
var/injury_enrages = FALSE // Do injuries enrage (aka strengthen) our mob? If yes, we'll interpret how hurt we are differently.
// VOREStation Add End
var/has_recoloured = FALSE
/mob/living/simple_mob/Initialize()
verbs -= /mob/verb/observe
health = maxHealth
@@ -200,6 +202,10 @@
if(organ_names)
organ_names = GET_DECL(organ_names)
if(config.allow_simple_mob_recolor)
verbs |= /mob/living/simple_mob/proc/ColorMate
return ..()
/mob/living/simple_mob/Destroy()
@@ -349,3 +355,14 @@
. = ..() // Calling parent here, actually updating our mob on how hurt we are.
// VOREStation Add End
/mob/living/simple_mob/proc/ColorMate()
set name = "Recolour"
set category = "Abilities"
set desc = "Allows to recolour once."
if(!has_recoloured)
var/datum/ColorMate/recolour = new /datum/ColorMate(usr)
recolour.tgui_interact(usr)
return
to_chat(usr, "You've already recoloured yourself once. You are only allowed to recolour yourself once during a around.")

View File

@@ -85,7 +85,9 @@
/proc/is_admin(var/mob/user)
return check_rights(R_ADMIN|R_EVENT, 0, user) != 0
/* CHOMPEdit - See modular_chomp/code/_HELPERS/type2type/color.dm
/**
* Moved into its own file as part of port from CHOMP.
*
/proc/hsl2rgb(h, s, l)
return //TODO: Implement
*/

View File

@@ -663,3 +663,14 @@ JUKEBOX_TRACK_FILES config/jukebox.json
## Useful for developers to debug potential spritesheet issues to determine where the issue is cropping up (either in DM-side sprite generation or in the TGUI-side display of said spritesheet).
## Will only seek to waste disk space if ran on production.
#SAVE_SPRITESHEETS
# Controls whether robots may recolour their modules once/module reset by giving them the recolour module verb
# Admins may manually give them the verb even if disabled
# Uncomment to enable
#ALLOW_ROBOT_RECOLOR
# Controls whether simple mobs may recolour themselves once/spawn by giving them the recolour verb
# Admins may manually give them the verb even if disabled
# Uncomment to enable
#ALLOW_SIMPLE_MOB_RECOLOR

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

View File

@@ -1,172 +0,0 @@
/**
* Convert RBG to HSL
*/
/proc/rgb2hsl(red, green, blue)
red /= 255
green /= 255
blue /= 255
var/max = max(red, green, blue)
var/min = min(red, green, blue)
var/range = max - min
var/hue = 0
var/saturation = 0
var/lightness = 0
lightness = (max + min) / 2
if(range != 0)
if(lightness < 0.5)
saturation = range / (max + min)
else
saturation = range / (2 - max - min)
var/dred = ((max - red) / (6 * max)) + 0.5
var/dgreen = ((max - green) / (6 * max)) + 0.5
var/dblue = ((max - blue) / (6 * max)) + 0.5
if(max == red)
hue = dblue - dgreen
else if(max == green)
hue = dred - dblue + (1 / 3)
else
hue = dgreen - dred + (2 / 3)
if(hue < 0)
hue++
else if(hue > 1)
hue--
return list(hue, saturation, lightness)
/**
* Convert HSL to RGB
*/
/proc/hsl2rgb(hue, saturation, lightness)
var/red
var/green
var/blue
if(saturation == 0)
red = lightness * 255
green = red
blue = red
else
var/a;var/b;
if(lightness < 0.5)
b = lightness * (1 + saturation)
else
b = (lightness + saturation) - (saturation * lightness)
a = 2 * lightness - b
red = round(255 * hue2rgb(a, b, hue + (1/3)), 1)
green = round(255 * hue2rgb(a, b, hue), 1)
blue = round(255 * hue2rgb(a, b, hue - (1/3)), 1)
return list(red, green, blue)
/**
* Convert hue to RGB
*/
/proc/hue2rgb(a, b, hue)
if(hue < 0)
hue++
else if(hue > 1)
hue--
if(6*hue < 1)
return (a + (b - a) * 6 * hue)
if(2*hue < 1)
return b
if(3*hue < 2)
return (a + (b - a) * ((2 / 3) - hue) * 6)
return a
/**
* Convert Kelvin to RGB
*
* Adapted from http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
*/
/proc/heat2colour(temp)
return rgb(
heat2colour_r(temp),
heat2colour_g(temp),
heat2colour_b(temp),
)
/**
* Convert Kelvin for the Red channel
*/
/proc/heat2colour_r(temp)
temp /= 100
if(temp <= 66)
. = 255
else
. = max(0, min(255, 329.698727446 * (temp - 60) ** -0.1332047592))
/**
* Convert Kelvin for the Green channel
*/
/proc/heat2colour_g(temp)
temp /= 100
if(temp <= 66)
. = max(0, min(255, 99.4708025861 * log(temp) - 161.1195681661))
else
. = max(0, min(255, 288.1221685293 * ((temp - 60) ** -0.075148492)))
/**
* Convert Kelvin for the Blue channel
*/
/proc/heat2colour_b(temp)
temp /= 100
if(temp >= 66)
. = 255
else
if(temp <= 16)
. = 0
else
. = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
/**
* Assumes format #RRGGBB #rrggbb
*/
/proc/color_hex2num(A)
if(!A || length(A) != length_char(A))
return 0
var/R = hex2num(copytext(A, 2, 4))
var/G = hex2num(copytext(A, 4, 6))
var/B = hex2num(copytext(A, 6, 8))
return R+G+B
/**
*! Word of warning:
* Using a matrix like this as a color value will simplify it back to a string after being set.
*/
/proc/color_hex2color_matrix(string)
var/length = length(string)
if((length != 7 && length != 9) || length != length_char(string))
return color_matrix_identity()
var/r = hex2num(copytext(string, 2, 4)) / 255
var/g = hex2num(copytext(string, 4, 6)) / 255
var/b = hex2num(copytext(string, 6, 8)) / 255
var/a = 1
if(length == 9)
a = hex2num(copytext(string, 8, 10)) / 255
if(!isnum(r) || !isnum(g) || !isnum(b) || !isnum(a))
return color_matrix_identity()
return list(
r,0,0,0,0,
g,0,0,0,0,
b,0,0,0,0,
a,0,0,0,0,
)
/**
* Will drop all values not on the diagonal.
*/
/proc/color_matrix2color_hex(list/the_matrix)
if(!istype(the_matrix) || the_matrix.len != 20)
return "#ffffffff"
return rgb(
the_matrix[1] * 255, // R
the_matrix[6] * 255, // G
the_matrix[11] * 255, // B
the_matrix[16] * 255, // A
)

View File

@@ -1,84 +0,0 @@
/datum/browser/modal/color_matrix_picker
var/color_matrix
/datum/browser/modal/color_matrix_picker/New(mob/user, message, title, button1 = "Ok", button2, button3, stealfocus = TRUE, timeout = 0, list/values)
if(!user)
return
if(!values)
values = list(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
if(values.len < 12)
values.len = 12
var/list/output = list()
output += "<form><input type='hidden' name='src' value='[REF(src)]'>"
output += "[message]"
#define MATRIX_FIELD(field, default) "<b><label for='[##field]'>[##field]</label></b> <input type='number' step='0.001' name='[field]' value='[default]'>"
output += "<br><br>"
output += MATRIX_FIELD("rr", values[1])
output += MATRIX_FIELD("gr", values[4])
output += MATRIX_FIELD("br", values[7])
output += "<br><br>"
output += MATRIX_FIELD("rg", values[2])
output += MATRIX_FIELD("gg", values[5])
output += MATRIX_FIELD("bg", values[8])
output += "<br><br>"
output += MATRIX_FIELD("rb", values[3])
output += MATRIX_FIELD("gb", values[6])
output += MATRIX_FIELD("bb", values[9])
output += "<br><br>"
output += MATRIX_FIELD("cr", values[10])
output += MATRIX_FIELD("cg", values[11])
output += MATRIX_FIELD("cb", values[12])
output += "<br><br>"
#undef MATRIX_FIELD
output += {"</ul><div style="text-align:center">
<button type="submit" name="button" value="1" style="font-size:large;float:[( button2 ? "left" : "right" )]">[button1]</button>"}
if (button2)
output += {"<button type="submit" name="button" value="2" style="font-size:large;[( button3 ? "" : "float:right" )]">[button2]</button>"}
if (button3)
output += {"<button type="submit" name="button" value="3" style="font-size:large;float:right">[button3]</button>"}
output += {"</form></div>"}
..(user, ckey("[user]-[message]-[title]-[world.time]-[rand(1,10000)]"), title, 800, 400, src, stealfocus, timeout)
set_content(output.Join(""))
/datum/browser/modal/color_matrix_picker/Topic(href, list/href_list)
if(href_list["close"] || !user)
opentime = 0
return
if(href_list["button"])
var/button = text2num(href_list["button"])
if(ISINRANGE(button, 1, 3))
selectedbutton = button
var/list/cm = rgb_construct_color_matrix(
text2num(href_list["rr"]),
text2num(href_list["rg"]),
text2num(href_list["rb"]),
text2num(href_list["gr"]),
text2num(href_list["gg"]),
text2num(href_list["gb"]),
text2num(href_list["br"]),
text2num(href_list["bg"]),
text2num(href_list["bb"]),
text2num(href_list["cr"]),
text2num(href_list["cg"]),
text2num(href_list["cb"])
)
if(cm)
color_matrix = cm
opentime = 0
close()
/proc/color_matrix_picker(mob/user, message, title, button1 = "Ok", button2, button3, stealfocus, timeout = 10 MINUTES, list/values)
if(!istype(user))
if(istype(user, /client))
var/client/C = user
user = C.mob
else
return
var/datum/browser/modal/color_matrix_picker/B = new(user, message, title, button1, button2, button3, stealfocus, timeout, values)
B.open()
B.wait()
return list("button" = B.selectedbutton, "matrix" = B.color_matrix)

View File

@@ -1,59 +1,5 @@
/atom
//! Colors
/**
* used to store the different colors on an atom
*
* its inherent color, the colored paint applied on it, special color effect etc...
*/
var/list/atom_colours
/// Lazylist of all images to update when we change z levels
/// You will need to manage adding/removing from this yourself, but I'll do the updating for you
var/list/image/update_on_z
//! ## 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"
*/
/// 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.len)
atom_colours = list()
atom_colours.len = COLOUR_PRIORITY_AMOUNT //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, coloration)
if(!atom_colours)
atom_colours = list()
atom_colours.len = COLOUR_PRIORITY_AMOUNT //four priority levels currently.
if(colour_priority > atom_colours.len)
return
if(coloration && atom_colours[colour_priority] != coloration)
return //if we don't have the expected color (for a specific priority) to remove, do nothing
atom_colours[colour_priority] = null
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()
atom_colours.len = COLOUR_PRIORITY_AMOUNT //four priority levels currently.
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

@@ -1,296 +0,0 @@
/obj/machinery/gear_painter
name = "Color Mate"
desc = "A machine to give your apparel a fresh new color!"
icon = 'icons/obj/vending_vr.dmi'
icon_state = "colormate"
density = TRUE
anchored = TRUE
var/atom/movable/inserted
var/activecolor = "#FFFFFF"
var/list/color_matrix_last
var/active_mode = COLORMATE_HSV
var/build_hue = 0
var/build_sat = 1
var/build_val = 1
/// Allow holder'd mobs
var/allow_mobs = TRUE
/// Minimum lightness for normal mode
var/minimum_normal_lightness = 50
/// Minimum lightness for matrix mode, tested using 4 test colors of full red, green, blue, white.
var/minimum_matrix_lightness = 75
/// Minimum matrix tests that must pass for something to be considered a valid color (see above)
var/minimum_matrix_tests = 2
/// Temporary messages
var/temp
var/list/allowed_types = list(
/obj/item/clothing,
/obj/item/weapon/storage/backpack,
/obj/item/weapon/storage/belt,
/obj/item/toy
)
/obj/machinery/gear_painter/Initialize(mapload)
. = ..()
color_matrix_last = list(
1, 0, 0,
0, 1, 0,
0, 0, 1,
0, 0, 0,
)
/obj/machinery/gear_painter/update_icon()
if(panel_open)
icon_state = "colormate_open"
else if(inoperable())
icon_state = "colormate_off"
else if(inserted)
icon_state = "colormate_active"
else
icon_state = "colormate"
/obj/machinery/gear_painter/Destroy()
if(inserted) //please i beg you do not drop nulls
inserted.forceMove(drop_location())
return ..()
/obj/machinery/gear_painter/attackby(obj/item/I, mob/living/user)
if(inserted)
to_chat(user, SPAN_WARNING("The machine is already loaded."))
return
if(default_deconstruction_screwdriver(user, I))
return
if(default_deconstruction_crowbar(user, I))
return
if(default_unfasten_wrench(user, I, 40))
return
if(is_type_in_list(I, allowed_types) && !inoperable())
user.visible_message("<span class='notice'>[user] inserts \the [I] into the Color Mate receptable.</span>")
user.drop_from_inventory(I)
I.forceMove(src)
inserted = I
SStgui.update_uis(src)
else
return ..()
/obj/machinery/gear_painter/attack_hand(mob/user)
if(..())
return
tgui_interact(user)
/obj/machinery/gear_painter/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ColorMate", name)
ui.open()
/obj/machinery/gear_painter/proc/insert_mob(mob/victim, mob/user)
if(inserted)
return
if(user)
visible_message(SPAN_WARNING("[user] stuffs [victim] into [src]!"))
inserted = victim
inserted.forceMove(src)
/obj/machinery/gear_painter/AllowDrop()
return FALSE
// /obj/machinery/gear_painter/handle_atom_del(atom/movable/AM)
// if(AM == inserted)
// inserted = null
// return ..()
/obj/machinery/gear_painter/AltClick(mob/user)
. = ..()
drop_item()
/obj/machinery/gear_painter/proc/drop_item()
if(!oview(1,src))
return
if(!inserted)
return
to_chat(usr, SPAN_NOTICE("You remove [inserted] from [src]"))
inserted.forceMove(drop_location())
var/mob/living/user = usr
if(istype(user))
user.put_in_hands(inserted)
inserted = null
update_icon()
SStgui.update_uis(src)
/obj/machinery/gear_painter/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ColorMate", src.name)
ui.set_autoupdate(FALSE) //This might be a bit intensive, better to not update it every few ticks
ui.open()
/obj/machinery/gear_painter/tgui_data(mob/user)
. = list()
.["activemode"] = active_mode
.["matrixcolors"] = list(
"rr" = color_matrix_last[1],
"rg" = color_matrix_last[2],
"rb" = color_matrix_last[3],
"gr" = color_matrix_last[4],
"gg" = color_matrix_last[5],
"gb" = color_matrix_last[6],
"br" = color_matrix_last[7],
"bg" = color_matrix_last[8],
"bb" = color_matrix_last[9],
"cr" = color_matrix_last[10],
"cg" = color_matrix_last[11],
"cb" = color_matrix_last[12],
)
.["buildhue"] = build_hue
.["buildsat"] = build_sat
.["buildval"] = build_val
if(temp)
.["temp"] = temp
if(inserted)
.["item"] = list()
.["item"]["name"] = inserted.name
.["item"]["sprite"] = icon2base64(get_flat_icon(inserted,dir=SOUTH,no_anim=TRUE))
.["item"]["preview"] = icon2base64(build_preview())
else
.["item"] = null
/obj/machinery/gear_painter/tgui_act(action, params)
. = ..()
if(.)
return
if(inserted)
switch(action)
if("switch_modes")
active_mode = text2num(params["mode"])
return TRUE
if("choose_color")
var/chosen_color = input(usr, "Choose a color: ", "ColorMate colour picking", activecolor) as color|null
if(chosen_color)
activecolor = chosen_color
return TRUE
if("paint")
do_paint(usr)
temp = "Painted Successfully!"
return TRUE
if("drop")
temp = ""
drop_item()
return TRUE
if("clear")
inserted.remove_atom_colour(FIXED_COLOUR_PRIORITY)
playsound(src, 'sound/effects/spray3.ogg', 50, 1)
temp = "Cleared Successfully!"
return TRUE
if("set_matrix_color")
color_matrix_last[params["color"]] = params["value"]
return TRUE
if("set_hue")
build_hue = clamp(text2num(params["buildhue"]), 0, 360)
return TRUE
if("set_sat")
build_sat = clamp(text2num(params["buildsat"]), -10, 10)
return TRUE
if("set_val")
build_val = clamp(text2num(params["buildval"]), -10, 10)
return TRUE
/obj/machinery/gear_painter/proc/do_paint(mob/user)
var/color_to_use
switch(active_mode)
if(COLORMATE_TINT)
color_to_use = activecolor
if(COLORMATE_MATRIX)
color_to_use = rgb_construct_color_matrix(
text2num(color_matrix_last[1]),
text2num(color_matrix_last[2]),
text2num(color_matrix_last[3]),
text2num(color_matrix_last[4]),
text2num(color_matrix_last[5]),
text2num(color_matrix_last[6]),
text2num(color_matrix_last[7]),
text2num(color_matrix_last[8]),
text2num(color_matrix_last[9]),
text2num(color_matrix_last[10]),
text2num(color_matrix_last[11]),
text2num(color_matrix_last[12]),
)
if(COLORMATE_HSV)
color_to_use = color_matrix_hsv(build_hue, build_sat, build_val)
color_matrix_last = color_to_use
if(!color_to_use || !check_valid_color(color_to_use, user))
to_chat(user, SPAN_NOTICE("Invalid color."))
return FALSE
inserted.add_atom_colour(color_to_use, FIXED_COLOUR_PRIORITY)
playsound(src, 'sound/effects/spray3.ogg', 50, 1)
return TRUE
/// Produces the preview image of the item, used in the UI, the way the color is not stacking is a sin.
/obj/machinery/gear_painter/proc/build_preview()
if(inserted) //sanity
var/list/cm
switch(active_mode)
if(COLORMATE_MATRIX)
cm = rgb_construct_color_matrix(
text2num(color_matrix_last[1]),
text2num(color_matrix_last[2]),
text2num(color_matrix_last[3]),
text2num(color_matrix_last[4]),
text2num(color_matrix_last[5]),
text2num(color_matrix_last[6]),
text2num(color_matrix_last[7]),
text2num(color_matrix_last[8]),
text2num(color_matrix_last[9]),
text2num(color_matrix_last[10]),
text2num(color_matrix_last[11]),
text2num(color_matrix_last[12]),
)
if(!check_valid_color(cm, usr))
return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
if(COLORMATE_TINT)
if(!check_valid_color(activecolor, usr))
return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
if(COLORMATE_HSV)
cm = color_matrix_hsv(build_hue, build_sat, build_val)
color_matrix_last = cm
if(!check_valid_color(cm, usr))
return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
var/cur_color = inserted.color
inserted.color = null
inserted.color = (active_mode == COLORMATE_TINT ? activecolor : cm)
var/icon/preview = get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
inserted.color = cur_color
temp = ""
. = preview
/obj/machinery/gear_painter/proc/check_valid_color(list/cm, mob/user)
if(!islist(cm)) // normal
var/list/HSV = ReadHSV(RGBtoHSV(cm))
if(HSV[3] < minimum_normal_lightness)
temp = "[cm] is too dark (Minimum lightness: [minimum_normal_lightness])"
return FALSE
return TRUE
else // matrix
// We test using full red, green, blue, and white
// A predefined number of them must pass to be considered valid
var/passed = 0
#define COLORTEST(thestring, thematrix) passed += (ReadHSV(RGBtoHSV(RGBMatrixTransform(thestring, thematrix)))[3] >= minimum_matrix_lightness)
COLORTEST("FF0000", cm)
COLORTEST("00FF00", cm)
COLORTEST("0000FF", cm)
COLORTEST("FFFFFF", cm)
#undef COLORTEST
if(passed < minimum_matrix_tests)
temp = "Matrix is too dark. (passed [passed] out of [minimum_matrix_tests] required tests. Minimum lightness: [minimum_matrix_lightness])."
return FALSE
return TRUE

View File

@@ -63,39 +63,3 @@ var/datum/gear_tweak/item_tf_spawn/gear_tweak_item_tf_spawn = new()
return
I.spawn_mob_type = simplemob_list[metadata]
I.spawn_mob_name = metadata
GLOBAL_DATUM_INIT(gear_tweak_free_matrix_recolor, /datum/gear_tweak/matrix_recolor, new)
/datum/gear_tweak/matrix_recolor
/datum/gear_tweak/matrix_recolor/get_contents(var/metadata)
if(islist(metadata) && length(metadata))
return "Matrix Recolor: [english_list(metadata)]"
return "Matrix Recolor"
/datum/gear_tweak/matrix_recolor/get_default()
return null
/datum/gear_tweak/matrix_recolor/get_metadata(user, metadata)
var/list/returned = color_matrix_picker(user, "Pick a color matrix for this item", "Matrix Recolor", "Ok", "Erase", "Cancel", TRUE, 10 MINUTES, islist(metadata) && metadata)
var/list/L = returned["matrix"]
if(returned["button"] == 3)
return metadata
if((returned["button"] == 2) || !islist(L) || !ISINRANGE(L.len, 9, 20))
return list()
var/identity = TRUE
var/static/list/ones = list(1, 5, 9)
for(var/i in 1 to L.len)
if(L[i] != ((i in ones)? 1 : 0))
identity = FALSE
break
return identity? list() : L
/datum/gear_tweak/matrix_recolor/tweak_item(obj/item/I, metadata)
. = ..()
if(!islist(metadata) || (length(metadata) < 12))
return
if(istype(I))
I.add_atom_colour(metadata, FIXED_COLOUR_PRIORITY)
else
I.color = metadata // fuck off underwear

View File

@@ -1,7 +1,6 @@
/mob/living/silicon/robot
var/sleeper_resting = FALSE //Enable resting belly sprites for dogborgs that have the sprites
var/datum/matter_synth/water_res = null //Enable water for lick clean
var/has_recoloured = FALSE
//Multibelly support. We do not want to apply it to any module not supporting it in it's sprites
var/list/vore_light_states = list() //Robot exclusive
vore_capacity_ex = list()
@@ -54,19 +53,7 @@
/mob/living/silicon/robot/module_reset()
..()
has_recoloured = FALSE
// We only use the chomp system when the sprite supports it. Else we go through the fallback
vore_capacity_ex = list()
vore_fullness_ex = list()
vore_light_states = list()
/mob/living/silicon/robot/verb/ColorMate()
set name = "Recolour Module"
set category = "Robot Commands"
set desc = "Allows to recolour once."
if(!has_recoloured)
var/datum/ColorMate/recolour = new /datum/ColorMate(usr)
recolour.tgui_interact(usr)
return
to_chat(usr, "You've already recoloured yourself once. Ask for a module reset for another.")

View File

@@ -3,7 +3,6 @@
var/list/speech_sounds = list()
var/speech_chance = 75 //mobs can be a bit more emotive than carbon/humans
var/speech_sound_enabled = TRUE
var/has_recoloured = FALSE
//vars for vore_icons toggle control
var/vore_icons_cache = null // null by default. Going from ON to OFF should store vore_icons val here, OFF to ON reset as null
@@ -136,14 +135,3 @@
/mob/living/simple_mob/proc/character_directory_species()
return "simplemob"
/mob/living/simple_mob/verb/ColorMate()
set name = "Recolour"
set category = "Abilities"
set desc = "Allows to recolour once."
if(!has_recoloured)
var/datum/ColorMate/recolour = new /datum/ColorMate(usr)
recolour.tgui_interact(usr)
return
to_chat(usr, "You've already recoloured yourself once. You are only allowed to recolour yourself once during a around.")

View File

@@ -1,5 +1,14 @@
import { useBackend } from '../backend';
import { Button, Icon, NoticeBox, NumberInput, Section, Table, Tabs, Slider } from '../components';
import {
Button,
Icon,
NoticeBox,
NumberInput,
Section,
Slider,
Table,
Tabs,
} from '../components';
import { Window } from '../layouts';
export const ColorMate = (props, context) => {
@@ -49,7 +58,8 @@ export const ColorMate = (props, context) => {
act('switch_modes', {
mode: 1,
})
}>
}
>
Tint coloring (Simple)
</Tabs.Tab>
<Tabs.Tab
@@ -59,7 +69,8 @@ export const ColorMate = (props, context) => {
act('switch_modes', {
mode: 2,
})
}>
}
>
HSV coloring (Normal)
</Tabs.Tab>
<Tabs.Tab
@@ -69,7 +80,8 @@ export const ColorMate = (props, context) => {
act('switch_modes', {
mode: 3,
})
}>
}
>
Matrix coloring (Advanced)
</Tabs.Tab>
</Tabs>

View File

@@ -1,67 +0,0 @@
import { useBackend } from '../backend';
import { Box, Button, Flex, Section } from '../components';
import { Window } from '../layouts';
type Data = {
items;
activecolor: string;
};
export const ColorMate = (props) => {
const { act, data } = useBackend<Data>();
const { items, activecolor } = data;
let height = Math.min(270 + items.length * 15, 600);
return (
<Window width={300} height={height}>
<Window.Content>
{(items.length && (
<>
<Section title="Paint">
<Flex justify="center" align="center">
<Flex.Item basis="50%">
<Box
backgroundColor={activecolor}
width="120px"
height="120px"
/>
</Flex.Item>
<Flex.Item basis="50% ">
<Button
fluid
icon="eye-dropper"
onClick={() => act('select')}
>
Select Color
</Button>
<Button fluid icon="fill-drip" onClick={() => act('paint')}>
Paint Items
</Button>
<Button fluid icon="tint-slash" onClick={() => act('clear')}>
Remove Paintjob
</Button>
<Button fluid icon="eject" onClick={() => act('eject')}>
Eject Items
</Button>
</Flex.Item>
</Flex>
</Section>
<Section title="Items">
{items.map((item, i) => (
<Box key={i}>
#{i + 1}: {item}
</Box>
))}
</Section>
</>
)) || (
<Section>
<Box color="bad">No items inserted.</Box>
</Section>
)}
</Window.Content>
</Window>
);
};

View File

@@ -1,429 +0,0 @@
import { toFixed } from 'common/math';
import { useBackend } from '../../backend';
import {
Button,
Icon,
NoticeBox,
NumberInput,
Section,
Slider,
Table,
Tabs,
} from '../../components';
import { Window } from '../../layouts';
export const ColorMate = (props) => {
const { act, data } = useBackend();
const { activemode, temp } = data;
const item = data.item || [];
return (
<Window width="980" height="720" resizable>
<Window.Content overflow="auto">
<Section>
{temp ? <NoticeBox>{temp}</NoticeBox> : null}
{item && Object.keys(item).length ? (
<>
<Table>
<Table.Cell width="50%">
<Section>
<center>Item:</center>
<img
src={'data:image/jpeg;base64, ' + item.sprite}
width="100%"
height="100%"
style={{
'-ms-interpolation-mode': 'nearest-neighbor',
}}
/>
</Section>
</Table.Cell>
<Table.Cell>
<Section>
<center>Preview:</center>
<img
src={'data:image/jpeg;base64, ' + item.preview}
width="100%"
height="100%"
style={{
'-ms-interpolation-mode': 'nearest-neighbor',
}}
/>
</Section>
</Table.Cell>
</Table>
<Tabs fluid>
<Tabs.Tab
key="1"
selected={activemode === 1}
onClick={() =>
act('switch_modes', {
mode: 1,
})
}
>
Tint coloring (Simple)
</Tabs.Tab>
<Tabs.Tab
key="2"
selected={activemode === 2}
onClick={() =>
act('switch_modes', {
mode: 2,
})
}
>
HSV coloring (Normal)
</Tabs.Tab>
<Tabs.Tab
key="3"
selected={activemode === 3}
onClick={() =>
act('switch_modes', {
mode: 3,
})
}
>
Matrix coloring (Advanced)
</Tabs.Tab>
</Tabs>
<center>Coloring: {item.name}</center>
<Table mt={1}>
<Table.Cell width="33%">
<Button
fluid
content="Paint"
icon="fill"
onClick={() => act('paint')}
/>
<Button
fluid
content="Clear"
icon="eraser"
onClick={() => act('clear')}
/>
<Button
fluid
content="Eject"
icon="eject"
onClick={() => act('drop')}
/>
</Table.Cell>
<Table.Cell width="66%">
{activemode === 1 ? (
<ColorMateTint />
) : activemode === 2 ? (
<ColorMateHSV />
) : (
<ColorMateMatrix />
)}
</Table.Cell>
</Table>
</>
) : (
<center>No item inserted.</center>
)}
</Section>
</Window.Content>
</Window>
);
};
export const ColorMateTint = (props) => {
const { act, data } = useBackend();
return (
<Button
fluid
content="Select new color"
icon="paint-brush"
onClick={() => act('choose_color')}
/>
);
};
export const ColorMateMatrix = (props) => {
const { act, data } = useBackend();
const matrixcolors = data.matrixcolors || [];
return (
<Table>
<Table.Cell>
<Table.Row>
RR:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.rr}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 1,
value,
})
}
/>
</Table.Row>
<Table.Row>
GR:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.gr}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 4,
value,
})
}
/>
</Table.Row>
<Table.Row>
BR:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.br}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 7,
value,
})
}
/>
</Table.Row>
</Table.Cell>
<Table.Cell>
<Table.Row>
RG:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.rg}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 2,
value,
})
}
/>
</Table.Row>
<Table.Row>
GG:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.gg}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 5,
value,
})
}
/>
</Table.Row>
<Table.Row>
BG:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.bg}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 8,
value,
})
}
/>
</Table.Row>
</Table.Cell>
<Table.Cell>
<Table.Row>
RB:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.rb}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 3,
value,
})
}
/>
</Table.Row>
<Table.Row>
GB:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.gb}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 6,
value,
})
}
/>
</Table.Row>
<Table.Row>
BB:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.bb}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 9,
value,
})
}
/>
</Table.Row>
</Table.Cell>
<Table.Cell>
<Table.Row>
CR:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.cr}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 10,
value,
})
}
/>
</Table.Row>
<Table.Row>
CG:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.cg}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 11,
value,
})
}
/>
</Table.Row>
<Table.Row>
CB:
<NumberInput
width="50px"
minValue={-10}
maxValue={10}
step={0.01}
value={matrixcolors.cb}
format={(value) => toFixed(value, 2)}
onChange={(e, value) =>
act('set_matrix_color', {
color: 12,
value,
})
}
/>
</Table.Row>
</Table.Cell>
<Table.Cell width="40%">
<Icon name="question-circle" color="blue" /> RG means red will become
this much green.
<br />
<Icon name="question-circle" color="blue" /> CR means this much red will
be added.
</Table.Cell>
</Table>
);
};
export const ColorMateHSV = (props) => {
const { act, data } = useBackend();
const { buildhue, buildsat, buildval } = data;
return (
<Table>
<Table.Row>
<center>Hue:</center>
<Table.Cell width="85%">
<Slider
minValue={0}
maxValue={360}
step={1}
value={buildhue}
onDrag={(e, value) =>
act('set_hue', {
buildhue: value,
})
}
/>
</Table.Cell>
</Table.Row>
<Table.Row>
<center>Saturation:</center>
<Table.Cell>
<Slider
minValue={-10}
maxValue={10}
step={0.01}
value={buildsat}
format={(value) => toFixed(value, 2)}
onDrag={(e, value) =>
act('set_sat', {
buildsat: value,
})
}
/>
</Table.Cell>
</Table.Row>
<Table.Row>
<center>Value:</center>
<Table.Cell>
<Slider
minValue={-10}
maxValue={10}
step={0.01}
value={buildval}
format={(value) => toFixed(value, 2)}
onDrag={(e, value) =>
act('set_val', {
buildval: value,
})
}
/>
</Table.Cell>
</Table.Row>
</Table>
);
};

View File

@@ -65,7 +65,7 @@
#include "code\__defines\lighting.dm"
#include "code\__defines\lighting_vr.dm"
#include "code\__defines\logging.dm"
#include "code\__defines\lum_ch.dm"
#include "code\__defines\lum.dm"
#include "code\__defines\machinery.dm"
#include "code\__defines\map.dm"
#include "code\__defines\materials.dm"
@@ -154,7 +154,7 @@
#include "code\_helpers\global_lists_ch.dm"
#include "code\_helpers\global_lists_vr.dm"
#include "code\_helpers\icons.dm"
#include "code\_helpers\icons_ch.dm"
#include "code\_helpers\icons_procs.dm"
#include "code\_helpers\icons_vr.dm"
#include "code\_helpers\lighting.dm"
#include "code\_helpers\logging.dm"
@@ -176,6 +176,7 @@
#include "code\_helpers\view.dm"
#include "code\_helpers\visual_filters.dm"
#include "code\_helpers\widelists_ch.dm"
#include "code\_helpers\icons\flatten.dm"
#include "code\_helpers\logging\ui.dm"
#include "code\_helpers\sorts\__main.dm"
#include "code\_helpers\sorts\comparators.dm"
@@ -362,6 +363,7 @@
#include "code\datums\category.dm"
#include "code\datums\chat_message.dm"
#include "code\datums\chat_payload.dm"
#include "code\datums\colormate.dm"
#include "code\datums\datacore.dm"
#include "code\datums\datum.dm"
#include "code\datums\datumvars.dm"
@@ -426,6 +428,7 @@
#include "code\datums\helper_datums\teleport.dm"
#include "code\datums\helper_datums\teleport_vr.dm"
#include "code\datums\helper_datums\topic_input.dm"
#include "code\datums\interfaces\appearance.dm"
#include "code\datums\locations\locations.dm"
#include "code\datums\locations\nyx.dm"
#include "code\datums\locations\qerrvallis.dm"
@@ -924,6 +927,7 @@
#include "code\game\machinery\OpTable.dm"
#include "code\game\machinery\overview.dm"
#include "code\game\machinery\oxygen_pump.dm"
#include "code\game\machinery\painter_vr.dm"
#include "code\game\machinery\partslathe_vr.dm"
#include "code\game\machinery\pda_multicaster.dm"
#include "code\game\machinery\pointdefense.dm"
@@ -1803,6 +1807,7 @@
#include "code\game\turfs\unsimulated\walls.dm"
#include "code\js\byjax.dm"
#include "code\js\menus.dm"
#include "code\matrices\color_matrix.dm"
#include "code\modules\admin\admin.dm"
#include "code\modules\admin\admin_attack_log.dm"
#include "code\modules\admin\admin_investigate.dm"
@@ -4615,24 +4620,19 @@
#include "modular_chomp\code\_HELPERS\game.dm"
#include "modular_chomp\code\_HELPERS\mobs.dm"
#include "modular_chomp\code\_HELPERS\type2type.dm"
#include "modular_chomp\code\_HELPERS\icons\flatten.dm"
#include "modular_chomp\code\_HELPERS\type2type\color.dm"
#include "modular_chomp\code\_onclick\hud\alert.dm"
#include "modular_chomp\code\ATMOSPHERICS\atmospherics.dm"
#include "modular_chomp\code\datums\http.dm"
#include "modular_chomp\code\datums\autolathe\arms.dm"
#include "modular_chomp\code\datums\autolathe\engineering_ch.dm"
#include "modular_chomp\code\datums\autolathe\general_ch.dm"
#include "modular_chomp\code\datums\browser\color_matrix_picker.dm"
#include "modular_chomp\code\datums\changelog\changelog.dm"
#include "modular_chomp\code\datums\colormate\colormate.dm"
#include "modular_chomp\code\datums\components\dry.dm"
#include "modular_chomp\code\datums\components\gargoyle.dm"
#include "modular_chomp\code\datums\components\squeak.dm"
#include "modular_chomp\code\datums\components\xenoqueen.dm"
#include "modular_chomp\code\datums\crafting\items.dm"
#include "modular_chomp\code\datums\crafting\recipes.dm"
#include "modular_chomp\code\datums\interfaces\appearance.dm"
#include "modular_chomp\code\datums\outfits\jobs\cargo.dm"
#include "modular_chomp\code\datums\outfits\jobs\command.dm"
#include "modular_chomp\code\datums\outfits\jobs\noncrew.dm"
@@ -4652,7 +4652,6 @@
#include "modular_chomp\code\game\jobs\job\silicon.dm"
#include "modular_chomp\code\game\machinery\airconditioner_ch.dm"
#include "modular_chomp\code\game\machinery\autolathe_armory.dm"
#include "modular_chomp\code\game\machinery\colormate.dm"
#include "modular_chomp\code\game\machinery\cryopod.dm"
#include "modular_chomp\code\game\machinery\holosign.dm"
#include "modular_chomp\code\game\machinery\paradox.dm"
@@ -4694,7 +4693,6 @@
#include "modular_chomp\code\game\turfs\turf.dm"
#include "modular_chomp\code\game\turfs\simulated\outdoors\desert_planet.dm"
#include "modular_chomp\code\game\turfs\simulated\outdoors\lava_land.dm"
#include "modular_chomp\code\matrices\color_matrix.dm"
#include "modular_chomp\code\modules\admin\functions\modify_traits.dm"
#include "modular_chomp\code\modules\admin\verbs\randomverbs.dm"
#include "modular_chomp\code\modules\admin\verbs\tgui_verbs.dm"