mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
stopped random potentially picking a discount after its been bought
Fixed a very unlikely to occur bug, also got rid of old code that served no purpose.
This commit is contained in:
@@ -65,8 +65,6 @@ var/list/world_uplinks = list()
|
||||
category_items = 0
|
||||
|
||||
for(var/datum/uplink_item/I in uplink_items[category])
|
||||
if(I.limited_stock == 0)
|
||||
continue
|
||||
if(I.cost > uses)
|
||||
continue
|
||||
if(I.job && I.job.len)
|
||||
@@ -92,8 +90,6 @@ var/list/world_uplinks = list()
|
||||
for(var/category in uplink_items)
|
||||
nano[++nano.len] = list("Category" = category, "items" = list())
|
||||
for(var/datum/uplink_item/I in uplink_items[category])
|
||||
if(I.limited_stock == 0)
|
||||
continue
|
||||
if(I.job && I.job.len)
|
||||
if(!(I.job.Find(job)))
|
||||
continue
|
||||
@@ -113,7 +109,7 @@ var/list/world_uplinks = list()
|
||||
var/list/random_items = new
|
||||
for(var/IR in ItemsReference)
|
||||
var/datum/uplink_item/UI = ItemsReference[IR]
|
||||
if(UI.cost <= uses)
|
||||
if(UI.cost <= uses && UI.limited_stock != 0)
|
||||
random_items += UI
|
||||
return pick(random_items)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user