mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-01 12:31:32 +00:00
* Allows multitools to change the speed of linked conveyor belts by clicking on a placed conveyor switch. (#65277) * conveyor belt and switch changes * maintainer recommended changes 1 * maintainer recommended changes 2 * fixed hard delete * resolve fix and name change of variable * who knew that SECONDS is *10, not me * conveyor belt and switch changes Co-authored-by: MacBlaze1 <33578623+MacBlaze1@users.noreply.github.com>
21 lines
572 B
Plaintext
21 lines
572 B
Plaintext
/datum/wires/conveyor
|
|
holder_type = /obj/machinery/conveyor_switch
|
|
proper_name = "Conveyor"
|
|
/// var holder that logs who put the assembly inside and gets transfered to the switch on pulse
|
|
var/datum/weakref/fingerman_ref
|
|
|
|
/datum/wires/conveyor/New(atom/holder)
|
|
add_duds(1)
|
|
..()
|
|
|
|
/datum/wires/conveyor/on_pulse(wire)
|
|
var/obj/machinery/conveyor_switch/C = holder
|
|
var/mob/living/carbon/human/fingerman = fingerman_ref?.resolve()
|
|
C.interact(fingerman)
|
|
|
|
/datum/wires/conveyor/interactable(mob/user)
|
|
if(!..())
|
|
return FALSE
|
|
fingerman_ref = WEAKREF(user)
|
|
return TRUE
|