Cargo Fixes (#1087)

Fixes several problems and runtime errors related to spawning cargo stock and loot crates
This commit is contained in:
NanakoAC
2016-10-30 01:14:12 +03:00
committed by skull132
parent 415096c035
commit e0cbf33bde
5 changed files with 17 additions and 12 deletions
@@ -551,10 +551,15 @@
"largemetal" = "largemetalopen",
"medicalcrate" = "medicalcrateopen")
/obj/structure/closet/crate/loot/New(var/location, var/rarity = 1, var/quantity = 10)
/obj/structure/closet/crate/loot/New(var/location, var/_rarity = 1, var/_quantity = 10)
rarity = _rarity
quantity = _quantity
..(location)
rarity = rarity
quantity = quantity
/obj/structure/closet/crate/loot/initialize()
spawntypes = list("1" = STOCK_RARE_PROB*rarity, "2" = STOCK_UNCOMMON_PROB*rarity, "3" = (100 - ((STOCK_RARE_PROB*rarity) + (STOCK_UNCOMMON_PROB*rarity))))
icon_closed = pick(iconchoices)