diff --git a/code/__DEFINES/colors.dm b/code/__DEFINES/colors.dm
index 824f5b3e61..4811d0041f 100644
--- a/code/__DEFINES/colors.dm
+++ b/code/__DEFINES/colors.dm
@@ -37,3 +37,20 @@
#define COLOR_PALE_RED_GRAY "#D59998"
#define COLOR_PALE_PURPLE_GRAY "#CBB1CA"
#define COLOR_PURPLE_GRAY "#AE8CA8"
+
+//Color defines used by the assembly detailer.
+#define COLOR_ASSEMBLY_BLACK "#545454"
+#define COLOR_ASSEMBLY_BGRAY "#9497AB"
+#define COLOR_ASSEMBLY_WHITE "#E2E2E2"
+#define COLOR_ASSEMBLY_RED "#CC4242"
+#define COLOR_ASSEMBLY_ORANGE "#E39751"
+#define COLOR_ASSEMBLY_BEIGE "#AF9366"
+#define COLOR_ASSEMBLY_BROWN "#97670E"
+#define COLOR_ASSEMBLY_GOLD "#AA9100"
+#define COLOR_ASSEMBLY_YELLOW "#CECA2B"
+#define COLOR_ASSEMBLY_GURKHA "#999875"
+#define COLOR_ASSEMBLY_LGREEN "#789876"
+#define COLOR_ASSEMBLY_GREEN "#44843C"
+#define COLOR_ASSEMBLY_LBLUE "#5D99BE"
+#define COLOR_ASSEMBLY_BLUE "#38559E"
+#define COLOR_ASSEMBLY_PURPLE "#6F6192"
\ No newline at end of file
diff --git a/code/controllers/subsystem/processing/circuit.dm b/code/controllers/subsystem/processing/circuit.dm
index a9abacd934..9fc3683266 100644
--- a/code/controllers/subsystem/processing/circuit.dm
+++ b/code/controllers/subsystem/processing/circuit.dm
@@ -48,21 +48,35 @@ PROCESSING_SUBSYSTEM_DEF(circuit)
/obj/item/device/electronic_assembly/calc,
/obj/item/device/electronic_assembly/clam,
/obj/item/device/electronic_assembly/simple,
+ /obj/item/device/electronic_assembly/hook,
+ /obj/item/device/electronic_assembly/pda,
/obj/item/device/electronic_assembly/medium/default,
/obj/item/device/electronic_assembly/medium/box,
/obj/item/device/electronic_assembly/medium/clam,
/obj/item/device/electronic_assembly/medium/medical,
+ /obj/item/device/electronic_assembly/medium/gun,
+ /obj/item/device/electronic_assembly/medium/radio,
/obj/item/device/electronic_assembly/large/default,
/obj/item/device/electronic_assembly/large/scope,
/obj/item/device/electronic_assembly/large/terminal,
/obj/item/device/electronic_assembly/large/arm,
+ /obj/item/device/electronic_assembly/large/tall,
+ /obj/item/device/electronic_assembly/large/industrial,
/obj/item/device/electronic_assembly/drone/default,
- /obj/item/device/electronic_assembly/drone/arms
+ /obj/item/device/electronic_assembly/drone/arms,
+ /obj/item/device/electronic_assembly/drone/secbot,
+ /obj/item/device/electronic_assembly/drone/medbot,
+ /obj/item/device/electronic_assembly/drone/genbot,
+ /obj/item/device/electronic_assembly/drone/android,
+ /obj/item/device/electronic_assembly/wallmount/light,
+ /obj/item/device/electronic_assembly/wallmount,
+ /obj/item/device/electronic_assembly/wallmount/heavy
///obj/item/weapon/implant/integrated_circuit
)
circuit_fabricator_recipe_list["Tools"] = list(
/obj/item/device/integrated_electronics/wirer,
/obj/item/device/integrated_electronics/debugger,
- /obj/item/device/integrated_electronics/analyzer
+ /obj/item/device/integrated_electronics/analyzer,
+ /obj/item/device/integrated_electronics/detailer
)
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index ff113f8cd9..a060b030a1 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -218,6 +218,11 @@
else if(istype(W, /obj/item/poster))
place_poster(W,user)
return TRUE
+ //wall mounted IC assembly stuff
+ else if(istype(W, /obj/item/device/electronic_assembly/wallmount))
+ var/obj/item/device/electronic_assembly/wallmount/A = W
+ A.mount_assembly(src, user)
+ return TRUE
return FALSE
@@ -303,5 +308,5 @@
cut_overlay(dent_decals)
LAZYADD(dent_decals, decal)
add_overlay(dent_decals)
-
+
#undef MAX_DENT_DECALS
diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm
index 71605fc0dc..e62e26d576 100644
--- a/code/modules/integrated_electronics/core/assemblies.dm
+++ b/code/modules/integrated_electronics/core/assemblies.dm
@@ -30,6 +30,34 @@
hud_possible = list(DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_TRACK_HUD, DIAG_CIRCUIT_HUD) //diagnostic hud overlays
max_integrity = 50
armor = list("melee" = 50, "bullet" = 70, "laser" = 70, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
+ anchored = FALSE
+ var/can_anchor = TRUE
+ var/detail_color = COLOR_ASSEMBLY_BLACK
+ var/list/color_whitelist = list( //This is just for checking that hacked colors aren't in the save data.
+ COLOR_ASSEMBLY_BLACK,
+ COLOR_FLOORTILE_GRAY,
+ COLOR_ASSEMBLY_BGRAY,
+ COLOR_ASSEMBLY_WHITE,
+ COLOR_ASSEMBLY_RED,
+ COLOR_ASSEMBLY_ORANGE,
+ COLOR_ASSEMBLY_BEIGE,
+ COLOR_ASSEMBLY_BROWN,
+ COLOR_ASSEMBLY_GOLD,
+ COLOR_ASSEMBLY_YELLOW,
+ COLOR_ASSEMBLY_GURKHA,
+ COLOR_ASSEMBLY_LGREEN,
+ COLOR_ASSEMBLY_GREEN,
+ COLOR_ASSEMBLY_LBLUE,
+ COLOR_ASSEMBLY_BLUE,
+ COLOR_ASSEMBLY_PURPLE
+ )
+
+/obj/item/device/electronic_assembly/examine(mob/user)
+ . = ..()
+ if(can_anchor)
+ to_chat(user, "The anchoring bolts [anchored ? "are" : "can be"] wrenched in place and the maintainence panel [opened ? "can be" : "is"] screwed in place.")
+ else
+ to_chat(user, "The maintainence panel [opened ? "can be" : "is"] screwed in place.")
/obj/item/device/electronic_assembly/proc/check_interactivity(mob/user)
return user.canUseTopic(src, BE_CLOSE)
@@ -233,6 +261,12 @@
icon_state = initial(icon_state) + "-open"
else
icon_state = initial(icon_state)
+ cut_overlays()
+ if(detail_color == COLOR_ASSEMBLY_BLACK) //Black colored overlay looks almost but not exactly like the base sprite, so just cut the overlay and avoid it looking kinda off.
+ return
+ var/mutable_appearance/detail_overlay = mutable_appearance('icons/obj/assemblies/electronic_setups.dmi', "[icon_state]-color")
+ detail_overlay.color = detail_color
+ add_overlay(detail_overlay)
/obj/item/device/electronic_assembly/examine(mob/user)
..()
@@ -357,24 +391,38 @@
return TRUE
/obj/item/device/electronic_assembly/attackby(obj/item/I, mob/living/user)
+ if(can_anchor && default_unfasten_wrench(user, I, 20))
+ return
if(istype(I, /obj/item/integrated_circuit))
if(!user.canUnEquip(I))
return FALSE
if(try_add_component(I, user))
interact(user)
return TRUE
+ else
+ for(var/obj/item/integrated_circuit/input/S in assembly_components)
+ S.attackby_react(I,user,user.a_intent)
+ return ..()
else if(istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger))
if(opened)
interact(user)
+ return TRUE
else
to_chat(user, "[src]'s hatch is closed, so you can't fiddle with the internal components.")
+ for(var/obj/item/integrated_circuit/input/S in assembly_components)
+ S.attackby_react(I,user,user.a_intent)
+ return ..()
else if(istype(I, /obj/item/stock_parts/cell))
if(!opened)
- to_chat(user, "[src]'s hatch is closed, so you can't put anything inside.")
- return FALSE
+ to_chat(user, "[src]'s hatch is closed, so you can't access \the [src]'s power supplier.")
+ for(var/obj/item/integrated_circuit/input/S in assembly_components)
+ S.attackby_react(I,user,user.a_intent)
+ return ..()
if(battery)
to_chat(user, "[src] already has \a [battery] installed. Remove it first if you want to replace it.")
- return FALSE
+ for(var/obj/item/integrated_circuit/input/S in assembly_components)
+ S.attackby_react(I,user,user.a_intent)
+ return ..()
var/obj/item/stock_parts/cell = I
user.transferItemToLoc(I, loc)
cell.forceMove(src)
@@ -384,6 +432,10 @@
to_chat(user, "You slot \the [cell] inside \the [src]'s power supplier.")
interact(user)
return TRUE
+ else if(istype(I, /obj/item/device/integrated_electronics/detailer))
+ var/obj/item/device/integrated_electronics/detailer/D = I
+ detail_color = D.detail_color
+ update_icon()
else
for(var/obj/item/integrated_circuit/input/S in assembly_components)
S.attackby_react(I,user,user.a_intent)
@@ -471,6 +523,17 @@
return acting_object.drop_location()
+/obj/item/device/electronic_assembly/attack_tk(mob/user)
+ if(anchored)
+ return
+ ..()
+
+/obj/item/device/electronic_assembly/attack_hand(mob/user)
+ if(anchored)
+ attack_self(user)
+ return
+ ..()
+
/obj/item/device/electronic_assembly/default //The /default electronic_assemblys are to allow the introduction of the new naming scheme without breaking old saves.
name = "type-a electronic assembly"
@@ -489,6 +552,16 @@
icon_state = "setup_small_simple"
desc = "It's a case, for building small electronics with. This one has a simple design."
+/obj/item/device/electronic_assembly/hook
+ name = "type-e electronic assembly"
+ icon_state = "setup_small_hook"
+ desc = "It's a case, for building small electronics with. This one looks like it has a belt clip, but it's purely decorative."
+
+/obj/item/device/electronic_assembly/pda
+ name = "type-f electronic assembly"
+ icon_state = "setup_small_pda"
+ desc = "It's a case, for building small electronics with. This one resembles a PDA."
+
/obj/item/device/electronic_assembly/medium
name = "electronic mechanism"
icon_state = "setup_medium"
@@ -515,6 +588,16 @@
icon_state = "setup_medium_med"
desc = "It's a case, for building medium-sized electronics with. This one resembles some type of medical apparatus."
+/obj/item/device/electronic_assembly/medium/gun
+ name = "type-e electronic mechanism"
+ icon_state = "setup_medium_gun"
+ desc = "It's a case, for building medium-sized electronics with. This one resembles a gun, or some type of tool, if you're feeling optimistic."
+
+/obj/item/device/electronic_assembly/medium/radio
+ name = "type-f electronic mechanism"
+ icon_state = "setup_medium_radio"
+ desc = "It's a case, for building medium-sized electronics with. This one resembles an old radio."
+
/obj/item/device/electronic_assembly/large
name = "electronic machine"
icon_state = "setup_large"
@@ -522,23 +605,6 @@
w_class = WEIGHT_CLASS_BULKY
max_components = IC_MAX_SIZE_BASE * 4
max_complexity = IC_COMPLEXITY_BASE * 4
- anchored = FALSE
-
-/obj/item/device/electronic_assembly/large/attackby(obj/item/O, mob/user)
- if(default_unfasten_wrench(user, O, 20))
- return
- ..()
-
-/obj/item/device/electronic_assembly/large/attack_tk(mob/user)
- if(anchored)
- return
- ..()
-
-/obj/item/device/electronic_assembly/large/attack_hand(mob/user)
- if(anchored)
- attack_self(user)
- return
- ..()
/obj/item/device/electronic_assembly/large/default
name = "type-a electronic machine"
@@ -558,6 +624,16 @@
icon_state = "setup_large_arm"
desc = "It's a case, for building large electronics with. This one resembles a robotic arm."
+/obj/item/device/electronic_assembly/large/tall
+ name = "type-e electronic machine"
+ icon_state = "setup_large_tall"
+ desc = "It's a case, for building large electronics with. This one has a tall design."
+
+/obj/item/device/electronic_assembly/large/industrial
+ name = "type-f electronic machine"
+ icon_state = "setup_large_industrial"
+ desc = "It's a case, for building large electronics with. This one resembles some kind of industrial machinery."
+
/obj/item/device/electronic_assembly/drone
name = "electronic drone"
icon_state = "setup_drone"
@@ -566,6 +642,7 @@
max_components = IC_MAX_SIZE_BASE * 3
max_complexity = IC_COMPLEXITY_BASE * 3
allowed_circuit_action_flags = IC_ACTION_MOVEMENT | IC_ACTION_COMBAT | IC_ACTION_LONG_RANGE
+ can_anchor = FALSE
/obj/item/device/electronic_assembly/drone/can_move()
return TRUE
@@ -577,3 +654,75 @@
name = "type-b electronic drone"
icon_state = "setup_drone_arms"
desc = "It's a case, for building mobile electronics with. This one is armed and dangerous."
+
+/obj/item/device/electronic_assembly/drone/secbot
+ name = "type-c electronic drone"
+ icon_state = "setup_drone_secbot"
+ desc = "It's a case, for building mobile electronics with. This one resembles a Securitron."
+
+/obj/item/device/electronic_assembly/drone/medbot
+ name = "type-d electronic drone"
+ icon_state = "setup_drone_medbot"
+ desc = "It's a case, for building mobile electronics with. This one resembles a Medibot."
+
+/obj/item/device/electronic_assembly/drone/genbot
+ name = "type-e electronic drone"
+ icon_state = "setup_drone_genbot"
+ desc = "It's a case, for building mobile electronics with. This one has a generic bot design."
+
+/obj/item/device/electronic_assembly/drone/android
+ name = "type-f electronic drone"
+ icon_state = "setup_drone_android"
+ desc = "It's a case, for building mobile electronics with. This one has a hominoid design."
+
+/obj/item/device/electronic_assembly/wallmount
+ name = "wall-mounted electronic assembly"
+ icon_state = "setup_wallmount_medium"
+ desc = "It's a case, for building medium-sized electronics with. It has a magnetized backing to allow it to stick to walls, but you'll still need to wrench the anchoring bolts in place to keep it on."
+ w_class = WEIGHT_CLASS_NORMAL
+ max_components = IC_MAX_SIZE_BASE * 2
+ max_complexity = IC_COMPLEXITY_BASE * 2
+
+/obj/item/device/electronic_assembly/wallmount/heavy
+ name = "heavy wall-mounted electronic assembly"
+ icon_state = "setup_wallmount_large"
+ desc = "It's a case, for building large electronics with. It has a magnetized backing to allow it to stick to walls, but you'll still need to wrench the anchoring bolts in place to keep it on."
+ w_class = WEIGHT_CLASS_BULKY
+ max_components = IC_MAX_SIZE_BASE * 4
+ max_complexity = IC_COMPLEXITY_BASE * 4
+
+/obj/item/device/electronic_assembly/wallmount/light
+ name = "light wall-mounted electronic assembly"
+ icon_state = "setup_wallmount_small"
+ desc = "It's a case, for building small electronics with. It has a magnetized backing to allow it to stick to walls, but you'll still need to wrench the anchoring bolts in place to keep it on."
+ w_class = WEIGHT_CLASS_SMALL
+ max_components = IC_MAX_SIZE_BASE
+ max_complexity = IC_COMPLEXITY_BASE
+
+/obj/item/device/electronic_assembly/wallmount/proc/mount_assembly(turf/on_wall, mob/user) //Yeah, this is admittedly just an abridged and kitbashed version of the wallframe attach procs.
+ if(get_dist(on_wall,user)>1)
+ return
+ var/ndir = get_dir(on_wall, user)
+ if(!(ndir in GLOB.cardinals))
+ return
+ var/turf/T = get_turf(user)
+ if(!isfloorturf(T))
+ to_chat(user, "You cannot place [src] on this spot!")
+ return
+ if(gotwallitem(T, ndir))
+ to_chat(user, "There's already an item on this wall!")
+ return
+ playsound(src.loc, 'sound/machines/click.ogg', 75, 1)
+ user.visible_message("[user.name] attaches [src] to the wall.",
+ "You attach [src] to the wall.",
+ "You hear clicking.")
+ user.dropItemToGround(src)
+ switch(ndir)
+ if(NORTH)
+ pixel_y = -31
+ if(SOUTH)
+ pixel_y = 31
+ if(EAST)
+ pixel_x = -31
+ if(WEST)
+ pixel_x = 31
\ No newline at end of file
diff --git a/code/modules/integrated_electronics/core/detailer.dm b/code/modules/integrated_electronics/core/detailer.dm
new file mode 100644
index 0000000000..ef2cd3a138
--- /dev/null
+++ b/code/modules/integrated_electronics/core/detailer.dm
@@ -0,0 +1,47 @@
+/obj/item/device/integrated_electronics/detailer
+ name = "assembly detailer"
+ desc = "A combination autopainter and flash anodizer designed to give electronic assemblies a colorful, wear-resistant finish."
+ icon = 'icons/obj/assemblies/electronic_tools.dmi'
+ icon_state = "detailer"
+ flags_1 = CONDUCT_1 | NOBLUDGEON_1
+ w_class = WEIGHT_CLASS_SMALL
+ var/data_to_write = null
+ var/accepting_refs = FALSE
+ var/detail_color = COLOR_ASSEMBLY_WHITE
+ var/list/color_list = list(
+ "black" = COLOR_ASSEMBLY_BLACK,
+ "gray" = COLOR_FLOORTILE_GRAY,
+ "machine gray" = COLOR_ASSEMBLY_BGRAY,
+ "white" = COLOR_ASSEMBLY_WHITE,
+ "red" = COLOR_ASSEMBLY_RED,
+ "orange" = COLOR_ASSEMBLY_ORANGE,
+ "beige" = COLOR_ASSEMBLY_BEIGE,
+ "brown" = COLOR_ASSEMBLY_BROWN,
+ "gold" = COLOR_ASSEMBLY_GOLD,
+ "yellow" = COLOR_ASSEMBLY_YELLOW,
+ "gurkha" = COLOR_ASSEMBLY_GURKHA,
+ "light green" = COLOR_ASSEMBLY_LGREEN,
+ "green" = COLOR_ASSEMBLY_GREEN,
+ "light blue" = COLOR_ASSEMBLY_LBLUE,
+ "blue" = COLOR_ASSEMBLY_BLUE,
+ "purple" = COLOR_ASSEMBLY_PURPLE
+ )
+
+/obj/item/device/integrated_electronics/detailer/Initialize()
+ .=..()
+ update_icon()
+
+/obj/item/device/integrated_electronics/detailer/update_icon()
+ cut_overlays()
+ var/mutable_appearance/detail_overlay = mutable_appearance('icons/obj/assemblies/electronic_tools.dmi', "detailer-color")
+ detail_overlay.color = detail_color
+ add_overlay(detail_overlay)
+
+/obj/item/device/integrated_electronics/detailer/attack_self(mob/user)
+ var/color_choice = input(user, "Select color.", "Assembly Detailer") as null|anything in color_list
+ if(!color_list[color_choice])
+ return
+ if(!in_range(src, user))
+ return
+ detail_color = color_list[color_choice]
+ update_icon()
\ No newline at end of file
diff --git a/code/modules/integrated_electronics/core/saved_circuits.dm b/code/modules/integrated_electronics/core/saved_circuits.dm
index e0395d6ede..1fd3212a82 100644
--- a/code/modules/integrated_electronics/core/saved_circuits.dm
+++ b/code/modules/integrated_electronics/core/saved_circuits.dm
@@ -129,16 +129,21 @@
if(opened)
assembly_params["opened"] = TRUE
+ // Save modified color
+ if(initial(detail_color) != detail_color)
+ assembly_params["detail_color"] = detail_color
+
return assembly_params
// Verifies a list of assembly parameters
// Returns null on success, error name on failure
/obj/item/device/electronic_assembly/proc/verify_save(list/assembly_params)
- // Validate name
+ // Validate name and color
if(assembly_params["name"] && !reject_bad_name(assembly_params["name"], TRUE))
return "Bad assembly name."
-
+ if(assembly_params["detail_color"] && !(assembly_params["detail_color"] in color_whitelist))
+ return "Bad assembly color."
// Loads assembly parameters from a list
// Doesn't verify any of the parameters it loads, this is the job of verify_save()
@@ -150,7 +155,11 @@
// Load panel status
if(assembly_params["opened"])
opened = TRUE
- update_icon()
+
+ if(assembly_params["detail_color"])
+ detail_color = assembly_params["detail_color"]
+
+ update_icon()
diff --git a/icons/obj/assemblies/electronic_setups.dmi b/icons/obj/assemblies/electronic_setups.dmi
index 643d652be1..f18018c0ae 100644
Binary files a/icons/obj/assemblies/electronic_setups.dmi and b/icons/obj/assemblies/electronic_setups.dmi differ
diff --git a/icons/obj/assemblies/electronic_tools.dmi b/icons/obj/assemblies/electronic_tools.dmi
index 5c0b2faaa9..975f2fc9a8 100644
Binary files a/icons/obj/assemblies/electronic_tools.dmi and b/icons/obj/assemblies/electronic_tools.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index 443d286b4d..bfcc32cf67 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -1618,6 +1618,7 @@
#include "code\modules\integrated_electronics\core\analyzer.dm"
#include "code\modules\integrated_electronics\core\assemblies.dm"
#include "code\modules\integrated_electronics\core\debugger.dm"
+#include "code\modules\integrated_electronics\core\detailer.dm"
#include "code\modules\integrated_electronics\core\helpers.dm"
#include "code\modules\integrated_electronics\core\integrated_circuit.dm"
#include "code\modules\integrated_electronics\core\pins.dm"