Merge pull request #2981 from Yoshax/mkaykids

Fixes runtimes
This commit is contained in:
Anewbe
2017-02-04 21:05:31 -06:00
committed by GitHub
4 changed files with 8 additions and 9 deletions
+2 -2
View File
@@ -17,7 +17,7 @@
var/list/resource_field = list()
var/ore_types = list(
"iron" = /obj/item/weapon/ore/iron,
"hematite" = /obj/item/weapon/ore/iron,
"uranium" = /obj/item/weapon/ore/uranium,
"gold" = /obj/item/weapon/ore/gold,
"silver" = /obj/item/weapon/ore/silver,
@@ -26,7 +26,7 @@
"osmium" = /obj/item/weapon/ore/osmium,
"hydrogen" = /obj/item/weapon/ore/hydrogen,
"silicates" = /obj/item/weapon/ore/glass,
"carbonaceous rock" = /obj/item/weapon/ore/coal
"carbon" = /obj/item/weapon/ore/coal
)
//Upgrades
+1 -1
View File
@@ -29,7 +29,7 @@
var/ore_type
switch(metal)
if("silicates", "carbonaceous rock", "iron") ore_type = "surface minerals"
if("silicates", "carbon", "hematite") ore_type = "surface minerals"
if("gold", "silver", "diamond") ore_type = "precious metals"
if("uranium") ore_type = "nuclear fuel"
if("phoron", "osmium", "hydrogen") ore_type = "exotic matter"
+1 -2
View File
@@ -175,9 +175,8 @@ var/list/mining_overlay_cache = list()
if(severity <= 2) // Now to expose the ore lying under the sand.
spawn(1) // Otherwise most of the ore is lost to the explosion, which makes this rather moot.
var/losses = rand(0.5, 1) // Between 0% to 50% loss due to booms.
for(var/ore in resources)
var/amount_to_give = Ceiling(resources[ore] * losses) // Should result in at least one piece of ore.
var/amount_to_give = rand(Ceiling(resources[ore]/2), resources[ore]) // Should result in at least one piece of ore.
for(var/i=1, i <= amount_to_give, i++)
var/oretype = ore_types[ore]
new oretype(src)
+4 -4
View File
@@ -49,11 +49,11 @@
if(!priority_process) sleep(-1)
T.resources = list()
T.resources["silicates"] = rand(3,5)
T.resources["carbonaceous rock"] = rand(3,5)
T.resources["carbon"] = rand(3,5)
var/current_cell = map[get_map_cell(x,y)]
if(current_cell < rare_val) // Surface metals.
T.resources["iron"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
T.resources["hematite"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
T.resources["gold"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
T.resources["silver"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
@@ -69,14 +69,14 @@
T.resources["osmium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
T.resources["hydrogen"] = 0
T.resources["diamond"] = 0
T.resources["iron"] = 0
T.resources["hematite"] = 0
else // Deep metals.
T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
T.resources["diamond"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
T.resources["phoron"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
T.resources["osmium"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
T.resources["hydrogen"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
T.resources["iron"] = 0
T.resources["hematite"] = 0
T.resources["gold"] = 0
T.resources["silver"] = 0
return