From aabcfb580bc3ee999decbca1de237fde0769a153 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Mon, 6 Apr 2020 19:49:06 +0100 Subject: [PATCH] discounts rerolling is bad --- code/datums/components/uplink.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/datums/components/uplink.dm b/code/datums/components/uplink.dm index 7df570587d..dde8961482 100644 --- a/code/datums/components/uplink.dm +++ b/code/datums/components/uplink.dm @@ -124,7 +124,11 @@ GLOBAL_LIST_EMPTY(uplinks) saved_player_population = GLOB.joined_player_list.len //if population has changed, update uplink items if(saved_player_population != previous_player_population) - uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted, filters) + //make sure discounts are not rerolled + var/old_discounts = uplink_items["Discounted Gear"] + uplink_items = get_uplink_items(gamemode, FALSE, allow_restricted, filters) + if(old_discounts) + uplink_items["Discounted Gear"] = old_discounts ui_interact(user) // an unlocked uplink blocks also opening the PDA or headset menu @@ -200,7 +204,7 @@ GLOBAL_LIST_EMPTY(uplinks) if(item in buyable_items) var/datum/uplink_item/I = buyable_items[item] //check to make sure people cannot buy items when the player pop is below the requirement - if(saved_player_population >= I.player_minimum) + if(GLOB.joined_player_list.len >= I.player_minimum) MakePurchase(usr, I) . = TRUE if("lock")