mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@732 316c924e-a436-60f5-8080-3fe189b3f50e
522 lines
18 KiB
Plaintext
522 lines
18 KiB
Plaintext
//Config stuff
|
|
#define SUPPLY_DOCKZ 2 //Z-level of the Dock.
|
|
#define SUPPLY_STATIONZ 1 //Z-level of the Station.
|
|
#define SUPPLY_POINTSPER 10 //Points per tick.
|
|
#define SUPPLY_POINTDELAY 3000 //Delay between ticks in milliseconds.
|
|
#define SUPPLY_MOVETIME 1800 //Time to station is milliseconds.
|
|
#define SUPPLY_POINTSPERCRATE 5 //Points per crate sent back.
|
|
#define SUPPLY_STATION_AREATYPE "/area/supply/station" //Type of the supply shuttle area for station
|
|
#define SUPPLY_DOCK_AREATYPE "/area/supply/dock" //Type of the supply shuttle area for dock
|
|
#define SUPPLY_POINTSPERSLIP 1 //points per packing slip sent back stamped.
|
|
|
|
var/supply_shuttle_moving = 0
|
|
var/supply_shuttle_at_station = 0
|
|
var/list/supply_shuttle_shoppinglist = new/list()
|
|
var/list/supply_shuttle_requestlist = new/list()
|
|
var/supply_shuttle_can_send = 1
|
|
var/supply_shuttle_time = 0
|
|
var/supply_shuttle_timeleft = 0
|
|
var/supply_shuttle_points = 50
|
|
var/ordernum=0
|
|
|
|
/area/supply/station //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
|
name = "supply shuttle"
|
|
icon_state = "shuttle3"
|
|
luminosity = 1
|
|
sd_lighting = 0
|
|
requires_power = 0
|
|
|
|
/area/supply/dock //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
|
name = "supply shuttle"
|
|
icon_state = "shuttle3"
|
|
luminosity = 1
|
|
sd_lighting = 0
|
|
requires_power = 0
|
|
|
|
//SUPPLY PACKS MOVED TO /code/defines/obj/supplypacks.dm
|
|
|
|
/obj/plasticflaps //HOW DO YOU CALL THOSE THINGS ANYWAY
|
|
name = "Plastic flaps"
|
|
desc = "I definitely cant get past those. no way."
|
|
icon = 'stationobjs.dmi' //Change this.
|
|
icon_state = "plasticflaps"
|
|
density = 0
|
|
anchored = 1
|
|
layer = 4
|
|
|
|
/obj/plasticflaps/CanPass(atom/A, turf/T)
|
|
if (istype(A, /mob/living)) // You Shall Not Pass!
|
|
var/mob/living/M = A
|
|
if(!M.lying) // unless you're lying down
|
|
return 0
|
|
return ..()
|
|
|
|
/obj/plasticflaps/ex_act(severity)
|
|
switch(severity)
|
|
if (1)
|
|
del(src)
|
|
if (2)
|
|
if (prob(50))
|
|
del(src)
|
|
if (3)
|
|
if (prob(5))
|
|
del(src)
|
|
|
|
/area/supplyshuttle/
|
|
name = "Supply Shuttle"
|
|
icon_state = "supply"
|
|
requires_power = 0
|
|
|
|
/obj/machinery/computer/supplycomp
|
|
name = "Supply shuttle console"
|
|
icon = 'computer.dmi'
|
|
icon_state = "supply"
|
|
req_access = list(access_cargo)
|
|
var/temp = null
|
|
var/hacked = 0
|
|
|
|
/obj/machinery/computer/ordercomp
|
|
name = "Supply ordering console"
|
|
icon = 'computer.dmi'
|
|
icon_state = "request"
|
|
var/temp = null
|
|
|
|
/obj/marker/supplymarker
|
|
icon_state = "X"
|
|
icon = 'mark.dmi'
|
|
name = "X"
|
|
invisibility = 101
|
|
anchored = 1
|
|
opacity = 0
|
|
|
|
/datum/supply_order
|
|
var/datum/supply_packs/object = null
|
|
var/orderedby = null
|
|
var/comment = null
|
|
|
|
/datum/supply_packs
|
|
var/name = null
|
|
var/list/contains = new/list()
|
|
var/amount = null
|
|
var/cost = null
|
|
var/containertype = null
|
|
var/containername = null
|
|
var/access = null
|
|
var/hidden = 0
|
|
|
|
/proc/supply_ticker()
|
|
//world << "Supply ticker ticked : Adding [SUPPLY_POINTSPER] to [supply_shuttle_points]."
|
|
supply_shuttle_points += SUPPLY_POINTSPER
|
|
//world << "New SP total is [supply_shuttle_points]"
|
|
spawn(SUPPLY_POINTDELAY) supply_ticker()
|
|
|
|
/proc/supply_process()
|
|
while(supply_shuttle_time - world.timeofday > 0)
|
|
var/ticksleft = supply_shuttle_time - world.timeofday
|
|
|
|
if(ticksleft > 1e5)
|
|
supply_shuttle_time = world.timeofday + 10 // midnight rollover
|
|
|
|
|
|
supply_shuttle_timeleft = round( ((ticksleft / 10)/60) )
|
|
sleep(10)
|
|
supply_shuttle_moving = 0
|
|
send_supply_shuttle()
|
|
|
|
/proc/supply_can_move()
|
|
if(supply_shuttle_moving) return 0
|
|
|
|
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
|
|
|
|
for(var/turf/T in get_area_turfs(shuttleat) )
|
|
//if((locate(/mob/living) in T) && (!locate(/mob/living/carbon/monkey) in T)) return 0 //old check for living excluded monkeys
|
|
if((locate(/mob/living) in T)) return 0
|
|
if((locate(/obj/item/device/radio/beacon) in T)) return 0
|
|
for(var/atom/ATM in T)
|
|
if((locate(/mob/living) in ATM)) return 0
|
|
if((locate(/obj/item/device/radio/beacon) in ATM)) return 0
|
|
|
|
return 1
|
|
|
|
/proc/sell_crates()
|
|
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
|
|
|
|
for(var/turf/T in get_area_turfs(shuttleat) )
|
|
var/crate = locate(/obj/crate) in T
|
|
if (crate)
|
|
del(crate)
|
|
supply_shuttle_points += SUPPLY_POINTSPERCRATE
|
|
|
|
/obj/item/weapon/paper/manifest
|
|
name = "Supply Manifest"
|
|
|
|
/proc/process_supply_order()
|
|
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
|
|
|
|
var/list/markers = new/list()
|
|
|
|
if(!supply_shuttle_shoppinglist.len) return
|
|
|
|
for(var/turf/T in get_area_turfs(shuttleat))
|
|
for(var/obj/marker/supplymarker/D in T)
|
|
markers += D
|
|
|
|
for(var/S in supply_shuttle_shoppinglist)
|
|
var/pickedloc = 0
|
|
var/found = 0
|
|
for(var/C in markers)
|
|
if (locate(/obj/crate) in get_turf(C)) continue
|
|
found = 1
|
|
pickedloc = get_turf(C)
|
|
if (!found) pickedloc = get_turf(pick(markers))
|
|
var/datum/supply_order/SO = S
|
|
var/datum/supply_packs/SP = SO.object
|
|
|
|
var/atom/A = new SP.containertype ( pickedloc )
|
|
A.name = "[SP.containername] [SO.comment ? "([SO.comment])":"" ]"
|
|
|
|
//supply manifest generation begin
|
|
|
|
if(ordernum)
|
|
ordernum++
|
|
else
|
|
ordernum = rand(500,5000) //pick a random number to start with
|
|
|
|
var/obj/item/weapon/paper/manifest/slip = new /obj/item/weapon/paper/manifest (A)
|
|
slip.info = ""
|
|
slip.info +="<h3>[command_name()] Shipping Manifest</h3><hr><br>"
|
|
slip.info +="Order #: [ordernum]<br>"
|
|
slip.info +="Destination: [station_name]<br>"
|
|
slip.info +="[supply_shuttle_shoppinglist.len] PACKAGES IN THIS SHIPMENT<br>"
|
|
slip.info +="CONTENTS:<br><ul>"
|
|
|
|
//spawn the stuff, finish generating the manifest while you're at it
|
|
if(SP.access)
|
|
A:req_access = new/list()
|
|
A:req_access += text2num(SP.access)
|
|
for(var/B in SP.contains)
|
|
var/thepath = text2path(B)
|
|
var/atom/B2 = new thepath (A)
|
|
if(SP.amount && B2:amount) B2:amount = SP.amount
|
|
slip.info += "<li>[B2.name]</li>" //add the item to the manifest
|
|
|
|
//manifest finalisation
|
|
slip.info += "</ul><br>"
|
|
slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS<hr>"
|
|
|
|
return
|
|
|
|
/obj/machinery/computer/ordercomp/attackby(I as obj, user as mob)
|
|
return src.attack_hand(user)
|
|
|
|
/obj/machinery/computer/ordercomp/attack_ai(var/mob/user as mob)
|
|
return src.attack_hand(user)
|
|
|
|
/obj/machinery/computer/ordercomp/attack_paw(var/mob/user as mob)
|
|
return src.attack_hand(user)
|
|
|
|
/obj/machinery/computer/supplycomp/attackby(I as obj, user as mob)
|
|
return src.attack_hand(user)
|
|
|
|
/obj/machinery/computer/supplycomp/attack_ai(var/mob/user as mob)
|
|
return src.attack_hand(user)
|
|
|
|
/obj/machinery/computer/supplycomp/attack_paw(var/mob/user as mob)
|
|
return src.attack_hand(user)
|
|
|
|
/obj/machinery/computer/supplycomp/attackby(I as obj, user as mob)
|
|
if(istype(I,/obj/item/weapon/card/emag) && !hacked)
|
|
user << "\blue Special supplies unlocked."
|
|
src.hacked = 1
|
|
else
|
|
return src.attack_hand(user)
|
|
|
|
/obj/machinery/computer/ordercomp/attack_hand(var/mob/user as mob)
|
|
if(..())
|
|
return
|
|
user.machine = src
|
|
var/dat
|
|
if (src.temp)
|
|
dat = src.temp
|
|
else
|
|
|
|
dat += {"<BR><B>Supply shuttle</B><HR>
|
|
Location: [supply_shuttle_moving ? "Moving to station ([supply_shuttle_timeleft] Mins.)":supply_shuttle_at_station ? "Station":"Dock"]<BR>
|
|
<HR>Supply points: [supply_shuttle_points]<BR>
|
|
<BR>\n<A href='?src=\ref[src];order=1'>Request items</A><BR><BR>
|
|
<A href='?src=\ref[src];vieworders=1'>View approved orders</A><BR><BR>
|
|
<A href='?src=\ref[src];viewrequests=1'>View requests</A><BR><BR>
|
|
<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
|
|
|
|
user << browse(dat, "window=computer;size=575x450")
|
|
onclose(user, "computer")
|
|
return
|
|
|
|
/obj/machinery/computer/ordercomp/Topic(href, href_list)
|
|
if(..())
|
|
return
|
|
|
|
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
|
usr.machine = src
|
|
|
|
if (href_list["order"])
|
|
src.temp = "Supply points: [supply_shuttle_points]<BR><HR><BR>Request what?<BR><BR>"
|
|
for(var/S in (typesof(/datum/supply_packs) - /datum/supply_packs) )
|
|
var/datum/supply_packs/N = new S()
|
|
if(N.hidden) continue //Have to send the type instead of a reference to
|
|
src.temp += "<A href='?src=\ref[src];doorder=[N.type]'>[N.name]</A> Cost: [N.cost] " //the obj because it would get caught by the garbage
|
|
src.temp += "<A href='?src=\ref[src];printform=[N.type]'>Print Requisition</A><br>" //collector. oh well.
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
|
|
else if (href_list["doorder"])
|
|
var/datum/supply_order/O = new/datum/supply_order ()
|
|
var/supplytype = href_list["doorder"]
|
|
var/datum/supply_packs/P = new supplytype ()
|
|
O.object = P
|
|
O.orderedby = usr.name
|
|
supply_shuttle_requestlist += O
|
|
src.temp = "Thanks for your request. The cargo team will process it as soon as possible.<BR>"
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
|
|
else if (href_list["printform"])
|
|
var/supplytype = href_list["printform"]
|
|
var/datum/supply_packs/P = new supplytype ()
|
|
var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(src.loc)
|
|
var/idname = "Unknown"
|
|
var/idrank = "Unknown"
|
|
var/reason = input(usr,"Reason:","Why do you require this item?","")
|
|
|
|
reqform.name = "Requisition Form - [P.name]"
|
|
reqform.info += "<h3>[station_name] Supply Requisition Form</h3><hr>"
|
|
|
|
if (istype(usr:wear_id, /obj/item/weapon/card/id))
|
|
if(usr:wear_id.registered)
|
|
idname = usr:wear_id.registered
|
|
if(usr:wear_id.assignment)
|
|
idrank = usr:wear_id.assignment
|
|
if (istype(usr:wear_id, /obj/item/device/pda))
|
|
var/obj/item/device/pda/pda = usr:wear_id
|
|
if(pda.owner)
|
|
idname = pda.owner
|
|
if(pda.ownjob)
|
|
idrank = pda.ownjob
|
|
else
|
|
idname = usr.name
|
|
|
|
reqform.info += "REQUESTED BY: [idname]<br>"
|
|
reqform.info += "RANK: [idrank]<br>"
|
|
reqform.info += "REASON: [reason]<br>"
|
|
reqform.info += "SUPPLY CRATE TYPE: [P.name]<br>"
|
|
reqform.info += "Contents:<br><ul>"
|
|
|
|
for(var/B in P.contains)
|
|
var/thepath = text2path(B)
|
|
var/atom/B2 = new thepath ()
|
|
reqform.info += "<li>[B2.name]</li>"
|
|
reqform.info += "</ul><hr>"
|
|
reqform.info += "STAMP BELOW TO APPROVE THIS REQUISITION:<br>"
|
|
|
|
else if (href_list["vieworders"])
|
|
src.temp = "Current approved orders: <BR><BR>"
|
|
for(var/S in supply_shuttle_shoppinglist)
|
|
var/datum/supply_order/SO = S
|
|
src.temp += "[SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]<BR>"
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
|
|
else if (href_list["viewrequests"])
|
|
src.temp = "Current requests: <BR><BR>"
|
|
for(var/S in supply_shuttle_requestlist)
|
|
var/datum/supply_order/SO = S
|
|
src.temp += "[SO.object.name] requested by [SO.orderedby]<BR>"
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
|
|
else if (href_list["mainmenu"])
|
|
src.temp = null
|
|
|
|
src.add_fingerprint(usr)
|
|
src.updateUsrDialog()
|
|
return
|
|
|
|
/obj/machinery/computer/supplycomp/attack_hand(var/mob/user as mob)
|
|
if(!src.allowed(user))
|
|
user << "\red Access Denied."
|
|
return
|
|
|
|
if(..())
|
|
return
|
|
user.machine = src
|
|
post_signal("supply")
|
|
var/dat
|
|
if (src.temp)
|
|
dat = src.temp
|
|
else
|
|
dat += {"<BR><B>Supply shuttle</B><HR>
|
|
\nLocation: [supply_shuttle_moving ? "Moving to station ([supply_shuttle_timeleft] Mins.)":supply_shuttle_at_station ? "Station":"Dock"]<BR>
|
|
<HR>\nSupply points: [supply_shuttle_points]<BR>\n<BR>
|
|
[supply_shuttle_moving ? "\n*Must be at dock to order items*<BR>\n<BR>":supply_shuttle_at_station ? "\n*Must be at dock to order items*<BR>\n<BR>":"\n<A href='?src=\ref[src];order=1'>Order items</A><BR>\n<BR>"]
|
|
[supply_shuttle_moving ? "\n*Shuttle already called*<BR>\n<BR>":supply_shuttle_at_station ? "\n<A href='?src=\ref[src];sendtodock=1'>Send to Dock</A><BR>\n<BR>":"\n<A href='?src=\ref[src];sendtostation=1'>Send to station</A><BR>\n<BR>"]
|
|
\n<A href='?src=\ref[src];viewrequests=1'>View requests</A><BR>\n<BR>
|
|
\n<A href='?src=\ref[src];vieworders=1'>View orders</A><BR>\n<BR>
|
|
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
|
|
|
|
user << browse(dat, "window=computer;size=575x450")
|
|
onclose(user, "computer")
|
|
return
|
|
|
|
/obj/machinery/computer/supplycomp/Topic(href, href_list)
|
|
if(..())
|
|
return
|
|
|
|
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
|
usr.machine = src
|
|
|
|
if (href_list["sendtodock"])
|
|
if(!supply_shuttle_at_station || supply_shuttle_moving) return
|
|
|
|
if (!supply_can_move())
|
|
usr << "\red The supply shuttle can not transport station employees or homing beacons."
|
|
return
|
|
|
|
src.temp = "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
src.updateUsrDialog()
|
|
post_signal("supply")
|
|
|
|
supply_shuttle_shoppinglist = null
|
|
supply_shuttle_shoppinglist = new/list()
|
|
|
|
sell_crates()
|
|
send_supply_shuttle()
|
|
|
|
else if (href_list["sendtostation"])
|
|
if(supply_shuttle_at_station || supply_shuttle_moving) return
|
|
|
|
if (!supply_can_move())
|
|
usr << "\red The supply shuttle can not transport station employees or homing beacons."
|
|
return
|
|
|
|
post_signal("supply")
|
|
usr << "\blue The supply shuttle has been called and will arrive in [round(((SUPPLY_MOVETIME/10)/60))] minutes."
|
|
|
|
src.temp = "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
src.updateUsrDialog()
|
|
|
|
supply_shuttle_moving = 1
|
|
|
|
process_supply_order()
|
|
|
|
supply_shuttle_time = world.timeofday + SUPPLY_MOVETIME
|
|
spawn(0)
|
|
supply_process()
|
|
|
|
if (href_list["order"])
|
|
if(supply_shuttle_moving) return
|
|
src.temp = "Supply points: [supply_shuttle_points]<BR><HR><BR>Request what?<BR><BR>"
|
|
for(var/S in (typesof(/datum/supply_packs) - /datum/supply_packs) )
|
|
var/datum/supply_packs/N = new S()
|
|
if(N.hidden && !src.hacked) continue //Have to send the type instead of a reference to
|
|
src.temp += "<A href='?src=\ref[src];doorder=[N.type]'>[N.name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>" //collector. oh well.
|
|
|
|
else if (href_list["doorder"])
|
|
|
|
if(locate(href_list["doorder"])) //Comes from the requestlist
|
|
var/datum/supply_order/O = locate(href_list["doorder"])
|
|
var/datum/supply_packs/P = O.object
|
|
supply_shuttle_requestlist -= O
|
|
|
|
if(supply_shuttle_points >= P.cost)
|
|
supply_shuttle_points -= P.cost
|
|
O.object = P
|
|
O.orderedby = usr.name
|
|
O.comment = input(usr,"Comment:","Enter comment","")
|
|
supply_shuttle_shoppinglist += O
|
|
src.temp = "Thanks for your order.<BR>"
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
else
|
|
src.temp = "Not enough supply points.<BR>"
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
|
|
else //Comes from the orderform
|
|
var/datum/supply_order/O = new/datum/supply_order ()
|
|
var/supplytype = href_list["doorder"]
|
|
var/datum/supply_packs/P = new supplytype ()
|
|
if(supply_shuttle_points >= P.cost)
|
|
supply_shuttle_points -= P.cost
|
|
O.object = P
|
|
O.orderedby = usr.name
|
|
O.comment = input(usr,"Comment:","Enter comment","")
|
|
supply_shuttle_shoppinglist += O
|
|
src.temp = "Thanks for your order.<BR>"
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
else
|
|
src.temp = "Not enough supply points.<BR>"
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
|
|
else if (href_list["vieworders"])
|
|
src.temp = "Current approved orders: <BR><BR>"
|
|
for(var/S in supply_shuttle_shoppinglist)
|
|
var/datum/supply_order/SO = S
|
|
src.temp += "[SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]<BR>"
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
|
|
else if (href_list["viewrequests"])
|
|
src.temp = "Current requests: <BR><BR>"
|
|
for(var/S in supply_shuttle_requestlist)
|
|
var/datum/supply_order/SO = S
|
|
src.temp += "[SO.object.name] requested by [SO.orderedby] [supply_shuttle_moving ? "":supply_shuttle_at_station ? "":"<A href='?src=\ref[src];doorder=\ref[SO]'>Approve</A> <A href='?src=\ref[src];rreq=\ref[SO]'>Remove</A>"]<BR>"
|
|
|
|
src.temp += "<BR><A href='?src=\ref[src];clearreq=1'>Clear list</A>"
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
|
|
else if (href_list["rreq"])
|
|
supply_shuttle_requestlist -= locate(href_list["rreq"])
|
|
src.temp = "Request removed.<BR>"
|
|
src.temp += "<BR><A href='?src=\ref[src];viewrequests=1'>OK</A>"
|
|
|
|
else if (href_list["clearreq"])
|
|
supply_shuttle_requestlist = null
|
|
supply_shuttle_requestlist = new/list()
|
|
src.temp = "List cleared.<BR>"
|
|
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
|
|
|
else if (href_list["mainmenu"])
|
|
src.temp = null
|
|
|
|
src.add_fingerprint(usr)
|
|
src.updateUsrDialog()
|
|
return
|
|
|
|
/obj/machinery/computer/supplycomp/proc/post_signal(var/command)
|
|
|
|
var/datum/radio_frequency/frequency = radio_controller.return_frequency("1435")
|
|
|
|
if(!frequency) return
|
|
|
|
var/datum/signal/status_signal = new
|
|
status_signal.source = src
|
|
status_signal.transmission_method = 1
|
|
status_signal.data["command"] = command
|
|
|
|
frequency.post_signal(src, status_signal)
|
|
|
|
|
|
|
|
/proc/send_supply_shuttle()
|
|
|
|
if (supply_shuttle_moving) return
|
|
|
|
if (!supply_can_move())
|
|
usr << "\red The supply shuttle can not transport station employees or homing beacons."
|
|
return
|
|
|
|
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
|
|
var/shuttleto = !supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
|
|
|
|
var/area/from = locate(shuttleat)
|
|
var/area/dest = locate(shuttleto)
|
|
|
|
if(!from || !dest) return
|
|
|
|
from.move_contents_to(dest)
|
|
supply_shuttle_at_station = !supply_shuttle_at_station
|