From a8576c0441957cb36ca140dc9ee64bc2cb6953fb Mon Sep 17 00:00:00 2001 From: BogCreature <112462947+BogCreature@users.noreply.github.com> Date: Wed, 1 Nov 2023 20:12:38 -0400 Subject: [PATCH] Judgement Day: TestMerge-ocalypse --- code/datums/mapgen/planetary/LavaGenerator.dm | 10 +-- code/datums/mapgen/planetary/SnowGenerator.dm | 24 +++---- code/game/objects/items/pinpointer.dm | 2 + code/game/turfs/closed/minerals.dm | 18 +++--- code/modules/cargo/packs/machinery.dm | 13 ++++ code/modules/mining/drill.dm | 22 ++++--- code/modules/mining/ore_veins.dm | 62 ++++++++++++++++++- 7 files changed, 116 insertions(+), 35 deletions(-) diff --git a/code/datums/mapgen/planetary/LavaGenerator.dm b/code/datums/mapgen/planetary/LavaGenerator.dm index 366773ebd0ea..c244f3ef2560 100644 --- a/code/datums/mapgen/planetary/LavaGenerator.dm +++ b/code/datums/mapgen/planetary/LavaGenerator.dm @@ -115,9 +115,9 @@ /mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient/crystal = 1, /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/forgotten = 1, /mob/living/simple_animal/hostile/asteroid/hivelord/legion/crystal = 1, - /obj/structure/spawner/lavaland/low_threat = 12, - /obj/structure/spawner/lavaland/medium_threat = 4, - /obj/structure/spawner/lavaland/high_threat = 2, + /obj/structure/spawner/lavaland/low_threat = 8, + /obj/structure/spawner/lavaland/medium_threat = 3, + /obj/structure/spawner/lavaland/high_threat = 1, ) /datum/biome/lavaland/forest @@ -237,8 +237,8 @@ /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/random = 40, /mob/living/simple_animal/hostile/asteroid/hivelord/legion/random = 30, /mob/living/simple_animal/hostile/asteroid/goldgrub = 10, - /obj/structure/spawner/lavaland/low_threat = 12, - /obj/structure/spawner/lavaland/medium_threat = 4, + /obj/structure/spawner/lavaland/low_threat = 8, + /obj/structure/spawner/lavaland/medium_threat = 3, /obj/structure/spawner/lavaland/high_threat = 2, /obj/structure/spawner/lavaland/extreme_threat = 1 ) diff --git a/code/datums/mapgen/planetary/SnowGenerator.dm b/code/datums/mapgen/planetary/SnowGenerator.dm index acd472c86151..a883ed58492c 100644 --- a/code/datums/mapgen/planetary/SnowGenerator.dm +++ b/code/datums/mapgen/planetary/SnowGenerator.dm @@ -117,9 +117,9 @@ /obj/structure/spawner/ice_moon/demonic_portal/low_threat = 25, /obj/structure/spawner/ice_moon/demonic_portal/medium_threat = 50, /obj/structure/spawner/ice_moon/demonic_portal/high_threat = 13, - /obj/structure/vein = 25, - /obj/structure/vein/classtwo = 50, - /obj/structure/vein/classthree = 10, + /obj/structure/vein/ice = 25, + /obj/structure/vein/ice/classtwo = 50, + /obj/structure/vein/ice/classthree = 10, ) /datum/biome/snow/lush @@ -171,9 +171,9 @@ /obj/structure/spawner/ice_moon/polarbear = 3, /obj/structure/statue/snow/snowman = 3, /obj/structure/statue/snow/snowlegion = 1, - /obj/structure/vein = 3, - /obj/structure/vein/classtwo = 4, - /obj/structure/vein/classthree = 1, + /obj/structure/vein/ice = 3, + /obj/structure/vein/ice/classtwo = 4, + /obj/structure/vein/ice/classthree = 1, ) mob_spawn_list = list( /mob/living/simple_animal/hostile/asteroid/wolf/random = 30, @@ -219,9 +219,9 @@ /obj/structure/spawner/ice_moon/demonic_portal/medium_threat = 500, /obj/structure/spawner/ice_moon/demonic_portal/high_threat = 50, /obj/structure/spawner/ice_moon/demonic_portal/extreme_threat = 1, - /obj/structure/vein = 300, - /obj/structure/vein/classtwo = 500, - /obj/structure/vein/classthree = 50, + /obj/structure/vein/ice = 300, + /obj/structure/vein/ice/classtwo = 500, + /obj/structure/vein/ice/classthree = 50, ) @@ -276,9 +276,9 @@ /obj/structure/spawner/ice_moon = 30, /obj/structure/spawner/ice_moon/polarbear = 30, /obj/effect/spawner/lootdrop/anomaly/ice/cave = 10, - /obj/structure/vein = 30, - /obj/structure/vein/classtwo = 50, - /obj/structure/vein/classthree = 6, + /obj/structure/vein/ice = 30, + /obj/structure/vein/ice/classtwo = 50, + /obj/structure/vein/ice/classthree = 6, ) /datum/biome/cave/snow/thawed diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm index 12f91f99fb8c..8a84f3192959 100644 --- a/code/game/objects/items/pinpointer.dm +++ b/code/game/objects/items/pinpointer.dm @@ -63,6 +63,8 @@ . = ..() if(!active) return + if(target.loc == null) + return if(!target) . += "pinon[alert ? "alert" : ""]null[icon_suffix]" return diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm index f31374bc8adf..00b729ffae06 100644 --- a/code/game/turfs/closed/minerals.dm +++ b/code/game/turfs/closed/minerals.dm @@ -155,11 +155,11 @@ return /turf/closed/mineral/random - var/list/mineralSpawnChanceList = list(/obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10, - /obj/item/stack/ore/silver = 12, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 40, /obj/item/stack/ore/titanium = 11, + var/list/mineralSpawnChanceList = list(/obj/item/stack/ore/uranium = 3, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 4, + /obj/item/stack/ore/silver = 4, /obj/item/stack/ore/plasma = 40, /obj/item/stack/ore/iron = 65, /obj/item/stack/ore/titanium = 5, /turf/closed/mineral/gibtonite = 4, /obj/item/stack/ore/bluespace_crystal = 1) //Currently, Adamantine won't spawn as it has no uses. -Durandan - var/mineralChance = 13 + var/mineralChance = 5 /turf/closed/mineral/random/Initialize(mapload, inherited_virtual_z) @@ -188,7 +188,7 @@ Spread_Vein(path) /turf/closed/mineral/random/high_chance - mineralChance = 25 + mineralChance = 13 mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 35, /obj/item/stack/ore/diamond = 30, /obj/item/stack/ore/gold = 45, /obj/item/stack/ore/titanium = 45, /obj/item/stack/ore/silver = 50, /obj/item/stack/ore/plasma = 50, /obj/item/stack/ore/bluespace_crystal = 20) @@ -210,7 +210,7 @@ initial_gas_mix = "o2=22;n2=82;TEMP=293.15" /turf/closed/mineral/random/low_chance - mineralChance = 6 + mineralChance = 3 mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 2, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 4, /obj/item/stack/ore/titanium = 4, /obj/item/stack/ore/silver = 6, /obj/item/stack/ore/plasma = 15, /obj/item/stack/ore/iron = 40, @@ -227,7 +227,7 @@ initial_gas_mix = LAVALAND_DEFAULT_ATMOS defer_change = 1 - mineralChance = 10 + mineralChance = 5 mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10, /obj/item/stack/ore/titanium = 11, /obj/item/stack/ore/silver = 12, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 40, @@ -253,7 +253,7 @@ baseturfs = /turf/open/floor/plating/asteroid/icerock initial_gas_mix = ICEMOON_DEFAULT_ATMOS defer_change = TRUE - mineralChance = 20 //as most caves is snowy, might as well bump up the chance + mineralChance = 10 //as most caves is snowy, might as well bump up the chance mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10, /obj/item/stack/ore/titanium = 11, @@ -280,7 +280,7 @@ /turf/closed/mineral/random/snow/underground baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon // abundant ore - mineralChance = 20 + mineralChance = 10 mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 10, /obj/item/stack/ore/diamond = 4, /obj/item/stack/ore/gold = 20, /obj/item/stack/ore/titanium = 22, /obj/item/stack/ore/silver = 24, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 20, /obj/item/stack/ore/bananium = 1, @@ -817,7 +817,7 @@ baseturfs = /turf/open/floor/plating/asteroid/wasteplanet mineralSpawnChanceList = list(/obj/item/stack/ore/uranium = 30, /obj/item/stack/ore/diamond = 0.5, /obj/item/stack/ore/gold = 5, /obj/item/stack/ore/silver = 7, /obj/item/stack/ore/plasma = 35, /obj/item/stack/ore/iron = 35, /obj/item/stack/ore/titanium = 10) - mineralChance = 30 + mineralChance = 10 /turf/closed/mineral/snowmountain/cavern/shipside name = "ice cavern rock" diff --git a/code/modules/cargo/packs/machinery.dm b/code/modules/cargo/packs/machinery.dm index 20f0af7a03a3..e97e6cdae81e 100644 --- a/code/modules/cargo/packs/machinery.dm +++ b/code/modules/cargo/packs/machinery.dm @@ -178,6 +178,19 @@ ) crate_name = "Shuttle in a Box" +/datum/supply_pack/machinery/drill_crate + name = "Heavy duty laser mining drill" + desc = "An experimental laser-based mining drill that Nanotrasen is kindly allowing YOU, the customer, to opt into testing of." + cost = 1000 //Only while TMed, jack up the price before merging + contains = list( + /obj/machinery/drill, + /obj/item/pinpointer/mineral, + /obj/item/paper/guides/drill + ) + crate_name = "laser mining drill crate" + crate_type = /obj/structure/closet/crate/engineering + + /* Power generation machines */ diff --git a/code/modules/mining/drill.dm b/code/modules/mining/drill.dm index ebeee7830823..e27f5e5beab2 100644 --- a/code/modules/mining/drill.dm +++ b/code/modules/mining/drill.dm @@ -39,16 +39,16 @@ . += "The lower power light is blinking." switch(malfunction) if(4) - . += "The [src]'s structure looks like it needs to be welded back together." + . += "The [src]'s structure looks like it needs to be welded back together." if(5) - . += "The [src]'s gimbal is out of alignment, it needs to be recalibrated with a multitool." + . += "The [src]'s gimbal is out of alignment, it needs to be recalibrated with a multitool." switch(metal_attached) if(METAL_PLACED) - . += "Replacement plating has been attached to [src], but has not been bolted in place yet." + . += "Replacement plating has been attached to [src], but has not been bolted in place yet." if(METAL_SECURED) - . += "Replacement plating has been secured to [src], but still needs to be welded into place." + . += "Replacement plating has been secured to [src], but still needs to be welded into place." if(machine_stat && BROKEN && !metal_attached) - . += "[src]'s structure has been totaled, the plasteel plating needs to be replaced." + . += "[src]'s structure has been totaled, the plasteel plating needs to be replaced." /obj/machinery/drill/Initialize() . = ..() @@ -87,6 +87,11 @@ /obj/machinery/drill/get_cell() return cell +//The RPED sort of trivializes a good deal of the malfunction mechancis, as such it will not be allowed to work +/obj/machinery/drill/exchange_parts(mob/user, obj/item/storage/part_replacer/W) + to_chat(user, "[W] does not seem to work on [src], it might require more delecitate parts replacement.") + return + /obj/machinery/drill/attackby(obj/item/tool, mob/living/user, params) var/obj/structure/vein/vein = locate(/obj/structure/vein) in src.loc if(machine_stat && BROKEN) @@ -289,7 +294,7 @@ sensor_rating = sensor.rating if(mining.mining_charges) mining.mining_charges-- - mining.drop_ore(round(sqrt(sensor_rating), 0.1)) + mining.drop_ore(round(sqrt(sensor_rating), 0.1),src) start_mining() else if(!mining.mining_charges) //Extra check to prevent vein related errors locking us in place say("Error: Vein Depleted") @@ -317,8 +322,11 @@ return if(MALF_STRUCTURAL) say("Malfunction: Drill plating damaged, provide structural repairs before continuing mining operations.") - /*playsound()*/ return if(MALF_CALIBRATE) say("Malfunction: Drill laser calibrations out of alignment, please recalibrate before continuing.") return + +/obj/item/paper/guides/drill + name = "Laser Mining Drill Operation Manual" + default_raw_text = "
Laser Mining Drill Operation Manual


Thank you for opting in to the paid testing of Nanotrasen's new, experimental laser drilling device (trademark pending). We are legally obligated to mention that despite this new and wonderful drilling device being less dangerous than past iterations (note the 75% decrease in plasma ignition incidents), the seismic activity created by the drill has been noted to anger most forms of xenofauna. As such our legal team advises only armed mining expeditions make use of this drill.

How to set up your Laser Mining Drill


1. Find a suitable ore vein with the included scanner.
2. Wrench the drill's anchors in place over the vein.
3. Protect the drill from any enraged xenofauna until it has finished drilling.

With all this done, your ore should be well on its way out of the ground and into your pockets! Be warned though, the Laser Mining Drill is prone to numerous malfunctions when exposed to most forms of physical trauma. As such, we advise any teams utilizing this drill to bring with them a set of replacement Nanotrasen brand stock parts and a set of tools to handle repairs. If the drill suffers a total structural failure, then plasteel alloy may be needed to repair said structure.
" diff --git a/code/modules/mining/ore_veins.dm b/code/modules/mining/ore_veins.dm index 00f770783fbe..ec8a69b6f615 100644 --- a/code/modules/mining/ore_veins.dm +++ b/code/modules/mining/ore_veins.dm @@ -82,18 +82,22 @@ GLOBAL_LIST_EMPTY(ore_veins) AddComponent(spawner_type, mob_types, spawn_time, faction, spawn_text, max_mobs, spawn_sound, spawn_distance_min, spawn_distance_max, wave_length, wave_downtime) //Pulls a random ore from the vein list per vein_class -/obj/structure/vein/proc/drop_ore(multiplier) +/obj/structure/vein/proc/drop_ore(multiplier,obj/machinery/drill/current) var/class class = vein_class for(class, class>0, class--) var/picked picked = pick(vein_contents) - new picked(loc,round(rand(5,10)*multiplier)) + new picked(pick(get_adjacent_open_turfs(current)),round(rand(5,10)*multiplier)) /obj/structure/vein/proc/destroy_effect() playsound(loc,'sound/effects/explosionfar.ogg', 200, TRUE) visible_message("[src] collapses!") +// +// Planetary and Class Subtypes +// The current set of subtypes are heavily subject to future balancing and reworking as the balance of them is tested more +// /obj/structure/vein/classtwo mining_charges = 9 @@ -126,3 +130,57 @@ GLOBAL_LIST_EMPTY(ore_veins) ) max_mobs = 6 //Best not to go past 6 due to balance and lag reasons spawn_time = 80 + +/obj/structure/vein/ice + mob_types = list( + /mob/living/simple_animal/hostile/asteroid/wolf = 30, + /mob/living/simple_animal/hostile/asteroid/polarbear = 30, + /mob/living/simple_animal/hostile/asteroid/hivelord/legion/snow = 20, + /mob/living/simple_animal/hostile/asteroid/ice_demon = 10, + /mob/living/simple_animal/hostile/asteroid/ice_whelp = 5, + /mob/living/simple_animal/hostile/asteroid/lobstrosity = 20, + ) + //Ice planets earn a slightly higher rare ore chance on account of them being notably harder + ore_list = list( + /obj/item/stack/ore/iron = 5, + /obj/item/stack/ore/plasma = 5, + /obj/item/stack/ore/silver = 3, + /obj/item/stack/ore/uranium = 3, + /obj/item/stack/ore/titanium = 3, + /obj/item/stack/ore/titanium = 2, + /obj/item/stack/ore/gold = 1, + /obj/item/stack/ore/diamond = 1, + ) + +/obj/structure/vein/ice/classtwo + mining_charges = 9 + vein_class = 2 + ore_list = list( + /obj/item/stack/ore/iron = 6, + /obj/item/stack/ore/plasma = 6, + /obj/item/stack/ore/silver = 5, + /obj/item/stack/ore/uranium = 5, + /obj/item/stack/ore/titanium = 6, + /obj/item/stack/ore/diamond = 2, + /obj/item/stack/ore/gold = 3, + /obj/item/stack/ore/bluespace_crystal = 1, + ) + max_mobs = 6 + spawn_time = 100 + +/obj/structure/vein/ice/classthree + mining_charges = 12 + vein_class = 3 + ore_list = list( + /obj/item/stack/ore/iron = 5, + /obj/item/stack/ore/plasma = 5, + /obj/item/stack/ore/silver = 6, + /obj/item/stack/ore/uranium = 5, + /obj/item/stack/ore/titanium = 6, + /obj/item/stack/ore/diamond = 4, + /obj/item/stack/ore/gold = 6, + /obj/item/stack/ore/bluespace_crystal = 4, + ) + max_mobs = 6 + spawn_time = 80 +