mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
Make stack amount var private
This commit is contained in:
@@ -135,7 +135,7 @@
|
||||
LAZYADDASSOCLIST(.["instances"], item.type, item)
|
||||
if(istype(item, /obj/item/stack))
|
||||
var/obj/item/stack/stack = item
|
||||
.["other"][item.type] += stack.amount
|
||||
.["other"][item.type] += stack.get_amount()
|
||||
else if(item.tool_qualities)
|
||||
.["tool_qualities"] |= item.tool_qualities
|
||||
.["other"][item.type] += 1
|
||||
@@ -297,20 +297,20 @@
|
||||
var/obj/item/stack/SD
|
||||
while(amt > 0)
|
||||
S = locate(path_key) in surroundings
|
||||
if(S.amount >= amt)
|
||||
if(S.get_amount() >= amt)
|
||||
if(!locate(S.type) in Deletion)
|
||||
SD = new S.type()
|
||||
Deletion += SD
|
||||
S.use(amt)
|
||||
SD = locate(S.type) in Deletion
|
||||
SD.amount += amt
|
||||
SD.add(amt)
|
||||
continue main_loop
|
||||
else
|
||||
amt -= S.amount
|
||||
amt -= S.get_amount()
|
||||
if(!locate(S.type) in Deletion)
|
||||
Deletion += S
|
||||
else
|
||||
data = S.amount
|
||||
data = S.get_amount()
|
||||
S = locate(S.type) in Deletion
|
||||
S.add(data)
|
||||
surroundings -= S
|
||||
@@ -334,8 +334,8 @@
|
||||
continue
|
||||
else if(istype(part, /obj/item/stack))
|
||||
var/obj/item/stack/ST = locate(part) in Deletion
|
||||
if(ST.amount > partlist[part])
|
||||
ST.amount = partlist[part]
|
||||
if(ST.get_amount() > partlist[part])
|
||||
ST.set_amount(partlist[part])
|
||||
. += ST
|
||||
Deletion -= ST
|
||||
continue
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
if(.)
|
||||
var/obj/item/stack/S = product
|
||||
if(istype(S))
|
||||
amount += S.amount
|
||||
amount += S.get_amount()
|
||||
|
||||
/datum/stored_item/stack/get_product(var/product_location, var/count)
|
||||
if(!LAZYLEN(instances))
|
||||
|
||||
Reference in New Issue
Block a user