diff --git a/code/__DEFINES/mode.dm b/code/__DEFINES/mode.dm index 218bfef5eb40..94428ba7d9b3 100644 --- a/code/__DEFINES/mode.dm +++ b/code/__DEFINES/mode.dm @@ -91,8 +91,8 @@ //================================================= -//Number of marine players against which the Marine's gear scales -#define MARINE_GEAR_SCALING_NORMAL 30 +/// Number of weighted marine players for 1 gear_scale. gear_scale is clamped to 1 minimum +#define MARINE_GEAR_SCALING_NORMAL 50 #define RESOURCE_NODE_SCALE 95 //How many players minimum per extra set of resource nodes #define RESOURCE_NODE_QUANTITY_PER_POP 11 //How many resources total per pop diff --git a/code/__DEFINES/vendors.dm b/code/__DEFINES/vendors.dm index eeec210a56c3..086b70a92428 100644 --- a/code/__DEFINES/vendors.dm +++ b/code/__DEFINES/vendors.dm @@ -67,6 +67,9 @@ //Whether or not to load ammo boxes depending on ammo loaded into the vendor //Only relevant in big vendors, like Requisitions or Squad Prep #define VEND_LOAD_AMMO_BOXES (1<<9) +/// Vendors with this flag will fill retroactively based on latejoining players, +/// and expect a scale multiplier instead of amount of items +#define VEND_STOCK_DYNAMIC (1<<10) // Redemption Tokens #define VEND_TOKEN_ENGINEER "Engineer" diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 541d1a05362d..d302191c67eb 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -467,6 +467,8 @@ DEFINE_BITFIELD(vend_flags, list( "VEND_INSTANCED_CATEGORY" = VEND_INSTANCED_CATEGORY, "VEND_FACTION_THEMES" = VEND_FACTION_THEMES, "VEND_USE_VENDOR_FLAGS" = VEND_USE_VENDOR_FLAGS, + "VEND_LOAD_AMMO_BOXES" = VEND_LOAD_AMMO_BOXES, + "VEND_STOCK_DYNAMIC" = VEND_STOCK_DYNAMIC )) DEFINE_BITFIELD(vehicle_flags, list( diff --git a/code/game/gamemodes/cm_initialize.dm b/code/game/gamemodes/cm_initialize.dm index ffcfd37489af..55452972cc3f 100644 --- a/code/game/gamemodes/cm_initialize.dm +++ b/code/game/gamemodes/cm_initialize.dm @@ -75,6 +75,12 @@ Additional game mode variables. var/list/monkey_types = list() //What type of monkeys do we spawn var/latejoin_tally = 0 //How many people latejoined Marines var/latejoin_larva_drop = LATEJOIN_MARINES_PER_LATEJOIN_LARVA //A larva will spawn in once the tally reaches this level. If set to 0, no latejoin larva drop + /// Amount of latejoin_tally already awarded as larvas + var/latejoin_larva_used = 0 + /// Multiplier to the amount of marine gear, current value as calculated with modifiers + var/gear_scale = 1 + /// Multiplier to the amount of marine gear, maximum reached value for + var/gear_scale_max = 1 //Role Authority set up. /// List of role titles to override to different roles when starting game @@ -914,23 +920,49 @@ Additional game mode variables. //We do NOT want to initilialize the gear before everyone is properly spawned in /datum/game_mode/proc/initialize_post_marine_gear_list() - var/scale = get_scaling_value() + init_gear_scale() //Set up attachment vendor contents related to Marine count for(var/i in GLOB.cm_vending_vendors) var/obj/structure/machinery/cm_vending/sorted/CVS = i - CVS.populate_product_list_and_boxes(scale) + CVS.populate_product_list_and_boxes(gear_scale) //Scale the amount of cargo points through a direct multiplier - GLOB.supply_controller.points = round(GLOB.supply_controller.points * scale) + GLOB.supply_controller.points += round(GLOB.supply_controller.points_scale * gear_scale) -/datum/game_mode/proc/get_scaling_value() +///Returns a multiplier to the amount of gear that is to be distributed roundstart, stored in [/datum/game_mode/var/gear_scale] +/datum/game_mode/proc/init_gear_scale() //We take the number of marine players, deduced from other lists, and then get a scale multiplier from it, to be used in arbitrary manners to distribute equipment - //This might count players who ready up but get kicked back to the lobby - var/marine_pop_size = length(GLOB.alive_human_list) + var/marine_pop_size = 0 + var/uscm_personnel_count = 0 + for(var/mob/living/carbon/human/human as anything in GLOB.alive_human_list) + if(human.faction == FACTION_USCM) + uscm_personnel_count++ + var/datum/job/job = GET_MAPPED_ROLE(human.job) + marine_pop_size += GLOB.RoleAuthority.calculate_role_weight(job) //This gives a decimal value representing a scaling multiplier. Cannot go below 1 - return max(marine_pop_size / MARINE_GEAR_SCALING_NORMAL, 1) + gear_scale = max(marine_pop_size / MARINE_GEAR_SCALING_NORMAL, 1) + gear_scale_max = gear_scale + log_debug("SUPPLY: Game start detected [marine_pop_size] weighted marines (out of [uscm_personnel_count]/[length(GLOB.alive_human_list)] USCM humans), resulting in gear_scale = [gear_scale]") + return gear_scale + +///Updates the [/datum/game_mode/var/gear_scale] multiplier based on joining and cryoing marines +/datum/game_mode/proc/update_gear_scale(delta) + // Magic inverse function that guarantees marines still get good supplies for latejoins within first ~30 minutes but stalls starting 2 hours or so + gear_scale += delta * (0.25 + 0.75 / (1 + ROUND_TIME / 20000)) / MARINE_GEAR_SCALING_NORMAL + var/gear_delta = gear_scale - gear_scale_max + if(gear_delta > 0) + gear_scale_max = gear_scale + for(var/obj/structure/machinery/cm_vending/sorted/vendor as anything in GLOB.cm_vending_vendors) + vendor.update_dynamic_stock(gear_scale_max) + GLOB.supply_controller.points += round(gear_delta * GLOB.supply_controller.points_scale) + +/// Updates [var/latejoin_tally] and [var/gear_scale] based on role weights of latejoiners/cryoers. Delta is the amount of role positions added/removed +/datum/game_mode/proc/latejoin_update(role, delta = 1) + var/weight = GLOB.RoleAuthority.calculate_role_weight(role) + latejoin_tally += weight * delta + update_gear_scale(weight * delta) // for the toolbox /datum/game_mode/proc/end_round_message() diff --git a/code/game/jobs/role_authority.dm b/code/game/jobs/role_authority.dm index 8deadbeba32e..37131451ca07 100644 --- a/code/game/jobs/role_authority.dm +++ b/code/game/jobs/role_authority.dm @@ -366,6 +366,8 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou * survivors and the number of roundstart Squad Rifleman slots. */ /datum/authority/branch/role/proc/calculate_role_weight(datum/job/J) + if(!J) + return 0 if(GLOB.ROLES_MARINES.Find(J.title)) return 1 if(GLOB.ROLES_XENO.Find(J.title)) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 58935702cb7b..53bf82c93925 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -321,13 +321,13 @@ GLOBAL_LIST_INIT(frozen_items, list(SQUAD_MARINE_1 = list(), SQUAD_MARINE_2 = li dept_console += A A.moveToNullspace() + var/datum/job/job = GET_MAPPED_ROLE(occupant.job) if(ishuman(occupant)) var/mob/living/carbon/human/H = occupant if(H.assigned_squad) var/datum/squad/S = H.assigned_squad S.forget_marine_in_squad(H) - var/datum/job/J = GET_MAPPED_ROLE(H.job) - if(istype(J, /datum/job/marine/specialist)) + if(istype(job, /datum/job/marine/specialist)) //we make the set this specialist took if any available again if(H.skills) var/set_name @@ -346,7 +346,8 @@ GLOBAL_LIST_INIT(frozen_items, list(SQUAD_MARINE_1 = list(), SQUAD_MARINE_2 = li if(set_name && !GLOB.available_specialist_sets.Find(set_name)) GLOB.available_specialist_sets += set_name - SSticker.mode.latejoin_tally-- //Cryoing someone out removes someone from the Marines, blocking further larva spawns until accounted for + //Cryoing someone out removes someone from the Marines, blocking further larva spawns until accounted for + SSticker.mode.latejoin_update(job, -1) //Handle job slot/tater cleanup. GLOB.RoleAuthority.free_role(GET_MAPPED_ROLE(occupant.job), TRUE) diff --git a/code/game/machinery/vending/cm_vending.dm b/code/game/machinery/vending/cm_vending.dm index b0a09dcd1767..451b57afb296 100644 --- a/code/game/machinery/vending/cm_vending.dm +++ b/code/game/machinery/vending/cm_vending.dm @@ -875,8 +875,11 @@ GLOBAL_LIST_EMPTY(vending_products) vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND show_points = FALSE - //this here is made to provide ability to restock vendors with different subtypes of same object, like handmade and manually filled ammo boxes. + ///this here is made to provide ability to restock vendors with different subtypes of same object, like handmade and manually filled ammo boxes. var/list/corresponding_types_list + ///If using [VEND_STOCK_DYNAMIC], assoc list of product entry to list of (product multiplier, awarded objects) - as seen in [/obj/structure/machinery/cm_vending/sorted/proc/populate_product_list] + ///This allows us to backtrack and refill the stocks when new players latejoin + var/list/list/dynamic_stock_multipliers /obj/structure/machinery/cm_vending/sorted/Initialize() . = ..() @@ -889,14 +892,44 @@ GLOBAL_LIST_EMPTY(vending_products) GLOB.cm_vending_vendors -= src return ..() -//this proc, well, populates product list based on roundstart amount of players +///this proc, well, populates product list based on roundstart amount of players /obj/structure/machinery/cm_vending/sorted/proc/populate_product_list_and_boxes(scale) - populate_product_list(scale) + if(vend_flags & VEND_STOCK_DYNAMIC) + populate_product_list(1.0) + dynamic_stock_multipliers = list() + for(var/list/vendspec in listed_products) + var/multiplier = vendspec[2] + if(multiplier > 0) + var/awarded = round(vendspec[2] * scale) // Starting amount + //Record the multiplier and how many have actually been given out + dynamic_stock_multipliers[vendspec] = list(vendspec[2], awarded) + vendspec[2] = awarded // Override starting amount + else + populate_product_list(scale) + if(vend_flags & VEND_LOAD_AMMO_BOXES) populate_ammo_boxes() return -//this proc, well, populates product list based on roundstart amount of players +///Updates the vendor stock when the [/datum/game_mode/var/marine_tally] has changed and we're using [VEND_STOCK_DYNAMIC] +///Assumes the scale can only increase!!! Don't take their items away! +/obj/structure/machinery/cm_vending/sorted/proc/update_dynamic_stock(new_scale) + if(!(vend_flags & VEND_STOCK_DYNAMIC)) + return + for(var/list/vendspec in dynamic_stock_multipliers) + var/list/metadata = dynamic_stock_multipliers[vendspec] + var/multiplier = metadata[1] // How much do we multiply scales by + var/previous_max_amount = metadata[2] // How many we already handed out at old scale + var/projected_max_amount = round(new_scale * multiplier) // How much we would have had total now in total + var/amount_to_add = round(projected_max_amount - previous_max_amount) // Rounding just in case + if(amount_to_add > 0) + metadata[2] += amount_to_add + vendspec[2] += amount_to_add + update_derived_ammo_and_boxes_on_add(vendspec) + +///this proc, well, populates product list based on roundstart amount of players +///do not rely on scale here if you use VEND_STOCK_DYNAMIC because it's already taken into account +///this is here for historical reasons and should ONLY be called by populate_product_list_and_boxes if you want dynamic stocks and ammoboxes to work /obj/structure/machinery/cm_vending/sorted/proc/populate_product_list(scale) return diff --git a/code/game/machinery/vending/vendor_types/requisitions.dm b/code/game/machinery/vending/vendor_types/requisitions.dm index 93680fb93d2c..b5ed2c19fb78 100644 --- a/code/game/machinery/vending/vendor_types/requisitions.dm +++ b/code/game/machinery/vending/vendor_types/requisitions.dm @@ -8,7 +8,7 @@ icon_state = "req_guns" req_access = list(ACCESS_MARINE_CARGO) vendor_theme = VENDOR_THEME_USCM - vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_LOAD_AMMO_BOXES + vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_LOAD_AMMO_BOXES | VEND_STOCK_DYNAMIC /obj/structure/machinery/cm_vending/sorted/cargo_guns/vend_fail() return @@ -35,7 +35,7 @@ list("SU-6 Smart Pistol", round(scale * 3), /obj/item/storage/box/guncase/smartpistol, VENDOR_ITEM_REGULAR), list("MOU-53 Shotgun", round(scale * 2), /obj/item/storage/box/guncase/mou53, VENDOR_ITEM_REGULAR), list("XM88 Heavy Rifle", round(scale * 3), /obj/item/storage/box/guncase/xm88, VENDOR_ITEM_REGULAR), - list("M41AE2 Heavy Pulse Rifle", round(scale * 2.5), /obj/item/storage/box/guncase/lmg, VENDOR_ITEM_REGULAR), + list("M41AE2 Heavy Pulse Rifle", 2.5, /obj/item/storage/box/guncase/lmg, VENDOR_ITEM_REGULAR), list("M41A Pulse Rifle MK1", round(scale * 3), /obj/item/storage/box/guncase/m41aMK1, VENDOR_ITEM_REGULAR), list("M56D Heavy Machine Gun", round(scale * 2), /obj/item/storage/box/guncase/m56d, VENDOR_ITEM_REGULAR), list("M2C Heavy Machine Gun", round(scale * 2), /obj/item/storage/box/guncase/m2c, VENDOR_ITEM_REGULAR), @@ -103,7 +103,7 @@ list("Flare Pouch (Full)", round(scale * 5), /obj/item/storage/pouch/flare/full, VENDOR_ITEM_REGULAR), list("Document Pouch", round(scale * 2), /obj/item/storage/pouch/document/small, VENDOR_ITEM_REGULAR), list("Sling Pouch", round(scale * 2), /obj/item/storage/pouch/sling, VENDOR_ITEM_REGULAR), - list("Machete Pouch (Full)", round(scale * 0.5), /obj/item/storage/pouch/machete/full, VENDOR_ITEM_REGULAR), + list("Machete Pouch (Full)", 1, /obj/item/storage/pouch/machete/full, VENDOR_ITEM_REGULAR), list("Bayonet Pouch", round(scale * 2), /obj/item/storage/pouch/bayonet, VENDOR_ITEM_REGULAR), list("Medium General Pouch", round(scale * 2), /obj/item/storage/pouch/general/medium, VENDOR_ITEM_REGULAR), list("Magazine Pouch", round(scale * 5), /obj/item/storage/pouch/magazine, VENDOR_ITEM_REGULAR), @@ -135,7 +135,7 @@ list("Sentry Gun Network Laptop", 4, /obj/item/device/sentry_computer, VENDOR_ITEM_REGULAR), list("JTAC Pamphlet", round(scale * 1), /obj/item/pamphlet/skill/jtac, VENDOR_ITEM_REGULAR), list("Engineering Pamphlet", round(scale * 1), /obj/item/pamphlet/skill/engineer, VENDOR_ITEM_REGULAR), - list("Powerloader Certification", round(scale * 0.1) + 1, /obj/item/pamphlet/skill/powerloader, VENDOR_ITEM_REGULAR), + list("Powerloader Certification", 0.75, /obj/item/pamphlet/skill/powerloader, VENDOR_ITEM_REGULAR), list("Spare PDT/L Battle Buddy Kit", round(scale * 4), /obj/item/storage/box/pdt_kit, VENDOR_ITEM_REGULAR), list("W-Y brand rechargeable mini-battery", round(scale * 3), /obj/item/cell/crap, VENDOR_ITEM_REGULAR) ) @@ -174,7 +174,7 @@ //Special cargo-specific vendor with vending offsets /obj/structure/machinery/cm_vending/sorted/cargo_guns/cargo - vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_LOAD_AMMO_BOXES //We want to vend to turf not hand, since we are in requisitions + vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_LOAD_AMMO_BOXES | VEND_STOCK_DYNAMIC //We want to vend to turf not hand, since we are in requisitions vend_dir = WEST vend_dir_whitelist = list(NORTH, SOUTH) @@ -194,7 +194,7 @@ icon_state = "req_ammo" req_access = list(ACCESS_MARINE_CARGO) vendor_theme = VENDOR_THEME_USCM - vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_LOAD_AMMO_BOXES + vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_LOAD_AMMO_BOXES | VEND_STOCK_DYNAMIC vend_dir = WEST vend_dir_whitelist = list(SOUTHWEST, NORTHWEST) @@ -218,29 +218,29 @@ list("ARMOR-PIERCING AMMUNITION", -1, null, null), list("88 Mod 4 AP Magazine (9mm)", round(scale * 50), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR), - list("M4RA AP Magazine (10x24mm)", round(scale * 15.7), /obj/item/ammo_magazine/rifle/m4ra/ap, VENDOR_ITEM_REGULAR), - list("M39 AP Magazine (10x20mm)", round(scale * 11.9), /obj/item/ammo_magazine/smg/m39/ap, VENDOR_ITEM_REGULAR), - list("M41A MK2 AP Magazine (10x24mm)", round(scale * 10.5), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), + list("M4RA AP Magazine (10x24mm)", round(scale * 16), /obj/item/ammo_magazine/rifle/m4ra/ap, VENDOR_ITEM_REGULAR), + list("M39 AP Magazine (10x20mm)", round(scale * 12), /obj/item/ammo_magazine/smg/m39/ap, VENDOR_ITEM_REGULAR), + list("M41A MK2 AP Magazine (10x24mm)", round(scale * 10), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), list("M4A3 AP Magazine (9mm)", round(scale * 2), /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), - list("M39 Extended Magazine (10x20mm)", round(scale * 9.5) + 3, /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), - list("M41A MK2 Extended Magazine (10x24mm)", round(scale * 8.1), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", round(scale * 10), /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), + list("M41A MK2 Extended Magazine (10x24mm)", round(scale * 8), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIAL AMMUNITION", -1, null, null), list("M56 Battery", 4, /obj/item/smartgun_battery, VENDOR_ITEM_REGULAR), list("M56 Smartgun Drum", 4, /obj/item/ammo_magazine/smartgun, VENDOR_ITEM_REGULAR), - list("M44 Heavy Speed Loader (.44)", round(scale * 10.5), /obj/item/ammo_magazine/revolver/heavy, VENDOR_ITEM_REGULAR), - list("M44 Marksman Speed Loader (.44)", round(scale * 5.7), /obj/item/ammo_magazine/revolver/marksman, VENDOR_ITEM_REGULAR), + list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, VENDOR_ITEM_REGULAR), + list("M44 Marksman Speed Loader (.44)", 6, /obj/item/ammo_magazine/revolver/marksman, VENDOR_ITEM_REGULAR), list("M4A3 HP Magazine (9mm)", round(scale * 2), /obj/item/ammo_magazine/pistol/hp, VENDOR_ITEM_REGULAR), list("M41AE2 Holo Target Rounds (10x24mm)", round(scale * 2), /obj/item/ammo_magazine/rifle/lmg/holo_target, VENDOR_ITEM_REGULAR), list("RESTRICTED FIREARM AMMUNITION", -1, null, null), - list("VP78 Magazine", round(scale * 11.2), /obj/item/ammo_magazine/pistol/vp78, VENDOR_ITEM_REGULAR), - list("SU-6 Smartpistol Magazine (.45)", round(scale * 12,8), /obj/item/ammo_magazine/pistol/smart, VENDOR_ITEM_REGULAR), + list("VP78 Magazine", 11, /obj/item/ammo_magazine/pistol/vp78, VENDOR_ITEM_REGULAR), + list("SU-6 Smartpistol Magazine (.45)", 13, /obj/item/ammo_magazine/pistol/smart, VENDOR_ITEM_REGULAR), list("M240 Incinerator Tank", round(scale * 3), /obj/item/ammo_magazine/flamer_tank, VENDOR_ITEM_REGULAR), list("M41AE2 Box Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/lmg, VENDOR_ITEM_REGULAR), - list("M41A MK1 Magazine (10x24mm)", round(scale * 4.5), /obj/item/ammo_magazine/rifle/m41aMK1, VENDOR_ITEM_REGULAR), + list("M41A MK1 Magazine (10x24mm)", 4.5, /obj/item/ammo_magazine/rifle/m41aMK1, VENDOR_ITEM_REGULAR), list("M41A MK1 AP Magazine (10x24mm)", round(scale * 2), /obj/item/ammo_magazine/rifle/m41aMK1/ap, VENDOR_ITEM_REGULAR), list("M56D Drum Magazine", round(scale * 2), /obj/item/ammo_magazine/m56d, VENDOR_ITEM_REGULAR), list("M2C Box Magazine", round(scale * 2), /obj/item/ammo_magazine/m2c, VENDOR_ITEM_REGULAR), @@ -293,7 +293,7 @@ //Special cargo-specific vendor with vending offsets /obj/structure/machinery/cm_vending/sorted/cargo_ammo/cargo - vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_LOAD_AMMO_BOXES //We want to vend to turf not hand, since we are in requisitions + vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_LOAD_AMMO_BOXES | VEND_STOCK_DYNAMIC //We want to vend to turf not hand, since we are in requisitions //------------ATTACHMENTS VENDOR--------------- @@ -305,7 +305,7 @@ icon_state = "req_attach" vend_dir = WEST vend_dir_whitelist = list(SOUTHEAST, NORTHEAST) - vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY //We want to vend to turf not hand, since we are in requisitions + vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_STOCK_DYNAMIC //We want to vend to turf not hand, since we are in requisitions /obj/structure/machinery/cm_vending/sorted/attachments/vend_fail() return @@ -316,42 +316,42 @@ /obj/structure/machinery/cm_vending/sorted/attachments/populate_product_list(scale) listed_products = list( list("BARREL", -1, null, null), - list("Extended Barrel", round(scale * 6.5), /obj/item/attachable/extended_barrel, VENDOR_ITEM_REGULAR), - list("M5 Bayonet", round(scale * 10.5), /obj/item/attachable/bayonet, VENDOR_ITEM_REGULAR), - list("Recoil Compensator", round(scale * 6.5), /obj/item/attachable/compensator, VENDOR_ITEM_REGULAR), - list("Suppressor", round(scale * 6.5), /obj/item/attachable/suppressor, VENDOR_ITEM_REGULAR), + list("Extended Barrel", 6.5, /obj/item/attachable/extended_barrel, VENDOR_ITEM_REGULAR), + list("M5 Bayonet", 10.5, /obj/item/attachable/bayonet, VENDOR_ITEM_REGULAR), + list("Recoil Compensator", 6.5, /obj/item/attachable/compensator, VENDOR_ITEM_REGULAR), + list("Suppressor", 6.5, /obj/item/attachable/suppressor, VENDOR_ITEM_REGULAR), list("RAIL", -1, null, null), - list("B8 Smart-Scope", round(scale * 3.5), /obj/item/attachable/scope/mini_iff, VENDOR_ITEM_REGULAR), - list("Magnetic Harness", round(scale * 8.5), /obj/item/attachable/magnetic_harness, VENDOR_ITEM_REGULAR), - list("Rail Flashlight", round(scale * 10.5), /obj/item/attachable/flashlight, VENDOR_ITEM_REGULAR), - list("S4 2x Telescopic Mini-Scope", round(scale * 4.5), /obj/item/attachable/scope/mini, VENDOR_ITEM_REGULAR), - list("S5 Red-Dot Sight", round(scale * 9.5), /obj/item/attachable/reddot, VENDOR_ITEM_REGULAR), - list("S6 Reflex Sight", round(scale * 9.5), /obj/item/attachable/reflex, VENDOR_ITEM_REGULAR), - list("S8 4x Telescopic Scope", round(scale * 4.5), /obj/item/attachable/scope, VENDOR_ITEM_REGULAR), + list("B8 Smart-Scope", 3.5, /obj/item/attachable/scope/mini_iff, VENDOR_ITEM_REGULAR), + list("Magnetic Harness", 8.5, /obj/item/attachable/magnetic_harness, VENDOR_ITEM_REGULAR), + list("Rail Flashlight", 10.5, /obj/item/attachable/flashlight, VENDOR_ITEM_REGULAR), + list("S4 2x Telescopic Mini-Scope", 4.5, /obj/item/attachable/scope/mini, VENDOR_ITEM_REGULAR), + list("S5 Red-Dot Sight", 9.5, /obj/item/attachable/reddot, VENDOR_ITEM_REGULAR), + list("S6 Reflex Sight", 9.5, /obj/item/attachable/reflex, VENDOR_ITEM_REGULAR), + list("S8 4x Telescopic Scope", 4.5, /obj/item/attachable/scope, VENDOR_ITEM_REGULAR), list("UNDERBARREL", -1, null, null), - list("Angled Grip", round(scale * 6.5), /obj/item/attachable/angledgrip, VENDOR_ITEM_REGULAR), - list("Bipod", round(scale * 6.5), /obj/item/attachable/bipod, VENDOR_ITEM_REGULAR), - list("Burst Fire Assembly", round(scale * 4.5), /obj/item/attachable/burstfire_assembly, VENDOR_ITEM_REGULAR), - list("Gyroscopic Stabilizer", round(scale * 4.5), /obj/item/attachable/gyro, VENDOR_ITEM_REGULAR), - list("Laser Sight", round(scale * 9.5), /obj/item/attachable/lasersight, VENDOR_ITEM_REGULAR), - list("Mini Flamethrower", round(scale * 4.5), /obj/item/attachable/attached_gun/flamer, VENDOR_ITEM_REGULAR), - list("XM-VESG-1 Flamer Nozzle", round(scale * 4.5), /obj/item/attachable/attached_gun/flamer_nozzle, VENDOR_ITEM_REGULAR), - list("U7 Underbarrel Shotgun", round(scale * 4.5), /obj/item/attachable/attached_gun/shotgun, VENDOR_ITEM_REGULAR), - list("Underbarrel Extinguisher", round(scale * 4.5), /obj/item/attachable/attached_gun/extinguisher, VENDOR_ITEM_REGULAR), - list("Underbarrel Flashlight Grip", round(scale * 9.5), /obj/item/attachable/flashlight/grip, VENDOR_ITEM_REGULAR), - list("Underslung Grenade Launcher", round(scale * 9.5), /obj/item/attachable/attached_gun/grenade, VENDOR_ITEM_REGULAR), - list("Vertical Grip", round(scale * 9.5), /obj/item/attachable/verticalgrip, VENDOR_ITEM_REGULAR), + list("Angled Grip", 6.5, /obj/item/attachable/angledgrip, VENDOR_ITEM_REGULAR), + list("Bipod", 6.5, /obj/item/attachable/bipod, VENDOR_ITEM_REGULAR), + list("Burst Fire Assembly", 4.5, /obj/item/attachable/burstfire_assembly, VENDOR_ITEM_REGULAR), + list("Gyroscopic Stabilizer", 4.5, /obj/item/attachable/gyro, VENDOR_ITEM_REGULAR), + list("Laser Sight", 9.5, /obj/item/attachable/lasersight, VENDOR_ITEM_REGULAR), + list("Mini Flamethrower", 4.5, /obj/item/attachable/attached_gun/flamer, VENDOR_ITEM_REGULAR), + list("XM-VESG-1 Flamer Nozzle", 4.5, /obj/item/attachable/attached_gun/flamer_nozzle, VENDOR_ITEM_REGULAR), + list("U7 Underbarrel Shotgun", 4.5, /obj/item/attachable/attached_gun/shotgun, VENDOR_ITEM_REGULAR), + list("Underbarrel Extinguisher", 4.5, /obj/item/attachable/attached_gun/extinguisher, VENDOR_ITEM_REGULAR), + list("Underbarrel Flashlight Grip", 9.5, /obj/item/attachable/flashlight/grip, VENDOR_ITEM_REGULAR), + list("Underslung Grenade Launcher", 9.5, /obj/item/attachable/attached_gun/grenade, VENDOR_ITEM_REGULAR), + list("Vertical Grip", 9.5, /obj/item/attachable/verticalgrip, VENDOR_ITEM_REGULAR), list("STOCK", -1, null, null), - list("M37 Wooden Stock", round(scale * 4.5), /obj/item/attachable/stock/shotgun, VENDOR_ITEM_REGULAR), - list("M39 Arm Brace", round(scale * 4.5), /obj/item/attachable/stock/smg/collapsible/brace, VENDOR_ITEM_REGULAR), - list("M39 Folding Stock", round(scale * 4.5), /obj/item/attachable/stock/smg/collapsible, VENDOR_ITEM_REGULAR), - list("M39 Stock", round(scale * 4.5), /obj/item/attachable/stock/smg, VENDOR_ITEM_REGULAR), - list("M41A Solid Stock", round(scale * 4.5), /obj/item/attachable/stock/rifle, VENDOR_ITEM_REGULAR), - list("M41A Folding Stock", round(scale * 4.5), /obj/item/attachable/stock/rifle/collapsible, VENDOR_ITEM_REGULAR), - list("M44 Magnum Sharpshooter Stock", round(scale * 4.5), /obj/item/attachable/stock/revolver, VENDOR_ITEM_REGULAR) + list("M37 Wooden Stock", 4.5, /obj/item/attachable/stock/shotgun, VENDOR_ITEM_REGULAR), + list("M39 Arm Brace", 4.5, /obj/item/attachable/stock/smg/collapsible/brace, VENDOR_ITEM_REGULAR), + list("M39 Folding Stock", 4.5, /obj/item/attachable/stock/smg/collapsible, VENDOR_ITEM_REGULAR), + list("M39 Stock", 4.5, /obj/item/attachable/stock/smg, VENDOR_ITEM_REGULAR), + list("M41A Solid Stock", 4.5, /obj/item/attachable/stock/rifle, VENDOR_ITEM_REGULAR), + list("M41A Folding Stock", 4.5, /obj/item/attachable/stock/rifle/collapsible, VENDOR_ITEM_REGULAR), + list("M44 Magnum Sharpshooter Stock", 4.5, /obj/item/attachable/stock/revolver, VENDOR_ITEM_REGULAR) ) /obj/structure/machinery/cm_vending/sorted/attachments/blend diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index 505ef81a1277..299ef36ea7d2 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -63,6 +63,7 @@ req_one_access = list() listed_products = list() hackable = TRUE + vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_STOCK_DYNAMIC /obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep/ui_state(mob/user) return GLOB.not_incapacitated_and_adjacent_strict_state @@ -80,11 +81,11 @@ list("M10 Pattern Marine Helmet", round(scale * 15), /obj/item/clothing/head/helmet/marine, VENDOR_ITEM_REGULAR), list("WEBBINGS", -1, null, null), - list("Brown Webbing Vest", round(scale * 1.25), /obj/item/clothing/accessory/storage/black_vest/brown_vest, VENDOR_ITEM_REGULAR), - list("Black Webbing Vest", round(max(1,(scale * 0.5))), /obj/item/clothing/accessory/storage/black_vest, VENDOR_ITEM_REGULAR), + list("Brown Webbing Vest", 1, /obj/item/clothing/accessory/storage/black_vest/brown_vest, VENDOR_ITEM_REGULAR), + list("Black Webbing Vest", 1, /obj/item/clothing/accessory/storage/black_vest, VENDOR_ITEM_REGULAR), list("Webbing", round(scale * 2), /obj/item/clothing/accessory/storage/webbing, VENDOR_ITEM_REGULAR), - list("Drop Pouch", round(max(1,(scale * 0.5))), /obj/item/clothing/accessory/storage/droppouch, VENDOR_ITEM_REGULAR), - list("Shoulder Holster", round(max(1,(scale * 0.5))), /obj/item/clothing/accessory/storage/holster, VENDOR_ITEM_REGULAR), + list("Drop Pouch", 0.75, /obj/item/clothing/accessory/storage/droppouch, VENDOR_ITEM_REGULAR), + list("Shoulder Holster", 0.75, /obj/item/clothing/accessory/storage/holster, VENDOR_ITEM_REGULAR), list("ARMOR", -1, null, null), list("M3 Pattern Carrier Marine Armor", round(scale * 15), /obj/item/clothing/suit/storage/marine/carrier, VENDOR_ITEM_REGULAR), @@ -107,9 +108,9 @@ list("Shotgun Scabbard", round(scale * 5), /obj/item/storage/large_holster/m37, VENDOR_ITEM_REGULAR), list("RESTRICTED BACKPACKS", -1, null, null), - list("USCM Technician Welderpack", round(scale * 1.25), /obj/item/storage/backpack/marine/engineerpack, VENDOR_ITEM_REGULAR), + list("USCM Technician Welderpack", 1.25, /obj/item/storage/backpack/marine/engineerpack, VENDOR_ITEM_REGULAR), list("Technician Welder-Satchel", round(scale * 2), /obj/item/storage/backpack/marine/engineerpack/satchel, VENDOR_ITEM_REGULAR), - list("Radio Telephone Backpack", round(max(1,(scale * 0.5))), /obj/item/storage/backpack/marine/satchel/rto, VENDOR_ITEM_REGULAR), + list("Radio Telephone Backpack", 0.75, /obj/item/storage/backpack/marine/satchel/rto, VENDOR_ITEM_REGULAR), list("BELTS", -1, null, null), list("M276 Pattern Ammo Load Rig", round(scale * 15), /obj/item/storage/belt/marine, VENDOR_ITEM_REGULAR), @@ -136,12 +137,12 @@ list("Pistol Pouch", round(scale * 15), /obj/item/storage/pouch/pistol, VENDOR_ITEM_REGULAR), list("RESTRICTED POUCHES", -1, null, null, null), - list("Construction Pouch", round(scale * 1.25), /obj/item/storage/pouch/construction, VENDOR_ITEM_REGULAR), - list("Explosive Pouch", round(scale * 1.25), /obj/item/storage/pouch/explosive, VENDOR_ITEM_REGULAR), - list("First Responder Pouch (Empty)", round(scale * 2.5), /obj/item/storage/pouch/first_responder, VENDOR_ITEM_REGULAR), + list("Construction Pouch", 1.25, /obj/item/storage/pouch/construction, VENDOR_ITEM_REGULAR), + list("Explosive Pouch", 1.25, /obj/item/storage/pouch/explosive, VENDOR_ITEM_REGULAR), + list("First Responder Pouch (Empty)", 2.5, /obj/item/storage/pouch/first_responder, VENDOR_ITEM_REGULAR), list("Large Pistol Magazine Pouch", round(scale * 2), /obj/item/storage/pouch/magazine/pistol/large, VENDOR_ITEM_REGULAR), - list("Tools Pouch", round(scale * 1.25), /obj/item/storage/pouch/tools, VENDOR_ITEM_REGULAR), - list("Sling Pouch", round(scale * 1.25), /obj/item/storage/pouch/sling, VENDOR_ITEM_REGULAR), + list("Tools Pouch", 1.25, /obj/item/storage/pouch/tools, VENDOR_ITEM_REGULAR), + list("Sling Pouch", 1.25, /obj/item/storage/pouch/sling, VENDOR_ITEM_REGULAR), list("MASK", -1, null, null, null), list("Gas Mask", round(scale * 15), /obj/item/clothing/mask/gas, VENDOR_ITEM_REGULAR), @@ -215,7 +216,7 @@ req_access = list(ACCESS_MARINE_ALPHA) req_one_access = list(ACCESS_MARINE_LEADER, ACCESS_MARINE_SPECPREP, ACCESS_MARINE_RO) hackable = TRUE - vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND + vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_STOCK_DYNAMIC vend_x_offset = 2 @@ -226,13 +227,13 @@ /obj/structure/machinery/cm_vending/sorted/cargo_ammo/squad/populate_product_list(scale) listed_products = list( list("ARMOR-PIERCING AMMUNITION", -1, null, null), - list("M4RA AP Magazine (10x24mm)", round(scale * 3.5), /obj/item/ammo_magazine/rifle/m4ra/ap, VENDOR_ITEM_REGULAR), + list("M4RA AP Magazine (10x24mm)", 3.5, /obj/item/ammo_magazine/rifle/m4ra/ap, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", round(scale * 3), /obj/item/ammo_magazine/smg/m39/ap, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), - list("M39 Extended Magazine (10x20mm)", round(scale * 1.8), /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", round(scale * 1.9), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 1.8, /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", 1.9, /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIAL AMMUNITION", -1, null, null), list("M56 Smartgun Drum", 1, /obj/item/ammo_magazine/smartgun, VENDOR_ITEM_REGULAR), @@ -261,7 +262,7 @@ vend_x_offset = 2 vend_y_offset = 1 - vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND + vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_STOCK_DYNAMIC /obj/structure/machinery/cm_vending/sorted/cargo_guns/squad/ui_state(mob/user) return GLOB.not_incapacitated_and_adjacent_strict_state @@ -309,7 +310,7 @@ req_access = list(ACCESS_MARINE_ALPHA) req_one_access = list(ACCESS_MARINE_LEADER, ACCESS_MARINE_SPECPREP, ACCESS_MARINE_RO) hackable = TRUE - vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND + vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_STOCK_DYNAMIC vend_y_offset = 1 @@ -319,36 +320,36 @@ /obj/structure/machinery/cm_vending/sorted/attachments/squad/populate_product_list(scale) listed_products = list( list("BARREL", -1, null, null), - list("Extended Barrel", round(scale * 2.5), /obj/item/attachable/extended_barrel, VENDOR_ITEM_REGULAR), - list("Recoil Compensator", round(scale * 2.5), /obj/item/attachable/compensator, VENDOR_ITEM_REGULAR), - list("Suppressor", round(scale * 2.5), /obj/item/attachable/suppressor, VENDOR_ITEM_REGULAR), + list("Extended Barrel", 2.5, /obj/item/attachable/extended_barrel, VENDOR_ITEM_REGULAR), + list("Recoil Compensator", 2.5, /obj/item/attachable/compensator, VENDOR_ITEM_REGULAR), + list("Suppressor", 2.5, /obj/item/attachable/suppressor, VENDOR_ITEM_REGULAR), list("RAIL", -1, null, null), - list("B8 Smart-Scope", round(scale * 1.5), /obj/item/attachable/scope/mini_iff, VENDOR_ITEM_REGULAR), - list("Magnetic Harness", round(scale * 4), /obj/item/attachable/magnetic_harness, VENDOR_ITEM_REGULAR), - list("S4 2x Telescopic Mini-Scope", round(scale * 2), /obj/item/attachable/scope/mini, VENDOR_ITEM_REGULAR), - list("S5 Red-Dot Sight", round(scale * 3), /obj/item/attachable/reddot, VENDOR_ITEM_REGULAR), - list("S6 Reflex Sight", round(scale * 3), /obj/item/attachable/reflex, VENDOR_ITEM_REGULAR), - list("S8 4x Telescopic Scope", round(scale * 2), /obj/item/attachable/scope, VENDOR_ITEM_REGULAR), + list("B8 Smart-Scope", 1.5, /obj/item/attachable/scope/mini_iff, VENDOR_ITEM_REGULAR), + list("Magnetic Harness", 4, /obj/item/attachable/magnetic_harness, VENDOR_ITEM_REGULAR), + list("S4 2x Telescopic Mini-Scope", 2, /obj/item/attachable/scope/mini, VENDOR_ITEM_REGULAR), + list("S5 Red-Dot Sight", 3, /obj/item/attachable/reddot, VENDOR_ITEM_REGULAR), + list("S6 Reflex Sight", 3, /obj/item/attachable/reflex, VENDOR_ITEM_REGULAR), + list("S8 4x Telescopic Scope", 2, /obj/item/attachable/scope, VENDOR_ITEM_REGULAR), list("UNDERBARREL", -1, null, null), - list("Angled Grip", round(scale * 2.5), /obj/item/attachable/angledgrip, VENDOR_ITEM_REGULAR), - list("Bipod", round(scale * 2.5), /obj/item/attachable/bipod, VENDOR_ITEM_REGULAR), - list("Burst Fire Assembly", round(scale * 1.5), /obj/item/attachable/burstfire_assembly, VENDOR_ITEM_REGULAR), - list("Gyroscopic Stabilizer", round(scale * 1.5), /obj/item/attachable/gyro, VENDOR_ITEM_REGULAR), - list("Laser Sight", round(scale * 3), /obj/item/attachable/lasersight, VENDOR_ITEM_REGULAR), - list("Mini Flamethrower", round(scale * 1.5), /obj/item/attachable/attached_gun/flamer, VENDOR_ITEM_REGULAR), - list("XM-VESG-1 Flamer Nozzle", round(scale * 1.5), /obj/item/attachable/attached_gun/flamer_nozzle, VENDOR_ITEM_REGULAR), - list("U7 Underbarrel Shotgun", round(scale * 1.5), /obj/item/attachable/attached_gun/shotgun, VENDOR_ITEM_REGULAR), - list("Underbarrel Extinguisher", round(scale * 1.5), /obj/item/attachable/attached_gun/extinguisher, VENDOR_ITEM_REGULAR), - list("Vertical Grip", round(scale * 3), /obj/item/attachable/verticalgrip, VENDOR_ITEM_REGULAR), + list("Angled Grip", 2.5, /obj/item/attachable/angledgrip, VENDOR_ITEM_REGULAR), + list("Bipod", 2.5, /obj/item/attachable/bipod, VENDOR_ITEM_REGULAR), + list("Burst Fire Assembly", 1.5, /obj/item/attachable/burstfire_assembly, VENDOR_ITEM_REGULAR), + list("Gyroscopic Stabilizer", 1.5, /obj/item/attachable/gyro, VENDOR_ITEM_REGULAR), + list("Laser Sight", 3, /obj/item/attachable/lasersight, VENDOR_ITEM_REGULAR), + list("Mini Flamethrower", 1.5, /obj/item/attachable/attached_gun/flamer, VENDOR_ITEM_REGULAR), + list("XM-VESG-1 Flamer Nozzle", 1.5, /obj/item/attachable/attached_gun/flamer_nozzle, VENDOR_ITEM_REGULAR), + list("U7 Underbarrel Shotgun", 1.5, /obj/item/attachable/attached_gun/shotgun, VENDOR_ITEM_REGULAR), + list("Underbarrel Extinguisher", 1.5, /obj/item/attachable/attached_gun/extinguisher, VENDOR_ITEM_REGULAR), + list("Vertical Grip", 3, /obj/item/attachable/verticalgrip, VENDOR_ITEM_REGULAR), list("STOCK", -1, null, null), - list("M37 Wooden Stock", round(scale * 1.5), /obj/item/attachable/stock/shotgun, VENDOR_ITEM_REGULAR), - list("M39 Arm Brace", round(scale * 1.5), /obj/item/attachable/stock/smg/collapsible/brace, VENDOR_ITEM_REGULAR), - list("M39 Stock", round(scale * 1.5), /obj/item/attachable/stock/smg, VENDOR_ITEM_REGULAR), - list("M41A Solid Stock", round(scale * 1.5), /obj/item/attachable/stock/rifle, VENDOR_ITEM_REGULAR), - list("M44 Magnum Sharpshooter Stock", round(scale * 1.5), /obj/item/attachable/stock/revolver, VENDOR_ITEM_REGULAR) + list("M37 Wooden Stock", 1.5, /obj/item/attachable/stock/shotgun, VENDOR_ITEM_REGULAR), + list("M39 Arm Brace", 1.5, /obj/item/attachable/stock/smg/collapsible/brace, VENDOR_ITEM_REGULAR), + list("M39 Stock", 1.5, /obj/item/attachable/stock/smg, VENDOR_ITEM_REGULAR), + list("M41A Solid Stock", 1.5, /obj/item/attachable/stock/rifle, VENDOR_ITEM_REGULAR), + list("M44 Magnum Sharpshooter Stock", 1.5, /obj/item/attachable/stock/revolver, VENDOR_ITEM_REGULAR) ) //------------ESSENTIAL SETS--------------- diff --git a/code/game/machinery/vending/vendor_types/wo_vendors.dm b/code/game/machinery/vending/vendor_types/wo_vendors.dm index 557933754f07..46299ef19f4c 100644 --- a/code/game/machinery/vending/vendor_types/wo_vendors.dm +++ b/code/game/machinery/vending/vendor_types/wo_vendors.dm @@ -66,7 +66,7 @@ /obj/structure/machinery/cm_vending/sorted/cargo_guns/squad_prep/wo req_access = list() req_one_access = list() - vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_LOAD_AMMO_BOXES + vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_LOAD_AMMO_BOXES | VEND_STOCK_DYNAMIC /obj/structure/machinery/cm_vending/sorted/cargo_guns/squad_prep/wo/populate_product_list(scale) listed_products = list( diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index e4e4923173bf..2902d96373c2 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -369,8 +369,10 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) var/processing = 1 var/processing_interval = 300 var/iteration = 0 - //supply points - var/points = 120 + /// Current supply points + var/points = 0 + /// Multiplier to the amount of points awarded based on marine scale + var/points_scale = 120 var/points_per_process = 1.5 var/points_per_slip = 1 var/points_per_crate = 2 diff --git a/code/modules/admin/player_panel/actions/physical.dm b/code/modules/admin/player_panel/actions/physical.dm index eb43fe5d2aa8..21e6fed4f825 100644 --- a/code/modules/admin/player_panel/actions/physical.dm +++ b/code/modules/admin/player_panel/actions/physical.dm @@ -70,6 +70,7 @@ /datum/player_action/cryo_human/act(client/user, mob/target, list/params) + var/datum/job/job = GET_MAPPED_ROLE(target.job) if(ishuman(target)) var/mob/living/carbon/human/H = target if(H.assigned_squad) @@ -95,7 +96,8 @@ S.forget_marine_in_squad(H) message_admins("[key_name_admin(user)] sent [key_name_admin(target)] ([H.job]) to cryogenics.") - SSticker.mode.latejoin_tally-- //Cryoing someone out removes someone from the Marines, blocking further larva spawns until accounted for + //Cryoing someone out removes someone from the Marines, blocking further larva spawns until accounted for + SSticker.mode.latejoin_update(job, -1) //Handle job slot/tater cleanup. GLOB.RoleAuthority.free_role(GLOB.RoleAuthority.roles_for_mode[target.job], TRUE) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 2034202144b2..0276cacbfdc0 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -254,15 +254,16 @@ GLOB.data_core.manifest_inject(character) SSticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn - SSticker.mode.latejoin_tally += GLOB.RoleAuthority.calculate_role_weight(player_rank) + SSticker.mode.latejoin_update(player_rank) + SSticker.mode.update_gear_scale() for(var/datum/squad/sq in GLOB.RoleAuthority.squads) if(sq) sq.max_engineers = engi_slot_formula(GLOB.clients.len) sq.max_medics = medic_slot_formula(GLOB.clients.len) - if(SSticker.mode.latejoin_larva_drop && SSticker.mode.latejoin_tally >= SSticker.mode.latejoin_larva_drop) - SSticker.mode.latejoin_tally -= SSticker.mode.latejoin_larva_drop + if(SSticker.mode.latejoin_larva_drop && SSticker.mode.latejoin_tally - SSticker.mode.latejoin_larva_used >= SSticker.mode.latejoin_larva_drop) + SSticker.mode.latejoin_larva_used += SSticker.mode.latejoin_larva_drop var/datum/hive_status/hive for(var/hivenumber in GLOB.hive_datum) hive = GLOB.hive_datum[hivenumber]