mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-20 11:40:07 +01:00
[MIRROR] Refactored fundamental circuit components that have varying inputs. Improvements to the integrated circuit UI. Improves and rebalances the drone shell [MDB IGNORE] (#15264)
* 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> * Refactored fundamental circuit components that have varying inputs. Improvements to the integrated circuit UI. Improves and rebalances the drone shell Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <hidden@ hidden.com>
This commit is contained in:
co-authored by
Watermelon914
Watermelon914
parent
e2c4318f29
commit
856ea9c79a
@@ -8,21 +8,28 @@
|
||||
desc = "A component that combines strings."
|
||||
category = "String"
|
||||
|
||||
/// The amount of input ports to have
|
||||
var/input_port_amount = 4
|
||||
|
||||
var/list/datum/port/input/concat_ports = list()
|
||||
|
||||
/// The result from the output
|
||||
var/datum/port/output/output
|
||||
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL
|
||||
|
||||
/obj/item/circuit_component/concat/populate_ports()
|
||||
for(var/port_id in 1 to input_port_amount)
|
||||
var/letter = ascii2text(text2ascii("A") + (port_id-1))
|
||||
concat_ports += add_input_port(letter, PORT_TYPE_STRING)
|
||||
ui_buttons = list(
|
||||
"plus" = "add",
|
||||
"minus" = "remove"
|
||||
)
|
||||
|
||||
output = add_output_port("Output", PORT_TYPE_STRING)
|
||||
/obj/item/circuit_component/concat/populate_ports()
|
||||
AddComponent(/datum/component/circuit_component_add_port, \
|
||||
port_list = concat_ports, \
|
||||
add_action = "add", \
|
||||
remove_action = "remove", \
|
||||
port_type = PORT_TYPE_STRING, \
|
||||
prefix = "Port", \
|
||||
minimum_amount = 2 \
|
||||
)
|
||||
|
||||
output = add_output_port("Output", PORT_TYPE_STRING, order = 1.1)
|
||||
|
||||
/obj/item/circuit_component/concat/input_received(datum/port/input/port)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user