mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
Makes cargo canister listings get automatically generated at runtime (#57844)
This commit is contained in:
@@ -44,10 +44,19 @@ SUBSYSTEM_DEF(shuttle)
|
||||
var/centcom_message = "" //Remarks from CentCom on how well you checked the last order.
|
||||
var/list/discoveredPlants = list() //Typepaths for unusual plants we've already sent CentCom, associated with their potencies
|
||||
|
||||
/// All of the possible supply packs that can be purchased by cargo
|
||||
var/list/supply_packs = list()
|
||||
|
||||
/// Queued supplies to be purchased for the chef
|
||||
var/list/chef_groceries = list()
|
||||
|
||||
/// Queued supply packs to be purchased
|
||||
var/list/shoppinglist = list()
|
||||
|
||||
/// Wishlist items made by crew for cargo to purchase at their leisure
|
||||
var/list/requestlist = list()
|
||||
|
||||
/// A listing of previously delivered supply packs
|
||||
var/list/orderhistory = list()
|
||||
|
||||
var/list/hidden_shuttle_turfs = list() //all turfs hidden from navigation computers associated with a list containing the image hiding them and the type of the turf they are pretending to be
|
||||
@@ -76,11 +85,22 @@ SUBSYSTEM_DEF(shuttle)
|
||||
/datum/controller/subsystem/shuttle/Initialize(timeofday)
|
||||
ordernum = rand(1, 9000)
|
||||
|
||||
for(var/pack in subtypesof(/datum/supply_pack))
|
||||
var/datum/supply_pack/P = new pack()
|
||||
if(!P.contains)
|
||||
var/list/pack_processing = subtypesof(/datum/supply_pack)
|
||||
while(length(pack_processing))
|
||||
var/datum/supply_pack/pack = pack_processing[length(pack_processing)]
|
||||
pack_processing.len--
|
||||
if(ispath(pack, /datum/supply_pack))
|
||||
pack = new pack
|
||||
|
||||
var/list/generated_packs = pack.generate_supply_packs()
|
||||
if(generated_packs)
|
||||
pack_processing += generated_packs
|
||||
continue
|
||||
supply_packs[P.type] = P
|
||||
|
||||
if(!pack.contains)
|
||||
continue
|
||||
|
||||
supply_packs[pack.id] = pack
|
||||
|
||||
initial_load()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user