mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-30 11:32:20 +00:00
Tags would bug out due to how the 'Save Shell' component would copy all the variables on an object except a few restricted ones, though this proved to be very buggy. The duplicator part has been removed and more proper logging has been added. To compensate for the duplicator part being removed, admin circuit display names will now replace the entire name of the shell.
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
/**
|
|
* # SDQL Component
|
|
*
|
|
* A component that performs an sdql operation
|
|
*/
|
|
/obj/item/circuit_component/sdql_operation
|
|
display_name = "SDQL Operation"
|
|
desc = "A component that performs an SDQL operation when invoked."
|
|
category = "Admin"
|
|
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL|CIRCUIT_FLAG_ADMIN
|
|
|
|
/// SDQL Operation to invoke
|
|
var/datum/port/input/sdql_operation
|
|
|
|
var/datum/port/output/results
|
|
|
|
|
|
/obj/item/circuit_component/sdql_operation/populate_ports()
|
|
sdql_operation = add_input_port("SDQL String", PORT_TYPE_STRING)
|
|
results = add_output_port("Result", PORT_TYPE_LIST(PORT_TYPE_STRING))
|
|
|
|
/obj/item/circuit_component/sdql_operation/input_received(datum/port/input/port)
|
|
if(GLOB.AdminProcCaller)
|
|
return TRUE
|
|
|
|
INVOKE_ASYNC(src, .proc/execute_sdql, port)
|
|
|
|
/obj/item/circuit_component/sdql_operation/proc/execute_sdql(datum/port/input/port)
|
|
var/operation = sdql_operation.value
|
|
|
|
if(!operation)
|
|
return
|
|
|
|
log_admin_circuit("[parent.get_creator()] performed SDQL query [operation].")
|
|
var/result = HandleUserlessSDQL(parent.get_creator(), operation)
|
|
results.set_output(result)
|