Refactored fundamental circuit components that have varying inputs. Improvements to the integrated circuit UI. Improves and rebalances the drone shell (#68586)

* Refactored fundamental circuit components that have varying inputs. Made the integrated circuit UI slightly better.

* Fixes with UI

* Removes logger

* Ran prettier

* Fixed documentation

* Rebalances drone circuit

* Drones can now charge in chargers

Co-authored-by: Watermelon914 <hidden@hidden.com>
This commit is contained in:
Watermelon914
2022-07-28 23:55:41 -07:00
committed by GitHub
co-authored by Watermelon914
parent 736ca53254
commit 74dddffb29
25 changed files with 533 additions and 336 deletions
@@ -16,9 +16,6 @@
desc = "General arithmetic component with arithmetic capabilities."
category = "Math"
/// The amount of input ports to have
var/input_port_amount = 4
var/datum/port/input/option/arithmetic_option
/// The result from the output
@@ -26,6 +23,10 @@
var/list/arithmetic_ports
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL
ui_buttons = list(
"plus" = "add",
"minus" = "remove"
)
/obj/item/circuit_component/arithmetic/populate_options()
var/static/component_options = list(
@@ -40,11 +41,15 @@
/obj/item/circuit_component/arithmetic/populate_ports()
arithmetic_ports = list()
for(var/port_id in 1 to input_port_amount)
var/letter = ascii2text(text2ascii("A") + (port_id-1))
arithmetic_ports += add_input_port(letter, PORT_TYPE_NUMBER)
output = add_output_port("Output", PORT_TYPE_NUMBER)
AddComponent(/datum/component/circuit_component_add_port, \
port_list = arithmetic_ports, \
add_action = "add", \
remove_action = "remove", \
port_type = PORT_TYPE_NUMBER, \
prefix = "Port", \
minimum_amount = 2 \
)
output = add_output_port("Output", PORT_TYPE_NUMBER, order = 1.1)
/obj/item/circuit_component/arithmetic/input_received(datum/port/input/port)