Random mineral spawns change less turfs. (#49205)

As-is, random mineral spawning changes the turf to the subtype with that mineral, which results in a lot of turf changes I guess. Now it just changes the mineralType of the turf. Unless it's gibtonite or a cave spawner, because the alternatives are worse and those aren't all that common anyway.

🆑
tweak: Random mineral turfs no longer cause large amounts of turf changes on initialization.
/🆑
This commit is contained in:
Buggy123
2020-02-15 13:34:15 +13:00
committed by GitHub
parent 0f03149abe
commit 800457ffc8
3 changed files with 71 additions and 63 deletions
+16
View File
@@ -19,6 +19,8 @@
var/mine_experience = 5 //How much experience do you get for mining this ore?
novariants = TRUE // Ore stacks handle their icon updates themselves to keep the illusion that there's more going
var/list/stack_overlays
var/scan_state = "" //Used by mineral turfs for their scan overlay.
var/spreadChance = 0 //Also used by mineral turfs for spreading veins
/obj/item/stack/ore/update_overlays()
. = ..()
@@ -74,6 +76,8 @@
custom_materials = list(/datum/material/uranium=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/uranium
mine_experience = 6
scan_state = "rock_Uranium"
spreadChance = 5
/obj/item/stack/ore/iron
name = "iron ore"
@@ -84,6 +88,8 @@
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/metal
mine_experience = 1
scan_state = "rock_Iron"
spreadChance = 20
/obj/item/stack/ore/glass
name = "sand pile"
@@ -139,6 +145,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
custom_materials = list(/datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/plasma
mine_experience = 5
scan_state = "rock_Plasma"
spreadChance = 8
/obj/item/stack/ore/plasma/welder_act(mob/living/user, obj/item/I)
to_chat(user, "<span class='warning'>You can't hit a high enough temperature to smelt [src] properly!</span>")
@@ -154,6 +162,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
mine_experience = 3
custom_materials = list(/datum/material/silver=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/silver
scan_state = "rock_Silver"
spreadChance = 5
/obj/item/stack/ore/gold
name = "gold ore"
@@ -164,6 +174,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
mine_experience = 5
custom_materials = list(/datum/material/gold=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/gold
scan_state = "rock_Gold"
spreadChance = 5
/obj/item/stack/ore/diamond
name = "diamond ore"
@@ -174,6 +186,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
custom_materials = list(/datum/material/diamond=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/diamond
mine_experience = 10
scan_state = "rock_Diamond"
/obj/item/stack/ore/bananium
name = "bananium ore"
@@ -184,6 +197,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
custom_materials = list(/datum/material/bananium=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/bananium
mine_experience = 15
scan_state = "rock_Bananium"
/obj/item/stack/ore/titanium
name = "titanium ore"
@@ -194,6 +208,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/titanium
mine_experience = 3
scan_state = "rock_Titanium"
spreadChance = 5
/obj/item/stack/ore/slag
name = "slag"