Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASRS Supply Pools -- Crates Carryover and MessTech supply #5018

Merged
merged 10 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions code/__DEFINES/supply.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//We use the cost to determine the spawn chance this equals out the crates that spawn later in the round.
#define ASRS_HIGHEST_WEIGHT 0 //warning this weight wont change.
#define ASRS_VERY_HIGH_WEIGHT 5
#define ASRS_HIGH_WEIGHT 15
#define ASRS_MEDIUM_WEIGHT 25
#define ASRS_LOW_WEIGHT 35
#define ASRS_VERY_LOW_WEIGHT 50
#define ASRS_LOWEST_WEIGHT 100

// List of pools of supply packs, rolled individually by the ASRS system
/// Main pool of ASRS supplies, dispensing military supplies such as ammo
#define ASRS_POOL_MAIN "Main"
/// Secondary ASRS pool dispening food related items for MessTech
#define ASRS_POOL_FOOD "Food"

/// Divider to the amount of xeno forces on the planet to ASRS provided crates. It is used as such sqrt(xenos/ASRS_XENO_CRATES_DIVIDER))
#define ASRS_XENO_CRATES_DIVIDER 4
2 changes: 1 addition & 1 deletion code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ SUBSYSTEM_DEF(ticker)
if(GLOB.round_statistics)
to_chat_spaced(world, html = FONT_SIZE_BIG(SPAN_ROLE_BODY("<B>Welcome to [GLOB.round_statistics.round_name]</B>")))

GLOB.supply_controller.process() //Start the supply shuttle regenerating points -- TLE
GLOB.supply_controller.start_processing()

for(var/i in GLOB.closet_list) //Set up special equipment for lockers and vendors, depending on gamemode
var/obj/structure/closet/C = i
Expand Down
146 changes: 62 additions & 84 deletions code/datums/ASRS.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,138 +2,116 @@
//These are non orderable packs that get in automaticly though the ARSR system.
//Note these should never show up to buy and some will only show up later in the round.
//BIG NOTE: Don't add living things to crates, that's bad, it will break the shuttle.
//We use the cost to determine the spawn chance this equals out the crates that spawn later in the round.
#define ASRS_HIGHEST_WEIGHT 0 //warning this weight wont change.
#define ASRS_VERY_HIGH_WEIGHT 5
#define ASRS_HIGH_WEIGHT 15
#define ASRS_MEDIUM_WEIGHT 25
#define ASRS_LOW_WEIGHT 35
#define ASRS_VERY_LOW_WEIGHT 50
#define ASRS_LOWEST_WEIGHT 100


/datum/supply_packs_asrs
/// How likely we are to select this pack over others
var/cost = ASRS_MEDIUM_WEIGHT
/// Which pool of ASRS automatically dispensed supplies this belongs to
var/pool = ASRS_POOL_MAIN
/// What supply pack would this dispense
var/datum/supply_packs/reference_package

//===================================
// Rounds
/datum/supply_packs/ammo_rounds_box_rifle/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_rounds_box_rifle
reference_package = /datum/supply_packs/ammo_rounds_box_rifle
cost = ASRS_MEDIUM_WEIGHT

/datum/supply_packs/ammo_rounds_box_rifle_ap/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_rounds_box_rifle_ap
reference_package = /datum/supply_packs/ammo_rounds_box_rifle_ap
cost = ASRS_LOW_WEIGHT

/datum/supply_packs/ammo_rounds_box_xm88/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_rounds_box_xm88
reference_package = /datum/supply_packs/ammo_rounds_box_xm88
cost = ASRS_LOW_WEIGHT

//===================================
// Magazines
/datum/supply_packs/gun/ammo_hpr/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/gun/ammo_hpr
reference_package = /datum/supply_packs/ammo_hpr
cost = ASRS_LOWEST_WEIGHT

/datum/supply_packs/ammo_m4a3_mag_box/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_m4a3_mag_box
reference_package = /datum/supply_packs/ammo_m4a3_mag_box
cost = ASRS_LOW_WEIGHT

/datum/supply_packs/ammo_m4a3_mag_box_ap/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_m4a3_mag_box_ap
reference_package = /datum/supply_packs/ammo_m4a3_mag_box_ap
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ammo_mag_box/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_mag_box
reference_package = /datum/supply_packs/ammo_mag_box
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ammo_mag_box_ap/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_mag_box_ap
reference_package = /datum/supply_packs/ammo_mag_box_ap

/datum/supply_packs/ammo_m4ra_mag_box/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_m4ra_mag_box
reference_package = /datum/supply_packs/ammo_m4ra_mag_box
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ammo_m4ra_mag_box_ap/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_m4ra_mag_box_ap
reference_package = /datum/supply_packs/ammo_m4ra_mag_box_ap

/datum/supply_packs/ammo_shell_box/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_shell_box
reference_package = /datum/supply_packs/ammo_shell_box
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ammo_shell_box_buck/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_shell_box_buck
reference_package = /datum/supply_packs/ammo_shell_box_buck
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ammo_shell_box_flechette/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_shell_box_flechette
reference_package = /datum/supply_packs/ammo_shell_box_flechette
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ammo_smartgun/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_smartgun
reference_package = /datum/supply_packs/ammo_smartgun

/datum/supply_packs/ammo_napalm/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_napalm
reference_package = /datum/supply_packs/ammo_napalm
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ammo_napalm_gel/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_napalm_gel
reference_package = /datum/supply_packs/ammo_napalm_gel
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ammo_flamer_mixed/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_flamer_mixed
reference_package = /datum/supply_packs/ammo_flamer_mixed
cost = ASRS_VERY_LOW_WEIGHT

//===================================
// Mortar ammo
/datum/supply_packs/ammo_mortar_he/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_mortar_he
reference_package = /datum/supply_packs/ammo_mortar_he

/datum/supply_packs/ammo_mortar_incend/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_mortar_incend
reference_package = /datum/supply_packs/ammo_mortar_incend

/datum/supply_packs/ammo_mortar_flare/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/ammo_mortar_flare
reference_package = /datum/supply_packs/ammo_mortar_flare

//===================================
// Misc supplies
/datum/supply_packs/flares/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/flares
reference_package = /datum/supply_packs/flares
cost = ASRS_LOW_WEIGHT

/datum/supply_packs/mre/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/mre
reference_package = /datum/supply_packs/mre
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/flashlights/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/flashlights
reference_package = /datum/supply_packs/flashlights
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/batteries/asrs
buyable = 0
group = "ASRS"
/datum/supply_packs_asrs/batteries
reference_package = /datum/supply_packs/batteries
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ingredient/asrs
buyable = 0
group = "ASRS"
cost = ASRS_LOW_WEIGHT
// ============================
// FOOD POOL - for Mess Tech gradual supplies throughout the round
/datum/supply_packs_asrs/ingredient
reference_package = /datum/supply_packs/ingredient
pool = ASRS_POOL_FOOD
1 change: 0 additions & 1 deletion code/datums/supply_packs/_supply_packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
var/group = null
var/buyable = 1 ///Can this pack be bought? These packs don't show up at all - they have to be spawned externally (fe: DEFCON ASRS)
var/randomised_num_contained = 0 //Randomly picks X of items out of the contains list instead of using all.
var/iteration_needed = 0
/// How many W-Y dollars are deducted from the supply controller. Only use for contraband.
var/dollar_cost = 0
/// How much "heat" this crate adds, too much heat will send an investigation. Only use for contraband.
Expand Down
6 changes: 0 additions & 6 deletions code/datums/supply_packs/operations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
containername = "OB Ammo Crate (Incendiary x2)"
buyable = 0
group = "Operations"
iteration_needed = null

/datum/supply_packs/ob_explosive
contains = list(
Expand All @@ -48,7 +47,6 @@
containername = "OB Ammo Crate (HE x2)"
buyable = 0
group = "Operations"
iteration_needed = null

/datum/supply_packs/ob_cluster
contains = list(
Expand All @@ -72,7 +70,6 @@
containername = "OB Ammo Crate (Cluster x2)"
buyable = 0
group = "Operations"
iteration_needed = null

/datum/supply_packs/telecommsparts
name = "Replacement Telecommunications Parts"
Expand All @@ -99,15 +96,13 @@
containertype = /obj/structure/machinery/nuclearbomb
buyable = 0
group = "Operations"
iteration_needed = null

/datum/supply_packs/technuclearbomb
name = "Encrypted Operational Nuke"
cost = 0
containertype = /obj/structure/machinery/nuclearbomb/tech
buyable = 0
group = "Operations"
iteration_needed = null

/datum/supply_packs/spec_kits
name = "Weapons Specialist Kits"
Expand All @@ -122,4 +117,3 @@
containername = "weapons specialist kits crate"
buyable = 0
group = "Operations"
iteration_needed = null
Loading