From 213896bd56314e9643c37d86f849a5c08fc83f2a Mon Sep 17 00:00:00 2001 From: InsaneRed <47158596+InsaneRed@users.noreply.github.com> Date: Wed, 14 Feb 2024 07:44:17 +0300 Subject: [PATCH] fixes drop pouch not being given to vendors and makes it scale the same as base webbing (#5706) # About the pull request makes the droppouch scale with pop, fixes it from being constantly 0 # Explain why it's good for the game bugfix, old value was 0.75 which meant squad vendors were not receiving any. makes it scale like the webbing as requested by drathek # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: balance: Drop pouch now scales the same as normal webbing /:cl: --------- Co-authored-by: InsaneRed --- code/game/machinery/vending/cm_vending.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/vending/cm_vending.dm b/code/game/machinery/vending/cm_vending.dm index 2ba1ac089826..4f825030d627 100644 --- a/code/game/machinery/vending/cm_vending.dm +++ b/code/game/machinery/vending/cm_vending.dm @@ -900,7 +900,7 @@ GLOBAL_LIST_EMPTY(vending_products) for(var/list/vendspec in listed_products) var/multiplier = vendspec[2] if(multiplier > 0) - var/awarded = round(vendspec[2] * scale) // Starting amount + var/awarded = round(vendspec[2] * scale, 1) // 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 @@ -920,8 +920,8 @@ GLOBAL_LIST_EMPTY(vending_products) 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 + var/projected_max_amount = round(new_scale * multiplier, 1) // How much we would have had total now in total + var/amount_to_add = round(projected_max_amount - previous_max_amount, 1) // Rounding just in case if(amount_to_add > 0) metadata[2] += amount_to_add vendspec[2] += amount_to_add