mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-27 18:42:19 +00:00
-Changed all minerals path from /obj/item/stack/sheet to /obj/item/stack/sheet/mineral. (This change excludes glass, Rglass, metal and plasteel)
-Reduced the chunks of code about minerals in door_assembly.dm Preeeetty much this commit is just to update all the files to the new path of the minerals. From here, if I can, I'll start changing one by one to remove the huge chunks of code. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5087 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -80,10 +80,10 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
|
||||
G.amount = round(g_amount / 3750)
|
||||
if(gold_amount >= 2000)
|
||||
var/obj/item/stack/sheet/gold/G = new /obj/item/stack/sheet/gold(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(src.loc)
|
||||
G.amount = round(gold_amount / 2000)
|
||||
if(diamond_amount >= 2000)
|
||||
var/obj/item/stack/sheet/diamond/G = new /obj/item/stack/sheet/diamond(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc)
|
||||
G.amount = round(diamond_amount / 2000)
|
||||
del(src)
|
||||
return 1
|
||||
@@ -97,7 +97,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
return 1
|
||||
if (O.is_open_container())
|
||||
return 1
|
||||
if (!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/gold) && !istype(O, /obj/item/stack/sheet/diamond))
|
||||
if (!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond))
|
||||
user << "\red You cannot insert this item into the [name]!"
|
||||
return 1
|
||||
if (stat)
|
||||
@@ -124,9 +124,9 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
user << "\blue You add [amount] sheets to the [src.name]."
|
||||
if(istype(stack, /obj/item/stack/sheet/glass))
|
||||
g_amount += amount * 3750
|
||||
else if(istype(stack, /obj/item/stack/sheet/gold))
|
||||
else if(istype(stack, /obj/item/stack/sheet/mineral/gold))
|
||||
gold_amount += amount * 2000
|
||||
else if(istype(stack, /obj/item/stack/sheet/diamond))
|
||||
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
|
||||
diamond_amount += amount * 2000
|
||||
stack.use(amount)
|
||||
busy = 0
|
||||
|
||||
@@ -88,25 +88,25 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
|
||||
G.amount = round(g_amount / G.perunit)
|
||||
if(plasma_amount >= 2000)
|
||||
var/obj/item/stack/sheet/plasma/G = new /obj/item/stack/sheet/plasma(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma(src.loc)
|
||||
G.amount = round(plasma_amount / G.perunit)
|
||||
if(silver_amount >= 2000)
|
||||
var/obj/item/stack/sheet/silver/G = new /obj/item/stack/sheet/silver(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver(src.loc)
|
||||
G.amount = round(silver_amount / G.perunit)
|
||||
if(gold_amount >= 2000)
|
||||
var/obj/item/stack/sheet/gold/G = new /obj/item/stack/sheet/gold(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(src.loc)
|
||||
G.amount = round(gold_amount / G.perunit)
|
||||
if(uranium_amount >= 2000)
|
||||
var/obj/item/stack/sheet/uranium/G = new /obj/item/stack/sheet/uranium(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(src.loc)
|
||||
G.amount = round(uranium_amount / G.perunit)
|
||||
if(diamond_amount >= 2000)
|
||||
var/obj/item/stack/sheet/diamond/G = new /obj/item/stack/sheet/diamond(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc)
|
||||
G.amount = round(diamond_amount / G.perunit)
|
||||
if(clown_amount >= 2000)
|
||||
var/obj/item/stack/sheet/clown/G = new /obj/item/stack/sheet/clown(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown(src.loc)
|
||||
G.amount = round(clown_amount / G.perunit)
|
||||
if(adamantine_amount >= 2000)
|
||||
var/obj/item/stack/sheet/adamantine/G = new /obj/item/stack/sheet/adamantine(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/adamantine/G = new /obj/item/stack/sheet/mineral/adamantine(src.loc)
|
||||
G.amount = round(adamantine_amount / G.perunit)
|
||||
del(src)
|
||||
return 1
|
||||
@@ -157,19 +157,19 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
m_amount += amount * 3750
|
||||
else if(istype(stack, /obj/item/stack/sheet/glass))
|
||||
g_amount += amount * 3750
|
||||
else if(istype(stack, /obj/item/stack/sheet/gold))
|
||||
else if(istype(stack, /obj/item/stack/sheet/mineral/gold))
|
||||
gold_amount += amount * 2000
|
||||
else if(istype(stack, /obj/item/stack/sheet/silver))
|
||||
else if(istype(stack, /obj/item/stack/sheet/mineral/silver))
|
||||
silver_amount += amount * 2000
|
||||
else if(istype(stack, /obj/item/stack/sheet/plasma))
|
||||
else if(istype(stack, /obj/item/stack/sheet/mineral/plasma))
|
||||
plasma_amount += amount * 2000
|
||||
else if(istype(stack, /obj/item/stack/sheet/uranium))
|
||||
else if(istype(stack, /obj/item/stack/sheet/mineral/uranium))
|
||||
uranium_amount += amount * 2000
|
||||
else if(istype(stack, /obj/item/stack/sheet/diamond))
|
||||
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
|
||||
diamond_amount += amount * 2000
|
||||
else if(istype(stack, /obj/item/stack/sheet/clown))
|
||||
else if(istype(stack, /obj/item/stack/sheet/mineral/clown))
|
||||
clown_amount += amount * 2000
|
||||
else if(istype(stack, /obj/item/stack/sheet/adamantine))
|
||||
else if(istype(stack, /obj/item/stack/sheet/mineral/adamantine))
|
||||
adamantine_amount += amount * 2000
|
||||
stack.use(amount)
|
||||
busy = 0
|
||||
|
||||
@@ -460,22 +460,22 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
type = /obj/item/stack/sheet/glass
|
||||
res_amount = "g_amount"
|
||||
if("gold")
|
||||
type = /obj/item/stack/sheet/gold
|
||||
type = /obj/item/stack/sheet/mineral/gold
|
||||
res_amount = "gold_amount"
|
||||
if("silver")
|
||||
type = /obj/item/stack/sheet/silver
|
||||
type = /obj/item/stack/sheet/mineral/silver
|
||||
res_amount = "silver_amount"
|
||||
if("plasma")
|
||||
type = /obj/item/stack/sheet/plasma
|
||||
type = /obj/item/stack/sheet/mineral/plasma
|
||||
res_amount = "plasma_amount"
|
||||
if("uranium")
|
||||
type = /obj/item/stack/sheet/uranium
|
||||
type = /obj/item/stack/sheet/mineral/uranium
|
||||
res_amount = "uranium_amount"
|
||||
if("diamond")
|
||||
type = /obj/item/stack/sheet/diamond
|
||||
type = /obj/item/stack/sheet/mineral/diamond
|
||||
res_amount = "diamond_amount"
|
||||
if("clown")
|
||||
type = /obj/item/stack/sheet/clown
|
||||
type = /obj/item/stack/sheet/mineral/clown
|
||||
res_amount = "clown_amount"
|
||||
if(ispath(type) && hasvar(linked_lathe, res_amount))
|
||||
var/obj/item/stack/sheet/sheet = new type(linked_lathe.loc)
|
||||
@@ -493,10 +493,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
type = /obj/item/stack/sheet/glass
|
||||
res_amount = "g_amount"
|
||||
if("gold")
|
||||
type = /obj/item/stack/sheet/gold
|
||||
type = /obj/item/stack/sheet/mineral/gold
|
||||
res_amount = "gold_amount"
|
||||
if("diamond")
|
||||
type = /obj/item/stack/sheet/diamond
|
||||
type = /obj/item/stack/sheet/mineral/diamond
|
||||
res_amount = "diamond_amount"
|
||||
if(ispath(type) && hasvar(linked_imprinter, res_amount))
|
||||
var/obj/item/stack/sheet/sheet = new type(linked_imprinter.loc)
|
||||
|
||||
Reference in New Issue
Block a user