Stack update

This commit is contained in:
Kelenius
2014-09-02 09:59:32 +04:00
parent fac6666b58
commit 505f857eb8
53 changed files with 447 additions and 457 deletions

View File

@@ -8,6 +8,7 @@
/*
* Stacks
*/
/obj/item/stack
gender = PLURAL
origin_tech = "materials=1"
@@ -19,11 +20,11 @@
/obj/item/stack/New(var/loc, var/amount=null)
..()
if (amount)
src.amount=amount
src.amount = amount
return
/obj/item/stack/Del()
if (src && usr && usr.machine==src)
if (src && usr && usr.machine == src)
usr << browse(null, "window=stack")
..()
@@ -69,12 +70,6 @@
var/title as text
var/can_build = 1
can_build = can_build && (max_multiplier>0)
/*
if (R.one_per_turf)
can_build = can_build && !(locate(R.result_type) in usr.loc)
if (R.on_floor)
can_build = can_build && istype(usr.loc, /turf/simulated/floor)
*/
if (R.res_amount>1)
title+= "[R.res_amount]x [R.title]\s"
else
@@ -181,6 +176,9 @@
amount += extra
return 1
/obj/item/stack/proc/get_amount()
return amount
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
var/obj/item/stack/oldsrc = src
src = null