diff --git a/code/datums/mapgen/Cavegens/IcemoonCaves.dm b/code/datums/mapgen/Cavegens/IcemoonCaves.dm index afabc7ffd43..0e1425ead39 100644 --- a/code/datums/mapgen/Cavegens/IcemoonCaves.dm +++ b/code/datums/mapgen/Cavegens/IcemoonCaves.dm @@ -1,8 +1,9 @@ /datum/map_generator/cave_generator/icemoon weighted_open_turf_types = list(/turf/open/misc/asteroid/snow/icemoon = 19, /turf/open/misc/ice/icemoon = 1) weighted_closed_turf_types = list( - /turf/closed/mineral/snowmountain/icemoon = 100, - /turf/closed/mineral/gibtonite/ice/icemoon = 4, + //turf/closed/mineral/snowmountain/icemoon = 100, + //turf/closed/mineral/gibtonite/ice/icemoon = 4, + /turf/closed/mineral/random/snow = 1, //SKYRAT EDIT: Hybrid Mining ) @@ -63,7 +64,7 @@ /datum/map_generator/cave_generator/icemoon/surface/noruins //use this for when you don't want ruins to spawn in a certain area /datum/map_generator/cave_generator/icemoon/deep - weighted_closed_turf_types = list(/turf/closed/mineral/snowmountain/icemoon = 1) + weighted_closed_turf_types = list(/turf/closed/mineral/random/snow/underground = 1) // SKYRAT EDIT: Original: /turf/closed/mineral/snowmountain/icemoon = 1 weighted_mob_spawn_list = list( SPAWN_MEGAFAUNA = 1, /mob/living/basic/mining/ice_demon = 100, diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm index 02d894bed85..6d47d353b51 100644 --- a/code/game/turfs/closed/minerals.dm +++ b/code/game/turfs/closed/minerals.dm @@ -410,7 +410,7 @@ baseturfs = /turf/open/misc/asteroid/basalt/lava_land_surface initial_gas_mix = LAVALAND_DEFAULT_ATMOS defer_change = TRUE - proximity_based = TRUE + proximity_based = FALSE //SKYRAT EDIT: Original TRUE mineralChance = 5 /turf/closed/mineral/random/volcanic/mineral_chances() @@ -438,7 +438,7 @@ baseturfs = /turf/open/misc/asteroid/snow/icemoon initial_gas_mix = ICEMOON_DEFAULT_ATMOS weak_turf = TRUE - proximity_based = TRUE + proximity_based = FALSE //SKYRAT EDIT: Original TRUE /turf/closed/mineral/random/snow/Change_Ore(ore_type, random = 0) . = ..() diff --git a/code/modules/mining/boulder_processing/boulder.dm b/code/modules/mining/boulder_processing/boulder.dm index 77260eef088..f8393ff0df9 100644 --- a/code/modules/mining/boulder_processing/boulder.dm +++ b/code/modules/mining/boulder_processing/boulder.dm @@ -126,6 +126,7 @@ * @param override_speed_multiplier The speed multiplier to use if weapon is null. The do_after will take 2 * this value seconds to complete. * @param continued Whether or not this is a continued process, or the first one. If true, we don't play the "You swing at the boulder" message. */ +/* SKYRAT EDIT OVERRIDE! Check the module:mining boulder.dm! /obj/item/boulder/proc/manual_process(obj/item/weapon, mob/living/user, override_speed_multiplier, continued = FALSE) var/process_speed = 0 //Handle weapon conditions. @@ -168,7 +169,7 @@ var/msg = (durability == 1 ? "is crumbling!" : "looks weaker!") to_chat(user, span_notice("\The [src] [msg]")) manual_process(weapon, user, override_speed_multiplier, continued = TRUE) - +*/ /** * This function is called while breaking boulders manually, and drops ore based on the boulder's mineral content. * Quantity of ore spawned here is 1 less than if the boulder was processed by a machine, but clamped at 10 maximum, 1 minimum. diff --git a/modular_skyrat/modules/mining/boulder.dm b/modular_skyrat/modules/mining/boulder.dm new file mode 100644 index 00000000000..0aa52f20974 --- /dev/null +++ b/modular_skyrat/modules/mining/boulder.dm @@ -0,0 +1,53 @@ +/obj/item/boulder/proc/manual_process(obj/item/weapon, mob/living/user, override_speed_multiplier, continued = FALSE) + var/process_speed = 0 + var/skill_modifier = user.mind?.get_skill_modifier(/datum/skill/mining, SKILL_SPEED_MODIFIER) || 1 + //Handle weapon conditions. + if(weapon) + if(HAS_TRAIT(weapon, TRAIT_INSTANTLY_PROCESSES_BOULDERS)) + durability = 0 + + process_speed = weapon.toolspeed + weapon.play_tool_sound(src, 50) + if(!continued) + to_chat(user, span_notice("You swing at \the [src]...")) + + // Handle user conditions/override conditions. + else if (override_speed_multiplier || HAS_TRAIT(user, TRAIT_BOULDER_BREAKER)) + if(user) + if(HAS_TRAIT(user, TRAIT_INSTANTLY_PROCESSES_BOULDERS)) + durability = 0 + + else if(override_speed_multiplier) + process_speed = override_speed_multiplier + + else + process_speed = INATE_BOULDER_SPEED_MULTIPLIER + + playsound(src, 'sound/effects/rocktap1.ogg', 50) + if(!continued) + to_chat(user, span_notice("You scrape away at \the [src]... speed is [process_speed].")) + + else + CRASH("No weapon, acceptable user, or override speed multiplier passed to manual_process()") + + if(durability > 0) + if(!do_after(user, ((2 * process_speed SECONDS) * skill_modifier), target = src)) + return + + if(!user.Adjacent(src)) + return + + durability-- + user.apply_damage((4 * skill_modifier), STAMINA) + + if(durability <= 0) + convert_to_ore() + to_chat(user, span_notice("You finish working on \the [src], and it crumbles into ore.")) + playsound(src, 'sound/effects/rock_break.ogg', 50) + user.mind?.adjust_experience(/datum/skill/mining, MINING_SKILL_BOULDER_SIZE_XP * 0.5) + qdel(src) + return + + var/msg = (durability == 1 ? "is crumbling!" : "looks weaker!") + to_chat(user, span_notice("\The [src] [msg]")) + manual_process(weapon, user, override_speed_multiplier, continued = TRUE) diff --git a/tgstation.dme b/tgstation.dme index 959ad6987c4..6e5ccc80fc5 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -7502,6 +7502,7 @@ #include "modular_skyrat\modules\microfusion\code\projectiles.dm" #include "modular_skyrat\modules\Midroundtraitor\code\datum_traitor.dm" #include "modular_skyrat\modules\Midroundtraitor\code\event.dm" +#include "modular_skyrat\modules\mining\boulder.dm" #include "modular_skyrat\modules\mining_vendor_additions\code\order_mining.dm" #include "modular_skyrat\modules\modsuit_pai\code\mod_pai.dm" #include "modular_skyrat\modules\modular_ert\code\engineer\engineer.dm"