mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
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:
co-authored by
Watermelon914
parent
736ca53254
commit
74dddffb29
@@ -11,9 +11,11 @@
|
||||
desc = "A component that checks the type of its input."
|
||||
category = "Utility"
|
||||
|
||||
input_port_amount = 1
|
||||
var/datum/port/input/option/typecheck_options
|
||||
|
||||
/// Object to typecheck
|
||||
var/datum/port/input/thing_to_check
|
||||
|
||||
/obj/item/circuit_component/compare/typecheck/populate_options()
|
||||
var/static/component_options = list(
|
||||
PORT_TYPE_STRING,
|
||||
@@ -25,14 +27,11 @@
|
||||
)
|
||||
typecheck_options = add_option_port("Typecheck Options", component_options)
|
||||
|
||||
/obj/item/circuit_component/compare/typecheck/do_comparisons(list/ports)
|
||||
if(!length(ports))
|
||||
return
|
||||
. = FALSE
|
||||
/obj/item/circuit_component/compare/typecheck/populate_custom_ports()
|
||||
thing_to_check = add_input_port("Value", PORT_TYPE_ANY)
|
||||
|
||||
// We're only comparing the first port/value. There shouldn't be any more.
|
||||
var/datum/port/input/input_port = ports[1]
|
||||
var/input_val = input_port.value
|
||||
/obj/item/circuit_component/compare/typecheck/do_comparisons()
|
||||
var/input_val = thing_to_check.value
|
||||
switch(typecheck_options.value)
|
||||
if(PORT_TYPE_STRING)
|
||||
return istext(input_val)
|
||||
@@ -46,7 +45,7 @@
|
||||
return ismob(input_val)
|
||||
if(COMP_TYPECHECK_HUMAN)
|
||||
return ishuman(input_val)
|
||||
|
||||
return FALSE
|
||||
|
||||
#undef COMP_TYPECHECK_MOB
|
||||
#undef COMP_TYPECHECK_HUMAN
|
||||
|
||||
Reference in New Issue
Block a user