Make stack amount var private

This commit is contained in:
Aronai Sieyes
2021-08-19 21:06:46 -04:00
parent ab7b3fcad9
commit e52031d6aa
72 changed files with 241 additions and 297 deletions
@@ -116,7 +116,6 @@
for(var/i = 0, i<2, i++)
for(var/res in resources)
var/obj/item/stack/R = new res(src)
R.amount = R.max_amount
new res(src, -1)
return ..()
+1 -2
View File
@@ -43,8 +43,7 @@
to_chat(user, "<span class='notice'>You start to cut the shower curtains.</span>")
if(do_after(user, 10))
to_chat(user, "<span class='notice'>You cut the shower curtains.</span>")
var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
A.amount = 3
new /obj/item/stack/material/plastic(src.loc, 3)
qdel(src)
return
else
+1 -2
View File
@@ -113,8 +113,7 @@
if(finished)
to_chat(user, "<span class='notice'>You start breaking down \the [src].</span>")
if(do_after(user, 10 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE))
var/obj/item/stack/S = new /obj/item/stack/material/plasteel(loc)
S.amount = 10
new /obj/item/stack/material/plasteel(loc, 10)
playsound(user, O.usesound, 50, 1)
qdel(src)
else
+1 -2
View File
@@ -101,8 +101,7 @@
return
if(product && product_amount) // Make wooden logs.
var/obj/item/stack/material/M = new product(get_turf(src))
M.amount = product_amount
var/obj/item/stack/material/M = new product(get_turf(src), product_amount)
M.update_icon()
visible_message("<span class='danger'>\The [src] is felled!</span>")
stump()
+1 -2
View File
@@ -22,8 +22,7 @@
to_chat(user, "<span class='notice'>You start to cut the plastic flaps.</span>")
if(do_after(user, 10 * P.toolspeed))
to_chat(user, "<span class='notice'>You cut the plastic flaps.</span>")
var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
A.amount = 4
new /obj/item/stack/material/plastic(src.loc, 4)
qdel(src)
return
else
+1 -1
View File
@@ -297,7 +297,7 @@
visible_message("<span class='notice'>[user] dismantles \the [src].</span>")
var/obj/item/stack/material/mats = new glasstype(loc)
if(is_fulltile())
mats.amount = 4
mats.set_amount(4)
qdel(src)
else if(istype(W, /obj/item/stack/cable_coil) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
var/obj/item/stack/cable_coil/C = W