diff --git a/code/_globalvars/lists/ores_spawned.dm b/code/_globalvars/lists/ores_spawned.dm index 227e06061ad..a6a9654f823 100644 --- a/code/_globalvars/lists/ores_spawned.dm +++ b/code/_globalvars/lists/ores_spawned.dm @@ -9,27 +9,23 @@ */ GLOBAL_LIST_INIT(ore_vent_minerals_lavaland, list( - /datum/material/iron = 13, - /datum/material/glass = 12, - /datum/material/plasma = 9, + /datum/material/iron = 14, + /datum/material/glass = 13, + /datum/material/plasma = 10, + /datum/material/silver = 7, /datum/material/titanium = 6, - /datum/material/silver = 5, /datum/material/gold = 5, - /datum/material/diamond = 3, - /datum/material/uranium = 3, - /datum/material/bluespace = 3, + /datum/material/uranium = 4, /datum/material/plastic = 1, )) GLOBAL_LIST_INIT(ore_vent_minerals_triple_z, list( - /datum/material/iron = 24, - /datum/material/glass = 23, - /datum/material/plasma = 16, + /datum/material/iron = 25, + /datum/material/glass = 24, + /datum/material/plasma = 17, /datum/material/titanium = 10, - /datum/material/silver = 8, - /datum/material/gold = 7, - /datum/material/diamond = 4, - /datum/material/uranium = 4, - /datum/material/bluespace = 3, + /datum/material/silver = 10, + /datum/material/gold = 8, + /datum/material/uranium = 5, /datum/material/plastic = 1, )) diff --git a/code/game/objects/structures/lavaland/ore_vent.dm b/code/game/objects/structures/lavaland/ore_vent.dm index 38e5ac83537..244e88102be 100644 --- a/code/game/objects/structures/lavaland/ore_vent.dm +++ b/code/game/objects/structures/lavaland/ore_vent.dm @@ -1,4 +1,4 @@ -#define MAX_ARTIFACT_ROLL_CHANCE 10 +#define ARTIFACT_ROLL_CHANCE 7 #define MINERAL_TYPE_OPTIONS_RANDOM 4 #define OVERLAY_OFFSET_START 0 #define OVERLAY_OFFSET_EACH 5 @@ -72,7 +72,7 @@ /// What base icon_state do we use for this vent's boulders? var/boulder_icon_state = "boulder" /// Percent chance that this vent will produce an artifact boulder. - var/artifact_chance = 0 + var/artifact_chance = ARTIFACT_ROLL_CHANCE /// We use a cooldown to prevent the wave defense from being started multiple times. COOLDOWN_DECLARE(wave_cooldown) /// We use a cooldown to prevent players from tapping boulders rapidly from vents. @@ -161,6 +161,8 @@ . += span_notice("This vent produces [span_bold("large")] boulders containing [ore_string]") else . += span_notice("This vent can be scanned with a [span_bold("Mining Scanner")].") + if(artifact_chance) + . += span_notice("This vent has a low chance to produce an [span_bold("artifact boulder.")] These may contain rare minerals or strange artifacts.") /obj/structure/ore_vent/add_context(atom/source, list/context, obj/item/held_item, mob/living/user) if(is_type_in_list(held_item, scanning_equipment)) @@ -526,6 +528,11 @@ var/atom/movable/flick_visual/visual = flick_overlay_view(mutable_appearance('icons/effects/vent_overlays.dmi', selected_mat.name), 4.5 SECONDS) animate(visual, alpha = 0, time = 4.5 SECONDS, easing = CIRCULAR_EASING|EASE_IN) + if(artifact_chance) + var/atom/movable/flick_visual/rare = flick_overlay_view(mutable_appearance('icons/effects/vent_overlays.dmi', "rare_ore"), 4.5 SECONDS) + animate(rare, alpha = 0, time = 4.5 SECONDS, easing = CIRCULAR_EASING|EASE_IN) + + /** * Here is where we handle producing a new boulder, based on the qualities of this ore vent. * Returns the boulder produced. @@ -541,7 +548,8 @@ //produce the boulder var/obj/item/boulder/new_rock if(prob(artifact_chance)) - new_rock = new /obj/item/boulder/artifact(loc) + var/picked_artifact = pick(typesof(/obj/item/boulder/artifact)) + new_rock = new picked_artifact(loc) else new_rock = new /obj/item/boulder(loc) Shake(duration = 1.5 SECONDS) @@ -646,6 +654,10 @@ /datum/material/glass = 1, ) +/obj/structure/ore_vent/starter_resources/Initialize(mapload) + . = ..() + generate_description() + /obj/structure/ore_vent/random // Todo: determine if we need a boulder_size default thats unique from the override performed in vent_size_setup. @@ -654,7 +666,6 @@ if(!unique_vent && !mapload) generate_mineral_breakdown(map_loading = mapload) //Default to random mineral breakdowns, unless this is a unique vent or we're still setting up default vent distribution. generate_description() - artifact_chance = rand(0, MAX_ARTIFACT_ROLL_CHANCE) if(!mapload) vent_size_setup(random = TRUE) // We only do this here specific to random distribution ore vents, and within mapload we handle this manually within SSore_generation. @@ -700,9 +711,9 @@ /datum/material/titanium = 1, /datum/material/silver = 1, /datum/material/gold = 1, - /datum/material/diamond = 1, + /datum/material/diamond = 0.1, /datum/material/uranium = 1, - /datum/material/bluespace = 1, + /datum/material/bluespace = 0.1, /datum/material/plastic = 1, ) defending_mobs = list( @@ -785,6 +796,7 @@ var/value = tgui_input_number(user, "What weight should it have?", "ore pickweight", 1, 100, 1) mineral_breakdown[choice] = value balloon_alert_to_viewers("weighting of [value] added") + generate_description() /obj/structure/ore_vent/debug/attack_hand_secondary(mob/user, list/modifiers) . = ..() @@ -807,7 +819,7 @@ GLOB.mining_center += loc return INITIALIZE_HINT_QDEL -#undef MAX_ARTIFACT_ROLL_CHANCE +#undef ARTIFACT_ROLL_CHANCE #undef MINERAL_TYPE_OPTIONS_RANDOM #undef OVERLAY_OFFSET_START #undef OVERLAY_OFFSET_EACH diff --git a/code/modules/mining/boulder_processing/boulder_types.dm b/code/modules/mining/boulder_processing/boulder_types.dm index ec67648fe2a..1a6979f3885 100644 --- a/code/modules/mining/boulder_processing/boulder_types.dm +++ b/code/modules/mining/boulder_processing/boulder_types.dm @@ -1,3 +1,6 @@ +#define BONUS_MATS_MINIMUM 1 +#define BONUS_MATS_MAXIMUM 5 + ///Boulders with special artificats that can give higher mining points /obj/item/boulder/artifact name = "artifact boulder" @@ -7,10 +10,14 @@ var/artifact_type = /obj/item/relic/lavaland /// References to the relic inside the boulder, if any. var/obj/item/artifact_inside + /// Bonus materials to add to this boulder, in addition to existing materials created by the ore vent. + var/datum/material/bonus_mat /obj/item/boulder/artifact/Initialize(mapload) . = ..() artifact_inside = new artifact_type(src) /// This could be poggers for archaeology in the future. + if(bonus_mat) + add_bonus_mats() /obj/item/boulder/artifact/Destroy(force) QDEL_NULL(artifact_inside) @@ -27,7 +34,24 @@ /obj/item/boulder/artifact/update_icon_state() . = ..() - icon_state = "boulder_artifact" // Hardset to artifact sprites for consistency + icon_state = initial(icon_state) // Hardset to artifact sprites for consistency + +/// Adds a random amount of material to an artifact boulder, determined by BONUS_MAT defines and of the type bonus_mat defined on the boulder. +/obj/item/boulder/artifact/proc/add_bonus_mats() + var/list/bonus_mats = list() + if(custom_materials) + bonus_mats = custom_materials.Copy() + bonus_mats[bonus_mat] += rand(BONUS_MATS_MINIMUM, BONUS_MATS_MAXIMUM) * SHEET_MATERIAL_AMOUNT + set_custom_materials(bonus_mats) + + +/obj/item/boulder/artifact/bluespace + icon_state = "boulder_artifact_BS" + bonus_mat = /datum/material/bluespace + +/obj/item/boulder/artifact/diamond + icon_state = "boulder_artifact_diamond" + bonus_mat = /datum/material/diamond ///Boulders usually spawned in lavaland labour camp area /obj/item/boulder/gulag @@ -77,3 +101,6 @@ desc = "A bizarre, twisted boulder. Wait, wait no, it's just a rock." custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.1, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.1) durability = 1 + +#undef BONUS_MATS_MINIMUM +#undef BONUS_MATS_MAXIMUM diff --git a/icons/effects/vent_overlays.dmi b/icons/effects/vent_overlays.dmi index 375117f4c79..c1e676591e7 100644 Binary files a/icons/effects/vent_overlays.dmi and b/icons/effects/vent_overlays.dmi differ diff --git a/icons/obj/ore.dmi b/icons/obj/ore.dmi index 5a363aad95b..8cb07a5312d 100644 Binary files a/icons/obj/ore.dmi and b/icons/obj/ore.dmi differ