Skip to content

Commit

Permalink
fixes drop pouch not being given to vendors and makes it scale the sa…
Browse files Browse the repository at this point in the history
…me 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
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
balance: Drop pouch now scales the same as normal webbing
/:cl:

---------

Co-authored-by: InsaneRed <[email protected]>
  • Loading branch information
Red-byte3D and InsaneRed committed Feb 14, 2024
1 parent 696a7ef commit 213896b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/game/machinery/vending/cm_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 213896b

Please sign in to comment.