Skip to content

Commit

Permalink
A handful of circuitry fixes and changes (#11184)
Browse files Browse the repository at this point in the history
* Controller fixes

Fixed the controller shell and changed size on it and the compact version. also added a description to both

* A number of fixes and changes

-fixed so all the open shells have a weight
-fixed the drone shell using the wrong sprite
-added open shells for the compact remote, controller and scanner.
-fixed the working animation for the component printer and fixed so you can dissasamble it now
-fixed that the component printer doesnt auto link to the silo
-balance the server shell only takes 8 seconds instead of 10 to screw together.

* accidentally put in 8 seconds instead of 6 seconds

oops
  • Loading branch information
Geatish authored Jul 30, 2024
1 parent 7d00ab8 commit d6181cf
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 23 deletions.
6 changes: 3 additions & 3 deletions code/modules/research/designs/wiremod_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@
name = "Compact Remote Shell"
desc = "A handheld shell with one big button."
id = "compact_remote_shell"
build_path = /obj/item/compact_remote
build_path = /obj/item/shell/compact_remote
materials = list(/datum/material/glass = 2000, /datum/material/iron = 5000)
build_type = PROTOLATHE | COMPONENT_PRINTER
category = list(WIREMOD_CIRCUITRY, WIREMOD_SHELLS)
Expand All @@ -434,7 +434,7 @@
name = "Controller Shell"
desc = "A handheld shell with several buttons."
id = "controller_shell"
build_path = /obj/item/controller
build_path = /obj/item/shell/controller
build_type = PROTOLATHE | COMPONENT_PRINTER
materials = list(/datum/material/glass = 2000, /datum/material/iron = 7000)
category = list(WIREMOD_CIRCUITRY, WIREMOD_SHELLS)
Expand All @@ -443,7 +443,7 @@
name = "Scanner Shell"
desc = "A handheld scanner shell that can scan entities."
id = "scanner_shell"
build_path = /obj/item/wiremod_scanner
build_path = /obj/item/shell/wiremod_scanner
build_type = PROTOLATHE | COMPONENT_PRINTER
materials = list(/datum/material/glass = 4000, /datum/material/iron = 5000)
category = list(WIREMOD_CIRCUITRY, WIREMOD_SHELLS)
Expand Down
19 changes: 15 additions & 4 deletions code/modules/wiremod/core/component_printer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
circuit = /obj/item/circuitboard/machine/component_printer

remote_materials = TRUE
auto_link = TRUE
auto_link = FALSE
can_sync = TRUE

//Quick.
Expand All @@ -16,8 +16,7 @@

categories = WIREMODE_CATEGORIES

/obj/machinery/component_printer/crowbar_act(mob/living/user, obj/item/tool)

/obj/machinery/modular_fabricator/component_printer/crowbar_act(mob/living/user, obj/item/tool)
if(..())
return TRUE
return default_deconstruction_crowbar(tool)
Expand All @@ -27,14 +26,26 @@
return TRUE
return default_deconstruction_screwdriver(user, "fab-o", "fab-idle", tool)

/obj/machinery/modular_fabricator/component_printer/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
. = ..()
var/datum/material/M = id_inserted
add_overlay("fab-load-[M.name]")
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, cut_overlay), "fab-load-[M.name]"), 10)

/obj/machinery/modular_fabricator/component_printer/set_default_sprite()
cut_overlay("fab-active")

/obj/machinery/modular_fabricator/component_printer/set_working_sprite()
add_overlay("fab-active")

/obj/item/circuitboard/machine/component_printer
name = "\improper Component Printer (Machine Board)"
icon_state = "science"
build_path = /obj/machinery/modular_fabricator/component_printer
req_components = list(
/obj/item/stock_parts/matter_bin = 2,
/obj/item/stock_parts/manipulator = 2,
/obj/item/reagent_containers/glass/beaker = 2,
/obj/item/reagent_containers/glass/beaker = 2, //this doesn't make any sense, yet i wasn't allowed to fix it.
)

/// Module duplicator, allows you to save and recreate module components.
Expand Down
3 changes: 2 additions & 1 deletion code/modules/wiremod/shell/compact_remote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
*/
/obj/item/compact_remote
name = "compact remote"
desc = "A smaller handheld device with one big button."
icon = 'icons/obj/wiremod.dmi'
icon_state = "setup_small_simple"
item_state = "electronic"
w_class = WEIGHT_CLASS_SMALL
w_class = WEIGHT_CLASS_TINY
//worn_icon_state = "electronic" //remember to change it later lol
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
Expand Down
26 changes: 15 additions & 11 deletions code/modules/wiremod/shell/controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
*/
/obj/item/controller
name = "controller"
desc = "A handheld device with three buttons."
icon = 'icons/obj/wiremod.dmi'
icon_state = "setup_small_calc"
item_state = "electronic"
w_class = WEIGHT_CLASS_SMALL
//worn_icon_state = "electronic" //remember to change it
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
Expand All @@ -23,30 +25,32 @@

/obj/item/circuit_component/controller
display_name = "Controller"
desc = "Used to receive inputs from the controller shell. Use the shell in hand to trigger the output signal. Alt-click for the alternate signal. Right click for the extra signal."
desc = "Used to receive inputs from the controller shell. Use the shell in hand to trigger the first signal. Alt-click for the second signal. CTRL-click for the thrid signal."

/// The three separate buttons that are called in attack_hand on the shell.
var/datum/port/output/signal
var/datum/port/output/alt
var/datum/port/output/right
var/datum/port/output/ctrl

/// The entity output
var/datum/port/output/entity

/obj/item/circuit_component/controller/populate_ports()
entity = add_output_port("User", PORT_TYPE_ATOM)
signal = add_output_port("Signal", PORT_TYPE_SIGNAL)
alt = add_output_port("Alternate Signal", PORT_TYPE_SIGNAL)
right = add_output_port("Extra Signal", PORT_TYPE_SIGNAL)
signal = add_output_port("First Signal", PORT_TYPE_SIGNAL)
alt = add_output_port("Second Signal", PORT_TYPE_SIGNAL)
ctrl = add_output_port("Third Signal", PORT_TYPE_SIGNAL)

/obj/item/circuit_component/controller/register_shell(atom/movable/shell)
RegisterSignal(shell, COMSIG_ITEM_ATTACK_SELF, PROC_REF(send_trigger))
RegisterSignal(shell, COMSIG_CLICK_ALT, PROC_REF(send_alternate_signal))
RegisterSignal(shell, COMSIG_CLICK_CTRL, PROC_REF(send_ctrl_signal))

/obj/item/circuit_component/controller/unregister_shell(atom/movable/shell)
UnregisterSignal(shell, list(
COMSIG_ITEM_ATTACK_SELF,
COMSIG_CLICK_ALT,
COMSIG_CLICK_CTRL,
))

/**
Expand All @@ -56,7 +60,7 @@
SIGNAL_HANDLER
if(!user.Adjacent(source))
return
source.balloon_alert(user, "Clicked the primary button.")
source.balloon_alert(user, "Clicked the first button.")
playsound(source, get_sfx("terminal_type"), 25, FALSE)
entity.set_output(user)
signal.set_output(COMPONENT_SIGNAL)
Expand All @@ -68,20 +72,20 @@
SIGNAL_HANDLER
if(!user.Adjacent(source))
return
source.balloon_alert(user, "Clicked the alternate button.")
source.balloon_alert(user, "Clicked the second button.")
playsound(source, get_sfx("terminal_type"), 25, FALSE)
entity.set_output(user)
alt.set_output(COMPONENT_SIGNAL)
return COMPONENT_INTERCEPT_ALT

/**
* Called when the shell item is right-clicked in active hand
* Called when the shell item is ctrl-clicked in active hand
*/
/obj/item/circuit_component/controller/proc/send_right_signal(atom/source, mob/user)
/obj/item/circuit_component/controller/proc/send_ctrl_signal(atom/source, mob/user)
SIGNAL_HANDLER
if(!user.Adjacent(source))
return
source.balloon_alert(user, "Clicked the extra button.")
source.balloon_alert(user, "Clicked the third button.")
playsound(source, get_sfx("terminal_type"), 25, FALSE)
entity.set_output(user)
right.set_output(COMPONENT_SIGNAL)
ctrl.set_output(COMPONENT_SIGNAL)
2 changes: 1 addition & 1 deletion code/modules/wiremod/shell/drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/mob/living/circuit_drone
name = "drone"
icon = 'icons/obj/wiremod.dmi'
icon_state = "setup_medium_med"
icon_state = "setup_drone_arms" //RIP setup_medium_med, you were too cute for this world. Maybe some other day they'll find a use for you

light_system = MOVABLE_LIGHT

Expand Down
4 changes: 3 additions & 1 deletion code/modules/wiremod/shell/scanner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*/
/obj/item/wiremod_scanner
name = "scanner"
desc = "A handheld device that lets you scan people"
icon = 'icons/obj/wiremod.dmi'
icon_state = "setup_small"
item_state = "electronic"
w_class = WEIGHT_CLASS_SMALL
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'

Expand All @@ -20,7 +22,7 @@
. = ..()
AddComponent(/datum/component/shell, list(
new /obj/item/circuit_component/wiremod_scanner()
), SHELL_CAPACITY_SMALL)
), SHELL_CAPACITY_MEDIUM)

/obj/item/circuit_component/wiremod_scanner
display_name = "Scanner"
Expand Down
37 changes: 35 additions & 2 deletions code/modules/wiremod/shell/shell_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,70 @@
name = "bot assembly"
icon_state = "setup_medium_box-open"
shell_to_spawn = /obj/structure/bot
w_class = WEIGHT_CLASS_NORMAL

/obj/item/shell/money_bot
name = "money bot assembly"
icon_state = "setup_large-open"
shell_to_spawn = /obj/structure/money_bot
w_class = WEIGHT_CLASS_NORMAL

/obj/item/shell/drone
name = "drone assembly"
icon_state = "setup_medium_med-open"
icon_state = "setup_drone_arms-open"
shell_to_spawn = /mob/living/circuit_drone
w_class = WEIGHT_CLASS_NORMAL // you should be able to fit these in your back pack

/obj/item/shell/server
name = "server assembly"
icon_state = "setup_stationary-open"
shell_to_spawn = /obj/structure/server
screw_delay = 10 SECONDS
screw_delay = 6 SECONDS
w_class = WEIGHT_CLASS_BULKY

/obj/item/shell/server/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, require_twohands=TRUE)

/obj/item/shell/airlock
name = "circuit airlock assembly"
icon = 'icons/obj/doors/airlocks/station/public.dmi'
icon_state = "construction"
shell_to_spawn = /obj/machinery/door/airlock/shell
screw_delay = 10 SECONDS
w_class = WEIGHT_CLASS_GIGANTIC

/obj/item/shell/airlock/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, require_twohands=TRUE) // that you even are allowed to carry around an airlock frame is weird.

/obj/item/shell/bci
name = "brain-computer interface assembly"
icon_state = "bci-open"
shell_to_spawn = /obj/item/organ/cyberimp/bci
w_class = WEIGHT_CLASS_TINY

/obj/item/shell/scanner_gate
name = "scanner gate assembly"
icon = 'icons/obj/machines/scangate.dmi'
icon_state = "scangate"
shell_to_spawn = /obj/structure/scanner_gate_shell
w_class = WEIGHT_CLASS_LARGE

/obj/item/shell/controller
name = "controller assembly"
icon_state = "setup_small_calc-open"
shell_to_spawn = /obj/item/controller
w_class = WEIGHT_CLASS_SMALL

/obj/item/shell/compact_remote
name = "compact remote assembly"
icon_state = "setup_small_simple-open"
shell_to_spawn = /obj/item/compact_remote
w_class = WEIGHT_CLASS_TINY

/obj/item/shell/wiremod_scanner
name = "scanner assembly"
icon_state = "setup_small-open"
shell_to_spawn = /obj/item/wiremod_scanner
w_class = WEIGHT_CLASS_SMALL

0 comments on commit d6181cf

Please sign in to comment.