mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
refactors global lists.
This commit is contained in:
@@ -13,6 +13,9 @@
|
||||
- [Initialization](#initialization)
|
||||
<!-- /TOC -->
|
||||
|
||||
# Important note:
|
||||
The following readme was last updated during Late 2015. The changes between Paradise & TG's shuttle system has diverged greatly since then. Do not take the documentation here's description of differences between tg & paradise seriously without double checking.
|
||||
|
||||
# Shuttle system
|
||||
## Introduction
|
||||
This folder belongs to the "shuttle" system. The shuttle system is used to control the
|
||||
@@ -121,11 +124,6 @@ direction as the "Stationary" docking port.
|
||||
There are three main differences between -tg-station13's shuttle system and the one in
|
||||
use on Paradise, and none are very complex.
|
||||
|
||||
### Shuttle Controller
|
||||
This is a very simple change. On -tg-station13, the shuttle controller is referenced by a
|
||||
variable named `SSShuttle`. On Paradise, due to controller naming conventions, it is
|
||||
instead named `shuttle_master`.
|
||||
|
||||
### Airlocks
|
||||
The biggest modification comes in the form of how docking ports interact with airlocks.
|
||||
With -tg-station13's base code, any door on the shuttle will be closed, and any door
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
return
|
||||
if(!istype(W, /obj/item/card))
|
||||
return
|
||||
if(shuttle_master.emergency.mode != SHUTTLE_DOCKED)
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_DOCKED)
|
||||
return
|
||||
if(!user)
|
||||
return
|
||||
if(shuttle_master.emergency.timeLeft() < 11)
|
||||
if(SSshuttle.emergency.timeLeft() < 11)
|
||||
return
|
||||
if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda))
|
||||
if(istype(W, /obj/item/pda))
|
||||
@@ -35,10 +35,10 @@
|
||||
return 0
|
||||
|
||||
var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
|
||||
if(shuttle_master.emergency.mode != SHUTTLE_DOCKED || user.get_active_hand() != W)
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_DOCKED || user.get_active_hand() != W)
|
||||
return 0
|
||||
|
||||
var/seconds = shuttle_master.emergency.timeLeft()
|
||||
var/seconds = SSshuttle.emergency.timeLeft()
|
||||
if(seconds <= 10)
|
||||
return 0
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
message_admins("[key_name_admin(user)] has launched the emergency shuttle [seconds] seconds before launch.")
|
||||
log_game("[key_name(user)] has launched the emergency shuttle in ([x], [y], [z]) [seconds] seconds before launch.")
|
||||
minor_announcement.Announce("The emergency shuttle will launch in 10 seconds")
|
||||
shuttle_master.emergency.setTimer(100)
|
||||
SSshuttle.emergency.setTimer(100)
|
||||
|
||||
if("Repeal")
|
||||
if(authorized.Remove(W:registered_name))
|
||||
@@ -66,12 +66,12 @@
|
||||
authorized.Cut()
|
||||
|
||||
/obj/machinery/computer/emergency_shuttle/emag_act(mob/user)
|
||||
if(!emagged && shuttle_master.emergency.mode == SHUTTLE_DOCKED)
|
||||
var/time = shuttle_master.emergency.timeLeft()
|
||||
if(!emagged && SSshuttle.emergency.mode == SHUTTLE_DOCKED)
|
||||
var/time = SSshuttle.emergency.timeLeft()
|
||||
message_admins("[key_name_admin(user)] has emagged the emergency shuttle: [time] seconds before launch.")
|
||||
log_game("[key_name(user)] has emagged the emergency shuttle in ([x], [y], [z]): [time] seconds before launch.")
|
||||
minor_announcement.Announce("The emergency shuttle will launch in 10 seconds", "SYSTEM ERROR:")
|
||||
shuttle_master.emergency.setTimer(100)
|
||||
SSshuttle.emergency.setTimer(100)
|
||||
emagged = 1
|
||||
|
||||
|
||||
@@ -98,15 +98,15 @@
|
||||
if(!..())
|
||||
return 0 //shuttle master not initialized
|
||||
|
||||
shuttle_master.emergency = src
|
||||
SSshuttle.emergency = src
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile/emergency/Destroy(force)
|
||||
if(force)
|
||||
// This'll make the shuttle subsystem use the backup shuttle.
|
||||
if(shuttle_master.emergency == src)
|
||||
if(SSshuttle.emergency == src)
|
||||
// If we're the selected emergency shuttle
|
||||
shuttle_master.emergencyDeregister()
|
||||
SSshuttle.emergencyDeregister()
|
||||
|
||||
|
||||
return ..()
|
||||
@@ -115,21 +115,21 @@
|
||||
if(divisor <= 0)
|
||||
divisor = 10
|
||||
if(!timer)
|
||||
return round(shuttle_master.emergencyCallTime/divisor, 1)
|
||||
return round(SSshuttle.emergencyCallTime/divisor, 1)
|
||||
|
||||
var/dtime = world.time - timer
|
||||
switch(mode)
|
||||
if(SHUTTLE_ESCAPE)
|
||||
dtime = max(shuttle_master.emergencyEscapeTime - dtime, 0)
|
||||
dtime = max(SSshuttle.emergencyEscapeTime - dtime, 0)
|
||||
if(SHUTTLE_DOCKED)
|
||||
dtime = max(shuttle_master.emergencyDockTime - dtime, 0)
|
||||
dtime = max(SSshuttle.emergencyDockTime - dtime, 0)
|
||||
else
|
||||
|
||||
dtime = max(shuttle_master.emergencyCallTime - dtime, 0)
|
||||
dtime = max(SSshuttle.emergencyCallTime - dtime, 0)
|
||||
return round(dtime/divisor, 1)
|
||||
|
||||
/obj/docking_port/mobile/emergency/request(obj/docking_port/stationary/S, coefficient=1, area/signalOrigin, reason, redAlert)
|
||||
shuttle_master.emergencyCallTime = initial(shuttle_master.emergencyCallTime) * coefficient
|
||||
SSshuttle.emergencyCallTime = initial(SSshuttle.emergencyCallTime) * coefficient
|
||||
switch(mode)
|
||||
if(SHUTTLE_RECALL)
|
||||
mode = SHUTTLE_CALL
|
||||
@@ -144,11 +144,11 @@
|
||||
return
|
||||
|
||||
if(prob(70))
|
||||
shuttle_master.emergencyLastCallLoc = signalOrigin
|
||||
SSshuttle.emergencyLastCallLoc = signalOrigin
|
||||
else
|
||||
shuttle_master.emergencyLastCallLoc = null
|
||||
SSshuttle.emergencyLastCallLoc = null
|
||||
|
||||
emergency_shuttle_called.Announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][shuttle_master.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]")
|
||||
emergency_shuttle_called.Announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]")
|
||||
|
||||
if(reason == "Automatic Crew Transfer" && signalOrigin == null) // Best way we have to check that it's actually a crew transfer and not just a player using the same message- any other calls to this proc should have a signalOrigin.
|
||||
atc.shift_ending()
|
||||
@@ -167,10 +167,10 @@
|
||||
mode = SHUTTLE_RECALL
|
||||
|
||||
if(prob(70))
|
||||
shuttle_master.emergencyLastCallLoc = signalOrigin
|
||||
SSshuttle.emergencyLastCallLoc = signalOrigin
|
||||
else
|
||||
shuttle_master.emergencyLastCallLoc = null
|
||||
emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.[shuttle_master.emergencyLastCallLoc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]")
|
||||
SSshuttle.emergencyLastCallLoc = null
|
||||
emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.[SSshuttle.emergencyLastCallLoc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]")
|
||||
|
||||
/obj/docking_port/mobile/emergency/proc/is_hijacked()
|
||||
for(var/mob/living/player in GLOB.player_list)
|
||||
@@ -215,9 +215,9 @@
|
||||
if(!ripples.len && (time_left <= SHUTTLE_RIPPLE_TIME) && ((mode == SHUTTLE_CALL) || (mode == SHUTTLE_ESCAPE)))
|
||||
var/destination
|
||||
if(mode == SHUTTLE_CALL)
|
||||
destination = shuttle_master.getDock("emergency_home")
|
||||
destination = SSshuttle.getDock("emergency_home")
|
||||
else if(mode == SHUTTLE_ESCAPE)
|
||||
destination = shuttle_master.getDock("emergency_away")
|
||||
destination = SSshuttle.getDock("emergency_away")
|
||||
create_ripples(destination)
|
||||
|
||||
switch(mode)
|
||||
@@ -228,7 +228,7 @@
|
||||
if(SHUTTLE_CALL)
|
||||
if(time_left <= 0)
|
||||
//move emergency shuttle to station
|
||||
if(dock(shuttle_master.getDock("emergency_home")))
|
||||
if(dock(SSshuttle.getDock("emergency_home")))
|
||||
setTimer(20)
|
||||
return
|
||||
mode = SHUTTLE_DOCKED
|
||||
@@ -246,7 +246,7 @@
|
||||
*/
|
||||
if(SHUTTLE_DOCKED)
|
||||
|
||||
if(time_left <= 0 && shuttle_master.emergencyNoEscape)
|
||||
if(time_left <= 0 && SSshuttle.emergencyNoEscape)
|
||||
priority_announcement.Announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.")
|
||||
sound_played = 0
|
||||
mode = SHUTTLE_STRANDED
|
||||
@@ -256,9 +256,9 @@
|
||||
for(var/area/shuttle/escape/E in world)
|
||||
E << 'sound/effects/hyperspace_begin.ogg'
|
||||
|
||||
if(time_left <= 0 && !shuttle_master.emergencyNoEscape)
|
||||
if(time_left <= 0 && !SSshuttle.emergencyNoEscape)
|
||||
//move each escape pod to its corresponding transit dock
|
||||
for(var/obj/docking_port/mobile/pod/M in shuttle_master.mobile)
|
||||
for(var/obj/docking_port/mobile/pod/M in SSshuttle.mobile)
|
||||
if(is_station_level(M.z)) //Will not launch from the mine/planet
|
||||
M.enterTransit()
|
||||
//now move the actual emergency shuttle to its transit dock
|
||||
@@ -275,8 +275,8 @@
|
||||
if(SHUTTLE_ESCAPE)
|
||||
if(time_left <= 0)
|
||||
//move each escape pod to its corresponding escape dock
|
||||
for(var/obj/docking_port/mobile/pod/M in shuttle_master.mobile)
|
||||
M.dock(shuttle_master.getDock("[M.id]_away"))
|
||||
for(var/obj/docking_port/mobile/pod/M in SSshuttle.mobile)
|
||||
M.dock(SSshuttle.getDock("[M.id]_away"))
|
||||
|
||||
for(var/area/shuttle/escape/E in world)
|
||||
E << 'sound/effects/hyperspace_end.ogg'
|
||||
@@ -321,7 +321,7 @@
|
||||
|
||||
/*
|
||||
findTransitDock()
|
||||
. = shuttle_master.getDock("[id]_transit")
|
||||
. = SSshuttle.getDock("[id]_transit")
|
||||
if(.) return .
|
||||
return ..()
|
||||
*/
|
||||
@@ -368,7 +368,7 @@
|
||||
roundstart_move = "backup_away"
|
||||
|
||||
/obj/docking_port/mobile/emergency/backup/register()
|
||||
var/current_emergency = shuttle_master.emergency
|
||||
var/current_emergency = SSshuttle.emergency
|
||||
..()
|
||||
shuttle_master.emergency = current_emergency
|
||||
shuttle_master.backup_shuttle = src
|
||||
SSshuttle.emergency = current_emergency
|
||||
SSshuttle.backup_shuttle = src
|
||||
|
||||
@@ -154,15 +154,15 @@
|
||||
var/lock_shuttle_doors = 0
|
||||
|
||||
/obj/docking_port/stationary/register()
|
||||
if(!shuttle_master)
|
||||
if(!SSshuttle)
|
||||
throw EXCEPTION("docking port [src] could not initialize.")
|
||||
return 0
|
||||
|
||||
shuttle_master.stationary += src
|
||||
SSshuttle.stationary += src
|
||||
if(!id)
|
||||
id = "[shuttle_master.stationary.len]"
|
||||
id = "[SSshuttle.stationary.len]"
|
||||
if(name == "dock")
|
||||
name = "dock[shuttle_master.stationary.len]"
|
||||
name = "dock[SSshuttle.stationary.len]"
|
||||
|
||||
#ifdef DOCKING_PORT_HIGHLIGHT
|
||||
highlight("#f00")
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
name = "In transit" //This looks weird, but- it means that the on-map instances can be named something actually usable to search for, but still appear correctly in terminals.
|
||||
|
||||
shuttle_master.transit += src
|
||||
SSshuttle.transit += src
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile
|
||||
@@ -236,22 +236,22 @@
|
||||
..()
|
||||
|
||||
/obj/docking_port/mobile/register()
|
||||
if(!shuttle_master)
|
||||
if(!SSshuttle)
|
||||
throw EXCEPTION("docking port [src] could not initialize.")
|
||||
return 0
|
||||
|
||||
shuttle_master.mobile += src
|
||||
SSshuttle.mobile += src
|
||||
|
||||
if(!id)
|
||||
id = "[shuttle_master.mobile.len]"
|
||||
id = "[SSshuttle.mobile.len]"
|
||||
if(name == "shuttle")
|
||||
name = "shuttle[shuttle_master.mobile.len]"
|
||||
name = "shuttle[SSshuttle.mobile.len]"
|
||||
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile/Destroy(force)
|
||||
if(force)
|
||||
shuttle_master.mobile -= src
|
||||
SSshuttle.mobile -= src
|
||||
areaInstance = null
|
||||
destination = null
|
||||
previous = null
|
||||
@@ -517,14 +517,14 @@
|
||||
|
||||
|
||||
/obj/docking_port/mobile/proc/findTransitDock()
|
||||
var/obj/docking_port/stationary/transit/T = shuttle_master.getDock("[id]_transit")
|
||||
var/obj/docking_port/stationary/transit/T = SSshuttle.getDock("[id]_transit")
|
||||
if(T && check_dock(T))
|
||||
return T
|
||||
|
||||
|
||||
/obj/docking_port/mobile/proc/findRoundstartDock()
|
||||
var/obj/docking_port/stationary/D
|
||||
D = shuttle_master.getDock(roundstart_move)
|
||||
D = SSshuttle.getDock(roundstart_move)
|
||||
|
||||
if(D)
|
||||
return D
|
||||
@@ -536,7 +536,7 @@
|
||||
. = dock_id(roundstart_move)
|
||||
|
||||
/obj/docking_port/mobile/proc/dock_id(id)
|
||||
var/port = shuttle_master.getDock(id)
|
||||
var/port = SSshuttle.getDock(id)
|
||||
if(port)
|
||||
. = dock(port)
|
||||
else
|
||||
@@ -707,20 +707,20 @@
|
||||
var/obj/docking_port/mobile/M
|
||||
if(!shuttleId)
|
||||
// find close shuttle that is ok to mess with
|
||||
if(!shuttle_master) //intentionally mapping shuttle consoles without actual shuttles IS POSSIBLE OH MY GOD WHO KNEW *glare*
|
||||
if(!SSshuttle) //intentionally mapping shuttle consoles without actual shuttles IS POSSIBLE OH MY GOD WHO KNEW *glare*
|
||||
return
|
||||
for(var/obj/docking_port/mobile/D in shuttle_master.mobile)
|
||||
for(var/obj/docking_port/mobile/D in SSshuttle.mobile)
|
||||
if(get_dist(src, D) <= max_connect_range && D.rebuildable)
|
||||
M = D
|
||||
shuttleId = M.id
|
||||
break
|
||||
else if(!possible_destinations && shuttle_master) //possible destinations should **not** always exist; so, if it's specifically set to null, don't make it exist
|
||||
M = shuttle_master.getShuttle(shuttleId)
|
||||
else if(!possible_destinations && SSshuttle) //possible destinations should **not** always exist; so, if it's specifically set to null, don't make it exist
|
||||
M = SSshuttle.getShuttle(shuttleId)
|
||||
|
||||
if(M && !possible_destinations)
|
||||
// find perfect fits
|
||||
possible_destinations = ""
|
||||
for(var/obj/docking_port/stationary/S in shuttle_master.stationary)
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!istype(S, /obj/docking_port/stationary/transit) && S.width == M.width && S.height == M.height && S.dwidth == M.dwidth && S.dheight == M.dheight && findtext(S.id, M.id))
|
||||
possible_destinations += "[possible_destinations ? ";" : ""][S.id]"
|
||||
|
||||
@@ -734,7 +734,7 @@
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/shuttle/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/obj/docking_port/mobile/M = shuttle_master.getShuttle(shuttleId)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "shuttle_console.tmpl", M ? M.name : "shuttle", 300, 200)
|
||||
@@ -742,14 +742,14 @@
|
||||
|
||||
/obj/machinery/computer/shuttle/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
var/obj/docking_port/mobile/M = shuttle_master.getShuttle(shuttleId)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
data["status"] = M ? M.getStatusText() : null
|
||||
if(M)
|
||||
data["shuttle"] = 1
|
||||
var/list/docking_ports = list()
|
||||
data["docking_ports"] = docking_ports
|
||||
var/list/options = params2list(possible_destinations)
|
||||
for(var/obj/docking_port/stationary/S in shuttle_master.stationary)
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!options.Find(S.id))
|
||||
continue
|
||||
if(!M.check_dock(S))
|
||||
@@ -775,7 +775,7 @@
|
||||
// Seriously, though, NEVER trust a Topic with something like this. Ever.
|
||||
message_admins("move HREF ([src] attempted to move to: [href_list["move"]]) exploit attempted by [key_name_admin(usr)] on [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
return
|
||||
switch(shuttle_master.moveShuttle(shuttleId, href_list["move"], 1))
|
||||
switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1))
|
||||
if(0)
|
||||
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
|
||||
if(1)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
data["templates_tabs"] += S.port_id
|
||||
// The first found shuttle type will be our default
|
||||
if(!existing_shuttle)
|
||||
existing_shuttle = shuttle_master.getShuttle(S.port_id)
|
||||
existing_shuttle = SSshuttle.getShuttle(S.port_id)
|
||||
templates[S.port_id] = list(
|
||||
"port_id" = S.port_id,
|
||||
"templates" = list()
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
// Status panel
|
||||
data["shuttles"] = list()
|
||||
for(var/i in shuttle_master.mobile)
|
||||
for(var/i in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = i
|
||||
var/list/L = list()
|
||||
L["name"] = M.name
|
||||
@@ -148,19 +148,19 @@
|
||||
if(href_list["select_template_category"])
|
||||
var/chosen_shuttle_id = href_list["select_template_category"]
|
||||
selected = null
|
||||
existing_shuttle = shuttle_master.getShuttle(chosen_shuttle_id)
|
||||
existing_shuttle = SSshuttle.getShuttle(chosen_shuttle_id)
|
||||
return 1
|
||||
|
||||
if(href_list["select_template"])
|
||||
if(S)
|
||||
existing_shuttle = shuttle_master.getShuttle(S.port_id)
|
||||
existing_shuttle = SSshuttle.getShuttle(S.port_id)
|
||||
selected = S
|
||||
. = TRUE
|
||||
|
||||
if(href_list["jump_to"])
|
||||
|
||||
if(href_list["type"] == "mobile")
|
||||
for(var/i in shuttle_master.mobile)
|
||||
for(var/i in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = i
|
||||
if(M.id == href_list["id"])
|
||||
user.forceMove(get_turf(M))
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
if(href_list["fast_travel"])
|
||||
|
||||
for(var/i in shuttle_master.mobile)
|
||||
for(var/i in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = i
|
||||
if(M.id == href_list["id"] && M.timer && M.timeLeft() >= 50)
|
||||
M.setTimer(50)
|
||||
@@ -192,7 +192,7 @@
|
||||
user.forceMove(get_turf(preview_shuttle))
|
||||
|
||||
if(href_list["load"])
|
||||
if(existing_shuttle == shuttle_master.backup_shuttle)
|
||||
if(existing_shuttle == SSshuttle.backup_shuttle)
|
||||
// TODO make the load button disabled
|
||||
WARNING("The shuttle that the selected shuttle will replace \
|
||||
is the backup shuttle. Backup shuttle is required to be \
|
||||
|
||||
+89
-108
@@ -24,7 +24,7 @@
|
||||
/obj/docking_port/mobile/supply/register()
|
||||
if(!..())
|
||||
return 0
|
||||
shuttle_master.supply = src
|
||||
SSshuttle.supply = src
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile/supply/canMove()
|
||||
@@ -48,7 +48,7 @@
|
||||
if(!is_station_level(z)) //we only buy when we are -at- the station
|
||||
return 1
|
||||
|
||||
if(!shuttle_master.shoppinglist.len)
|
||||
if(!SSshuttle.shoppinglist.len)
|
||||
return 2
|
||||
|
||||
var/list/emptyTurfs = list()
|
||||
@@ -71,14 +71,14 @@
|
||||
|
||||
emptyTurfs += T
|
||||
|
||||
for(var/datum/supply_order/SO in shuttle_master.shoppinglist)
|
||||
for(var/datum/supply_order/SO in SSshuttle.shoppinglist)
|
||||
if(!SO.object)
|
||||
throw EXCEPTION("Supply Order [SO] has no object associated with it.")
|
||||
continue
|
||||
|
||||
var/turf/T = pick_n_take(emptyTurfs) //turf we will place it in
|
||||
if(!T)
|
||||
shuttle_master.shoppinglist.Cut(1, shuttle_master.shoppinglist.Find(SO))
|
||||
SSshuttle.shoppinglist.Cut(1, SSshuttle.shoppinglist.Find(SO))
|
||||
return
|
||||
|
||||
var/errors = 0
|
||||
@@ -90,7 +90,7 @@
|
||||
errors |= MANIFEST_ERROR_ITEM
|
||||
SO.createObject(T, errors)
|
||||
|
||||
shuttle_master.shoppinglist.Cut()
|
||||
SSshuttle.shoppinglist.Cut()
|
||||
|
||||
/obj/docking_port/mobile/supply/proc/sell()
|
||||
if(z != level_name_to_num(CENTCOMM)) //we only sell when we are -at- centcomm
|
||||
@@ -105,19 +105,19 @@
|
||||
|
||||
for(var/atom/movable/MA in areaInstance)
|
||||
if(MA.anchored) continue
|
||||
shuttle_master.sold_atoms += " [MA.name]"
|
||||
SSshuttle.sold_atoms += " [MA.name]"
|
||||
|
||||
// Must be in a crate (or a critter crate)!
|
||||
if(istype(MA,/obj/structure/closet/crate) || istype(MA,/obj/structure/closet/critter))
|
||||
shuttle_master.sold_atoms += ":"
|
||||
SSshuttle.sold_atoms += ":"
|
||||
if(!MA.contents.len)
|
||||
shuttle_master.sold_atoms += " (empty)"
|
||||
SSshuttle.sold_atoms += " (empty)"
|
||||
++crate_count
|
||||
|
||||
var/find_slip = 1
|
||||
for(var/thing in MA)
|
||||
// Sell manifests
|
||||
shuttle_master.sold_atoms += " [thing:name]"
|
||||
SSshuttle.sold_atoms += " [thing:name]"
|
||||
if(find_slip && istype(thing,/obj/item/paper/manifest))
|
||||
var/obj/item/paper/manifest/slip = thing
|
||||
// TODO: Check for a signature, too.
|
||||
@@ -128,8 +128,8 @@
|
||||
if(slip.stamped[i] == /obj/item/stamp/denied)
|
||||
denied = 1
|
||||
if(slip.erroneous && denied) // Caught a mistake by Centcom (IDEA: maybe Centcom rarely gets offended by this)
|
||||
pointsEarned = slip.points - shuttle_master.points_per_crate
|
||||
shuttle_master.points += pointsEarned // For now, give a full refund for paying attention (minus the crate cost)
|
||||
pointsEarned = slip.points - SSshuttle.points_per_crate
|
||||
SSshuttle.points += pointsEarned // For now, give a full refund for paying attention (minus the crate cost)
|
||||
msg += "<span class='good'>+[pointsEarned]</span>: Station correctly denied package [slip.ordernumber]: "
|
||||
if(slip.erroneous & MANIFEST_ERROR_NAME)
|
||||
msg += "Destination station incorrect. "
|
||||
@@ -139,8 +139,8 @@
|
||||
msg += "Package incomplete. "
|
||||
msg += "Points refunded.<br>"
|
||||
else if(!slip.erroneous && !denied) // Approving a proper order awards the relatively tiny points_per_slip
|
||||
shuttle_master.points += shuttle_master.points_per_slip
|
||||
msg += "<span class='good'>+[shuttle_master.points_per_slip]</span>: Package [slip.ordernumber] accorded.<br>"
|
||||
SSshuttle.points += SSshuttle.points_per_slip
|
||||
msg += "<span class='good'>+[SSshuttle.points_per_slip]</span>: Package [slip.ordernumber] accorded.<br>"
|
||||
else // You done goofed.
|
||||
if(slip.erroneous)
|
||||
msg += "<span class='good'>+0</span>: Station approved package [slip.ordernumber] despite error: "
|
||||
@@ -152,8 +152,8 @@
|
||||
msg += "We found unshipped items on our dock."
|
||||
msg += " Be more vigilant.<br>"
|
||||
else
|
||||
pointsEarned = round(shuttle_master.points_per_crate - slip.points)
|
||||
shuttle_master.points += pointsEarned
|
||||
pointsEarned = round(SSshuttle.points_per_crate - slip.points)
|
||||
SSshuttle.points += pointsEarned
|
||||
msg += "<span class='bad'>[pointsEarned]</span>: Station denied package [slip.ordernumber]. Our records show no fault on our part.<br>"
|
||||
find_slip = 0
|
||||
continue
|
||||
@@ -173,10 +173,10 @@
|
||||
if(!disk.stored) continue
|
||||
var/datum/tech/tech = disk.stored
|
||||
|
||||
var/cost = tech.getCost(shuttle_master.techLevels[tech.id])
|
||||
var/cost = tech.getCost(SSshuttle.techLevels[tech.id])
|
||||
if(cost)
|
||||
shuttle_master.techLevels[tech.id] = tech.level
|
||||
shuttle_master.points += cost
|
||||
SSshuttle.techLevels[tech.id] = tech.level
|
||||
SSshuttle.points += cost
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.mind)
|
||||
for(var/datum/job_objective/further_research/objective in M.mind.job_objectives)
|
||||
@@ -189,48 +189,48 @@
|
||||
if(!disk.blueprint)
|
||||
continue
|
||||
var/datum/design/design = disk.blueprint
|
||||
if(design.id in shuttle_master.researchDesigns)
|
||||
if(design.id in SSshuttle.researchDesigns)
|
||||
continue
|
||||
shuttle_master.points += shuttle_master.points_per_design
|
||||
shuttle_master.researchDesigns += design.id
|
||||
msg += "<span class='good'>+[shuttle_master.points_per_design]</span>: [design.name] design.<br>"
|
||||
SSshuttle.points += SSshuttle.points_per_design
|
||||
SSshuttle.researchDesigns += design.id
|
||||
msg += "<span class='good'>+[SSshuttle.points_per_design]</span>: [design.name] design.<br>"
|
||||
|
||||
// Sell exotic plants
|
||||
if(istype(thing, /obj/item/seeds))
|
||||
var/obj/item/seeds/S = thing
|
||||
if(S.rarity == 0) // Mundane species
|
||||
msg += "<span class='bad'>+0</span>: We don't need samples of mundane species \"[capitalize(S.species)]\".<br>"
|
||||
else if(shuttle_master.discoveredPlants[S.type]) // This species has already been sent to CentComm
|
||||
var/potDiff = S.potency - shuttle_master.discoveredPlants[S.type] // Compare it to the previous best
|
||||
else if(SSshuttle.discoveredPlants[S.type]) // This species has already been sent to CentComm
|
||||
var/potDiff = S.potency - SSshuttle.discoveredPlants[S.type] // Compare it to the previous best
|
||||
if(potDiff > 0) // This sample is better
|
||||
shuttle_master.discoveredPlants[S.type] = S.potency
|
||||
SSshuttle.discoveredPlants[S.type] = S.potency
|
||||
msg += "<span class='good'>+[potDiff]</span>: New sample of \"[capitalize(S.species)]\" is superior. Good work.<br>"
|
||||
shuttle_master.points += potDiff
|
||||
SSshuttle.points += potDiff
|
||||
else // This sample is worthless
|
||||
msg += "<span class='bad'>+0</span>: New sample of \"[capitalize(S.species)]\" is not more potent than existing sample ([shuttle_master.discoveredPlants[S.type]] potency).<br>"
|
||||
msg += "<span class='bad'>+0</span>: New sample of \"[capitalize(S.species)]\" is not more potent than existing sample ([SSshuttle.discoveredPlants[S.type]] potency).<br>"
|
||||
else // This is a new discovery!
|
||||
shuttle_master.discoveredPlants[S.type] = S.potency
|
||||
SSshuttle.discoveredPlants[S.type] = S.potency
|
||||
msg += "<span class='good'>[S.rarity]</span>: New species discovered: \"[capitalize(S.species)]\". Excellent work.<br>"
|
||||
shuttle_master.points += S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later
|
||||
SSshuttle.points += S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later
|
||||
qdel(MA)
|
||||
shuttle_master.sold_atoms += "."
|
||||
SSshuttle.sold_atoms += "."
|
||||
|
||||
if(plasma_count > 0)
|
||||
pointsEarned = round(plasma_count * shuttle_master.points_per_plasma)
|
||||
pointsEarned = round(plasma_count * SSshuttle.points_per_plasma)
|
||||
msg += "<span class='good'>+[pointsEarned]</span>: Received [plasma_count] unit(s) of exotic material.<br>"
|
||||
shuttle_master.points += pointsEarned
|
||||
SSshuttle.points += pointsEarned
|
||||
|
||||
if(intel_count > 0)
|
||||
pointsEarned = round(intel_count * shuttle_master.points_per_intel)
|
||||
pointsEarned = round(intel_count * SSshuttle.points_per_intel)
|
||||
msg += "<span class='good'>+[pointsEarned]</span>: Received [intel_count] article(s) of enemy intelligence.<br>"
|
||||
shuttle_master.points += pointsEarned
|
||||
SSshuttle.points += pointsEarned
|
||||
|
||||
if(crate_count > 0)
|
||||
pointsEarned = round(crate_count * shuttle_master.points_per_crate)
|
||||
pointsEarned = round(crate_count * SSshuttle.points_per_crate)
|
||||
msg += "<span class='good'>+[pointsEarned]</span>: Received [crate_count] crate(s).<br>"
|
||||
shuttle_master.points += pointsEarned
|
||||
SSshuttle.points += pointsEarned
|
||||
|
||||
shuttle_master.centcom_message = msg
|
||||
SSshuttle.centcom_message = msg
|
||||
|
||||
/proc/forbidden_atoms_check(atom/A)
|
||||
var/list/blacklist = list(
|
||||
@@ -271,25 +271,6 @@
|
||||
var/comment = null
|
||||
var/crates
|
||||
|
||||
/datum/controller/process/shuttle/proc/generateSupplyOrder(packId, _orderedby, _orderedbyRank, _comment, _crates)
|
||||
if(!packId)
|
||||
return
|
||||
var/datum/supply_packs/P = supply_packs["[packId]"]
|
||||
if(!P)
|
||||
return
|
||||
|
||||
var/datum/supply_order/O = new()
|
||||
O.ordernum = ordernum++
|
||||
O.object = P
|
||||
O.orderedby = _orderedby
|
||||
O.orderedbyRank = _orderedbyRank
|
||||
O.comment = _comment
|
||||
O.crates = _crates
|
||||
|
||||
requestlist += O
|
||||
|
||||
return O
|
||||
|
||||
/datum/supply_order/proc/generateRequisition(atom/_loc)
|
||||
if(!object)
|
||||
return
|
||||
@@ -298,7 +279,7 @@
|
||||
playsound(_loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
|
||||
reqform.name = "Requisition Form - [crates] '[object.name]' for [orderedby]"
|
||||
reqform.info += "<h3>[station_name()] Supply Requisition Form</h3><hr>"
|
||||
reqform.info += "INDEX: #[shuttle_master.ordernum]<br>"
|
||||
reqform.info += "INDEX: #[SSshuttle.ordernum]<br>"
|
||||
reqform.info += "REQUESTED BY: [orderedby]<br>"
|
||||
reqform.info += "RANK: [orderedbyRank]<br>"
|
||||
reqform.info += "REASON: [comment]<br>"
|
||||
@@ -331,7 +312,7 @@
|
||||
slip.ordernumber = ordernum
|
||||
|
||||
var/stationName = (errors & MANIFEST_ERROR_NAME) ? new_station_name() : station_name()
|
||||
var/packagesAmt = shuttle_master.shoppinglist.len + ((errors & MANIFEST_ERROR_COUNT) ? rand(1,2) : 0)
|
||||
var/packagesAmt = SSshuttle.shoppinglist.len + ((errors & MANIFEST_ERROR_COUNT) ? rand(1,2) : 0)
|
||||
|
||||
slip.name = "Shipping Manifest - '[object.name]' for [orderedby]"
|
||||
slip.info = "<h3>[command_name()] Shipping Manifest</h3><hr><br>"
|
||||
@@ -444,8 +425,8 @@
|
||||
|
||||
var/cat = text2num(last_viewed_group)
|
||||
var/packs_list[0]
|
||||
for(var/set_name in shuttle_master.supply_packs)
|
||||
var/datum/supply_packs/pack = shuttle_master.supply_packs[set_name]
|
||||
for(var/set_name in SSshuttle.supply_packs)
|
||||
var/datum/supply_packs/pack = SSshuttle.supply_packs[set_name]
|
||||
if(!pack.contraband && !pack.hidden && !pack.special && pack.group == cat)
|
||||
// 0/1 after the pack name (set_name) is a boolean for ordering multiple crates
|
||||
packs_list.Add(list(list("name" = pack.name, "amount" = pack.amount, "cost" = pack.cost, "command1" = list("doorder" = "[set_name]0"), "command2" = list("doorder" = "[set_name]1"), "command3" = list("contents" = set_name))))
|
||||
@@ -458,7 +439,7 @@
|
||||
data["contents_access"] = content_pack.access ? get_access_desc(content_pack.access) : "None"
|
||||
|
||||
var/requests_list[0]
|
||||
for(var/set_name in shuttle_master.requestlist)
|
||||
for(var/set_name in SSshuttle.requestlist)
|
||||
var/datum/supply_order/SO = set_name
|
||||
if(SO)
|
||||
// Check if the user owns the request, so they can cancel requests
|
||||
@@ -470,18 +451,18 @@
|
||||
data["requests"] = requests_list
|
||||
|
||||
var/orders_list[0]
|
||||
for(var/set_name in shuttle_master.shoppinglist)
|
||||
for(var/set_name in SSshuttle.shoppinglist)
|
||||
var/datum/supply_order/SO = set_name
|
||||
if(SO)
|
||||
orders_list.Add(list(list("ordernum" = SO.ordernum, "supply_type" = SO.object.name, "orderedby" = SO.orderedby)))
|
||||
data["orders"] = orders_list
|
||||
|
||||
data["points"] = round(shuttle_master.points)
|
||||
data["points"] = round(SSshuttle.points)
|
||||
data["send"] = list("send" = 1)
|
||||
|
||||
data["moving"] = shuttle_master.supply.mode != SHUTTLE_IDLE
|
||||
data["at_station"] = shuttle_master.supply.getDockedId() == "supply_home"
|
||||
data["timeleft"] = shuttle_master.supply.timeLeft(600)
|
||||
data["moving"] = SSshuttle.supply.mode != SHUTTLE_IDLE
|
||||
data["at_station"] = SSshuttle.supply.getDockedId() == "supply_home"
|
||||
data["timeleft"] = SSshuttle.supply.timeLeft(600)
|
||||
|
||||
return data
|
||||
|
||||
@@ -499,7 +480,7 @@
|
||||
var/multi = text2num(copytext(href_list["doorder"], -1))
|
||||
if(!isnum(multi))
|
||||
return 1
|
||||
var/datum/supply_packs/P = shuttle_master.supply_packs[index]
|
||||
var/datum/supply_packs/P = SSshuttle.supply_packs[index]
|
||||
if(!istype(P))
|
||||
return 1
|
||||
var/crates = 1
|
||||
@@ -528,7 +509,7 @@
|
||||
|
||||
//make our supply_order datums
|
||||
for(var/i = 1; i <= crates; i++)
|
||||
var/datum/supply_order/O = shuttle_master.generateSupplyOrder(index, idname, idrank, reason, crates)
|
||||
var/datum/supply_order/O = SSshuttle.generateSupplyOrder(index, idname, idrank, reason, crates)
|
||||
if(!O) return
|
||||
if(i == 1)
|
||||
O.generateRequisition(loc)
|
||||
@@ -536,10 +517,10 @@
|
||||
else if(href_list["rreq"])
|
||||
var/ordernum = text2num(href_list["rreq"])
|
||||
var/obj/item/card/id/I = usr.get_id_card()
|
||||
for(var/i=1, i<=shuttle_master.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = shuttle_master.requestlist[i]
|
||||
for(var/i=1, i<=SSshuttle.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = SSshuttle.requestlist[i]
|
||||
if(SO.ordernum == ordernum && (I && SO.orderedby == I.registered_name))
|
||||
shuttle_master.requestlist.Cut(i,i+1)
|
||||
SSshuttle.requestlist.Cut(i,i+1)
|
||||
break
|
||||
|
||||
else if(href_list["last_viewed_group"])
|
||||
@@ -551,7 +532,7 @@
|
||||
if(topic == 1)
|
||||
content_pack = null
|
||||
else
|
||||
var/datum/supply_packs/P = shuttle_master.supply_packs[topic]
|
||||
var/datum/supply_packs/P = SSshuttle.supply_packs[topic]
|
||||
content_pack = P
|
||||
|
||||
add_fingerprint(usr)
|
||||
@@ -593,8 +574,8 @@
|
||||
|
||||
var/cat = text2num(last_viewed_group)
|
||||
var/packs_list[0]
|
||||
for(var/set_name in shuttle_master.supply_packs)
|
||||
var/datum/supply_packs/pack = shuttle_master.supply_packs[set_name]
|
||||
for(var/set_name in SSshuttle.supply_packs)
|
||||
var/datum/supply_packs/pack = SSshuttle.supply_packs[set_name]
|
||||
if((pack.hidden && hacked) || (pack.contraband && can_order_contraband) || (pack.special && pack.special_enabled) || (!pack.contraband && !pack.hidden && !pack.special))
|
||||
if(pack.group == cat)
|
||||
// 0/1 after the pack name (set_name) is a boolean for ordering multiple crates
|
||||
@@ -608,7 +589,7 @@
|
||||
data["contents_access"] = content_pack.access ? get_access_desc(content_pack.access) : "None"
|
||||
|
||||
var/requests_list[0]
|
||||
for(var/set_name in shuttle_master.requestlist)
|
||||
for(var/set_name in SSshuttle.requestlist)
|
||||
var/datum/supply_order/SO = set_name
|
||||
if(SO)
|
||||
if(!SO.comment)
|
||||
@@ -617,21 +598,21 @@
|
||||
data["requests"] = requests_list
|
||||
|
||||
var/orders_list[0]
|
||||
for(var/set_name in shuttle_master.shoppinglist)
|
||||
for(var/set_name in SSshuttle.shoppinglist)
|
||||
var/datum/supply_order/SO = set_name
|
||||
if(SO)
|
||||
orders_list.Add(list(list("ordernum" = SO.ordernum, "supply_type" = SO.object.name, "orderedby" = SO.orderedby, "comment" = SO.comment)))
|
||||
data["orders"] = orders_list
|
||||
|
||||
data["canapprove"] = (shuttle_master.supply.getDockedId() == "supply_away") && !(shuttle_master.supply.mode != SHUTTLE_IDLE)
|
||||
data["points"] = round(shuttle_master.points)
|
||||
data["canapprove"] = (SSshuttle.supply.getDockedId() == "supply_away") && !(SSshuttle.supply.mode != SHUTTLE_IDLE)
|
||||
data["points"] = round(SSshuttle.points)
|
||||
data["send"] = list("send" = 1)
|
||||
data["message"] = shuttle_master.centcom_message ? shuttle_master.centcom_message : "Remember to stamp and send back the supply manifests."
|
||||
data["message"] = SSshuttle.centcom_message ? SSshuttle.centcom_message : "Remember to stamp and send back the supply manifests."
|
||||
|
||||
data["moving"] = shuttle_master.supply.mode != SHUTTLE_IDLE
|
||||
data["at_station"] = shuttle_master.supply.getDockedId() == "supply_home"
|
||||
data["timeleft"] = shuttle_master.supply.timeLeft(600)
|
||||
data["can_launch"] = !shuttle_master.supply.canMove()
|
||||
data["moving"] = SSshuttle.supply.mode != SHUTTLE_IDLE
|
||||
data["at_station"] = SSshuttle.supply.getDockedId() == "supply_home"
|
||||
data["timeleft"] = SSshuttle.supply.timeLeft(600)
|
||||
data["can_launch"] = !SSshuttle.supply.canMove()
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/supplycomp/proc/is_authorized(mob/user)
|
||||
@@ -650,24 +631,24 @@
|
||||
if(!is_authorized(usr))
|
||||
return 1
|
||||
|
||||
if(!shuttle_master)
|
||||
log_runtime(EXCEPTION("The shuttle_master controller datum is missing somehow."), src)
|
||||
if(!SSshuttle)
|
||||
log_runtime(EXCEPTION("The SSshuttle controller datum is missing somehow."), src)
|
||||
return 1
|
||||
|
||||
if(href_list["send"])
|
||||
if(shuttle_master.supply.canMove())
|
||||
if(SSshuttle.supply.canMove())
|
||||
to_chat(usr, "<span class='warning'>For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.</span>")
|
||||
else if(shuttle_master.supply.getDockedId() == "supply_home")
|
||||
shuttle_master.toggleShuttle("supply", "supply_home", "supply_away", 1)
|
||||
investigate_log("[key_name(usr)] has sent the supply shuttle away. Remaining points: [shuttle_master.points]. Shuttle contents: [shuttle_master.sold_atoms]", "cargo")
|
||||
else if(!shuttle_master.supply.request(shuttle_master.getDock("supply_home")))
|
||||
else if(SSshuttle.supply.getDockedId() == "supply_home")
|
||||
SSshuttle.toggleShuttle("supply", "supply_home", "supply_away", 1)
|
||||
investigate_log("[key_name(usr)] has sent the supply shuttle away. Remaining points: [SSshuttle.points]. Shuttle contents: [SSshuttle.sold_atoms]", "cargo")
|
||||
else if(!SSshuttle.supply.request(SSshuttle.getDock("supply_home")))
|
||||
post_signal("supply")
|
||||
if(LAZYLEN(shuttle_master.shoppinglist) && prob(10))
|
||||
if(LAZYLEN(SSshuttle.shoppinglist) && prob(10))
|
||||
var/datum/supply_order/O = new /datum/supply_order()
|
||||
O.ordernum = shuttle_master.ordernum
|
||||
O.object = shuttle_master.supply_packs[pick(shuttle_master.supply_packs)]
|
||||
O.ordernum = SSshuttle.ordernum
|
||||
O.object = SSshuttle.supply_packs[pick(SSshuttle.supply_packs)]
|
||||
O.orderedby = random_name(pick(MALE,FEMALE), species = "Human")
|
||||
shuttle_master.shoppinglist += O
|
||||
SSshuttle.shoppinglist += O
|
||||
investigate_log("Random [O.object] crate added to supply shuttle")
|
||||
|
||||
else if(href_list["doorder"])
|
||||
@@ -680,7 +661,7 @@
|
||||
var/multi = text2num(copytext(href_list["doorder"], -1))
|
||||
if(!isnum(multi))
|
||||
return 1
|
||||
var/datum/supply_packs/P = shuttle_master.supply_packs[index]
|
||||
var/datum/supply_packs/P = SSshuttle.supply_packs[index]
|
||||
if(!istype(P))
|
||||
return 1
|
||||
var/crates = 1
|
||||
@@ -708,37 +689,37 @@
|
||||
|
||||
//make our supply_order datums
|
||||
for(var/i = 1; i <= crates; i++)
|
||||
var/datum/supply_order/O = shuttle_master.generateSupplyOrder(index, idname, idrank, reason, crates)
|
||||
var/datum/supply_order/O = SSshuttle.generateSupplyOrder(index, idname, idrank, reason, crates)
|
||||
if(!O) return 1
|
||||
if(i == 1)
|
||||
O.generateRequisition(loc)
|
||||
|
||||
else if(href_list["confirmorder"])
|
||||
if(shuttle_master.supply.getDockedId() != "supply_away" || shuttle_master.supply.mode != SHUTTLE_IDLE)
|
||||
if(SSshuttle.supply.getDockedId() != "supply_away" || SSshuttle.supply.mode != SHUTTLE_IDLE)
|
||||
return 1
|
||||
var/ordernum = text2num(href_list["confirmorder"])
|
||||
var/datum/supply_order/O
|
||||
var/datum/supply_packs/P
|
||||
for(var/i=1, i<=shuttle_master.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = shuttle_master.requestlist[i]
|
||||
for(var/i=1, i<=SSshuttle.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = SSshuttle.requestlist[i]
|
||||
if(SO.ordernum == ordernum)
|
||||
O = SO
|
||||
P = O.object
|
||||
if(shuttle_master.points >= P.cost)
|
||||
shuttle_master.requestlist.Cut(i,i+1)
|
||||
shuttle_master.points -= P.cost
|
||||
shuttle_master.shoppinglist += O
|
||||
investigate_log("[key_name(usr)] has authorized an order for [P.name]. Remaining points: [shuttle_master.points].", "cargo")
|
||||
if(SSshuttle.points >= P.cost)
|
||||
SSshuttle.requestlist.Cut(i,i+1)
|
||||
SSshuttle.points -= P.cost
|
||||
SSshuttle.shoppinglist += O
|
||||
investigate_log("[key_name(usr)] has authorized an order for [P.name]. Remaining points: [SSshuttle.points].", "cargo")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>There are insufficient supply points for this request.</span>")
|
||||
break
|
||||
|
||||
else if(href_list["rreq"])
|
||||
var/ordernum = text2num(href_list["rreq"])
|
||||
for(var/i=1, i<=shuttle_master.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = shuttle_master.requestlist[i]
|
||||
for(var/i=1, i<=SSshuttle.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = SSshuttle.requestlist[i]
|
||||
if(SO.ordernum == ordernum)
|
||||
shuttle_master.requestlist.Cut(i,i+1)
|
||||
SSshuttle.requestlist.Cut(i,i+1)
|
||||
break
|
||||
|
||||
else if(href_list["last_viewed_group"])
|
||||
@@ -750,7 +731,7 @@
|
||||
if(topic == 1)
|
||||
content_pack = null
|
||||
else
|
||||
var/datum/supply_packs/P = shuttle_master.supply_packs[topic]
|
||||
var/datum/supply_packs/P = SSshuttle.supply_packs[topic]
|
||||
content_pack = P
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
Reference in New Issue
Block a user