Files
Bubberstation/code/datums/wires/conveyor.dm
SkyratBot 92f94b7d97 [MIRROR] conveyor belt and switch changes [MDB IGNORE] (#12030)
* 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>
2022-03-11 18:09:10 -07:00

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