Files
VOREStation/code/game/machinery/mass_driver.dm
T
Cameron Lennox 453080616b SM, Tesla, and general engineering adjustments [MDB IGNORE] [IDB IGNORE] (#19339)
* Update supermatter.dm

* fix

* clamps these

* gwah

* Stops tesla from zapping unwrenched coils

* tesla upgrade

* unglobals this

* fix these

* Update coil.dm

* Update coil.dm

* Descriptions

* Update coil.dm

* Update coil.dm

* Update coil.dm

* Update coil.dm

* Update coil.dm

* ranges

* UGH

* Update vorestation.dme

* meth

* monster math

* Update coil.dm

* Update coil.dm

* Update coil.dm

* THEY DID THE MATH

* the monster math

* egwah

* desc

* Update coil.dm

* Returns

* Update coil.dm

* Lowers amount gained

* this

* im dumb

* tesy

* Update coil.dm

* Update coil.dm

* fixes initial density on blast doors

* dot

* fixes these

* Mapper Tools

* icon

* these

* Fixes the sound following people

* recursive geigers

* Make this a proc

* Update supermatter.dm

* less ear destroying

* these

* makes canisters not get softlocked

* Hotkeys

* proper return

* Makes shield gen useful. Gets rid of a harddel

Adds hydromagnetic trap

* math

* Makes buttons more clear.

* lol

* Fixes ancient runtime

* Adds craftable mass driver buttons

* button

* fixes this

* Makes misclicks not destroy solar panels

* Update solar.dm

* fix this

* make them both numbers

* upports reflectors

* Update reflector.dm

* Update reflectors.dm

* solar panel and climbable

* Gets rid of 'as X'

* Adds account console

* Update vorestation.dme

* Craftable message server

* Update message_server.dm

* These

* con struct

* Update smartfridge.dm

* whoop

* edits
2026-03-26 22:20:06 -04:00

63 lines
1.8 KiB
Plaintext

//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/obj/machinery/mass_driver
name = "mass driver"
desc = "Shoots things into space."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "mass_driver"
anchored = TRUE
use_power = USE_POWER_IDLE
idle_power_usage = 2
active_power_usage = 50
circuit = /obj/item/circuitboard/mass_driver
var/power = 1.0
var/code = 1.0
var/id = null
var/drive_range = 50 //this is mostly irrelevant since current mass drivers throw into space, but you could make a lower-range mass driver for interstation transport or something I guess.
/obj/machinery/mass_driver/Initialize(mapload)
. = ..()
default_apply_parts()
/obj/machinery/mass_driver/attackby(var/obj/item/I, mob/user)
if(default_deconstruction_screwdriver(user, I))
return
if(default_deconstruction_crowbar(user, I))
return
if(istype(I, /obj/item/multitool))
if(panel_open)
var/input = tgui_input_number(user, "[src] has an id of \"[id]\". What would you like it to be?", "[src] ID]", id, 9999)
if(!input)
to_chat(user, "No input found please hang up and try your call again.")
return
id = input
return
return
/obj/machinery/mass_driver/proc/drive(amount)
if(stat & (BROKEN|NOPOWER))
return
use_power(500)
var/O_limit
var/atom/target = get_edge_target_turf(src, dir)
for(var/atom/movable/O in loc)
if(!O.anchored||istype(O, /obj/mecha))//Mechs need their launch platforms.
O_limit++
if(O_limit >= 20)
for(var/mob/M in hearers(src, null))
to_chat(M, span_notice("The mass driver lets out a screech, it mustn't be able to handle any more items."))
break
use_power(500)
spawn(0)
O.throw_at(target, drive_range * power, power)
flick("mass_driver1", src)
return
/obj/machinery/mass_driver/emp_act(severity, recursive)
if(stat & (BROKEN|NOPOWER))
return
drive()
..(severity, recursive)