mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
[MIRROR] Refactors port types completely and adds the option type. Refactors options to use this new type (#7386)
* Refactors port types completely and adds the option type. Refactors options to use this new type (#60571) Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com> * Refactors port types completely and adds the option type. Refactors options to use this new type Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
This commit is contained in:
@@ -5,9 +5,11 @@
|
||||
*/
|
||||
/obj/item/circuit_component/proccall
|
||||
display_name = "Proc Call"
|
||||
desc = "A component that gets a variable on an object."
|
||||
desc = "A component that calls a proc on an object."
|
||||
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL|CIRCUIT_FLAG_ADMIN
|
||||
|
||||
var/datum/port/input/option/proccall_options
|
||||
|
||||
/// Entity to proccall on
|
||||
var/datum/port/input/entity
|
||||
|
||||
@@ -26,7 +28,7 @@
|
||||
COMP_PROC_GLOBAL,
|
||||
)
|
||||
|
||||
options = component_options
|
||||
proccall_options = add_option_port("Proccall Options", component_options)
|
||||
|
||||
/obj/item/circuit_component/proccall/Initialize()
|
||||
. = ..()
|
||||
@@ -42,7 +44,7 @@
|
||||
return
|
||||
|
||||
var/called_on
|
||||
if(current_option == COMP_PROC_OBJECT)
|
||||
if(proccall_options.input_value == COMP_PROC_OBJECT)
|
||||
called_on = entity.input_value
|
||||
else
|
||||
called_on = GLOBAL_PROC
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
/obj/item/circuit_component/spawn_atom
|
||||
display_name = "Spawn Atom"
|
||||
desc = "A component that returns the value of a list at a given index."
|
||||
desc = "Spawns an atom at a desired location"
|
||||
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL|CIRCUIT_FLAG_ADMIN
|
||||
|
||||
/// The input path to convert into a typepath
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
/obj/item/circuit_component/to_type
|
||||
display_name = "String To Type"
|
||||
desc = "A component that returns the value of a list at a given index."
|
||||
desc = "Converts a string into a typepath. Useful for adding components."
|
||||
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL|CIRCUIT_FLAG_ADMIN
|
||||
|
||||
/// The input path to convert into a typepath
|
||||
|
||||
Reference in New Issue
Block a user