mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-05 22:43:46 +00:00
* Input ports now connect to multiple output ports. Remove combiner. (#60494) * tgui bsod * debug disconnections * prelim * recomment * set_value -> put ._. * DAMN IT * reinsert subsystem * prepare * unditch signals * remove combiner * remove combiner some more * how did router.dm get here? deleting. * These two COMSIGS should be one. * critical typo * inline cast * have your signals * Have your set_input & set_output. * make compile * upgrade save/load to n-to-n-wires * have your documentation * have your unsafe proc * pay no attention to the compile errors * unlist the ref * paste my for block back in ._. * fix manual input * oops pushed too soon * Have your !port.connected_to?.length Co-authored-by: Watermelon914 <37270891+Watermelon914@ users.noreply.github.com> Co-authored-by: Watermelon914 <37270891+Watermelon914@ users.noreply.github.com> * Input ports now connect to multiple output ports. Remove combiner. Co-authored-by: Gurkenglas <gurkenglas@hotmail.de> Co-authored-by: Watermelon914 <37270891+Watermelon914@ users.noreply.github.com>
32 lines
829 B
Plaintext
32 lines
829 B
Plaintext
/**
|
|
* # Pull Component
|
|
*
|
|
* Tells the shell to start pulling on a designated atom. Only works on movable shells.
|
|
*/
|
|
/obj/item/circuit_component/pull
|
|
display_name = "Start Pulling"
|
|
desc = "A component that can force the shell to pull entities. Only works for drone shells."
|
|
|
|
/// Frequency input
|
|
var/datum/port/input/target
|
|
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL
|
|
|
|
/obj/item/circuit_component/pull/Initialize()
|
|
. = ..()
|
|
target = add_input_port("Target", PORT_TYPE_ATOM)
|
|
|
|
/obj/item/circuit_component/pull/input_received(datum/port/input/port)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
var/atom/target_atom = target.value
|
|
if(!target_atom)
|
|
return
|
|
|
|
var/mob/shell = parent.shell
|
|
if(!istype(shell) || get_dist(shell, target_atom) > 1 || shell.z != target_atom.z)
|
|
return
|
|
|
|
shell.start_pulling(target_atom)
|