Adds a safety to uplink discounts, preventing the amount of sales from exceeding the amount of categories. (#93202)

This commit is contained in:
Xander3359
2025-10-08 11:21:38 +11:00
committed by GitHub
parent d0fbea4be5
commit 7e3caa6eca
+1 -1
View File
@@ -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