mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Supply shuttle, initial_move() fixes, dock fixes
Supply has been almost completely replaced by -tg-'s system. No fancy UI, unfortunately, but modifying bay's directly was not possible.
This commit is contained in:
@@ -169,4 +169,8 @@
|
||||
#define POLLTYPE_RATING "NUMVAL"
|
||||
#define POLLTYPE_MULTI "MULTICHOICE"
|
||||
|
||||
#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day
|
||||
#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day
|
||||
|
||||
#define MANIFEST_ERROR_NAME 1
|
||||
#define MANIFEST_ERROR_COUNT 2
|
||||
#define MANIFEST_ERROR_ITEM 4
|
||||
|
||||
+42
-48
@@ -52,54 +52,6 @@ var/religion_name = null
|
||||
|
||||
var/name = ""
|
||||
|
||||
/*
|
||||
var/random = rand(1,5)
|
||||
|
||||
|
||||
//Rare: Pre-Prefix
|
||||
if (prob(10))
|
||||
name = pick("Imperium", "Heretical", "Cuban", "Psychic", "Elegant", "Common", "Uncommon", "Rare", "Unique", "Houseruled", "Religious", "Atheist", "Traditional", "Houseruled", "Mad", "Super", "Ultra", "Secret", "Top Secret", "Deep", "Death", "Zybourne", "Central", "Main", "Government", "Uoi", "Fat", "Automated", "Experimental", "Augmented")
|
||||
station_name = name + " "
|
||||
|
||||
// Prefix
|
||||
switch(Holiday)
|
||||
//get normal name
|
||||
if(null,"",0)
|
||||
name = pick("", "Stanford", "Dorf", "Alium", "Prefix", "Clowning", "Aegis", "Ishimura", "Scaredy", "Death-World", "Mime", "Honk", "Rogue", "MacRagge", "Ultrameens", "Safety", "Paranoia", "Explosive", "Neckbear", "Donk", "Muppet", "North", "West", "East", "South", "Slant-ways", "Widdershins", "Rimward", "Expensive", "Procreatory", "Imperial", "Unidentified", "Immoral", "Carp", "Ork", "Pete", "Control", "Nettle", "Aspie", "Class", "Crab", "Fist","Corrogated","Skeleton","Race", "Fatguy", "Gentleman", "Capitalist", "Communist", "Bear", "Beard", "Derp", "Space", "Spess", "Star", "Moon", "System", "Mining", "Neckbeard", "Research", "Supply", "Military", "Orbital", "Battle", "Science", "Asteroid", "Home", "Production", "Transport", "Delivery", "Extraplanetary", "Orbital", "Correctional", "Robot", "Hats", "Pizza")
|
||||
if(name)
|
||||
station_name += name + " "
|
||||
|
||||
//For special days like christmas, easter, new-years etc ~Carn
|
||||
if("Friday the 13th")
|
||||
name = pick("Mike","Friday","Evil","Myers","Murder","Deathly","Stabby")
|
||||
station_name += name + " "
|
||||
random = 13
|
||||
else
|
||||
//get the first word of the Holiday and use that
|
||||
var/i = findtext(Holiday," ",1,0)
|
||||
name = copytext(Holiday,1,i)
|
||||
station_name += name + " "
|
||||
|
||||
// Suffix
|
||||
name = pick("Station", "Fortress", "Frontier", "Suffix", "Death-trap", "Space-hulk", "Lab", "Hazard","Spess Junk", "Fishery", "No-Moon", "Tomb", "Crypt", "Hut", "Monkey", "Bomb", "Trade Post", "Fortress", "Village", "Town", "City", "Edition", "Hive", "Complex", "Base", "Facility", "Depot", "Outpost", "Installation", "Drydock", "Observatory", "Array", "Relay", "Monitor", "Platform", "Construct", "Hangar", "Prison", "Center", "Port", "Waystation", "Factory", "Waypoint", "Stopover", "Hub", "HQ", "Office", "Object", "Fortification", "Colony", "Planet-Cracker", "Roost", "Fat Camp")
|
||||
station_name += name + " "
|
||||
|
||||
// ID Number
|
||||
switch(random)
|
||||
if(1)
|
||||
station_name += "[rand(1, 99)]"
|
||||
if(2)
|
||||
station_name += pick("Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega")
|
||||
if(3)
|
||||
station_name += pick("II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX")
|
||||
if(4)
|
||||
station_name += pick("Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliet", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-ray", "Yankee", "Zulu")
|
||||
if(5)
|
||||
station_name += pick("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen")
|
||||
if(13)
|
||||
station_name += pick("13","XIII","Thirteen")
|
||||
*/
|
||||
|
||||
if (config && config.server_name)
|
||||
world.name = "[config.server_name]: [name]"
|
||||
else
|
||||
@@ -107,6 +59,48 @@ var/religion_name = null
|
||||
|
||||
return station_name
|
||||
|
||||
/proc/new_station_name()
|
||||
var/random = rand(1,5)
|
||||
var/name = ""
|
||||
var/new_station_name = ""
|
||||
|
||||
//Rare: Pre-Prefix
|
||||
if (prob(10))
|
||||
name = pick("Imperium", "Heretical", "Cuban", "Psychic", "Elegant", "Common", "Uncommon", "Rare", "Unique", "Houseruled", "Religious", "Atheist", "Traditional", "Houseruled", "Mad", "Super", "Ultra", "Secret", "Top Secret", "Deep", "Death", "Zybourne", "Central", "Main", "Government", "Uoi", "Fat", "Automated", "Experimental", "Augmented")
|
||||
new_station_name = name + " "
|
||||
name = ""
|
||||
|
||||
// Prefix
|
||||
for(var/holiday_name in holiday_master.holidays)
|
||||
if(holiday_name == "Friday the 13th")
|
||||
random = 13
|
||||
var/datum/holiday/holiday = holiday_master.holidays[holiday_name]
|
||||
name = holiday.getStationPrefix()
|
||||
//get normal name
|
||||
if(!name)
|
||||
name = pick("", "Stanford", "Dorf", "Alium", "Prefix", "Clowning", "Aegis", "Ishimura", "Scaredy", "Death-World", "Mime", "Honk", "Rogue", "MacRagge", "Ultrameens", "Safety", "Paranoia", "Explosive", "Neckbear", "Donk", "Muppet", "North", "West", "East", "South", "Slant-ways", "Widdershins", "Rimward", "Expensive", "Procreatory", "Imperial", "Unidentified", "Immoral", "Carp", "Ork", "Pete", "Control", "Nettle", "Aspie", "Class", "Crab", "Fist","Corrogated","Skeleton","Race", "Fatguy", "Gentleman", "Capitalist", "Communist", "Bear", "Beard", "Derp", "Space", "Spess", "Star", "Moon", "System", "Mining", "Neckbeard", "Research", "Supply", "Military", "Orbital", "Battle", "Science", "Asteroid", "Home", "Production", "Transport", "Delivery", "Extraplanetary", "Orbital", "Correctional", "Robot", "Hats", "Pizza")
|
||||
if(name)
|
||||
new_station_name += name + " "
|
||||
|
||||
// Suffix
|
||||
name = pick("Station", "Fortress", "Frontier", "Suffix", "Death-trap", "Space-hulk", "Lab", "Hazard","Spess Junk", "Fishery", "No-Moon", "Tomb", "Crypt", "Hut", "Monkey", "Bomb", "Trade Post", "Fortress", "Village", "Town", "City", "Edition", "Hive", "Complex", "Base", "Facility", "Depot", "Outpost", "Installation", "Drydock", "Observatory", "Array", "Relay", "Monitor", "Platform", "Construct", "Hangar", "Prison", "Center", "Port", "Waystation", "Factory", "Waypoint", "Stopover", "Hub", "HQ", "Office", "Object", "Fortification", "Colony", "Planet-Cracker", "Roost", "Fat Camp")
|
||||
new_station_name += name + " "
|
||||
|
||||
// ID Number
|
||||
switch(random)
|
||||
if(1)
|
||||
new_station_name += "[rand(1, 99)]"
|
||||
if(2)
|
||||
new_station_name += pick("Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega")
|
||||
if(3)
|
||||
new_station_name += pick("II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX")
|
||||
if(4)
|
||||
new_station_name += pick("Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliet", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-ray", "Yankee", "Zulu")
|
||||
if(5)
|
||||
new_station_name += pick("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen")
|
||||
if(13)
|
||||
new_station_name += pick("13","XIII","Thirteen")
|
||||
return new_station_name
|
||||
|
||||
|
||||
/proc/world_name(var/name)
|
||||
|
||||
@@ -41,6 +41,24 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
|
||||
shuttle_master = src
|
||||
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("Initializing shuttle docks...")
|
||||
initialize_docks()
|
||||
log_startup_progress(" Docks initalized in [stop_watch(watch)]s.")
|
||||
|
||||
if(!emergency)
|
||||
WARNING("No /obj/docking_port/mobile/emergency placed on the map!")
|
||||
if(!supply)
|
||||
WARNING("No /obj/docking_port/mobile/supply placed on the map!")
|
||||
|
||||
ordernum = rand(1,9000)
|
||||
|
||||
for(var/typepath in subtypesof(/datum/supply_packs))
|
||||
var/datum/supply_packs/P = new typepath()
|
||||
if(P.name == "HEADER") continue // To filter out group headers
|
||||
supply_packs["[P.type]"] = P
|
||||
initial_move()
|
||||
|
||||
/datum/controller/process/shuttle/doWork()
|
||||
points += points_per_decisecond * schedule_interval
|
||||
for(var/thing in mobile)
|
||||
@@ -50,6 +68,9 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
continue
|
||||
mobile.Remove(thing)
|
||||
|
||||
/datum/controller/process/shuttle/proc/initialize_docks()
|
||||
for(var/obj/docking_port/D in world)
|
||||
D.register()
|
||||
|
||||
|
||||
/datum/controller/process/shuttle/proc/getShuttle(id)
|
||||
@@ -190,3 +211,127 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
S.dwidth = M.dwidth
|
||||
S.dheight = M.dheight
|
||||
moveShuttle(M.id, "[M.roundstart_move]", 0)
|
||||
|
||||
/datum/supply_order
|
||||
var/ordernum
|
||||
var/datum/supply_packs/object = null
|
||||
var/orderedby = null
|
||||
var/orderedbyRank
|
||||
var/comment = null
|
||||
|
||||
/datum/supply_order/proc/generateRequisition(atom/_loc)
|
||||
if(!object)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(_loc)
|
||||
reqform.name = "requisition form - [object.name]"
|
||||
reqform.info += "<h3>[station_name] Supply Requisition Form</h3><hr>"
|
||||
reqform.info += "INDEX: #[ordernum]<br>"
|
||||
reqform.info += "REQUESTED BY: [orderedby]<br>"
|
||||
reqform.info += "RANK: [orderedbyRank]<br>"
|
||||
reqform.info += "REASON: [comment]<br>"
|
||||
reqform.info += "SUPPLY CRATE TYPE: [object.name]<br>"
|
||||
reqform.info += "ACCESS RESTRICTION: [get_access_desc(object.access)]<br>"
|
||||
reqform.info += "CONTENTS:<br>"
|
||||
reqform.info += object.manifest
|
||||
reqform.info += "<hr>"
|
||||
reqform.info += "STAMP BELOW TO APPROVE THIS REQUISITION:<br>"
|
||||
|
||||
reqform.update_icon() //Fix for appearing blank when printed.
|
||||
|
||||
return reqform
|
||||
|
||||
/datum/supply_order/proc/createObject(atom/_loc, errors=0)
|
||||
if(!object)
|
||||
return
|
||||
|
||||
world << "Supply order [src] creating object [object] at atom [_loc]."
|
||||
|
||||
//create the crate
|
||||
var/atom/Crate = new object.containertype(_loc)
|
||||
Crate.name = "[object.containername] [comment ? "([comment])":"" ]"
|
||||
if(object.access)
|
||||
Crate:req_access = list(text2num(object.access))
|
||||
|
||||
//create the manifest slip
|
||||
var/obj/item/weapon/paper/manifest/slip = new /obj/item/weapon/paper/manifest()
|
||||
slip.erroneous = errors
|
||||
slip.points = object.cost
|
||||
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)
|
||||
|
||||
slip.info = "<h3>[command_name()] Shipping Manifest</h3><hr><br>"
|
||||
slip.info +="Order #[ordernum]<br>"
|
||||
slip.info +="Destination: [stationName]<br>"
|
||||
slip.info +="[packagesAmt] PACKAGES IN THIS SHIPMENT<br>"
|
||||
slip.info +="CONTENTS:<br><ul>"
|
||||
|
||||
//we now create the actual contents
|
||||
var/list/contains
|
||||
if(istype(object, /datum/supply_packs/misc/randomised))
|
||||
var/datum/supply_packs/misc/randomised/SO = object
|
||||
contains = list()
|
||||
if(object.contains.len)
|
||||
for(var/j=1, j<=SO.num_contained, j++)
|
||||
contains += pick(object.contains)
|
||||
else
|
||||
contains = object.contains
|
||||
|
||||
for(var/typepath in contains)
|
||||
if(!typepath) continue
|
||||
var/atom/A = new typepath(Crate)
|
||||
if(object.amount && A.vars.Find("amount") && A:amount)
|
||||
A:amount = object.amount
|
||||
slip.info += "<li>[A.name]</li>" //add the item to the manifest (even if it was misplaced)
|
||||
|
||||
if(istype(Crate, /obj/structure/closet/critter)) // critter crates do not actually spawn mobs yet and have no contains var, but the manifest still needs to list them
|
||||
var/obj/structure/closet/critter/CritCrate = Crate
|
||||
if(CritCrate.content_mob)
|
||||
var/mob/crittername = CritCrate.content_mob
|
||||
slip.info += "<li>[initial(crittername.name)]</li>"
|
||||
|
||||
if((errors & MANIFEST_ERROR_ITEM))
|
||||
//secure and large crates cannot lose items
|
||||
if(findtext("[object.containertype]", "/secure/") || findtext("[object.containertype]","/largecrate/"))
|
||||
errors &= ~MANIFEST_ERROR_ITEM
|
||||
else
|
||||
var/lostAmt = max(round(Crate.contents.len/10), 1)
|
||||
//lose some of the items
|
||||
while(--lostAmt >= 0)
|
||||
qdel(pick(Crate.contents))
|
||||
|
||||
//manifest finalisation
|
||||
slip.info += "</ul><br>"
|
||||
slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS<hr>" // And now this is actually meaningful.
|
||||
slip.loc = Crate
|
||||
if(istype(Crate, /obj/structure/closet/crate))
|
||||
var/obj/structure/closet/crate/CR = Crate
|
||||
CR.manifest = slip
|
||||
CR.update_icon()
|
||||
if(istype(Crate, /obj/structure/largecrate))
|
||||
var/obj/structure/largecrate/LC = Crate
|
||||
LC.manifest = slip
|
||||
LC.update_icon()
|
||||
|
||||
return Crate
|
||||
|
||||
/datum/controller/process/shuttle/proc/generateSupplyOrder(packId, _orderedby, _orderedbyRank, _comment)
|
||||
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
|
||||
|
||||
requestlist += O
|
||||
|
||||
return O
|
||||
|
||||
|
||||
@@ -14,19 +14,13 @@
|
||||
var/datum/announcement/priority/emergency_shuttle_called = new(0, new_sound = sound('sound/AI/shuttlecalled.ogg'))
|
||||
var/datum/announcement/priority/emergency_shuttle_recalled = new(0, new_sound = sound('sound/AI/shuttlerecalled.ogg'))
|
||||
|
||||
/obj/docking_port/mobile/emergency/register()
|
||||
if(!..())
|
||||
return 0 //shuttle master not initialized
|
||||
|
||||
/obj/docking_port/mobile/emergency/New()
|
||||
..()
|
||||
spawn(0)
|
||||
if(!shuttle_master)
|
||||
sleep(50)
|
||||
if(!shuttle_master)
|
||||
sleep(50)
|
||||
if(!shuttle_master)
|
||||
throw EXCEPTION("docking port [src] could not initialize")
|
||||
return 0 //give up
|
||||
|
||||
shuttle_master.emergency = src
|
||||
shuttle_master.emergency = src
|
||||
log_to_dd("EMERGENCY FUCKING DOCKING PORT CREATED GOD FUCKING DAMNIT")
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile/emergency/timeLeft(divisor)
|
||||
if(divisor <= 0)
|
||||
|
||||
@@ -0,0 +1,649 @@
|
||||
/obj/item/weapon/paper/manifest
|
||||
name = "supply manifest"
|
||||
var/erroneous = 0
|
||||
var/points = 0
|
||||
var/ordernumber = 0
|
||||
|
||||
/obj/docking_port/mobile/supply
|
||||
name = "supply shuttle"
|
||||
id = "supply"
|
||||
callTime = 1200
|
||||
|
||||
dir = 8
|
||||
travelDir = 90
|
||||
width = 12
|
||||
dwidth = 5
|
||||
height = 7
|
||||
roundstart_move = "supply_away"
|
||||
|
||||
/obj/docking_port/mobile/supply/New()
|
||||
..()
|
||||
|
||||
/obj/docking_port/mobile/supply/register()
|
||||
if(!..())
|
||||
return 0
|
||||
shuttle_master.supply = src
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile/supply/canMove()
|
||||
if(z == ZLEVEL_STATION)
|
||||
return forbidden_atoms_check(areaInstance)
|
||||
return ..()
|
||||
|
||||
/obj/docking_port/mobile/supply/request(obj/docking_port/stationary/S)
|
||||
if(mode != SHUTTLE_IDLE)
|
||||
return 2
|
||||
return ..()
|
||||
|
||||
/obj/docking_port/mobile/supply/dock()
|
||||
. = ..()
|
||||
if(.) return .
|
||||
|
||||
buy()
|
||||
sell()
|
||||
|
||||
/obj/docking_port/mobile/supply/proc/buy()
|
||||
if(z != ZLEVEL_STATION) //we only buy when we are -at- the station
|
||||
return 1
|
||||
|
||||
if(!shuttle_master.shoppinglist.len)
|
||||
return 2
|
||||
|
||||
var/list/emptyTurfs = list()
|
||||
for(var/turf/simulated/T in areaInstance)
|
||||
if(T.density)
|
||||
continue
|
||||
|
||||
var/contcount
|
||||
for(var/atom/A in T.contents)
|
||||
if(istype(A,/atom/movable/lighting_overlay))
|
||||
continue
|
||||
if(istype(A,/obj/machinery/light))
|
||||
continue //hacky but whatever, shuttles need three spots each for this shit
|
||||
if(!A.simulated)
|
||||
continue
|
||||
contcount++
|
||||
|
||||
if(contcount)
|
||||
continue
|
||||
|
||||
emptyTurfs += T
|
||||
|
||||
world << "Supply shuttle buying items. emptyTurfs.len = [emptyTurfs.len]"
|
||||
|
||||
for(var/datum/supply_order/SO in shuttle_master.shoppinglist)
|
||||
if(!SO.object)
|
||||
throw EXCEPTION("Supply Order [SO] has no object associated with it.")
|
||||
continue
|
||||
|
||||
world << "Supply shuttle buying [SO], [SO.object]."
|
||||
|
||||
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))
|
||||
return
|
||||
|
||||
var/errors = 0
|
||||
if(prob(5))
|
||||
errors |= MANIFEST_ERROR_COUNT
|
||||
if(prob(5))
|
||||
errors |= MANIFEST_ERROR_NAME
|
||||
if(prob(5))
|
||||
errors |= MANIFEST_ERROR_ITEM
|
||||
SO.createObject(T, errors)
|
||||
|
||||
shuttle_master.shoppinglist.Cut()
|
||||
|
||||
|
||||
/obj/docking_port/mobile/supply/proc/sell()
|
||||
if(z != ZLEVEL_CENTCOMM) //we only sell when we are -at- centcomm
|
||||
return 1
|
||||
|
||||
var/plasma_count = 0
|
||||
var/intel_count = 0
|
||||
var/crate_count = 0
|
||||
|
||||
var/msg = ""
|
||||
var/pointsEarned
|
||||
|
||||
for(var/atom/movable/MA in areaInstance)
|
||||
if(MA.anchored) continue
|
||||
shuttle_master.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 += ":"
|
||||
if(!MA.contents.len)
|
||||
shuttle_master.sold_atoms += " (empty)"
|
||||
++crate_count
|
||||
|
||||
var/find_slip = 1
|
||||
for(var/thing in MA)
|
||||
// Sell manifests
|
||||
shuttle_master.sold_atoms += " [thing:name]"
|
||||
if(find_slip && istype(thing,/obj/item/weapon/paper/manifest))
|
||||
var/obj/item/weapon/paper/manifest/slip = thing
|
||||
// TODO: Check for a signature, too.
|
||||
if(slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense
|
||||
// Did they mark it as erroneous?
|
||||
var/denied = 0
|
||||
for(var/i=1,i<=slip.stamped.len,i++)
|
||||
if(slip.stamped[i] == /obj/item/weapon/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)
|
||||
msg += "<font color=green>+[pointsEarned]</font>: Station correctly denied package [slip.ordernumber]: "
|
||||
if(slip.erroneous & MANIFEST_ERROR_NAME)
|
||||
msg += "Destination station incorrect. "
|
||||
else if(slip.erroneous & MANIFEST_ERROR_COUNT)
|
||||
msg += "Packages incorrectly counted. "
|
||||
else if(slip.erroneous & MANIFEST_ERROR_ITEM)
|
||||
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 += "<font color=green>+[shuttle_master.points_per_slip]</font>: Package [slip.ordernumber] accorded.<BR>"
|
||||
else // You done goofed.
|
||||
if(slip.erroneous)
|
||||
msg += "<font color=red>+0</font>: Station approved package [slip.ordernumber] despite error: "
|
||||
if(slip.erroneous & MANIFEST_ERROR_NAME)
|
||||
msg += "Destination station incorrect."
|
||||
else if(slip.erroneous & MANIFEST_ERROR_COUNT)
|
||||
msg += "Packages incorrectly counted."
|
||||
else if(slip.erroneous & MANIFEST_ERROR_ITEM)
|
||||
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
|
||||
msg += "<font color=red>[pointsEarned]</font>: Station denied package [slip.ordernumber]. Our records show no fault on our part.<BR>"
|
||||
find_slip = 0
|
||||
continue
|
||||
|
||||
// Sell plasma
|
||||
if(istype(thing, /obj/item/stack/sheet/mineral/plasma))
|
||||
var/obj/item/stack/sheet/mineral/plasma/P = thing
|
||||
plasma_count += P.amount
|
||||
|
||||
// Sell syndicate intel
|
||||
if(istype(thing, /obj/item/documents/syndicate))
|
||||
++intel_count
|
||||
|
||||
// Sell tech levels
|
||||
if(istype(thing, /obj/item/weapon/disk/tech_disk))
|
||||
var/obj/item/weapon/disk/tech_disk/disk = thing
|
||||
if(!disk.stored) continue
|
||||
var/datum/tech/tech = disk.stored
|
||||
|
||||
var/cost = tech.getCost(shuttle_master.techLevels[tech.id])
|
||||
if(cost)
|
||||
shuttle_master.techLevels[tech.id] = tech.level
|
||||
shuttle_master.points += cost
|
||||
msg += "<font color=green>+[cost]</font>: [tech.name] - new data.<BR>"
|
||||
|
||||
// Sell max reliablity designs
|
||||
if(istype(thing, /obj/item/weapon/disk/design_disk))
|
||||
var/obj/item/weapon/disk/design_disk/disk = thing
|
||||
if(!disk.blueprint) continue
|
||||
var/datum/design/design = disk.blueprint
|
||||
if(design.id in shuttle_master.researchDesigns) continue
|
||||
|
||||
if(initial(design.reliability) < 100 && design.reliability >= 100)
|
||||
// Maxed out reliability designs only.
|
||||
shuttle_master.points += shuttle_master.points_per_design
|
||||
shuttle_master.researchDesigns += design.id
|
||||
msg += "<font color=green>+[shuttle_master.points_per_design]</font>: Reliable [design.name] design.<BR>"
|
||||
|
||||
// Sell exotic plants
|
||||
if(istype(thing, /obj/item/seeds))
|
||||
var/obj/item/seeds/S = thing
|
||||
if(S.seed.get_trait(TRAIT_RARITY) == 0) // Mundane species
|
||||
msg += "<font color=red>+0</font>: We don't need samples of mundane species \"[capitalize(S.seed.seed_name)]\".<BR>"
|
||||
else if(shuttle_master.discoveredPlants[S.type]) // This species has already been sent to CentComm
|
||||
var/potDiff = S.seed.get_trait(TRAIT_POTENCY) - shuttle_master.discoveredPlants[S.type] // Compare it to the previous best
|
||||
if(potDiff > 0) // This sample is better
|
||||
shuttle_master.discoveredPlants[S.type] = S.seed.get_trait(TRAIT_POTENCY)
|
||||
msg += "<font color=green>+[potDiff]</font>: New sample of \"[capitalize(S.seed.seed_name)]\" is superior. Good work.<BR>"
|
||||
shuttle_master.points += potDiff
|
||||
else // This sample is worthless
|
||||
msg += "<font color=red>+0</font>: New sample of \"[capitalize(S.seed.seed_name)]\" is not more potent than existing sample ([shuttle_master.discoveredPlants[S.type]] potency).<BR>"
|
||||
else // This is a new discovery!
|
||||
shuttle_master.discoveredPlants[S.type] = S.seed.get_trait(TRAIT_POTENCY)
|
||||
msg += "<font color=green>+[S.seed.get_trait(TRAIT_RARITY)]</font>: New species discovered: \"[capitalize(S.seed.seed_name)]\". Excellent work.<BR>"
|
||||
shuttle_master.points += S.seed.get_trait(TRAIT_RARITY) // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later
|
||||
qdel(MA)
|
||||
shuttle_master.sold_atoms += "."
|
||||
|
||||
if(plasma_count > 0)
|
||||
pointsEarned = round(plasma_count * shuttle_master.points_per_plasma)
|
||||
msg += "<font color=green>+[pointsEarned]</font>: Received [plasma_count] unit(s) of exotic material.<BR>"
|
||||
shuttle_master.points += pointsEarned
|
||||
|
||||
if(intel_count > 0)
|
||||
pointsEarned = round(intel_count * shuttle_master.points_per_intel)
|
||||
msg += "<font color=green>+[pointsEarned]</font>: Received [intel_count] article(s) of enemy intelligence.<BR>"
|
||||
shuttle_master.points += pointsEarned
|
||||
|
||||
if(crate_count > 0)
|
||||
pointsEarned = round(crate_count * shuttle_master.points_per_crate)
|
||||
msg += "<font color=green>+[pointsEarned]</font>: Received [crate_count] crate(s).<BR>"
|
||||
shuttle_master.points += pointsEarned
|
||||
|
||||
shuttle_master.centcom_message = msg
|
||||
|
||||
|
||||
/proc/forbidden_atoms_check(atom/A)
|
||||
var/list/blacklist = list(
|
||||
/mob/living,
|
||||
/obj/effect/blob,
|
||||
/obj/effect/spider/spiderling,
|
||||
/obj/item/weapon/disk/nuclear,
|
||||
/obj/machinery/nuclearbomb,
|
||||
/obj/item/device/radio/beacon,
|
||||
/obj/machinery/the_singularitygen,
|
||||
/obj/singularity,
|
||||
/obj/machinery/teleport/station,
|
||||
/obj/machinery/teleport/hub,
|
||||
/obj/machinery/telepad,
|
||||
/obj/machinery/clonepod
|
||||
)
|
||||
if(A)
|
||||
if(is_type_in_list(A, blacklist))
|
||||
return 1
|
||||
for(var/thing in A)
|
||||
if(.(thing))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/computer/ordercomp/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if(temp)
|
||||
dat = temp
|
||||
else
|
||||
dat += {"<div class='statusDisplay'>Shuttle Location: [shuttle_master.supply.name]<BR>
|
||||
<HR>Supply Points: [shuttle_master.points]<BR></div>
|
||||
|
||||
<BR>\n<A href='?src=\ref[src];order=categories'>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>"}
|
||||
|
||||
// Removing the old window method but leaving it here for reference
|
||||
//user << browse(dat, "window=computer;size=575x450")
|
||||
//onclose(user, "computer")
|
||||
|
||||
// Added the new browser window method
|
||||
var/datum/browser/popup = new(user, "computer", "Supply Ordering Console", 575, 450)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/ordercomp/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if( isturf(loc) && (in_range(src, usr) || istype(usr, /mob/living/silicon)) )
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["order"])
|
||||
if(href_list["order"] == "categories")
|
||||
//all_supply_groups
|
||||
//Request what?
|
||||
last_viewed_group = "categories"
|
||||
temp = "<div class='statusDisplay'><b>Supply points: [shuttle_master.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><BR></div><BR>"
|
||||
temp += "<b>Select a category</b><BR><BR>"
|
||||
for(var/cat in all_supply_groups )
|
||||
temp += "<A href='?src=\ref[src];order=[cat]'>[get_supply_group_name(cat)]</A><BR>"
|
||||
else
|
||||
last_viewed_group = href_list["order"]
|
||||
var/cat = text2num(last_viewed_group)
|
||||
temp = "<div class='statusDisplay'><b>Supply points: [shuttle_master.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><BR></div><BR>"
|
||||
temp += "<b>Request from: [get_supply_group_name(cat)]</b><BR><BR>"
|
||||
for(var/supply_type in shuttle_master.supply_packs )
|
||||
var/datum/supply_packs/N = shuttle_master.supply_packs[supply_type]
|
||||
if(N.hidden || N.contraband || N.group != cat) continue //Have to send the type instead of a reference to
|
||||
temp += "<A href='?src=\ref[src];doorder=[supply_type]'>[N.name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
else if (href_list["doorder"])
|
||||
if(world.time < reqtime)
|
||||
visible_message("\The [src] flashes, \"[world.time - reqtime] seconds remaining until another requisition form may be printed.\"")
|
||||
return
|
||||
|
||||
//Find the correct supply_pack datum
|
||||
if(!shuttle_master.supply_packs["[href_list["doorder"]]"]) return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = stripped_input(usr,"Reason:","Why do you require this item?","")
|
||||
if(world.time > timeout) return
|
||||
if(!reason) return
|
||||
|
||||
var/idname = "*None Provided*"
|
||||
var/idrank = "*None Provided*"
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
idname = H.get_authentification_name()
|
||||
idrank = H.get_assignment()
|
||||
else if(issilicon(usr))
|
||||
idname = usr.real_name
|
||||
|
||||
var/datum/supply_order/O = shuttle_master.generateSupplyOrder(href_list["doorder"], idname, idrank, reason)
|
||||
if(!O) return
|
||||
O.generateRequisition(loc)
|
||||
|
||||
reqtime = (world.time + 5) % 1e5
|
||||
|
||||
temp = "Thanks for your request. The cargo team will process it as soon as possible.<BR>"
|
||||
temp += "<BR><A href='?src=\ref[src];order=[last_viewed_group]'>Back</A> <A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
|
||||
else if (href_list["vieworders"])
|
||||
temp = "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><BR><BR>Current approved orders: <BR><BR>"
|
||||
for(var/datum/supply_order/SO in shuttle_master.shoppinglist)
|
||||
temp += "[SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]<BR>"
|
||||
|
||||
else if (href_list["viewrequests"])
|
||||
temp = "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><BR><BR>Current requests: <BR><BR>"
|
||||
for(var/datum/supply_order/SO in shuttle_master.requestlist)
|
||||
temp += "#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby]<BR>"
|
||||
|
||||
else if (href_list["mainmenu"])
|
||||
temp = null
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/supplycomp/attack_hand(mob/user)
|
||||
if(!allowed(user))
|
||||
user << "<span class='warning'>Access Denied.</span>"
|
||||
return
|
||||
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
post_signal("supply")
|
||||
var/dat
|
||||
if (temp)
|
||||
dat = temp
|
||||
else
|
||||
var/atDepot = (shuttle_master.supply.getDockedId() == "supply_away")
|
||||
var/inTransit = (shuttle_master.supply.mode != SHUTTLE_IDLE)
|
||||
var/canOrder = atDepot && !inTransit
|
||||
|
||||
dat += {"<div class='statusDisplay'><B>Supply shuttle</B><HR>
|
||||
Location: [shuttle_master.supply.getStatusText()]<BR>
|
||||
<HR>\nSupply Points: [shuttle_master.points]<BR>\n</div><BR>
|
||||
[canOrder ? "\n<A href='?src=\ref[src];order=categories'>Order items</A><BR>\n<BR>" : "\n*Must be away to order items*<BR>\n<BR>"]
|
||||
[inTransit ? "\n*Shuttle already called*<BR>\n<BR>": atDepot ? "\n<A href='?src=\ref[src];send=1'>Send to station</A><BR>\n<BR>":"\n<A href='?src=\ref[src];send=1'>Send to centcom</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><BR>
|
||||
<HR>\n<B>Central Command messages:</B><BR> [shuttle_master.centcom_message ? shuttle_master.centcom_message : "Remember to stamp and send back the supply manifests."]"}
|
||||
|
||||
var/datum/browser/popup = new(user, "computer", "Supply Shuttle Console", 700, 455)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/supplycomp/emag_act(mob/user)
|
||||
if(!hacked)
|
||||
user << "<span class='notice'>Special supplies unlocked.</span>"
|
||||
hacked = 1
|
||||
|
||||
/obj/machinery/computer/supplycomp/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(isturf(loc) && ( in_range(src, usr) || istype(usr, /mob/living/silicon) ) )
|
||||
usr.set_machine(src)
|
||||
|
||||
//Calling the shuttle
|
||||
if(href_list["send"])
|
||||
if(shuttle_master.supply.canMove())
|
||||
temp = "For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.<BR><BR><A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
|
||||
else if(shuttle_master.supply.getDockedId() == "supply_home")
|
||||
temp = "The supply shuttle has departed.<BR><BR><A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
shuttle_master.toggleShuttle("supply", "supply_home", "supply_away", 1)
|
||||
investigate_log("[usr.key] 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")))
|
||||
temp = "The supply shuttle has been called and will arrive in [shuttle_master.supply.timeLeft(600)] minutes.<BR><BR><A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
post_signal("supply")
|
||||
|
||||
else if (href_list["order"])
|
||||
if(shuttle_master.supply.mode != SHUTTLE_IDLE) return
|
||||
if(href_list["order"] == "categories")
|
||||
//all_supply_groups
|
||||
//Request what?
|
||||
last_viewed_group = "categories"
|
||||
temp = "<div class='statusDisplay'><b>Supply points: [shuttle_master.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><BR></div><BR>"
|
||||
temp += "<b>Select a category</b><BR><BR>"
|
||||
for(var/cat in all_supply_groups )
|
||||
temp += "<A href='?src=\ref[src];order=[cat]'>[get_supply_group_name(cat)]</A><BR>"
|
||||
else
|
||||
last_viewed_group = href_list["order"]
|
||||
var/cat = text2num(last_viewed_group)
|
||||
temp = "<div class='statusDisplay'><b>Supply points: [shuttle_master.points]</b><BR>"
|
||||
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><BR></div><BR>"
|
||||
temp += "<b>Request from: [get_supply_group_name(cat)]</b><BR><BR>"
|
||||
for(var/supply_type in shuttle_master.supply_packs )
|
||||
var/datum/supply_packs/N = shuttle_master.supply_packs[supply_type]
|
||||
if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != cat)
|
||||
continue //Have to send the type instead of a reference to
|
||||
temp += "<A href='?src=\ref[src];doorder=[supply_type]'>[N.name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
|
||||
/*temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
|
||||
|
||||
for(var/supply_name in supply_shuttle.supply_packs )
|
||||
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
|
||||
if(N.hidden && !hacked) continue
|
||||
if(N.contraband && !can_order_contraband) continue
|
||||
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"*/
|
||||
|
||||
else if (href_list["doorder"])
|
||||
if(world.time < reqtime)
|
||||
visible_message("\The [src] flashes, \"[world.time - reqtime] seconds remaining until another requisition form may be printed.\"")
|
||||
return
|
||||
|
||||
//Find the correct supply_pack datum
|
||||
if(!shuttle_master.supply_packs[href_list["doorder"]])
|
||||
return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = stripped_input(usr,"Reason:","Why do you require this item?","")
|
||||
if(world.time > timeout) return
|
||||
// if(!reason) return
|
||||
|
||||
var/idname = "*None Provided*"
|
||||
var/idrank = "*None Provided*"
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
idname = H.get_authentification_name()
|
||||
idrank = H.get_assignment()
|
||||
else if(issilicon(usr))
|
||||
idname = usr.real_name
|
||||
|
||||
var/datum/supply_order/O = shuttle_master.generateSupplyOrder(href_list["doorder"], idname, idrank, reason)
|
||||
if(!O) return
|
||||
O.generateRequisition(loc)
|
||||
|
||||
reqtime = (world.time + 5) % 1e5
|
||||
|
||||
temp = "Order request placed.<BR>"
|
||||
temp += "<BR><A href='?src=\ref[src];order=[last_viewed_group]'>Back</A> | <A href='?src=\ref[src];mainmenu=1'>Main Menu</A> | <A href='?src=\ref[src];confirmorder=[O.ordernum]'>Authorize Order</A>"
|
||||
|
||||
else if(href_list["confirmorder"])
|
||||
//Find the correct supply_order datum
|
||||
var/ordernum = text2num(href_list["confirmorder"])
|
||||
var/datum/supply_order/O
|
||||
var/datum/supply_packs/P
|
||||
temp = "Invalid Request"
|
||||
for(var/i=1, i<=shuttle_master.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = shuttle_master.requestlist[i]
|
||||
if(SO && 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
|
||||
temp = "Thanks for your order."
|
||||
investigate_log("[usr.key] has authorized an order for [P.name]. Remaining points: [shuttle_master.points].", "cargo")
|
||||
else
|
||||
temp = "Not enough supply points."
|
||||
break
|
||||
temp += "<BR><BR><A href='?src=\ref[src];viewrequests=1'>Back</A> <A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
|
||||
else if (href_list["vieworders"])
|
||||
temp = "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><BR><BR>Current approved orders: <BR><BR>"
|
||||
for(var/datum/supply_order/SO in shuttle_master.shoppinglist)
|
||||
temp += "#[SO.ordernum] - [SO.object.name] approved by [SO.orderedby][SO.comment ? " ([SO.comment])":""]<BR>"// <A href='?src=\ref[src];cancelorder=[S]'>(Cancel)</A><BR>"
|
||||
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
/*
|
||||
else if (href_list["cancelorder"])
|
||||
var/datum/supply_order/remove_supply = href_list["cancelorder"]
|
||||
supply_shuttle_shoppinglist -= remove_supply
|
||||
supply_shuttle_points += remove_supply.object.cost
|
||||
temp += "Canceled: [remove_supply.object.name]<BR><BR><BR>"
|
||||
|
||||
for(var/S in supply_shuttle_shoppinglist)
|
||||
var/datum/supply_order/SO = S
|
||||
temp += "[SO.object.name] approved by [SO.orderedby][SO.comment ? " ([SO.comment])":""] <A href='?src=\ref[src];cancelorder=[S]'>(Cancel)</A><BR>"
|
||||
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
*/
|
||||
else if (href_list["viewrequests"])
|
||||
temp = "<A href='?src=\ref[src];mainmenu=1'>Main Menu</A><BR><BR>Current requests: <BR><BR>"
|
||||
for(var/datum/supply_order/SO in shuttle_master.requestlist)
|
||||
temp += "#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby] [shuttle_master.supply.getDockedId() == "supply_away" ? "<A href='?src=\ref[src];confirmorder=[SO.ordernum]'>Approve</A> <A href='?src=\ref[src];rreq=[SO.ordernum]'>Remove</A>" : ""]<BR>"
|
||||
|
||||
temp += "<BR><A href='?src=\ref[src];clearreq=1'>Clear list</A>"
|
||||
|
||||
else if (href_list["rreq"])
|
||||
var/ordernum = text2num(href_list["rreq"])
|
||||
temp = "Invalid Request.<BR>"
|
||||
for(var/i=1, i<=shuttle_master.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = shuttle_master.requestlist[i]
|
||||
if(SO && SO.ordernum == ordernum)
|
||||
shuttle_master.requestlist.Cut(i,i+1)
|
||||
temp = "Request removed.<BR>"
|
||||
break
|
||||
temp += "<BR><A href='?src=\ref[src];viewrequests=1'>Back</A> <A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
|
||||
else if (href_list["clearreq"])
|
||||
shuttle_master.requestlist.Cut()
|
||||
temp = "List cleared.<BR>"
|
||||
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>Main Menu</A>"
|
||||
|
||||
else if (href_list["mainmenu"])
|
||||
temp = null
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/supplycomp/proc/post_signal(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)
|
||||
|
||||
|
||||
/**********
|
||||
MISC
|
||||
**********/
|
||||
|
||||
|
||||
/area/supply/station
|
||||
name = "Supply Shuttle"
|
||||
icon_state = "shuttle3"
|
||||
requires_power = 0
|
||||
|
||||
/area/supply/dock
|
||||
name = "Supply Shuttle"
|
||||
icon_state = "shuttle3"
|
||||
requires_power = 0
|
||||
|
||||
//SUPPLY PACKS MOVED TO /code/defines/obj/supplypacks.dm
|
||||
|
||||
/obj/structure/plasticflaps //HOW DO YOU CALL THOSE THINGS ANYWAY
|
||||
name = "\improper plastic flaps"
|
||||
desc = "Completely impassable - or are they?"
|
||||
icon = 'icons/obj/stationobjs.dmi' //Change this.
|
||||
icon_state = "plasticflaps"
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 4
|
||||
var/list/mobs_can_pass = list(
|
||||
/mob/living/carbon/slime,
|
||||
/mob/living/simple_animal/mouse,
|
||||
/mob/living/silicon/robot/drone
|
||||
)
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/stool/bed/B = A
|
||||
if (istype(A, /obj/structure/stool/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/vehicle)) //no vehicles
|
||||
return 0
|
||||
|
||||
var/mob/living/M = A
|
||||
if(istype(M))
|
||||
if(M.lying)
|
||||
return ..()
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(A, mob_type))
|
||||
return ..()
|
||||
if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.is_small)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/plasticflaps/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
if (3)
|
||||
if (prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
||||
name = "\improper Airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
|
||||
New()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
Destroy()
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
CanAtmosPass(turf/T)
|
||||
return 0
|
||||
@@ -2,7 +2,7 @@
|
||||
//TODO: allow all controllers to be deleted for clean restarts (see WIP master controller stuff) - MC done - lighting done
|
||||
|
||||
|
||||
/client/proc/restart_controller(controller in list("Master","Failsafe","Supply"))
|
||||
/client/proc/restart_controller(controller in list("Master","Failsafe"))
|
||||
set category = "Debug"
|
||||
set name = "Restart Controller"
|
||||
set desc = "Restart one of the various periodic loop controllers for the game (be careful!)"
|
||||
@@ -14,14 +14,11 @@
|
||||
if("Failsafe")
|
||||
new /datum/controller/failsafe()
|
||||
feedback_add_details("admin_verb","RFailsafe")
|
||||
if("Supply")
|
||||
supply_controller.process()
|
||||
feedback_add_details("admin_verb","RSupply")
|
||||
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
|
||||
return
|
||||
|
||||
|
||||
/client/proc/debug_controller(controller in list("Master","failsafe","Ticker","Air","Lighting","Jobs","Sun","Radio","Supply","Configuration","pAI", "Cameras","Garbage", "Transfer Controller","Event","Alarm","Scheduler","Nano"))
|
||||
/client/proc/debug_controller(controller in list("Master","failsafe","Ticker","Air","Lighting","Jobs","Sun","Radio","Configuration","pAI", "Cameras","Garbage", "Transfer Controller","Event","Alarm","Scheduler","Nano"))
|
||||
set category = "Debug"
|
||||
set name = "Debug Controller"
|
||||
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
|
||||
@@ -52,9 +49,6 @@
|
||||
if("Radio")
|
||||
debug_variables(radio_controller)
|
||||
feedback_add_details("admin_verb","DRadio")
|
||||
if("Supply")
|
||||
debug_variables(supply_controller)
|
||||
feedback_add_details("admin_verb","DSupply")
|
||||
if("Configuration")
|
||||
debug_variables(config)
|
||||
feedback_add_details("admin_verb","DConf")
|
||||
|
||||
@@ -160,18 +160,8 @@ var/list/ghostteleportlocs = list()
|
||||
/area/shuttle/escape
|
||||
name = "\improper Emergency Shuttle"
|
||||
music = "music/escape.ogg"
|
||||
|
||||
/area/shuttle/escape/station
|
||||
name = "\improper Emergency Shuttle Station"
|
||||
icon_state = "shuttle2"
|
||||
|
||||
/area/shuttle/escape/centcom
|
||||
name = "\improper Emergency Shuttle Centcom"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/shuttle/escape/transit // the area to pass through for 3 minute transit
|
||||
name = "\improper Emergency Shuttle Transit"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/shuttle/escape_pod1
|
||||
name = "\improper Escape Pod One"
|
||||
@@ -402,6 +392,11 @@ var/list/ghostteleportlocs = list()
|
||||
name = "\improper hyperspace"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/shuttle/supply
|
||||
name = "Supply Shuttle"
|
||||
icon_state = "shuttle3"
|
||||
requires_power = 0
|
||||
|
||||
/area/airtunnel1/ // referenced in airtunnel.dm:759
|
||||
|
||||
/area/dummy/ // Referenced in engine.dm:261
|
||||
@@ -2475,7 +2470,6 @@ area/security/podbay
|
||||
// CENTCOM
|
||||
var/list/centcom_areas = list (
|
||||
/area/centcom,
|
||||
/area/shuttle/escape/centcom,
|
||||
/area/shuttle/escape_pod1/centcom,
|
||||
/area/shuttle/escape_pod2/centcom,
|
||||
/area/shuttle/escape_pod3/centcom,
|
||||
@@ -2488,7 +2482,7 @@ var/list/centcom_areas = list (
|
||||
//SPACE STATION 13
|
||||
var/list/the_station_areas = list (
|
||||
/area/shuttle/arrival,
|
||||
/area/shuttle/escape/station,
|
||||
/area/shuttle/escape,
|
||||
/area/shuttle/escape_pod1/station,
|
||||
/area/shuttle/escape_pod2/station,
|
||||
/area/shuttle/escape_pod3/station,
|
||||
|
||||
@@ -30,6 +30,36 @@
|
||||
|
||||
var/allow_spin = 1 //Set this to 1 for a _target_ that is being thrown at; if an atom has this set to 1 then atoms thrown AT it will not spin; currently used for the singularity. -Fox
|
||||
|
||||
/atom/proc/onCentcom()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return 0
|
||||
|
||||
if(T.z != ZLEVEL_CENTCOMM)//if not, don't bother
|
||||
return 0
|
||||
|
||||
//check for centcomm shuttles
|
||||
for(var/centcom_shuttle in list("emergency", "pod1", "pod2", "pod3", "pod4", "ferry"))
|
||||
var/obj/docking_port/mobile/M = shuttle_master.getShuttle(centcom_shuttle)
|
||||
if(T in M.areaInstance)
|
||||
return 1
|
||||
|
||||
//finally check for centcom itself
|
||||
return istype(T.loc,/area/centcom)
|
||||
|
||||
/atom/proc/onSyndieBase()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return 0
|
||||
|
||||
if(T.z != ZLEVEL_CENTCOMM)//if not, don't bother
|
||||
return 0
|
||||
|
||||
if(istype(T.loc, /area/shuttle/syndicate_elite) || istype(T.loc, /area/syndicate_mothership))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/atom/Destroy()
|
||||
if(reagents)
|
||||
qdel(reagents)
|
||||
|
||||
@@ -171,7 +171,10 @@
|
||||
var/escaped_on_pod_5 = 0
|
||||
var/escaped_on_shuttle = 0
|
||||
|
||||
var/list/area/escape_locations = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom)
|
||||
var/list/area/escape_locations = list(/area/shuttle/escape, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom)
|
||||
|
||||
if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME) //shuttle didn't get to centcom
|
||||
escape_locations -= /area/shuttle/escape
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
@@ -186,7 +189,7 @@
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations)
|
||||
escaped_total++
|
||||
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape/centcom)
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == shuttle_master.emergency.areaInstance.type && shuttle_master.emergency.mode >= SHUTTLE_ENDGAME)
|
||||
escaped_on_shuttle++
|
||||
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod1/centcom)
|
||||
|
||||
@@ -40,13 +40,16 @@
|
||||
if(player.stat != DEAD)
|
||||
var/turf/location = get_turf(player.loc)
|
||||
if(!location) continue
|
||||
switch(location.loc.type)
|
||||
if( /area/shuttle/escape/centcom )
|
||||
text += "<br><b><font size=2>[player.real_name] escaped on the emergency shuttle</font></b>"
|
||||
if( /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom )
|
||||
text += "<br><font size=2>[player.real_name] escaped in a life pod.</font>"
|
||||
else
|
||||
text += "<br><font size=1>[player.real_name] survived but is stranded without any hope of rescue.</font>"
|
||||
|
||||
if(location.loc.type == shuttle_master.emergency.areaInstance.type) //didn't work in the switch for some reason
|
||||
text += "<br><b><font size=2>[player.real_name] escaped on the emergency shuttle</font></b>"
|
||||
|
||||
else
|
||||
switch(location.loc.type)
|
||||
if( /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom )
|
||||
text += "<br><font size=2>[player.real_name] escaped in a life pod.</font>"
|
||||
else
|
||||
text += "<br><font size=1>[player.real_name] survived but is stranded without any hope of rescue.</font>"
|
||||
survivors++
|
||||
|
||||
if(survivors)
|
||||
|
||||
@@ -333,17 +333,26 @@ datum/objective/hijack
|
||||
check_completion()
|
||||
if(!owner.current || owner.current.stat)
|
||||
return 0
|
||||
if(!shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
if(!shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
|
||||
return 0
|
||||
if(issilicon(owner.current))
|
||||
return 0
|
||||
var/area/shuttle = locate(/area/shuttle/escape/centcom)
|
||||
|
||||
var/area/A = get_area(owner.current)
|
||||
if(shuttle_master.emergency.areaInstance != A)
|
||||
return 0
|
||||
|
||||
for(var/mob/living/player in player_list)
|
||||
if(istype(player, /mob/living/silicon) || istype(player, /mob/living/simple_animal) || player.mind.special_role && !player.mind.special_role == "Response Team")
|
||||
continue
|
||||
if (player.mind && (player.mind != owner))
|
||||
if(player.stat != DEAD) //they're not dead!
|
||||
if(get_turf(player) in shuttle)
|
||||
if(player.mind && player.mind != owner)
|
||||
if(player.stat != DEAD)
|
||||
if(issilicon(player)) //Borgs are technically dead anyways
|
||||
continue
|
||||
if(isanimal(player)) //Poly does not own the shuttle
|
||||
continue
|
||||
if(player.mind.special_role && !player.mind.special_role == "Response Team") //Is antag, and not ERT
|
||||
continue
|
||||
|
||||
if(get_area(player) == A)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -353,10 +362,10 @@ datum/objective/hijack
|
||||
check_completion()
|
||||
if(!owner.current)
|
||||
return 0
|
||||
if(!shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
if(!shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
|
||||
return 0
|
||||
|
||||
var/area/A = locate(/area/shuttle/escape/centcom)
|
||||
var/area/A = shuttle_master.emergency.areaInstance
|
||||
|
||||
for(var/mob/living/player in player_list) //Make sure nobody else is onboard
|
||||
if(player.mind && player.mind != owner)
|
||||
@@ -383,43 +392,29 @@ datum/objective/block
|
||||
check_completion()
|
||||
if(!istype(owner.current, /mob/living/silicon))
|
||||
return 0
|
||||
if(!shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
if(!shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
|
||||
return 0
|
||||
if(!owner.current)
|
||||
return 0
|
||||
var/area/shuttle = locate(/area/shuttle/escape/centcom)
|
||||
var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot)
|
||||
for(var/mob/living/player in player_list)
|
||||
if(player.type in protected_mobs) continue
|
||||
if (player.mind)
|
||||
if (player.stat != DEAD)
|
||||
if (get_turf(player) in shuttle)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
datum/objective/silence
|
||||
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
|
||||
|
||||
check_completion()
|
||||
if(!shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
return 0
|
||||
var/area/A = shuttle_master.emergency.areaInstance
|
||||
var/list/protected_mobs = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot)
|
||||
|
||||
for(var/mob/living/player in player_list)
|
||||
if(player == owner.current)
|
||||
if(player.type in protected_mobs)
|
||||
continue
|
||||
if(player.mind)
|
||||
if(player.stat != DEAD)
|
||||
var/turf/T = get_turf(player)
|
||||
if(!T) continue
|
||||
switch(T.loc.type)
|
||||
if(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom)
|
||||
return 0
|
||||
|
||||
if(player.mind && player.stat != DEAD)
|
||||
if(get_area(player) == A)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
datum/objective/escape
|
||||
explanation_text = "Escape on the shuttle or an escape pod alive and free."
|
||||
var/escape_areas = list(/area/shuttle/escape/centcom,
|
||||
var/escape_areas = list(/area/shuttle/escape,
|
||||
/area/shuttle/escape_pod1/centcom,
|
||||
/area/shuttle/escape_pod1/transit,
|
||||
/area/shuttle/escape_pod2/centcom,
|
||||
@@ -435,22 +430,23 @@ datum/objective/escape
|
||||
return 0
|
||||
if(isbrain(owner.current))
|
||||
return 0
|
||||
if(!shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
return 0
|
||||
if(!owner.current || owner.current.stat == DEAD)
|
||||
return 0
|
||||
if(owner.current.restrained())
|
||||
if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
|
||||
return 0
|
||||
var/turf/location = get_turf(owner.current.loc)
|
||||
var/turf/location = get_turf(owner.current)
|
||||
if(!location)
|
||||
return 0
|
||||
|
||||
var/area/check_area = get_area(location)
|
||||
if(check_area && check_area.type in escape_areas)
|
||||
return 1
|
||||
else
|
||||
if(istype(location, /turf/simulated/shuttle/floor4)) // Fails traitors if they are in the shuttle brig -- Polymorph
|
||||
return 0
|
||||
|
||||
if(location.onCentcom() || location.onSyndieBase())
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
datum/objective/escape/escape_with_identity
|
||||
var/target_real_name // Has to be stored because the target's real_name can change over the course of the round
|
||||
|
||||
|
||||
@@ -36,39 +36,42 @@
|
||||
score_clownabuse++
|
||||
|
||||
|
||||
for(var/mob/living/player in mob_list)
|
||||
if(player.client)
|
||||
if (player.stat != DEAD)
|
||||
var/turf/location = get_turf(player.loc)
|
||||
var/area/escape_zone = locate(/area/shuttle/escape/centcom)
|
||||
if(location in escape_zone)
|
||||
score_escapees++
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_ENDGAME)
|
||||
for(var/mob/living/player in mob_list)
|
||||
if(player.client)
|
||||
if (player.stat != DEAD)
|
||||
var/turf/location = get_turf(player.loc)
|
||||
var/area/escape_zone = locate(/area/shuttle/escape)
|
||||
if(location in escape_zone)
|
||||
score_escapees++
|
||||
|
||||
|
||||
|
||||
var/cash_score = 0
|
||||
var/dmg_score = 0
|
||||
for(var/mob/living/carbon/human/E in mob_list)
|
||||
cash_score = 0
|
||||
dmg_score = 0
|
||||
var/turf/location = get_turf(E.loc)
|
||||
var/area/escape_zone = locate(/area/shuttle/escape/centcom)
|
||||
|
||||
if(E.stat != DEAD && location in escape_zone) // Escapee Scores
|
||||
cash_score = get_score_container_worth(E)
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_ENDGAME)
|
||||
for(var/mob/living/carbon/human/E in mob_list)
|
||||
cash_score = 0
|
||||
dmg_score = 0
|
||||
var/turf/location = get_turf(E.loc)
|
||||
var/area/escape_zone = shuttle_master.emergency.areaInstance
|
||||
|
||||
if(cash_score > score_richestcash)
|
||||
score_richestcash = cash_score
|
||||
score_richestname = E.real_name
|
||||
score_richestjob = E.job
|
||||
score_richestkey = E.key
|
||||
if(E.stat != DEAD && location in escape_zone) // Escapee Scores
|
||||
cash_score = get_score_container_worth(E)
|
||||
|
||||
dmg_score = E.bruteloss + E.fireloss + E.toxloss + E.oxyloss
|
||||
if(dmg_score > score_dmgestdamage)
|
||||
score_dmgestdamage = dmg_score
|
||||
score_dmgestname = E.real_name
|
||||
score_dmgestjob = E.job
|
||||
score_dmgestkey = E.key
|
||||
if(cash_score > score_richestcash)
|
||||
score_richestcash = cash_score
|
||||
score_richestname = E.real_name
|
||||
score_richestjob = E.job
|
||||
score_richestkey = E.key
|
||||
|
||||
dmg_score = E.bruteloss + E.fireloss + E.toxloss + E.oxyloss
|
||||
if(dmg_score > score_dmgestdamage)
|
||||
score_dmgestdamage = dmg_score
|
||||
score_dmgestname = E.real_name
|
||||
score_dmgestjob = E.job
|
||||
score_dmgestkey = E.key
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
ticker.mode.set_scoreboard_gvars()
|
||||
|
||||
@@ -74,6 +74,28 @@
|
||||
shuttle_master.emergency.setTimer(100)
|
||||
emagged = 1
|
||||
|
||||
/obj/machinery/computer/supplycomp
|
||||
name = "supply shuttle console"
|
||||
desc = "Used to order supplies."
|
||||
icon_screen = "supply"
|
||||
req_access = list(access_cargo)
|
||||
circuit = /obj/item/weapon/circuitboard/supplycomp
|
||||
var/temp = null
|
||||
var/reqtime = 0 //Cooldown for requisitions - Quarxink
|
||||
var/hacked = 0
|
||||
var/can_order_contraband = 0
|
||||
var/last_viewed_group = "categories"
|
||||
|
||||
|
||||
/obj/machinery/computer/ordercomp
|
||||
name = "supply ordering console"
|
||||
desc = "Used to order supplies from cargo staff."
|
||||
icon_screen = "request"
|
||||
circuit = /obj/item/weapon/circuitboard/ordercomp
|
||||
var/temp = null
|
||||
var/reqtime = 0 //Cooldown for requisitions - Quarxink
|
||||
var/last_viewed_group = "categories"
|
||||
|
||||
/obj/machinery/computer/shuttle/white_ship
|
||||
name = "White Ship Console"
|
||||
desc = "Used to control the White Ship."
|
||||
|
||||
@@ -174,16 +174,10 @@
|
||||
return "00:00"
|
||||
|
||||
/obj/machinery/status_display/proc/get_supply_shuttle_timer()
|
||||
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
|
||||
if (!shuttle)
|
||||
return "Error"
|
||||
|
||||
if(shuttle.has_arrive_time())
|
||||
var/timeleft = round((shuttle.arrive_time - world.time) / 10,1)
|
||||
if(timeleft < 0)
|
||||
return "Late"
|
||||
var/timeleft = shuttle_master.supply.timeLeft()
|
||||
if(timeleft > 0)
|
||||
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
return ""
|
||||
return "00:00"
|
||||
|
||||
/obj/machinery/status_display/proc/remove_display()
|
||||
if(overlays.len)
|
||||
|
||||
@@ -4,27 +4,19 @@
|
||||
|
||||
/obj/machinery/status_display/supply_display/update()
|
||||
if(!..() && mode == STATUS_DISPLAY_CUSTOM)
|
||||
message1 = "SUPPLY"
|
||||
message2 = ""
|
||||
|
||||
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
|
||||
if (!shuttle)
|
||||
message2 = "Error"
|
||||
else if(shuttle.has_arrive_time())
|
||||
message2 = get_supply_shuttle_timer()
|
||||
if(lentext(message2) > CHARS_PER_LINE)
|
||||
message2 = "Error"
|
||||
else if (shuttle.is_launching())
|
||||
if (shuttle.at_station())
|
||||
message2 = "Launch"
|
||||
else
|
||||
message2 = "ETA"
|
||||
var/line1
|
||||
var/line2
|
||||
if(shuttle_master.supply.mode == SHUTTLE_IDLE)
|
||||
if(shuttle_master.supply.z == ZLEVEL_STATION)
|
||||
line1 = "CARGO"
|
||||
line2 = "Docked"
|
||||
else
|
||||
if(shuttle.at_station())
|
||||
message2 = "Docked"
|
||||
else
|
||||
message1 = ""
|
||||
update_display(message1, message2)
|
||||
line1 = "CARGO"
|
||||
line2 = get_supply_shuttle_timer()
|
||||
if(lentext(line2) > CHARS_PER_LINE)
|
||||
line2 = "Error"
|
||||
|
||||
update_display(line1, line2)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -423,17 +423,23 @@
|
||||
|
||||
if(mode==47)
|
||||
var/supplyData[0]
|
||||
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
|
||||
if (shuttle)
|
||||
supplyData["shuttle_moving"] = shuttle.has_arrive_time()
|
||||
supplyData["shuttle_eta"] = shuttle.eta_minutes()
|
||||
supplyData["shuttle_loc"] = shuttle.at_station() ? "Station" : "Dock"
|
||||
|
||||
if(shuttle_master.supply.mode == SHUTTLE_CALL)
|
||||
supplyData["shuttle_moving"] = 1
|
||||
|
||||
if(shuttle_master.supply.z != ZLEVEL_STATION)
|
||||
supplyData["shuttle_loc"] = "station"
|
||||
else
|
||||
supplyData["shuttle_loc"] = "centcom"
|
||||
|
||||
supplyData["shuttle_time"] = "([shuttle_master.supply.timeLeft(600)] Mins)"
|
||||
|
||||
var/supplyOrderCount = 0
|
||||
var/supplyOrderData[0]
|
||||
for(var/S in supply_controller.shoppinglist)
|
||||
for(var/S in shuttle_master.shoppinglist)
|
||||
var/datum/supply_order/SO = S
|
||||
|
||||
supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
|
||||
|
||||
if(!supplyOrderData.len)
|
||||
supplyOrderData[++supplyOrderData.len] = list("Number" = null, "Name" = null, "OrderedBy"=null)
|
||||
|
||||
@@ -442,10 +448,11 @@
|
||||
|
||||
var/requestCount = 0
|
||||
var/requestData[0]
|
||||
for(var/S in supply_controller.requestlist)
|
||||
for(var/S in shuttle_master.requestlist)
|
||||
var/datum/supply_order/SO = S
|
||||
requestCount++
|
||||
requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
|
||||
|
||||
if(!requestData.len)
|
||||
requestData[++requestData.len] = list("Number" = null, "Name" = null, "orderedBy" = null, "Comment" = null)
|
||||
|
||||
|
||||
@@ -1,764 +0,0 @@
|
||||
//Config stuff
|
||||
#define SUPPLY_DOCKZ 2 //Z-level of the Dock.
|
||||
#define SUPPLY_STATIONZ 1 //Z-level of the Station.
|
||||
#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 COMP_SCREEN_WIDTH 600 //width of supply computer interaction window
|
||||
#define COMP_SCREEN_HEIGHT 555 //height of supply computer interaction window
|
||||
|
||||
var/datum/controller/supply/supply_controller = new()
|
||||
|
||||
var/list/mechtoys = list(
|
||||
/obj/item/toy/prize/ripley,
|
||||
/obj/item/toy/prize/fireripley,
|
||||
/obj/item/toy/prize/deathripley,
|
||||
/obj/item/toy/prize/gygax,
|
||||
/obj/item/toy/prize/durand,
|
||||
/obj/item/toy/prize/honk,
|
||||
/obj/item/toy/prize/marauder,
|
||||
/obj/item/toy/prize/seraph,
|
||||
/obj/item/toy/prize/mauler,
|
||||
/obj/item/toy/prize/odysseus,
|
||||
/obj/item/toy/prize/phazon
|
||||
)
|
||||
|
||||
/area/supply/station
|
||||
name = "Supply Shuttle"
|
||||
icon_state = "shuttle3"
|
||||
requires_power = 0
|
||||
|
||||
/area/supply/dock
|
||||
name = "Supply Shuttle"
|
||||
icon_state = "shuttle3"
|
||||
requires_power = 0
|
||||
|
||||
//SUPPLY PACKS MOVED TO /code/defines/obj/supplypacks.dm
|
||||
|
||||
/obj/structure/plasticflaps //HOW DO YOU CALL THOSE THINGS ANYWAY
|
||||
name = "\improper plastic flaps"
|
||||
desc = "Completely impassable - or are they?"
|
||||
icon = 'icons/obj/stationobjs.dmi' //Change this.
|
||||
icon_state = "plasticflaps"
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 4
|
||||
var/list/mobs_can_pass = list(
|
||||
/mob/living/carbon/slime,
|
||||
/mob/living/simple_animal/mouse,
|
||||
/mob/living/silicon/robot/drone
|
||||
)
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/stool/bed/B = A
|
||||
if (istype(A, /obj/structure/stool/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/vehicle)) //no vehicles
|
||||
return 0
|
||||
|
||||
var/mob/living/M = A
|
||||
if(istype(M))
|
||||
if(M.lying)
|
||||
return ..()
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(A, mob_type))
|
||||
return ..()
|
||||
if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.is_small)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/plasticflaps/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
if (3)
|
||||
if (prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
||||
name = "\improper Airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
|
||||
New()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
Destroy()
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
CanAtmosPass(turf/T)
|
||||
return 0
|
||||
|
||||
/obj/machinery/computer/supplycomp
|
||||
name = "Supply Shuttle Console"
|
||||
desc = "Used to order supplies."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_screen = "supply"
|
||||
req_access = list(access_cargo)
|
||||
circuit = /obj/item/weapon/circuitboard/supplycomp
|
||||
var/temp = null
|
||||
var/reqtime = 0 //Cooldown for requisitions - Quarxink
|
||||
var/hacked = 0
|
||||
var/can_order_contraband = 0
|
||||
var/last_viewed_group = "categories"
|
||||
var/datum/supply_packs/content_pack
|
||||
|
||||
/obj/machinery/computer/ordercomp
|
||||
name = "Supply Ordering Console"
|
||||
desc = "Used to order supplies from cargo staff."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_screen = "request"
|
||||
circuit = /obj/item/weapon/circuitboard/ordercomp
|
||||
var/reqtime = 0 //Cooldown for requisitions - Quarxink
|
||||
var/last_viewed_group = "categories"
|
||||
var/datum/supply_packs/content_pack
|
||||
|
||||
/*
|
||||
/obj/effect/marker/supplymarker
|
||||
icon_state = "X"
|
||||
icon = 'icons/misc/mark.dmi'
|
||||
name = "X"
|
||||
invisibility = 101
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
*/
|
||||
|
||||
/datum/supply_order
|
||||
var/ordernum
|
||||
var/datum/supply_packs/object = null
|
||||
var/orderedby = null
|
||||
var/orderedrank = null
|
||||
var/comment = null
|
||||
|
||||
/datum/controller/supply
|
||||
processing = 1
|
||||
//processing_interval = 300
|
||||
//supply points
|
||||
var/points = 50
|
||||
var/points_per_process = 0.05
|
||||
var/points_per_slip = 2
|
||||
var/points_per_crate = 5
|
||||
var/points_per_plasma = 5
|
||||
var/points_per_intel = 250 //points gained per intel returned
|
||||
var/points_per_design = 25 //points gained per max reliability research design returned (only for initilally unreliable designs)
|
||||
|
||||
var/list/discoveredPlants = list() //Typepaths for unusual plants we've already sent CentComm, associated with their potencies
|
||||
var/list/techLevels = list()
|
||||
var/list/researchDesigns = list()
|
||||
//control
|
||||
var/ordernum
|
||||
var/list/shoppinglist = list()
|
||||
var/list/requestlist = list()
|
||||
var/list/supply_packs = list()
|
||||
//shuttle movement
|
||||
var/movetime = 1200
|
||||
var/datum/shuttle/ferry/supply/shuttle
|
||||
|
||||
/datum/controller/supply/New()
|
||||
ordernum = rand(1,9000)
|
||||
|
||||
for(var/typepath in subtypesof(/datum/supply_packs))
|
||||
var/datum/supply_packs/P = new typepath()
|
||||
if(P.name == "HEADER") continue
|
||||
supply_packs[P.name] = P
|
||||
|
||||
//Supply shuttle ticker - handles supply point regeneration and shuttle travelling between centcomm and the station
|
||||
/datum/controller/supply/proc/process()
|
||||
points += points_per_process
|
||||
|
||||
//To stop things being sent to centcomm which should not be sent to centcomm. Recursively checks for these types.
|
||||
/datum/controller/supply/proc/forbidden_atoms_check(atom/A)
|
||||
if(istype(A,/mob/living))
|
||||
return 1
|
||||
if(istype(A,/obj/item/weapon/disk/nuclear))
|
||||
return 1
|
||||
if(istype(A,/obj/machinery/nuclearbomb))
|
||||
return 1
|
||||
if(istype(A,/obj/item/device/radio/beacon))
|
||||
return 1
|
||||
|
||||
for(var/i=1, i<=A.contents.len, i++)
|
||||
var/atom/B = A.contents[i]
|
||||
if(.(B))
|
||||
return 1
|
||||
|
||||
//Sellin
|
||||
/datum/controller/supply/proc/sell()
|
||||
var/area/area_shuttle = shuttle.get_location_area()
|
||||
if(!area_shuttle) return
|
||||
|
||||
var/plasma_count = 0
|
||||
var/intel_count = 0
|
||||
|
||||
for(var/atom/movable/MA in area_shuttle)
|
||||
if(MA.anchored) continue
|
||||
|
||||
// Must be in a crate!
|
||||
if(istype(MA,/obj/structure/closet/crate))
|
||||
callHook("sell_crate", list(MA, area_shuttle)) // check this
|
||||
|
||||
points += points_per_crate
|
||||
var/find_slip = 1
|
||||
|
||||
for(var/atom in MA)
|
||||
// Sell manifests
|
||||
var/atom/A = atom
|
||||
if(find_slip && istype(A,/obj/item/weapon/paper/manifest))
|
||||
var/obj/item/weapon/paper/slip = A
|
||||
if(slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense
|
||||
points += points_per_slip
|
||||
find_slip = 0
|
||||
|
||||
// Sell plasma
|
||||
if(istype(A, /obj/item/stack/sheet/mineral/plasma))
|
||||
var/obj/item/stack/sheet/mineral/plasma/P = A
|
||||
plasma_count += P.amount
|
||||
|
||||
// Sell syndicate intel
|
||||
if(istype(A, /obj/item/documents/syndicate))
|
||||
++intel_count
|
||||
|
||||
// Sell tech levels
|
||||
if(istype(A, /obj/item/weapon/disk/tech_disk))
|
||||
var/obj/item/weapon/disk/tech_disk/disk = A
|
||||
if(!disk.stored) continue
|
||||
var/datum/tech/tech = disk.stored
|
||||
|
||||
var/cost = tech.getCost(techLevels[tech.id])
|
||||
if(cost)
|
||||
techLevels[tech.id] = tech.level
|
||||
points += cost
|
||||
|
||||
// Sell max reliablity designs
|
||||
if(istype(A, /obj/item/weapon/disk/design_disk))
|
||||
var/obj/item/weapon/disk/design_disk/disk = A
|
||||
if(!disk.blueprint) continue
|
||||
var/datum/design/design = disk.blueprint
|
||||
if(design.id in researchDesigns) continue
|
||||
|
||||
if(initial(design.reliability) < 100 && design.reliability >= 100)
|
||||
// Maxed out reliability designs only.
|
||||
points += points_per_design
|
||||
researchDesigns += design.id
|
||||
|
||||
// Sell exotic plants
|
||||
if(istype(A, /obj/item/seeds))
|
||||
var/obj/item/seeds/S = A
|
||||
if(discoveredPlants[S.type]) // This species has already been sent to CentComm
|
||||
var/potDiff = S.seed.get_trait(TRAIT_POTENCY) - discoveredPlants[S.type] // Compare it to the previous best
|
||||
if(potDiff > 0) // This sample is better
|
||||
discoveredPlants[S.type] = S.seed.get_trait(TRAIT_POTENCY)
|
||||
points += potDiff
|
||||
else // This is a new discovery!
|
||||
discoveredPlants[S.type] = S.seed.get_trait(TRAIT_POTENCY)
|
||||
points += S.seed.get_trait(TRAIT_RARITY) // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later
|
||||
|
||||
// If you send something in a crate, centcom's keeping it! - fixes secure crates being sent to centom to open them
|
||||
qdel(A)
|
||||
qdel(MA)
|
||||
|
||||
if(plasma_count)
|
||||
points += plasma_count * points_per_plasma
|
||||
|
||||
if(intel_count)
|
||||
points += intel_count * points_per_intel
|
||||
|
||||
//Buyin
|
||||
/datum/controller/supply/proc/buy()
|
||||
if(!shoppinglist.len) return
|
||||
|
||||
var/area/area_shuttle = shuttle.get_location_area()
|
||||
if(!area_shuttle) return
|
||||
|
||||
var/list/clear_turfs = list()
|
||||
|
||||
for(var/turf/T in area_shuttle)
|
||||
if(T.density) continue
|
||||
var/contcount
|
||||
for(var/atom/A in T.contents)
|
||||
if(istype(A,/atom/movable/lighting_overlay))
|
||||
continue
|
||||
if(!A.simulated)
|
||||
continue
|
||||
contcount++
|
||||
if(contcount) continue
|
||||
clear_turfs += T
|
||||
|
||||
for(var/S in shoppinglist)
|
||||
if(!clear_turfs.len) break
|
||||
var/i = rand(1,clear_turfs.len)
|
||||
var/turf/pickedloc = clear_turfs[i]
|
||||
clear_turfs.Cut(i,i+1)
|
||||
|
||||
var/datum/supply_order/SO = S
|
||||
var/datum/supply_packs/SP = SO.object
|
||||
|
||||
var/atom/A = new SP.containertype(pickedloc)
|
||||
A.name = "[SP.containername]"
|
||||
|
||||
//supply manifest generation begin
|
||||
var/obj/item/weapon/paper/manifest/slip = new /obj/item/weapon/paper/manifest(A)
|
||||
slip.name = "Shipping Manifest - '[SP.name]' for [SO.orderedby]"
|
||||
slip.info = "<h3>[command_name()] Shipping Manifest</h3><hr><br>"
|
||||
slip.info +="Order: #[SO.ordernum]<br>"
|
||||
slip.info +="Destination: [station_name]<br>"
|
||||
slip.info +="Requested By: [SO.orderedby]<br>"
|
||||
slip.info +="Rank: [SO.orderedrank]<br>"
|
||||
slip.info +="Reason: [SO.comment]<br>"
|
||||
slip.info +="Supply Crate Type: [SP.name]<br>"
|
||||
slip.info +="Access Restriction: [replacetext(get_access_desc(SP.access))]<br>"
|
||||
slip.info +="[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(istype(A, /obj/structure/closet/crate))
|
||||
var/obj/structure/closet/crate/C = A
|
||||
if(SP.access)
|
||||
C.req_access = list()
|
||||
C.req_access += text2num(SP.access)
|
||||
|
||||
if(SP.announce_beacons)
|
||||
C.announce_beacons = SP.announce_beacons
|
||||
|
||||
var/list/contains
|
||||
if(istype(SP,/datum/supply_packs/misc/randomised))
|
||||
var/datum/supply_packs/misc/randomised/SPR = SP
|
||||
contains = list()
|
||||
if(SPR.contains.len)
|
||||
for(var/j=1,j<=SPR.num_contained,j++)
|
||||
contains += pick(SPR.contains)
|
||||
else
|
||||
contains = SP.contains
|
||||
|
||||
for(var/typepath in contains)
|
||||
if(!typepath) continue
|
||||
var/atom/B2 = new typepath(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>"
|
||||
if(!SP.contraband)
|
||||
if(istype(A, /obj/structure/closet/crate))
|
||||
var/obj/structure/closet/crate/CR = A
|
||||
CR.manifest = slip
|
||||
CR.update_icon()
|
||||
if(istype(A, /obj/structure/largecrate))
|
||||
var/obj/structure/largecrate/LC = A
|
||||
LC.manifest = slip
|
||||
LC.update_icon()
|
||||
else slip.loc = null //we are out of blanks for Form #44-D Ordering Illicit Drugs.
|
||||
shoppinglist.Cut()
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/manifest
|
||||
name = "Supply Manifest"
|
||||
|
||||
/obj/machinery/computer/ordercomp/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/ordercomp/attack_hand(var/mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/ordercomp/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
// data to send to ui
|
||||
var/data[0]
|
||||
data["last_viewed_group"] = last_viewed_group
|
||||
|
||||
var/category_list[0]
|
||||
for(var/category in all_supply_groups)
|
||||
category_list.Add(list(list("name" = get_supply_group_name(category), "category" = category)))
|
||||
data["categories"] = category_list
|
||||
|
||||
var/cat = text2num(last_viewed_group)
|
||||
var/packs_list[0]
|
||||
for(var/set_name in supply_controller.supply_packs)
|
||||
var/datum/supply_packs/pack = supply_controller.supply_packs[set_name]
|
||||
if(!pack.contraband && !pack.hidden && 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))))
|
||||
|
||||
data["supply_packs"] = packs_list
|
||||
if(content_pack)
|
||||
var/pack_name = sanitize(content_pack.name)
|
||||
data["contents_name"] = pack_name
|
||||
data["contents"] = content_pack.manifest
|
||||
data["contents_access"] = get_access_desc(content_pack.access)
|
||||
|
||||
var/requests_list[0]
|
||||
for(var/set_name in supply_controller.requestlist)
|
||||
var/datum/supply_order/SO = set_name
|
||||
if(SO)
|
||||
// Check if the usr owns the request, so they can cancel requests
|
||||
var/obj/item/weapon/card/id/I = usr.get_id_card()
|
||||
var/owned = 0
|
||||
if(I && SO.orderedby == I.registered_name)
|
||||
owned = 1
|
||||
requests_list.Add(list(list("ordernum" = SO.ordernum, "supply_type" = SO.object.name, "orderedby" = SO.orderedby, "owned" = owned, "command1" = list("rreq" = SO.ordernum))))
|
||||
data["requests"] = requests_list
|
||||
|
||||
var/orders_list[0]
|
||||
for(var/set_name in supply_controller.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"] = supply_controller.points
|
||||
data["send"] = list("send" = 1)
|
||||
|
||||
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
|
||||
data["moving"] = shuttle.has_arrive_time()
|
||||
data["at_station"] = shuttle.at_station()
|
||||
data["timeleft"] = shuttle.eta_minutes()
|
||||
if(shuttle.docking_controller)
|
||||
data["docked"] = capitalize(shuttle.docking_controller.get_docking_status())
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "order_console.tmpl", name, COMP_SCREEN_WIDTH+10, COMP_SCREEN_HEIGHT) //plus 10 because the default is *just* small enough to cause ugly wrapping effects
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/ordercomp/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (href_list["doorder"])
|
||||
if(world.time < reqtime)
|
||||
visible_message("<b>[src]</b>'s monitor flashes, \"[world.time - reqtime] seconds remaining until another requisition form may be printed.\"")
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
var/index = copytext(href_list["doorder"], 1, lentext(href_list["doorder"])) //text2num(copytext(href_list["doorder"], 1))
|
||||
var/multi = text2num(copytext(href_list["doorder"], -1))
|
||||
if(!isnum(multi))
|
||||
return
|
||||
var/datum/supply_packs/P = supply_controller.supply_packs[index]
|
||||
if(!istype(P))
|
||||
return
|
||||
var/crates = 1
|
||||
if(multi)
|
||||
var/num_input = input(usr, "Amount:", "How many crates?", "") as num
|
||||
crates = Clamp(round(text2num(num_input)), 1, 20)
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
|
||||
if(world.time > timeout || !reason || ..())
|
||||
return
|
||||
|
||||
var/idname = "*None Provided*"
|
||||
var/idrank = "*None Provided*"
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
idname = H.get_authentification_name()
|
||||
idrank = H.get_assignment()
|
||||
else if(issilicon(usr))
|
||||
idname = usr.real_name
|
||||
|
||||
supply_controller.ordernum++
|
||||
var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(loc)
|
||||
reqform.name = "Requisition Form - [crates] '[P.name]' for [idname]"
|
||||
reqform.info += "<h3>[station_name] Supply Requisition Form</h3><hr>"
|
||||
reqform.info += "INDEX: #[supply_controller.ordernum]<br>"
|
||||
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 += "NUMBER OF CRATES: [crates]<br>"
|
||||
reqform.info += "ACCESS RESTRICTION: [replacetext(get_access_desc(P.access))]<br>"
|
||||
reqform.info += "CONTENTS:<br>"
|
||||
reqform.info += P.manifest
|
||||
reqform.info += "<hr>"
|
||||
reqform.info += "STAMP BELOW TO APPROVE THIS REQUISITION:<br>"
|
||||
|
||||
reqform.update_icon() //Fix for appearing blank when printed.
|
||||
reqtime = (world.time + 5) % 1e5
|
||||
|
||||
//make our supply_order datums
|
||||
for(var/i = 1; i <= crates; i++)
|
||||
supply_controller.ordernum++
|
||||
var/datum/supply_order/O = new /datum/supply_order()
|
||||
O.ordernum = supply_controller.ordernum
|
||||
O.object = P
|
||||
O.orderedby = idname
|
||||
O.orderedrank = idrank
|
||||
O.comment = reason
|
||||
supply_controller.requestlist += O
|
||||
|
||||
else if (href_list["rreq"])
|
||||
var/ordernum = text2num(href_list["rreq"])
|
||||
var/obj/item/weapon/card/id/I = usr.get_id_card()
|
||||
for(var/i=1, i<=supply_controller.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = supply_controller.requestlist[i]
|
||||
if(SO.ordernum == ordernum && (I && SO.orderedby == I.registered_name))
|
||||
supply_controller.requestlist.Cut(i,i+1)
|
||||
break
|
||||
|
||||
else if (href_list["last_viewed_group"])
|
||||
content_pack = null
|
||||
last_viewed_group = text2num(href_list["last_viewed_group"])
|
||||
|
||||
else if (href_list["contents"])
|
||||
var/topic = href_list["contents"]
|
||||
if(topic == 1)
|
||||
content_pack = null
|
||||
else
|
||||
var/datum/supply_packs/P = supply_controller.supply_packs[topic]
|
||||
content_pack = P
|
||||
|
||||
add_fingerprint(usr)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/supplycomp/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/supplycomp/attack_hand(var/mob/user as mob)
|
||||
if(!allowed(user) && !isobserver(user))
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
return
|
||||
|
||||
post_signal("supply")
|
||||
ui_interact(user)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/supplycomp/emag_act(user as mob)
|
||||
if(!hacked)
|
||||
user << "<span class='notice'>Special supplies unlocked.</span>"
|
||||
hacked = 1
|
||||
return
|
||||
|
||||
/obj/machinery/computer/supplycomp/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
// data to send to ui
|
||||
var/data[0]
|
||||
data["last_viewed_group"] = last_viewed_group
|
||||
|
||||
var/category_list[0]
|
||||
for(var/category in all_supply_groups)
|
||||
category_list.Add(list(list("name" = get_supply_group_name(category), "category" = category)))
|
||||
data["categories"] = category_list
|
||||
|
||||
var/cat = text2num(last_viewed_group)
|
||||
var/packs_list[0]
|
||||
for(var/set_name in supply_controller.supply_packs)
|
||||
var/datum/supply_packs/pack = supply_controller.supply_packs[set_name]
|
||||
if((pack.hidden && src.hacked) || (pack.contraband && src.can_order_contraband) || (!pack.contraband && !pack.hidden))
|
||||
if(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))))
|
||||
|
||||
data["supply_packs"] = packs_list
|
||||
if(content_pack)
|
||||
var/pack_name = sanitize(content_pack.name)
|
||||
data["contents_name"] = pack_name
|
||||
data["contents"] = content_pack.manifest
|
||||
data["contents_access"] = get_access_desc(content_pack.access)
|
||||
|
||||
var/requests_list[0]
|
||||
for(var/set_name in supply_controller.requestlist)
|
||||
var/datum/supply_order/SO = set_name
|
||||
if(SO)
|
||||
if(!SO.comment)
|
||||
SO.comment = "No comment."
|
||||
requests_list.Add(list(list("ordernum" = SO.ordernum, "supply_type" = SO.object.name, "orderedby" = SO.orderedby, "comment" = SO.comment, "command1" = list("confirmorder" = SO.ordernum), "command2" = list("rreq" = SO.ordernum))))
|
||||
data["requests"] = requests_list
|
||||
|
||||
var/orders_list[0]
|
||||
for(var/set_name in supply_controller.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["points"] = supply_controller.points
|
||||
data["send"] = list("send" = 1)
|
||||
|
||||
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
|
||||
data["moving"] = shuttle.has_arrive_time()
|
||||
data["at_station"] = shuttle.at_station()
|
||||
data["timeleft"] = shuttle.eta_minutes()
|
||||
data["can_launch"] = shuttle.can_launch()
|
||||
data["can_force"] = shuttle.can_force()
|
||||
data["can_cancel"] = shuttle.can_cancel()
|
||||
if(shuttle.docking_controller)
|
||||
data["docked"] = capitalize(shuttle.docking_controller.get_docking_status())
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "supply_console.tmpl", name, COMP_SCREEN_WIDTH+10, COMP_SCREEN_HEIGHT) //plus 10 because the default is *just* small enough to cause ugly wrapping effects
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/supplycomp/proc/is_authorized(user)
|
||||
if(allowed(user))
|
||||
return 1
|
||||
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/obj/machinery/computer/supplycomp/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(!is_authorized(usr))
|
||||
return 1
|
||||
|
||||
if(!supply_controller)
|
||||
log_to_dd("## ERROR: The supply_controller controller datum is missing somehow.")
|
||||
return 1
|
||||
|
||||
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
|
||||
if(!shuttle)
|
||||
log_to_dd("## ERROR: The supply or shuttle datum is missing somehow.")
|
||||
return 1
|
||||
|
||||
if(href_list["send"])
|
||||
if(shuttle.at_station())
|
||||
if (shuttle.forbidden_atoms_check())
|
||||
usr = "<span class='warning'>For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.</span>"
|
||||
else
|
||||
shuttle.launch(src)
|
||||
else
|
||||
shuttle.launch(src)
|
||||
post_signal("supply")
|
||||
|
||||
if (href_list["force_send"])
|
||||
shuttle.force_launch(src)
|
||||
|
||||
if (href_list["cancel_send"])
|
||||
shuttle.cancel_launch(src)
|
||||
|
||||
else if (href_list["doorder"])
|
||||
if(world.time < reqtime)
|
||||
visible_message("<b>[src]</b>'s monitor flashes, \"[world.time - reqtime] seconds remaining until another requisition form may be printed.\"")
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
var/index = copytext(href_list["doorder"], 1, lentext(href_list["doorder"])) //text2num(copytext(href_list["doorder"], 1))
|
||||
var/multi = text2num(copytext(href_list["doorder"], -1))
|
||||
if(!isnum(multi))
|
||||
return
|
||||
var/datum/supply_packs/P = supply_controller.supply_packs[index]
|
||||
if(!istype(P))
|
||||
return
|
||||
var/crates = 1
|
||||
if(multi)
|
||||
var/num_input = input(usr, "Amount:", "How many crates?", "") as num
|
||||
crates = Clamp(round(text2num(num_input)), 1, 20)
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
|
||||
if(world.time > timeout || !reason || ..())
|
||||
return
|
||||
|
||||
var/idname = "*None Provided*"
|
||||
var/idrank = "*None Provided*"
|
||||
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
idname = H.get_authentification_name()
|
||||
idrank = H.get_assignment()
|
||||
else if(issilicon(usr))
|
||||
idname = usr.real_name
|
||||
|
||||
supply_controller.ordernum++
|
||||
var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(loc)
|
||||
reqform.name = "Requisition Form - [crates] '[P.name]' for [idname]"
|
||||
reqform.info += "<h3>[station_name] Supply Requisition Form</h3><hr>"
|
||||
reqform.info += "INDEX: #[supply_controller.ordernum]<br>"
|
||||
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 += "NUMBER OF CRATES: [crates]<br>"
|
||||
reqform.info += "ACCESS RESTRICTION: [replacetext(get_access_desc(P.access))]<br>"
|
||||
reqform.info += "CONTENTS:<br>"
|
||||
reqform.info += P.manifest
|
||||
reqform.info += "<hr>"
|
||||
reqform.info += "STAMP BELOW TO APPROVE THIS REQUISITION:<br>"
|
||||
|
||||
reqform.update_icon() //Fix for appearing blank when printed.
|
||||
reqtime = (world.time + 5) % 1e5
|
||||
|
||||
//make our supply_order datum
|
||||
for(var/i = 1; i <= crates; i++)
|
||||
supply_controller.ordernum++
|
||||
var/datum/supply_order/O = new /datum/supply_order()
|
||||
O.ordernum = supply_controller.ordernum
|
||||
O.object = P
|
||||
O.orderedby = idname
|
||||
O.orderedrank = idrank
|
||||
O.comment = reason
|
||||
supply_controller.requestlist += O
|
||||
|
||||
else if(href_list["confirmorder"])
|
||||
//Find the correct supply_order datum
|
||||
var/ordernum = text2num(href_list["confirmorder"])
|
||||
var/datum/supply_order/O
|
||||
var/datum/supply_packs/P
|
||||
for(var/i=1, i<=supply_controller.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = supply_controller.requestlist[i]
|
||||
if(SO.ordernum == ordernum)
|
||||
O = SO
|
||||
P = O.object
|
||||
if(supply_controller.points >= P.cost)
|
||||
supply_controller.requestlist.Cut(i,i+1)
|
||||
supply_controller.points -= P.cost
|
||||
supply_controller.shoppinglist += O
|
||||
else
|
||||
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<=supply_controller.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = supply_controller.requestlist[i]
|
||||
if(SO.ordernum == ordernum)
|
||||
supply_controller.requestlist.Cut(i,i+1)
|
||||
break
|
||||
|
||||
else if (href_list["last_viewed_group"])
|
||||
content_pack = null
|
||||
last_viewed_group = text2num(href_list["last_viewed_group"])
|
||||
|
||||
else if (href_list["contents"])
|
||||
var/topic = href_list["contents"]
|
||||
if(topic == 1)
|
||||
content_pack = null
|
||||
else
|
||||
var/datum/supply_packs/P = supply_controller.supply_packs[topic]
|
||||
content_pack = P
|
||||
|
||||
add_fingerprint(usr)
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/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)
|
||||
@@ -181,6 +181,37 @@
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
|
||||
|
||||
//sub-type to be used for interior shuttle walls
|
||||
//won't get an underlay of the destination turf on shuttle move
|
||||
/turf/simulated/shuttle/wall/interior/copyTurf(turf/T)
|
||||
if(T.type != type)
|
||||
T.ChangeTurf(type)
|
||||
if(underlays.len)
|
||||
T.underlays = underlays
|
||||
if(T.icon_state != icon_state)
|
||||
T.icon_state = icon_state
|
||||
if(T.icon != icon)
|
||||
T.icon = icon
|
||||
if(T.color != color)
|
||||
T.color = color
|
||||
if(T.dir != dir)
|
||||
T.dir = dir
|
||||
T.transform = transform
|
||||
return T
|
||||
|
||||
/turf/simulated/shuttle/wall/copyTurf(turf/T)
|
||||
. = ..()
|
||||
T.transform = transform
|
||||
|
||||
//why don't shuttle walls habe smoothwall? now i gotta do rotation the dirty way
|
||||
/turf/simulated/shuttle/wall/shuttleRotate(rotation)
|
||||
var/matrix/M = transform
|
||||
M.Turn(rotation)
|
||||
transform = M
|
||||
|
||||
|
||||
|
||||
/turf/simulated/shuttle/floor
|
||||
name = "floor"
|
||||
icon_state = "floor"
|
||||
|
||||
@@ -132,8 +132,7 @@ var/list/event_last_fired = list()
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 100)
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50))
|
||||
)
|
||||
|
||||
/datum/event_container/moderate
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
/area/solar,
|
||||
/area/holodeck,
|
||||
/area/shuttle/arrival,
|
||||
/area/shuttle/escape/station,
|
||||
/area/shuttle/escape,
|
||||
/area/shuttle/escape_pod1/station,
|
||||
/area/shuttle/escape_pod2/station,
|
||||
/area/shuttle/escape_pod3/station,
|
||||
|
||||
@@ -1379,6 +1379,10 @@ mob/proc/yank_out_object()
|
||||
spell.action.Grant(src)
|
||||
return
|
||||
|
||||
//override to avoid rotating pixel_xy on mobs
|
||||
/mob/shuttleRotate(rotation)
|
||||
dir = angle2dir(rotation+dir2angle(dir))
|
||||
|
||||
/mob/proc/handle_ventcrawl()
|
||||
return // Only living mobs can ventcrawl
|
||||
|
||||
|
||||
@@ -127,33 +127,31 @@
|
||||
var/obj/docking_port/P = get_docked()
|
||||
if(P) return P.id
|
||||
|
||||
/obj/docking_port/proc/register()
|
||||
return 0
|
||||
|
||||
/obj/docking_port/stationary
|
||||
name = "dock"
|
||||
|
||||
var/turf_type = /turf/space
|
||||
var/area_type = /area/space
|
||||
|
||||
/obj/docking_port/stationary/New()
|
||||
..()
|
||||
spawn(0)
|
||||
if(!shuttle_master)
|
||||
sleep(50)
|
||||
if(!shuttle_master)
|
||||
sleep(50)
|
||||
if(!shuttle_master)
|
||||
throw EXCEPTION("docking port [src] could not initialize")
|
||||
return 0 //give up
|
||||
/obj/docking_port/stationary/register()
|
||||
if(!shuttle_master)
|
||||
throw EXCEPTION("docking port [src] could not initialize.")
|
||||
return 0
|
||||
|
||||
shuttle_master.stationary += src
|
||||
log_to_dd("stationary dock initialized [src], [id]") //SHUTTLE-WIP DEBUG
|
||||
if(!id)
|
||||
id = "[shuttle_master.stationary.len]"
|
||||
if(name == "dock")
|
||||
name = "dock[shuttle_master.stationary.len]"
|
||||
shuttle_master.stationary += src
|
||||
log_to_dd("stationary dock initialized [src], [id]") //SHUTTLE-WIP DEBUG
|
||||
if(!id)
|
||||
id = "[shuttle_master.stationary.len]"
|
||||
if(name == "dock")
|
||||
name = "dock[shuttle_master.stationary.len]"
|
||||
|
||||
#ifdef DOCKING_PORT_HIGHLIGHT
|
||||
highlight("#f00")
|
||||
#endif
|
||||
#ifdef DOCKING_PORT_HIGHLIGHT
|
||||
highlight("#f00")
|
||||
#endif
|
||||
return 1
|
||||
|
||||
//returns first-found touching shuttleport
|
||||
/obj/docking_port/stationary/get_docked()
|
||||
@@ -169,19 +167,12 @@
|
||||
name = "In Transit"
|
||||
turf_type = /turf/space/transit
|
||||
|
||||
/obj/docking_port/stationary/transit/New()
|
||||
..()
|
||||
spawn(0) //shuttle_master takes a bit to initialize
|
||||
if(!shuttle_master)
|
||||
sleep(50)
|
||||
if(!shuttle_master)
|
||||
sleep(50)
|
||||
if(!shuttle_master)
|
||||
throw EXCEPTION("docking port [src] could not initialize")
|
||||
return 0 //give up
|
||||
|
||||
shuttle_master.transit += src
|
||||
/obj/docking_port/stationary/transit/register()
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
shuttle_master.transit += src
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile
|
||||
icon_state = "mobile"
|
||||
@@ -201,34 +192,34 @@
|
||||
|
||||
/obj/docking_port/mobile/New()
|
||||
..()
|
||||
spawn(0)
|
||||
if(!shuttle_master)
|
||||
sleep(50)
|
||||
if(!shuttle_master)
|
||||
sleep(50)
|
||||
if(!shuttle_master)
|
||||
throw EXCEPTION("docking port [src] could not initialize")
|
||||
return 0 //give up
|
||||
|
||||
shuttle_master.mobile += src
|
||||
var/area/A = get_area(src)
|
||||
if(istype(A, /area/shuttle))
|
||||
areaInstance = A
|
||||
|
||||
var/area/A = get_area(src)
|
||||
if(istype(A, /area/shuttle))
|
||||
areaInstance = A
|
||||
if(!areaInstance)
|
||||
areaInstance = new()
|
||||
areaInstance.name = name
|
||||
areaInstance.contents += return_ordered_turfs()
|
||||
|
||||
if(!id)
|
||||
id = "[shuttle_master.mobile.len]"
|
||||
if(name == "shuttle")
|
||||
name = "shuttle[shuttle_master.mobile.len]"
|
||||
#ifdef DOCKING_PORT_HIGHLIGHT
|
||||
highlight("#0f0")
|
||||
#endif
|
||||
|
||||
if(!areaInstance)
|
||||
areaInstance = new()
|
||||
areaInstance.name = name
|
||||
areaInstance.contents += return_ordered_turfs()
|
||||
/obj/docking_port/mobile/register()
|
||||
if(!shuttle_master)
|
||||
throw EXCEPTION("docking port [src] could not initialize.")
|
||||
return 0
|
||||
|
||||
shuttle_master.mobile += src
|
||||
|
||||
if(!id)
|
||||
id = "[shuttle_master.mobile.len]"
|
||||
if(name == "shuttle")
|
||||
name = "shuttle[shuttle_master.mobile.len]"
|
||||
|
||||
return 1
|
||||
|
||||
#ifdef DOCKING_PORT_HIGHLIGHT
|
||||
highlight("#0f0")
|
||||
#endif
|
||||
|
||||
//this is a hook for custom behaviour. Maybe at some point we could add checks to see if engines are intact
|
||||
/obj/docking_port/mobile/proc/canMove()
|
||||
@@ -409,8 +400,9 @@
|
||||
Door.close()
|
||||
if(istype(Door, /obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/A = Door
|
||||
A.lock()
|
||||
door_unlock_list += A
|
||||
if(A.id_tag == "s_docking_airlock")
|
||||
A.lock()
|
||||
door_unlock_list += A
|
||||
else if (istype(AM,/mob))
|
||||
var/mob/M = AM
|
||||
if(!M.move_on_shuttle)
|
||||
|
||||
@@ -840,10 +840,12 @@ Used In File(s): \code\game\objects\items\devices\PDA\PDA.dm
|
||||
<div class="itemContent">
|
||||
<span class="average">
|
||||
{{if data.records.supply.shuttle_moving}}
|
||||
Moving to station ({{:data.records.supply.shuttle_eta}})
|
||||
Moving to {{:data.records.supply.shuttle_loc}}
|
||||
{{else}}
|
||||
Shuttle at {{:data.records.supply.shuttle_loc}}
|
||||
{{/if}}
|
||||
<br>
|
||||
{{:data.records.supply.shuttle_time}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-4
@@ -10,7 +10,7 @@
|
||||
#define DEBUG
|
||||
// END_PREFERENCES
|
||||
// BEGIN_INCLUDE
|
||||
#include "_maps\cyberiad.dm"
|
||||
#include "_maps\metastation.dm"
|
||||
#include "code\_compile_options.dm"
|
||||
#include "code\hub.dm"
|
||||
#include "code\stylesheet.dm"
|
||||
@@ -165,10 +165,10 @@
|
||||
#include "code\controllers\Processes\pipenet.dm"
|
||||
#include "code\controllers\Processes\shuttles.dm"
|
||||
#include "code\controllers\Processes\sun.dm"
|
||||
#include "code\controllers\Processes\supply.dm"
|
||||
#include "code\controllers\Processes\ticker.dm"
|
||||
#include "code\controllers\Processes\vote.dm"
|
||||
#include "code\controllers\Processes\shuttles\emergency.dm"
|
||||
#include "code\controllers\Processes\shuttles\supply.dm"
|
||||
#include "code\controllers\ProcessScheduler\core\_stubs.dm"
|
||||
#include "code\controllers\ProcessScheduler\core\process.dm"
|
||||
#include "code\controllers\ProcessScheduler\core\processScheduler.dm"
|
||||
@@ -1136,7 +1136,6 @@
|
||||
#include "code\modules\events\blob.dm"
|
||||
#include "code\modules\events\borers.dm"
|
||||
#include "code\modules\events\brand_intelligence.dm"
|
||||
#include "code\modules\events\cargobonus.dm"
|
||||
#include "code\modules\events\carp_migration.dm"
|
||||
#include "code\modules\events\communications_blackout.dm"
|
||||
#include "code\modules\events\dust.dm"
|
||||
@@ -1841,7 +1840,6 @@
|
||||
#include "code\modules\shuttles\shuttle_console.dm"
|
||||
#include "code\modules\shuttles\shuttle_ferry.dm"
|
||||
#include "code\modules\shuttles\shuttle_specops.dm"
|
||||
#include "code\modules\shuttles\shuttle_supply.dm"
|
||||
#include "code\modules\shuttles\shuttles_multi.dm"
|
||||
#include "code\modules\shuttles\whiteship.dm"
|
||||
#include "code\modules\space_transition\space_transition.dm"
|
||||
|
||||
Reference in New Issue
Block a user