Files
GS13NG/code/modules/shuttle/computer.dm
Poojawa cf59ac1c3d 12/21 modernizations from TG live (#103)
* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes
2016-12-22 03:57:55 -06:00

79 lines
2.6 KiB
Plaintext

/obj/machinery/computer/shuttle
name = "Shuttle Console"
icon_screen = "shuttle"
icon_keyboard = "tech_key"
req_access = list( )
circuit = /obj/item/weapon/circuitboard/computer/shuttle
var/shuttleId
var/possible_destinations = ""
var/admin_controlled
var/no_destination_swap = 0
/obj/machinery/computer/shuttle/New(location, obj/item/weapon/circuitboard/computer/shuttle/C)
..()
if(istype(C))
possible_destinations = C.possible_destinations
shuttleId = C.shuttleId
/obj/machinery/computer/shuttle/attack_hand(mob/user)
if(..(user))
return
src.add_fingerprint(usr)
var/list/options = params2list(possible_destinations)
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
var/dat = "Status: [M ? M.getStatusText() : "*Missing*"]<br><br>"
if(M)
var/destination_found
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
if(!options.Find(S.id))
continue
if(!M.check_dock(S))
continue
destination_found = 1
dat += "<A href='?src=\ref[src];move=[S.id]'>Send to [S.name]</A><br>"
if(!destination_found)
dat += "<B>Shuttle Locked</B><br>"
if(admin_controlled)
dat += "Authorized personnel only<br>"
dat += "<A href='?src=\ref[src];request=1]'>Request Authorization</A><br>"
dat += "<a href='?src=\ref[user];mach_close=computer'>Close</a>"
var/datum/browser/popup = new(user, "computer", M ? M.name : "shuttle", 300, 200)
popup.set_content("<center>[dat]</center>")
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/computer/shuttle/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(!allowed(usr))
usr << "<span class='danger'>Access denied.</span>"
return
if(href_list["move"])
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
if(M.launch_status == ENDGAME_LAUNCHED)
usr << "<span class='warning'>You've already escaped. Never going back to that place again!</span>"
return
if(no_destination_swap)
if(M.mode != SHUTTLE_IDLE)
usr << "<span class='warning'>Shuttle already in transit.</span>"
return
switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1))
if(0)
usr << "<span class='notice'>Shuttle received message and will be sent shortly.</span>"
if(1)
usr << "<span class='warning'>Invalid shuttle requested.</span>"
else
usr << "<span class='notice'>Unable to comply.</span>"
/obj/machinery/computer/shuttle/emag_act(mob/user)
if(!emagged)
src.req_access = list()
emagged = 1
user << "<span class='notice'>You fried the consoles ID checking system.</span>"