mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge pull request #8946 from Zuhayr/miningstuff
Wall refactor/mining changes.
This commit is contained in:
@@ -67,8 +67,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if (copytext(ID, 1, 2) == "$")
|
||||
return_name = copytext(ID, 2)
|
||||
switch(return_name)
|
||||
if("metal")
|
||||
return_name = "Metal"
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
return_name = "Steel"
|
||||
if("glass")
|
||||
return_name = "Glass"
|
||||
if("gold")
|
||||
@@ -263,7 +263,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
|
||||
files.UpdateDesign(linked_destroy.loaded_item.type)
|
||||
if(linked_lathe && linked_destroy.loaded_item.matter) //Also sends salvaged materials to a linked protolathe, if any.
|
||||
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["metal"]*linked_destroy.decon_mod))
|
||||
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter[DEFAULT_WALL_MATERIAL]*linked_destroy.decon_mod))
|
||||
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["glass"]*linked_destroy.decon_mod))
|
||||
linked_destroy.loaded_item = null
|
||||
for(var/obj/I in linked_destroy.contents)
|
||||
@@ -439,27 +439,24 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material
|
||||
var/desired_num_sheets = text2num(href_list["amount"])
|
||||
var/res_amount, type
|
||||
switch(href_list["lathe_ejectsheet"])
|
||||
if("metal")
|
||||
type = /obj/item/stack/sheet/metal
|
||||
var/material/M = name_to_material[href_list["lathe_ejectsheet"]]
|
||||
if(istype(M))
|
||||
type = M.stack_type
|
||||
|
||||
switch(name_to_material[href_list["lathe_ejectsheet"]])
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
res_amount = "m_amount"
|
||||
if("glass")
|
||||
type = /obj/item/stack/sheet/glass
|
||||
res_amount = "g_amount"
|
||||
if("gold")
|
||||
type = /obj/item/stack/sheet/mineral/gold
|
||||
res_amount = "gold_amount"
|
||||
if("silver")
|
||||
type = /obj/item/stack/sheet/mineral/silver
|
||||
res_amount = "silver_amount"
|
||||
if("phoron")
|
||||
type = /obj/item/stack/sheet/mineral/phoron
|
||||
res_amount = "phoron_amount"
|
||||
if("uranium")
|
||||
type = /obj/item/stack/sheet/mineral/uranium
|
||||
res_amount = "uranium_amount"
|
||||
if("diamond")
|
||||
type = /obj/item/stack/sheet/mineral/diamond
|
||||
res_amount = "diamond_amount"
|
||||
|
||||
if(ispath(type) && hasvar(linked_lathe, res_amount))
|
||||
@@ -818,11 +815,11 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
|
||||
dat += "Material Storage<BR><HR>"
|
||||
dat += "<UL>"
|
||||
for(var/M in list("metal", "glass", "gold", "silver", "phoron", "uranium", "diamond"))
|
||||
for(var/M in list(DEFAULT_WALL_MATERIAL, "glass", "gold", "silver", "phoron", "uranium", "diamond"))
|
||||
var/amount
|
||||
var/sheetsize = 2000
|
||||
switch(M)
|
||||
if("metal")
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
amount = linked_lathe.m_amount
|
||||
sheetsize = 3750
|
||||
if("glass")
|
||||
|
||||
@@ -269,7 +269,7 @@ datum/tech/robotics
|
||||
icon_state = "datadisk2"
|
||||
item_state = "card-id"
|
||||
w_class = 2.0
|
||||
matter = list("metal" = 30, "glass" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30, "glass" = 10)
|
||||
var/datum/tech/stored
|
||||
|
||||
/obj/item/weapon/disk/tech_disk/New()
|
||||
@@ -283,7 +283,7 @@ datum/tech/robotics
|
||||
icon_state = "datadisk2"
|
||||
item_state = "card-id"
|
||||
w_class = 2.0
|
||||
matter = list("metal" = 30,"glass" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10)
|
||||
var/datum/design/blueprint
|
||||
|
||||
/obj/item/weapon/disk/design_disk/New()
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
var/apply_prefix = 1
|
||||
if(prob(40))
|
||||
material_descriptor = pick("rusted ","dusty ","archaic ","fragile ")
|
||||
source_material = pick("cordite","quadrinium","steel","titanium","aluminium","ferritic-alloy","plasteel","duranium")
|
||||
source_material = pick("cordite","quadrinium",DEFAULT_WALL_MATERIAL,"titanium","aluminium","ferritic-alloy","plasteel","duranium")
|
||||
|
||||
var/talkative = 0
|
||||
if(prob(5))
|
||||
@@ -490,7 +490,7 @@
|
||||
new_item = new /obj/item/clothing/mask/gas(src.loc)
|
||||
var/decorations = ""
|
||||
if(apply_material_decorations)
|
||||
source_material = pick("cordite","quadrinium","steel","titanium","aluminium","ferritic-alloy","plasteel","duranium")
|
||||
source_material = pick("cordite","quadrinium",DEFAULT_WALL_MATERIAL,"titanium","aluminium","ferritic-alloy","plasteel","duranium")
|
||||
desc = "A [material_descriptor ? "[material_descriptor] " : ""][item_type] made of [source_material], all craftsmanship is of [pick("the lowest","low","average","high","the highest")] quality."
|
||||
|
||||
var/list/descriptors = list()
|
||||
|
||||
@@ -61,44 +61,19 @@
|
||||
age = rand(1,999)
|
||||
|
||||
if(container.mineral)
|
||||
switch(container.mineral.name)
|
||||
if("Uranium")
|
||||
age_million = rand(1, 704)
|
||||
age_thousand = rand(1,999)
|
||||
find_presence["potassium"] = rand(1,1000) / 100
|
||||
source_mineral = "potassium"
|
||||
if("Iron")
|
||||
age_thousand = rand(1, 999)
|
||||
age_million = rand(1, 999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Diamond")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["nitrogen"] = rand(1,1000) / 100
|
||||
source_mineral = "nitrogen"
|
||||
if("Gold")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(3,4)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Silver")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Phoron")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(10, 13)
|
||||
find_presence["phoron"] = rand(1,1000) / 100
|
||||
source_mineral = "phoron"
|
||||
if("Clown")
|
||||
age = rand(-1,-999) //thats the joke
|
||||
age_thousand = rand(-1,-999)
|
||||
find_presence["phoron"] = rand(1,1000) / 100
|
||||
source_mineral = "phoron"
|
||||
if(islist(container.mineral.xarch_ages))
|
||||
var/list/ages = container.mineral.xarch_ages
|
||||
if(ages["thousand"])
|
||||
age_thousand = rand(1,ages["thousand"])
|
||||
if(ages["million"])
|
||||
age_million = rand(1,ages["million"])
|
||||
if(ages["billion"])
|
||||
if(ages["billion_lower"])
|
||||
age_billion = rand(ages["billion_lower"],ages["billion"])
|
||||
else
|
||||
age_billion = rand(1,ages["billion"])
|
||||
if(container.mineral.xarch_source_mineral)
|
||||
source_mineral = container.mineral.xarch_source_mineral
|
||||
|
||||
if(prob(75))
|
||||
find_presence["phosphorus"] = rand(1,500) / 100
|
||||
|
||||
Reference in New Issue
Block a user