mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-03 13:32:17 +00:00
## About The Pull Request Adds the ability to build mass drivers, you activate them by attaching a signaler to their launch wire. They also have a safety wire, that when pulsed, increases the power of it. To reset the power back to normal you cut the safety wire. This is mostly just a port of https://github.com/BeeStation/BeeStation-Hornet/pull/5563 ## Why It's Good For The Game Less weird unique machines, and you can do some interesting stuff with mass drivers, like traps, cannons, and many other interesting things. ## Changelog 🆑 add: mass drivers are now buildable, you activate them by attaching a signaler to their launch wire, and can increase their power by pulsing the safeties wire, and reset it back to normal by cutting the safeties wire. /🆑
26 lines
879 B
Plaintext
26 lines
879 B
Plaintext
/datum/wires/mass_driver
|
|
holder_type = /obj/machinery/mass_driver
|
|
proper_name = "Mass Driver"
|
|
|
|
/datum/wires/mass_driver/New(atom/holder)
|
|
wires = list(WIRE_LAUNCH, WIRE_SAFETIES)
|
|
..()
|
|
|
|
/datum/wires/mass_driver/on_pulse(wire)
|
|
var/obj/machinery/mass_driver/the_mass_driver = holder
|
|
switch(wire)
|
|
if(WIRE_LAUNCH)
|
|
the_mass_driver.drive()
|
|
holder.visible_message(span_notice("The drive mechanism activates."))
|
|
if(WIRE_SAFETIES)
|
|
the_mass_driver.power = 3
|
|
holder.visible_message(span_notice("You hear a worrying whirring noise emitting from the mass driver."))
|
|
|
|
/datum/wires/mass_driver/on_cut(wire, mend, source)
|
|
var/obj/machinery/mass_driver/the_mass_driver = holder
|
|
switch(wire)
|
|
if(WIRE_SAFETIES)
|
|
if(the_mass_driver.power > 1)
|
|
the_mass_driver.power = 1
|
|
holder.visible_message(span_notice("The whirring noise emitting from the mass driver stops."))
|