mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Adds a safety to uplink discounts, preventing the amount of sales from exceeding the amount of categories. (#93202)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
per_category[possible_sale.category] = list()
|
||||
per_category[possible_sale.category] += possible_sale
|
||||
|
||||
for (var/i in 1 to num)
|
||||
for (var/i in 1 to min(length(per_category), num))
|
||||
var/datum/uplink_category/item_category = pick(per_category)
|
||||
var/datum/uplink_item/taken_item = pick(per_category[item_category])
|
||||
per_category -= item_category
|
||||
|
||||
Reference in New Issue
Block a user