Whitespace Standardization [MDB IGNORE] (#15748)

* Update settings

* Whitespace changes

* Comment out merger hooks in gitattributes

Corrupt maps would have to be resolved in repo before hooks could be updated

* Revert "Whitespace changes"

This reverts commit afbdd1d844.

* Whitespace again minus example

* Gitignore example changelog

* Restore changelog merge setting

* Keep older dmi hook attribute until hooks can be updated

* update vscode settings too

* Renormalize remaining

* Revert "Gitignore example changelog"

This reverts commit de22ad375d.

* Attempt to normalize example.yml (and another file I guess)

* Try again
This commit is contained in:
Drathek
2024-02-20 02:28:51 -08:00
committed by GitHub
parent 3b61f677b3
commit 7c8bb85de3
1175 changed files with 818171 additions and 818145 deletions
@@ -1,180 +1,180 @@
// The base subtype for assemblies that can be worn. Certain pieces will have more or less capabilities
// E.g. Glasses have less room than something worn over the chest.
// Note that the electronic assembly is INSIDE the object that actually gets worn, in a similar way to implants.
/obj/item/device/electronic_assembly/clothing
name = "electronic clothing"
icon_state = "circuitry" // Needs to match the clothing's base icon_state.
desc = "It's a case, for building machines attached to clothing."
w_class = ITEMSIZE_SMALL
max_components = IC_COMPONENTS_BASE
max_complexity = IC_COMPLEXITY_BASE
var/obj/item/clothing/clothing = null
/obj/item/device/electronic_assembly/clothing/tgui_host()
return clothing.tgui_host()
/obj/item/device/electronic_assembly/clothing/update_icon()
..()
clothing.icon_state = icon_state
// We don't need to update the mob sprite since it won't (and shouldn't) actually get changed.
// This is 'small' relative to the size of regular clothing assemblies.
/obj/item/device/electronic_assembly/clothing/small
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
w_class = ITEMSIZE_TINY
// Ditto.
/obj/item/device/electronic_assembly/clothing/large
max_components = IC_COMPONENTS_BASE * 2
max_complexity = IC_COMPLEXITY_BASE * 2
w_class = ITEMSIZE_NORMAL
// This is defined higher up, in /clothing to avoid lots of copypasta.
/obj/item/clothing
var/obj/item/device/electronic_assembly/clothing/IC = null
var/obj/item/integrated_circuit/built_in/action_button/action_circuit = null // This gets pulsed when someone clicks the button on the hud.
/obj/item/clothing/emp_act(severity)
if(IC)
IC.emp_act(severity)
..()
/obj/item/clothing/examine(mob/user)
. = ..()
if(IC)
. += IC.examine(user)
/obj/item/clothing/CtrlShiftClick(mob/user)
var/turf/T = get_turf(src)
if(!T.AdjacentQuick(user)) // So people aren't messing with these from across the room
return FALSE
var/obj/item/I = user.get_active_hand() // ctrl-shift-click doesn't give us the item, we have to fetch it
if(!I)
return FALSE
return IC.attackby(I, user)
/obj/item/clothing/attack_self(mob/user)
if(IC)
if(IC.opened)
IC.attack_self(user)
else
action_circuit.do_work()
else
..()
// Does most of the repeatative setup.
/obj/item/clothing/proc/setup_integrated_circuit(new_type)
// Set up the internal circuit holder.
IC = new new_type(src)
IC.clothing = src
IC.name = name
// Clothing assemblies can be triggered by clicking on the HUD. This allows that to occur.
action_circuit = new(src.IC)
IC.force_add_circuit(action_circuit)
action_button_name = "Activate [name]"
/obj/item/clothing/Destroy()
if(IC)
IC.clothing = null
action_circuit = null // Will get deleted by qdel-ing the IC assembly.
qdel(IC)
return ..()
// Specific subtypes.
// Jumpsuit.
/obj/item/clothing/under/circuitry
name = "electronic jumpsuit"
desc = "It's a wearable case for electronics. This on is a black jumpsuit with wiring weaved into the fabric."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
worn_state = "circuitry"
/obj/item/clothing/under/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing)
return ..()
// Gloves.
/obj/item/clothing/gloves/circuitry
name = "electronic gloves"
desc = "It's a wearable case for electronics. This one is a pair of black gloves, with wires woven into them. A small \
device with a screen is attached to the left glove."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
item_state = "circuitry"
/obj/item/clothing/gloves/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
// Glasses.
/obj/item/clothing/glasses/circuitry
name = "electronic goggles"
desc = "It's a wearable case for electronics. This one is a pair of goggles, with wiring sticking out. \
Could this augment your vision?" // Sadly it won't, or at least not yet.
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
item_state = "night" // The on-mob sprite would be identical anyways.
/obj/item/clothing/glasses/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
// Shoes
/obj/item/clothing/shoes/circuitry
name = "electronic boots"
desc = "It's a wearable case for electronics. This one is a pair of boots, with wires attached to a small \
cover."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
item_state = "circuitry"
/obj/item/clothing/shoes/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
// Head
/obj/item/clothing/head/circuitry
name = "electronic headwear"
desc = "It's a wearable case for electronics. This one appears to be a very technical-looking piece that \
goes around the collar, with a heads-up-display attached on the right."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
item_state = "circuitry"
/obj/item/clothing/head/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
// Ear
/obj/item/clothing/ears/circuitry
name = "electronic earwear"
desc = "It's a wearable case for electronics. This one appears to be a technical-looking headset."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon = 'icons/inventory/ears/item.dmi'
icon_state = "circuitry"
item_state = "circuitry"
/obj/item/clothing/ears/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
// Exo-slot
/obj/item/clothing/suit/circuitry
name = "electronic chestpiece"
desc = "It's a wearable case for electronics. This one appears to be a very technical-looking vest, that \
almost looks professionally made, however the wiring popping out betrays that idea."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
item_state = "circuitry"
/obj/item/clothing/suit/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/large)
// The base subtype for assemblies that can be worn. Certain pieces will have more or less capabilities
// E.g. Glasses have less room than something worn over the chest.
// Note that the electronic assembly is INSIDE the object that actually gets worn, in a similar way to implants.
/obj/item/device/electronic_assembly/clothing
name = "electronic clothing"
icon_state = "circuitry" // Needs to match the clothing's base icon_state.
desc = "It's a case, for building machines attached to clothing."
w_class = ITEMSIZE_SMALL
max_components = IC_COMPONENTS_BASE
max_complexity = IC_COMPLEXITY_BASE
var/obj/item/clothing/clothing = null
/obj/item/device/electronic_assembly/clothing/tgui_host()
return clothing.tgui_host()
/obj/item/device/electronic_assembly/clothing/update_icon()
..()
clothing.icon_state = icon_state
// We don't need to update the mob sprite since it won't (and shouldn't) actually get changed.
// This is 'small' relative to the size of regular clothing assemblies.
/obj/item/device/electronic_assembly/clothing/small
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
w_class = ITEMSIZE_TINY
// Ditto.
/obj/item/device/electronic_assembly/clothing/large
max_components = IC_COMPONENTS_BASE * 2
max_complexity = IC_COMPLEXITY_BASE * 2
w_class = ITEMSIZE_NORMAL
// This is defined higher up, in /clothing to avoid lots of copypasta.
/obj/item/clothing
var/obj/item/device/electronic_assembly/clothing/IC = null
var/obj/item/integrated_circuit/built_in/action_button/action_circuit = null // This gets pulsed when someone clicks the button on the hud.
/obj/item/clothing/emp_act(severity)
if(IC)
IC.emp_act(severity)
..()
/obj/item/clothing/examine(mob/user)
. = ..()
if(IC)
. += IC.examine(user)
/obj/item/clothing/CtrlShiftClick(mob/user)
var/turf/T = get_turf(src)
if(!T.AdjacentQuick(user)) // So people aren't messing with these from across the room
return FALSE
var/obj/item/I = user.get_active_hand() // ctrl-shift-click doesn't give us the item, we have to fetch it
if(!I)
return FALSE
return IC.attackby(I, user)
/obj/item/clothing/attack_self(mob/user)
if(IC)
if(IC.opened)
IC.attack_self(user)
else
action_circuit.do_work()
else
..()
// Does most of the repeatative setup.
/obj/item/clothing/proc/setup_integrated_circuit(new_type)
// Set up the internal circuit holder.
IC = new new_type(src)
IC.clothing = src
IC.name = name
// Clothing assemblies can be triggered by clicking on the HUD. This allows that to occur.
action_circuit = new(src.IC)
IC.force_add_circuit(action_circuit)
action_button_name = "Activate [name]"
/obj/item/clothing/Destroy()
if(IC)
IC.clothing = null
action_circuit = null // Will get deleted by qdel-ing the IC assembly.
qdel(IC)
return ..()
// Specific subtypes.
// Jumpsuit.
/obj/item/clothing/under/circuitry
name = "electronic jumpsuit"
desc = "It's a wearable case for electronics. This on is a black jumpsuit with wiring weaved into the fabric."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
worn_state = "circuitry"
/obj/item/clothing/under/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing)
return ..()
// Gloves.
/obj/item/clothing/gloves/circuitry
name = "electronic gloves"
desc = "It's a wearable case for electronics. This one is a pair of black gloves, with wires woven into them. A small \
device with a screen is attached to the left glove."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
item_state = "circuitry"
/obj/item/clothing/gloves/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
// Glasses.
/obj/item/clothing/glasses/circuitry
name = "electronic goggles"
desc = "It's a wearable case for electronics. This one is a pair of goggles, with wiring sticking out. \
Could this augment your vision?" // Sadly it won't, or at least not yet.
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
item_state = "night" // The on-mob sprite would be identical anyways.
/obj/item/clothing/glasses/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
// Shoes
/obj/item/clothing/shoes/circuitry
name = "electronic boots"
desc = "It's a wearable case for electronics. This one is a pair of boots, with wires attached to a small \
cover."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
item_state = "circuitry"
/obj/item/clothing/shoes/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
// Head
/obj/item/clothing/head/circuitry
name = "electronic headwear"
desc = "It's a wearable case for electronics. This one appears to be a very technical-looking piece that \
goes around the collar, with a heads-up-display attached on the right."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
item_state = "circuitry"
/obj/item/clothing/head/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
// Ear
/obj/item/clothing/ears/circuitry
name = "electronic earwear"
desc = "It's a wearable case for electronics. This one appears to be a technical-looking headset."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon = 'icons/inventory/ears/item.dmi'
icon_state = "circuitry"
item_state = "circuitry"
/obj/item/clothing/ears/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
// Exo-slot
/obj/item/clothing/suit/circuitry
name = "electronic chestpiece"
desc = "It's a wearable case for electronics. This one appears to be a very technical-looking vest, that \
almost looks professionally made, however the wiring popping out betrays that idea."
description_info = "Control-shift-click on this with an item in hand to use it on the integrated circuit."
icon_state = "circuitry"
item_state = "circuitry"
/obj/item/clothing/suit/circuitry/Initialize()
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/large)
return ..()
@@ -1,263 +1,263 @@
// Generic subtypes without a lot of special code.
// Small assemblies.
/obj/item/device/electronic_assembly/default
name = "type-a electronic assembly"
/obj/item/device/electronic_assembly/calc
name = "type-b electronic assembly"
icon_state = "setup_small_calc"
desc = "It's a case, for building small electronics with. This one resembles a pocket calculator."
/obj/item/device/electronic_assembly/clam
name = "type-c electronic assembly"
icon_state = "setup_small_clam"
desc = "It's a case, for building small electronics with. This one has a clamshell design."
/obj/item/device/electronic_assembly/simple
name = "type-d electronic assembly"
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."
// Tiny assemblies.
/obj/item/device/electronic_assembly/tiny
name = "electronic device"
icon_state = "setup_device"
desc = "It's a case, for building tiny-sized electronics with."
w_class = ITEMSIZE_TINY
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
/obj/item/device/electronic_assembly/tiny/default
name = "type-a electronic device"
/obj/item/device/electronic_assembly/tiny/cylinder
name = "type-b electronic device"
icon_state = "setup_device_cylinder"
desc = "It's a case, for building tiny-sized electronics with. This one has a cylindrical design."
/obj/item/device/electronic_assembly/tiny/scanner
name = "type-c electronic device"
icon_state = "setup_device_scanner"
desc = "It's a case, for building tiny-sized electronics with. This one has a scanner-like design."
/obj/item/device/electronic_assembly/tiny/hook
name = "type-d electronic device"
icon_state = "setup_device_hook"
desc = "It's a case, for building tiny-sized electronics with. This one looks like it has a belt clip, but it's purely decorative."
/obj/item/device/electronic_assembly/tiny/box
name = "type-e electronic device"
icon_state = "setup_device_box"
desc = "It's a case, for building tiny-sized electronics with. This one has a boxy design."
// Medium assemblies.
/obj/item/device/electronic_assembly/medium
name = "electronic mechanism"
icon_state = "setup_medium"
desc = "It's a case, for building medium-sized electronics with."
w_class = ITEMSIZE_NORMAL
max_components = IC_COMPONENTS_BASE * 2
max_complexity = IC_COMPLEXITY_BASE * 2
/obj/item/device/electronic_assembly/medium/default
name = "type-a electronic mechanism"
/obj/item/device/electronic_assembly/medium/box
name = "type-b electronic mechanism"
icon_state = "setup_medium_box"
desc = "It's a case, for building medium-sized electronics with. This one has a boxy design."
/obj/item/device/electronic_assembly/medium/clam
name = "type-c electronic mechanism"
icon_state = "setup_medium_clam"
desc = "It's a case, for building medium-sized electronics with. This one has a clamshell design."
/obj/item/device/electronic_assembly/medium/medical
name = "type-d electronic mechanism"
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"
item_state = "circuitgun"
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."
// can_fire_equipped = TRUE
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_guns.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_guns.dmi',
)
/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."
// Large assemblies.
/obj/item/device/electronic_assembly/large
name = "electronic machine"
icon_state = "setup_large"
desc = "It's a case, for building large electronics with."
w_class = ITEMSIZE_LARGE
max_components = IC_COMPONENTS_BASE * 4
max_complexity = IC_COMPLEXITY_BASE * 4
can_anchor = TRUE
/obj/item/device/electronic_assembly/large/default
name = "type-a electronic machine"
/obj/item/device/electronic_assembly/large/scope
name = "type-b electronic machine"
icon_state = "setup_large_scope"
desc = "It's a case, for building large electronics with. This one resembles an oscilloscope."
/obj/item/device/electronic_assembly/large/terminal
name = "type-c electronic machine"
icon_state = "setup_large_terminal"
desc = "It's a case, for building large electronics with. This one resembles a computer terminal."
/obj/item/device/electronic_assembly/large/arm
name = "type-d electronic machine"
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."
// Drone assemblies, which can move with the locomotion circuit.
/obj/item/device/electronic_assembly/drone
name = "electronic drone"
icon_state = "setup_drone"
desc = "It's a case, for building mobile electronics with."
w_class = ITEMSIZE_NORMAL
max_components = IC_COMPONENTS_BASE * 1.5
max_complexity = IC_COMPLEXITY_BASE * 1.5
can_anchor = FALSE
/obj/item/device/electronic_assembly/drone/can_move()
return TRUE
/obj/item/device/electronic_assembly/drone/default
name = "type-a electronic drone"
/obj/item/device/electronic_assembly/drone/arms
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."
// Wall mounted assemblies.
/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."
w_class = ITEMSIZE_NORMAL
max_components = IC_COMPONENTS_BASE * 2
max_complexity = IC_COMPLEXITY_BASE * 2
can_anchor = TRUE
/obj/item/device/electronic_assembly/wallmount/proc/mount_assembly(turf/on_wall, mob/user)
if(get_dist(on_wall,user) > 1)
return
var/ndir = get_dir(on_wall, user)
if(!(ndir in cardinal))
return
var/turf/T = get_turf(user)
if(!istype(T, /turf/simulated/floor))
to_chat(user, "<span class='warning'>You cannot place \the [src] on this spot!</span>")
return
playsound(src, 'sound/machines/click.ogg', 75, 1)
user.visible_message("\The [user] attaches \the [src] to the wall.",
"<span class='notice'>You attach \the [src] to the wall.</span>",
"<span class='italics'>You hear clicking.</span>")
if(istype(user, /mob/living/silicon/robot)) //Robots cannot unequip/drop items, for Safety Reasons.
forceMove(T)
user.drop_item(T)
anchored = TRUE
on_anchored()
switch(ndir)
if(NORTH)
pixel_y = -31
if(SOUTH)
pixel_y = 31
if(EAST)
pixel_x = -31
if(WEST)
pixel_x = 31
/obj/item/device/electronic_assembly/wallmount/on_unanchored()
pixel_x = 0
pixel_y = 0
..()
/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."
w_class = ITEMSIZE_LARGE
max_components = IC_COMPONENTS_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."
w_class = ITEMSIZE_SMALL
max_components = IC_COMPONENTS_BASE
max_complexity = IC_COMPLEXITY_BASE
/obj/item/device/electronic_assembly/wallmount/tiny
name = "tiny wall-mounted electronic assembly"
icon_state = "setup_wallmount_tiny"
desc = "It's a case, for building tiny electronics with. It has a magnetized backing \
to allow it to stick to walls."
w_class = ITEMSIZE_TINY
max_components = IC_COMPONENTS_BASE / 2
// Generic subtypes without a lot of special code.
// Small assemblies.
/obj/item/device/electronic_assembly/default
name = "type-a electronic assembly"
/obj/item/device/electronic_assembly/calc
name = "type-b electronic assembly"
icon_state = "setup_small_calc"
desc = "It's a case, for building small electronics with. This one resembles a pocket calculator."
/obj/item/device/electronic_assembly/clam
name = "type-c electronic assembly"
icon_state = "setup_small_clam"
desc = "It's a case, for building small electronics with. This one has a clamshell design."
/obj/item/device/electronic_assembly/simple
name = "type-d electronic assembly"
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."
// Tiny assemblies.
/obj/item/device/electronic_assembly/tiny
name = "electronic device"
icon_state = "setup_device"
desc = "It's a case, for building tiny-sized electronics with."
w_class = ITEMSIZE_TINY
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
/obj/item/device/electronic_assembly/tiny/default
name = "type-a electronic device"
/obj/item/device/electronic_assembly/tiny/cylinder
name = "type-b electronic device"
icon_state = "setup_device_cylinder"
desc = "It's a case, for building tiny-sized electronics with. This one has a cylindrical design."
/obj/item/device/electronic_assembly/tiny/scanner
name = "type-c electronic device"
icon_state = "setup_device_scanner"
desc = "It's a case, for building tiny-sized electronics with. This one has a scanner-like design."
/obj/item/device/electronic_assembly/tiny/hook
name = "type-d electronic device"
icon_state = "setup_device_hook"
desc = "It's a case, for building tiny-sized electronics with. This one looks like it has a belt clip, but it's purely decorative."
/obj/item/device/electronic_assembly/tiny/box
name = "type-e electronic device"
icon_state = "setup_device_box"
desc = "It's a case, for building tiny-sized electronics with. This one has a boxy design."
// Medium assemblies.
/obj/item/device/electronic_assembly/medium
name = "electronic mechanism"
icon_state = "setup_medium"
desc = "It's a case, for building medium-sized electronics with."
w_class = ITEMSIZE_NORMAL
max_components = IC_COMPONENTS_BASE * 2
max_complexity = IC_COMPLEXITY_BASE * 2
/obj/item/device/electronic_assembly/medium/default
name = "type-a electronic mechanism"
/obj/item/device/electronic_assembly/medium/box
name = "type-b electronic mechanism"
icon_state = "setup_medium_box"
desc = "It's a case, for building medium-sized electronics with. This one has a boxy design."
/obj/item/device/electronic_assembly/medium/clam
name = "type-c electronic mechanism"
icon_state = "setup_medium_clam"
desc = "It's a case, for building medium-sized electronics with. This one has a clamshell design."
/obj/item/device/electronic_assembly/medium/medical
name = "type-d electronic mechanism"
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"
item_state = "circuitgun"
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."
// can_fire_equipped = TRUE
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_guns.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_guns.dmi',
)
/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."
// Large assemblies.
/obj/item/device/electronic_assembly/large
name = "electronic machine"
icon_state = "setup_large"
desc = "It's a case, for building large electronics with."
w_class = ITEMSIZE_LARGE
max_components = IC_COMPONENTS_BASE * 4
max_complexity = IC_COMPLEXITY_BASE * 4
can_anchor = TRUE
/obj/item/device/electronic_assembly/large/default
name = "type-a electronic machine"
/obj/item/device/electronic_assembly/large/scope
name = "type-b electronic machine"
icon_state = "setup_large_scope"
desc = "It's a case, for building large electronics with. This one resembles an oscilloscope."
/obj/item/device/electronic_assembly/large/terminal
name = "type-c electronic machine"
icon_state = "setup_large_terminal"
desc = "It's a case, for building large electronics with. This one resembles a computer terminal."
/obj/item/device/electronic_assembly/large/arm
name = "type-d electronic machine"
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."
// Drone assemblies, which can move with the locomotion circuit.
/obj/item/device/electronic_assembly/drone
name = "electronic drone"
icon_state = "setup_drone"
desc = "It's a case, for building mobile electronics with."
w_class = ITEMSIZE_NORMAL
max_components = IC_COMPONENTS_BASE * 1.5
max_complexity = IC_COMPLEXITY_BASE * 1.5
can_anchor = FALSE
/obj/item/device/electronic_assembly/drone/can_move()
return TRUE
/obj/item/device/electronic_assembly/drone/default
name = "type-a electronic drone"
/obj/item/device/electronic_assembly/drone/arms
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."
// Wall mounted assemblies.
/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."
w_class = ITEMSIZE_NORMAL
max_components = IC_COMPONENTS_BASE * 2
max_complexity = IC_COMPLEXITY_BASE * 2
can_anchor = TRUE
/obj/item/device/electronic_assembly/wallmount/proc/mount_assembly(turf/on_wall, mob/user)
if(get_dist(on_wall,user) > 1)
return
var/ndir = get_dir(on_wall, user)
if(!(ndir in cardinal))
return
var/turf/T = get_turf(user)
if(!istype(T, /turf/simulated/floor))
to_chat(user, "<span class='warning'>You cannot place \the [src] on this spot!</span>")
return
playsound(src, 'sound/machines/click.ogg', 75, 1)
user.visible_message("\The [user] attaches \the [src] to the wall.",
"<span class='notice'>You attach \the [src] to the wall.</span>",
"<span class='italics'>You hear clicking.</span>")
if(istype(user, /mob/living/silicon/robot)) //Robots cannot unequip/drop items, for Safety Reasons.
forceMove(T)
user.drop_item(T)
anchored = TRUE
on_anchored()
switch(ndir)
if(NORTH)
pixel_y = -31
if(SOUTH)
pixel_y = 31
if(EAST)
pixel_x = -31
if(WEST)
pixel_x = 31
/obj/item/device/electronic_assembly/wallmount/on_unanchored()
pixel_x = 0
pixel_y = 0
..()
/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."
w_class = ITEMSIZE_LARGE
max_components = IC_COMPONENTS_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."
w_class = ITEMSIZE_SMALL
max_components = IC_COMPONENTS_BASE
max_complexity = IC_COMPLEXITY_BASE
/obj/item/device/electronic_assembly/wallmount/tiny
name = "tiny wall-mounted electronic assembly"
icon_state = "setup_wallmount_tiny"
desc = "It's a case, for building tiny electronics with. It has a magnetized backing \
to allow it to stick to walls."
w_class = ITEMSIZE_TINY
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
@@ -1,18 +1,18 @@
// Note that this is contained inside an actual implant subtype.
// See code/game/objects/items/weapons/implants/implantcircuits.dm for where this gets held.
/obj/item/device/electronic_assembly/implant
name = "electronic implant"
icon_state = "setup_implant"
desc = "It's a case, for building very tiny electronics with."
w_class = ITEMSIZE_TINY
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
var/obj/item/weapon/implant/integrated_circuit/implant = null
/obj/item/device/electronic_assembly/implant/tgui_host()
return implant.tgui_host()
/obj/item/device/electronic_assembly/implant/update_icon()
..()
// Note that this is contained inside an actual implant subtype.
// See code/game/objects/items/weapons/implants/implantcircuits.dm for where this gets held.
/obj/item/device/electronic_assembly/implant
name = "electronic implant"
icon_state = "setup_implant"
desc = "It's a case, for building very tiny electronics with."
w_class = ITEMSIZE_TINY
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
var/obj/item/weapon/implant/integrated_circuit/implant = null
/obj/item/device/electronic_assembly/implant/tgui_host()
return implant.tgui_host()
/obj/item/device/electronic_assembly/implant/update_icon()
..()
implant.icon_state = icon_state
@@ -1,76 +1,76 @@
/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/integrated_electronics/electronic_tools.dmi'
icon_state = "detailer"
item_flags = NOBLUDGEON
w_class = ITEMSIZE_SMALL
var/detail_color = COLOR_ASSEMBLY_WHITE
var/list/color_list = list(
"dark gray" = COLOR_ASSEMBLY_BLACK,
"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,
"hot pink" = COLOR_ASSEMBLY_HOT_PINK
)
/obj/item/device/integrated_electronics/detailer/Initialize()
update_icon()
return ..()
/obj/item/device/integrated_electronics/detailer/update_icon()
cut_overlays()
var/mutable_appearance/detail_overlay = mutable_appearance('icons/obj/integrated_electronics/electronic_tools.dmi', "detailer-color")
detail_overlay.color = detail_color
add_overlay(detail_overlay)
/obj/item/device/integrated_electronics/detailer/tgui_state(mob/user)
return GLOB.tgui_inventory_state
/obj/item/device/integrated_electronics/detailer/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ICDetailer", name)
ui.open()
/obj/item/device/integrated_electronics/detailer/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
var/list/data = ..()
data["detail_color"] = detail_color
data["color_list"] = color_list
return data
/obj/item/device/integrated_electronics/detailer/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
if(..())
return TRUE
switch(action)
if("change_color")
if(!(params["color"] in color_list))
return // to prevent href exploits causing runtimes
detail_color = color_list[params["color"]]
update_icon()
return TRUE
/obj/item/device/integrated_electronics/detailer/attack_self(mob/user)
tgui_interact(user)
// Leaving this commented out in case someone decides that this would be better as an "any color" selection system
// Just uncomment this and get rid of all of the TGUI bullshit lol
// if(!in_range(user, src))
// return
// var/new_color = input(user, "Pick a color", "Color Selection", detail_color) as color|null
// if(!new_color)
// return
// detail_color = new_color
/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/integrated_electronics/electronic_tools.dmi'
icon_state = "detailer"
item_flags = NOBLUDGEON
w_class = ITEMSIZE_SMALL
var/detail_color = COLOR_ASSEMBLY_WHITE
var/list/color_list = list(
"dark gray" = COLOR_ASSEMBLY_BLACK,
"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,
"hot pink" = COLOR_ASSEMBLY_HOT_PINK
)
/obj/item/device/integrated_electronics/detailer/Initialize()
update_icon()
return ..()
/obj/item/device/integrated_electronics/detailer/update_icon()
cut_overlays()
var/mutable_appearance/detail_overlay = mutable_appearance('icons/obj/integrated_electronics/electronic_tools.dmi', "detailer-color")
detail_overlay.color = detail_color
add_overlay(detail_overlay)
/obj/item/device/integrated_electronics/detailer/tgui_state(mob/user)
return GLOB.tgui_inventory_state
/obj/item/device/integrated_electronics/detailer/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ICDetailer", name)
ui.open()
/obj/item/device/integrated_electronics/detailer/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
var/list/data = ..()
data["detail_color"] = detail_color
data["color_list"] = color_list
return data
/obj/item/device/integrated_electronics/detailer/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
if(..())
return TRUE
switch(action)
if("change_color")
if(!(params["color"] in color_list))
return // to prevent href exploits causing runtimes
detail_color = color_list[params["color"]]
update_icon()
return TRUE
/obj/item/device/integrated_electronics/detailer/attack_self(mob/user)
tgui_interact(user)
// Leaving this commented out in case someone decides that this would be better as an "any color" selection system
// Just uncomment this and get rid of all of the TGUI bullshit lol
// if(!in_range(user, src))
// return
// var/new_color = input(user, "Pick a color", "Color Selection", detail_color) as color|null
// if(!new_color)
// return
// detail_color = new_color
// update_icon()