Refactored material definitions a little bit, removed all bananium from the codebase.

This commit is contained in:
Zuhayr
2014-06-08 00:40:34 +09:30
parent a026575ef7
commit c2f2a7cde6
18 changed files with 120 additions and 356 deletions

View File

@@ -16,7 +16,6 @@ The currently supporting non-reagent materials:
- $gold (/obj/item/stack/gold). One sheet = 3750 units.
- $uranium (/obj/item/stack/uranium). One sheet = 3750 units.
- $diamond (/obj/item/stack/diamond). One sheet = 3750 units.
- $clown (/obj/item/stack/clown). One sheet = 3750 units. ("Bananium")
(Insert new ones here)
Don't add new keyword/IDs if they are made from an existing one (such as rods which are made from metal). Only add raw materials.

View File

@@ -102,9 +102,6 @@ Note: Must be placed west/left of and R&D console to function.
if(diamond_amount >= 2000)
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/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/mineral/adamantine/G = new /obj/item/stack/sheet/mineral/adamantine(src.loc)
G.amount = round(adamantine_amount / G.perunit)
@@ -172,8 +169,6 @@ Note: Must be placed west/left of and R&D console to function.
uranium_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/diamond)
diamond_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/clown)
clown_amount += amount * 2000
if(/obj/item/stack/sheet/mineral/adamantine)
adamantine_amount += amount * 2000
else

View File

@@ -84,8 +84,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
return_name = "Uranium"
if("diamond")
return_name = "Diamond"
if("clown")
return_name = "Bananium"
else
for(var/R in typesof(/datum/reagent) - /datum/reagent)
temp_reagent = null
@@ -163,7 +161,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else
//The construction/deconstruction of the console code.
..()
src.updateUsrDialog()
return
@@ -456,9 +454,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if("diamond")
type = /obj/item/stack/sheet/mineral/diamond
res_amount = "diamond_amount"
if("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)
var/available_num_sheets = round(linked_lathe.vars[res_amount]/sheet.perunit)
@@ -785,12 +781,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(linked_lathe.diamond_amount >= 10000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.diamond_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Bananium
dat += "* [linked_lathe.clown_amount] cm<sup>3</sup> of Bananium || "
dat += "Eject: "
if(linked_lathe.clown_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.clown_amount >= 10000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.clown_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
if(3.3) //Protolathe Chemical Storage Submenu
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "