Reworks the mining MODsuit (#92948)

## About The Pull Request

Slightly reworks the mining MODsuit to be more distinct from other
mining gear and have its own designated role as an exploration and
mining tool.
- Base armor (when covered in ash) has been reduced to 50 from 60, being
equal to that of an explorer suit with two goliath plates attached.
However, entering the sphere mode will grant additional 20 armor,
bumping it up to 70 (equal to that of a H.E.C.K. suit)
- Integrated drill no longer mines instantly by default, instead having
a delay of 0.25 seconds. However, when entering the sphere mode, the
drill will overcharge and get back its instamine, as well as get halved
power consumption. Currently, those two are mutually exclusive, and the
drill cannot be used in the sphere mode.
- Mining bomb cooldown has been reduced to 1s from 1.25s. They also now
detonate much faster, and the detonation time matches their animation.
The digging radius has been reduced back to 3x3 from 5x5, and their
damage has been reduced to 28 from 48 to compensate increase in firing
speed and reduced detonation delay making them much easier to use
(functional DPS has been reduced from 36 to 28)
- Rewrote ore bag a bit to try and make sure it doesn't break when
depositing ores into the ORM. I only have faint suspicions of this being
possibly being caused by ore getting deleted and leaving a null in the
list, so removing it should hopefully? stop the bag from breaking.
- The 0.25 slowdown is back, but it should be less of a problem
considering that the sphere mode now is a much more viable traversal
tool and not an utter joke aside from lava traversal.
- The MODsuit now comes pre-equipped with a magnetic harness, which is
now capable of stowing kinetic crushers in addition to guns. This should
make using the sphere mode less of a pain in the ass, as you won't drop
your weapon whenever you enter the sphere mode before you remember to
put it in your suit storage slot. The delay on harnesses has also been
reduced to 0.5 seconds, which should make them more comfortable to use,
while still allowing someone to grab your gun if you're not careful.
- The sphere mode can no longer traverse lava roundstart, instead
requiring to be upgraded with two pieces of bileworm skin to get
lava-resistant plating. This is meant to work together with #92877,
being a part of ongoing effort to bring mining back in terms of speed
and action level, reducing mining and exploration speeds in favor of
higher ore spawns and more focus on gear and equipment progression.

<img width="92" height="98" alt="image"
src="https://github.com/user-attachments/assets/740ab28d-210d-4832-ba07-00dbd8680491"
/>

Additionally, both the mining drill and green raptor bumpmining has been
nerfed (technically fixed, practically nerfed) by removing the diagonal
movement... thing which allowed you to mine thrice as quickly and ignore
the one-tick movement delay due to how diagonal movement works.


https://github.com/user-attachments/assets/711e895f-e7e7-4cd9-b484-d7d11ff597af

Its still fast and comfortable to use, just not absurdly fast.

## Why It's Good For The Game

The mining MODsuit is in a very weird place both balance and progression
wise. Its very easy to get if you ignore vents, it has good armor stats,
it allows you to partly ignore being set on fire (or fully if you get
the regulator module, but that requires more effort). I don't think that
the buff was very needed, it was very strong as-is when used properly
(with a yellow or green raptor mount) which not a lot of people seem to
have realized.
However, its still in a pretty pitiful state as its core feature (sphere
mode) is nigh useless as the drill only works outside of it, and mines
themselves are extremely clunky and uncomfortable to use. This leaves it
only being useful for its cheap armor (without needing to kill
goliaths), free GPS and ore bag that don't occupy your pockets, and
ability to ignore environmental hazards.

The solution I've decided to go with is reworking the MODsuit to be
focused on mining and exploration rather than combat, being a good
equipment piece for newer players and miners less interested in hunting
megafauna. This carves the MODsuit its own niche rather than being
weirdly slotted between base suits and contending with drake armor in
terms of stats/effects.
Roundstart lava crossing capabilities removal alongside bumpmining nerf
is somewhat unrelated to the rest of the changes, it is a part of the
exploration rework alongside #92877, which is intended to force miners
to engage in combat more. Without the nerf, the suit is as fast as a
yellow raptor, which lets it go through lavaland at absurd speeds when
moving diagonally. (Yes, diagonal zig-zag movement ignoring the bump
delay allows you to outspeed someone moving cardinally)

More details about the project can be found in this [design
doc](https://hackmd.io/@smart-kar/HkUINgBtke). The instamine ability of
the sphere will likely get slightly nerfed in the future with the main
batch of ore spread buffs and mining speed nerfs, but I've left it as
powerful as a green raptor to not make the suit useless when compared to
other options in the meantime.

## Changelog
🆑
add: Mining MODsuit has gained a magnetic harness for all of your
crusher stowing needs.
balance: Magnetic harnesses now take only 0.5 seconds to pick up your
gun, and can pick up crushers.
balance: Mining MODsuit has regained it small slowdown, and lost 10
melee armor.
balance: Mining drill MODule is no longer instant (outside of the sphere
mode of a mining MOD)
balance: The mining sphere MODule now can break rocks when rolling into
them, gives 20 melee and bomb armor when active, and has a shorter bomb
cooldown, but bombs themselves have reduced damage and mining AOE.
balance: Mining sphere MODule now requires an upgrade in form of two
pieces of bileworm skin to be able to traverse lava, as opposed to being
able to do so innately.
fix: Fixed MODsuit ore bag sometimes breaking permanently when
depositing ores into the ORM.
/🆑
This commit is contained in:
SmArtKar
2025-09-29 01:34:41 -04:00
committed by GitHub
parent bf09a03014
commit 5227e3e333
14 changed files with 259 additions and 146 deletions
+2
View File
@@ -132,11 +132,13 @@
/obj/item/mod/module/orebag,
/obj/item/mod/module/clamp,
/obj/item/mod/module/drill,
/obj/item/mod/module/magnetic_harness,
/obj/item/mod/module/mouthhole,
)
default_pins = list(
/obj/item/mod/module/gps,
/obj/item/mod/module/drill,
/obj/item/mod/module/orebag,
/obj/item/mod/module/sphere_transform,
)
+2
View File
@@ -171,6 +171,7 @@
balloon_alert(mod.wearer, "[src] activated, [used_button]-click to use") // As of now, only wearers can "use" mods
active = TRUE
SEND_SIGNAL(src, COMSIG_MODULE_ACTIVATED)
SEND_SIGNAL(mod, COMSIG_MOD_MODULE_ACTIVATED, src)
on_activation(activator)
update_clothing_slots()
return TRUE
@@ -190,6 +191,7 @@
UnregisterSignal(mod.wearer, used_signal)
used_signal = null
SEND_SIGNAL(src, COMSIG_MODULE_DEACTIVATED, mod.wearer)
SEND_SIGNAL(mod, COMSIG_MOD_MODULE_DEACTIVATED, src)
on_deactivation(activator, display_message = TRUE, deleting = FALSE)
update_clothing_slots()
return TRUE
+1 -1
View File
@@ -386,7 +386,7 @@
var/datum/storage/holding_storage = mod.loc.atom_storage
if(!holding_storage || holding_storage.max_specific_storage >= mod.w_class)
return
mod.forceMove(drop_location())
mod.forceMove(mod.drop_location())
/obj/item/mod/module/demoralizer
name = "MOD psi-echo demoralizer module"
+10 -3
View File
@@ -10,7 +10,7 @@
incompatible_modules = list(/obj/item/mod/module/magnetic_harness)
required_slots = list(ITEM_SLOT_OCLOTHING)
/// Time before we activate the magnet.
var/magnet_delay = 0.8 SECONDS
var/magnet_delay = 0.5 SECONDS
/// The typecache of all guns we allow.
var/static/list/guns_typecache
/// The guns already allowed by the modsuit chestplate.
@@ -19,7 +19,14 @@
/obj/item/mod/module/magnetic_harness/Initialize(mapload)
. = ..()
if(!guns_typecache)
guns_typecache = typecacheof(list(/obj/item/gun/ballistic, /obj/item/gun/energy, /obj/item/gun/grenadelauncher, /obj/item/gun/chem, /obj/item/gun/syringe))
guns_typecache = typecacheof(list(
/obj/item/gun/ballistic,
/obj/item/gun/energy,
/obj/item/gun/grenadelauncher,
/obj/item/gun/chem,
/obj/item/gun/syringe,
/obj/item/kinetic_crusher,
))
/obj/item/mod/module/magnetic_harness/on_install()
. = ..()
@@ -139,7 +146,7 @@
/obj/item/mod/module/holster/on_uninstall(deleting = FALSE)
. = ..()
if(holstered)
holstered.forceMove(drop_location())
holstered.forceMove(mod.drop_location())
/obj/item/mod/module/holster/Exited(atom/movable/gone, direction)
if(gone == holstered)
+184 -94
View File
@@ -47,7 +47,6 @@
/// The crates stored in the module.
var/list/stored_crates = list()
/obj/item/mod/module/clamp/Initialize(mapload)
. = ..()
accepted_items = typecacheof(list(
@@ -125,55 +124,110 @@
///Drill - Lets you dig through rock and basalt.
/obj/item/mod/module/drill
name = "MOD drill module"
desc = "An integrated drill, typically extending over the user's hand. While useful for drilling through rock, \
your drill is surely the one that both pierces and creates the heavens."
desc = "An arm-mounted drill, typically extending over the user's hand. While useful for drilling through rock, \
your drill is surely the one that both pierces and creates the heavens. Integrates with mining MODs' sphere \
transformation module, changing it from a mere traversal tool to high-powered excavation unit."
icon_state = "drill"
module_type = MODULE_ACTIVE
complexity = 1
use_energy_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/drill)
cooldown_time = 0.5 SECONDS
cooldown_time = 0.2 SECONDS
overlay_state_active = "module_drill"
required_slots = list(ITEM_SLOT_GLOVES)
toolspeed = 0.25
/// Are we currently in passive sphere mode?
var/ballin = FALSE
/// Last tick when we bumpmined. Prevents diagonal bumpnining being thrice as fast as normal
var/last_bumpmine_tick = -1
/// Mining skill experience multiplier for bumpmining
var/exp_multiplier = 1
/// Cooldown on gibtonite detonation warnings
COOLDOWN_DECLARE(gibtonite_warning_cd)
/obj/item/mod/module/drill/on_install()
. = ..()
RegisterSignal(mod, COMSIG_MOD_MODULE_ACTIVATED, PROC_REF(on_module_activated))
RegisterSignal(mod, COMSIG_MOD_MODULE_DEACTIVATED, PROC_REF(on_module_deactivated))
/obj/item/mod/module/drill/on_uninstall(deleting)
. = ..()
UnregisterSignal(mod, list(COMSIG_MOD_MODULE_ACTIVATED, COMSIG_MOD_MODULE_DEACTIVATED))
toolspeed = initial(toolspeed)
use_energy_cost = initial(use_energy_cost)
exp_multiplier = initial(exp_multiplier)
ballin = FALSE
/obj/item/mod/module/drill/on_activation(mob/activator)
if (ballin)
return
tool_behaviour = TOOL_MINING
RegisterSignal(mod.wearer, COMSIG_MOVABLE_BUMP, PROC_REF(bump_mine))
/obj/item/mod/module/drill/on_deactivation(mob/activator, display_message = TRUE, deleting = FALSE)
if (ballin)
return
tool_behaviour = NONE
UnregisterSignal(mod.wearer, COMSIG_MOVABLE_BUMP)
/obj/item/mod/module/drill/on_select_use(atom/target)
. = ..()
if(!.)
if(!. || !mod.wearer.Adjacent(target))
return
if(!mod.wearer.Adjacent(target))
if(!ismineralturf(target) || !isasteroidturf(target))
return
if(ismineralturf(target))
var/turf/closed/mineral/mineral_turf = target
mineral_turf.gets_drilled(mod.wearer)
drain_power(use_energy_cost)
else if(isasteroidturf(target))
var/turf/open/misc/asteroid/sand_turf = target
if(!sand_turf.can_dig(mod.wearer))
return
sand_turf.getDug()
drain_power(use_energy_cost)
if(drain_power(use_energy_cost))
target.attackby(src, mod.wearer)
/obj/item/mod/module/drill/proc/bump_mine(mob/living/carbon/human/bumper, atom/bumped_into, proximity)
SIGNAL_HANDLER
if(!ismineralturf(bumped_into) || !drain_power(use_energy_cost))
return
var/turf/closed/mineral/mineral_turf = bumped_into
var/turf/closed/mineral/gibtonite/giberal_turf = mineral_turf
if(istype(giberal_turf) && giberal_turf.stage != GIBTONITE_UNSTRUCK)
playsound(bumper, 'sound/machines/scanner/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
to_chat(bumper, span_warning("[icon2html(src, bumper)] Unstable gibtonite ore deposit detected! Drills disabled."))
on_deactivation()
return
mineral_turf.gets_drilled(mod.wearer)
return COMPONENT_CANCEL_ATTACK_CHAIN
///Ore Bag - Lets you pick up ores and drop them from the suit.
if (world.time == last_bumpmine_tick)
return
if (!ismineralturf(bumped_into) || !drain_power(use_energy_cost))
return
var/turf/closed/mineral/gibtonite/giberal_turf = bumped_into
if (!istype(giberal_turf) || giberal_turf.stage != GIBTONITE_UNSTRUCK)
last_bumpmine_tick = world.time
var/turf/closed/mineral/rock = bumped_into
INVOKE_ASYNC(rock, TYPE_PROC_REF(/atom, attackby), src, bumper, null, null, exp_multiplier)
return
if (!COOLDOWN_FINISHED(src, gibtonite_warning_cd))
return
COOLDOWN_START(src, gibtonite_warning_cd, 3 SECONDS)
playsound(bumper, 'sound/machines/scanner/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
to_chat(bumper, span_warning("[icon2html(src, bumper)] Unstable gibtonite ore deposit detected!"))
/obj/item/mod/module/drill/proc/on_module_activated(datum/source, obj/item/mod/module/module)
SIGNAL_HANDLER
if (!istype(module, /obj/item/mod/module/sphere_transform))
return
// In sphere mode we get instamine and halved power drain
toolspeed = 0
use_energy_cost *= 0.5
exp_multiplier *= 0.2
if (!active)
on_activation()
ballin = TRUE
/obj/item/mod/module/drill/proc/on_module_deactivated(datum/source, obj/item/mod/module/module)
SIGNAL_HANDLER
if (!istype(module, /obj/item/mod/module/sphere_transform))
return
toolspeed = initial(toolspeed)
use_energy_cost *= 2
exp_multiplier /= 2
ballin = FALSE
if (!active)
on_deactivation()
/// Ore Bag - Lets you pick up ores and drop them from the suit.
/obj/item/mod/module/orebag
name = "MOD ore bag module"
desc = "An integrated ore storage system installed into the suit, \
@@ -187,8 +241,6 @@
cooldown_time = 0.5 SECONDS
allow_flags = MODULE_ALLOW_INACTIVE
required_slots = list(ITEM_SLOT_BACK)
/// The ores stored in the bag.
var/list/ores = list()
/obj/item/mod/module/orebag/on_equip()
RegisterSignal(mod.wearer, COMSIG_MOVABLE_MOVED, PROC_REF(ore_pickup))
@@ -204,20 +256,17 @@
playsound(src, SFX_RUSTLE, 50, TRUE)
/obj/item/mod/module/orebag/proc/move_ore(obj/item/stack/ore)
for(var/obj/item/stack/stored_ore as anything in ores)
for(var/obj/item/stack/ore/stored_ore as anything in src)
if(!ore.can_merge(stored_ore))
continue
ore.merge(stored_ore)
if(QDELETED(ore))
return
break
ore.forceMove(src)
ores += ore
/obj/item/mod/module/orebag/on_use(mob/activator)
for(var/obj/item/ore as anything in ores)
ore.forceMove(drop_location())
ores -= ore
for(var/obj/item/ore as anything in src)
ore.forceMove(mod.drop_location())
drain_power(use_energy_cost)
/obj/item/mod/module/hydraulic
@@ -381,18 +430,18 @@
/// Armor values per tile.
var/datum/armor/armor_mod = /datum/armor/mod_ash_accretion
/// Speed added when you're fully covered in ash.
var/speed_added = -0.75
var/speed_added = -0.5
/// Turfs that let us accrete ash.
var/static/list/accretion_turfs
/// Turfs that let us keep ash.
var/static/list/keep_turfs
/datum/armor/mod_ash_accretion
melee = 4
melee = 3 // 50 armor when fully covered in ash, equal to two plates on an explorer suit
bullet = 1
laser = 2
energy = 2
bomb = 4
bomb = 3
/obj/item/mod/module/ash_accretion/Initialize(mapload)
. = ..()
@@ -446,32 +495,44 @@
/obj/item/mod/module/ash_accretion/proc/on_move(atom/source, atom/oldloc, dir, forced)
if(!isturf(mod.wearer.loc)) //dont lose ash from going in a locker
return
if(traveled_tiles) //leave ash every tile
new /obj/effect/temp_visual/light_ash(get_turf(src))
if(is_type_in_typecache(mod.wearer.loc, accretion_turfs))
if(traveled_tiles >= max_traveled_tiles)
return
traveled_tiles++
for(var/obj/item/part as anything in mod.get_parts(all = TRUE))
part.set_armor(part.get_armor().add_other_armor(armor_mod))
if(traveled_tiles >= max_traveled_tiles)
balloon_alert(mod.wearer, "fully ash covered")
mod.wearer.color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,3) //make them super light
animate(mod.wearer, 1 SECONDS, color = null, flags = ANIMATION_PARALLEL)
playsound(src, 'sound/effects/sparks/sparks1.ogg', 100, TRUE)
mod.update_speed()
else if(is_type_in_typecache(mod.wearer.loc, keep_turfs))
return
else
if(traveled_tiles <= 0)
if(traveled_tiles < max_traveled_tiles)
return
traveled_tiles--
if(traveled_tiles == max_traveled_tiles - 1) // Just lost our speed buff
mod.update_speed()
for(var/obj/item/part as anything in mod.get_parts(all = TRUE))
part.set_armor(part.get_armor().subtract_other_armor(armor_mod))
if(traveled_tiles <= 0)
balloon_alert(mod.wearer, "ran out of ash!")
balloon_alert(mod.wearer, "fully ash covered")
var/cur_color = mod.wearer.color
mod.wearer.color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,3) // Make them super light
animate(mod.wearer, 1 SECONDS, color = cur_color, flags = ANIMATION_PARALLEL)
playsound(src, 'sound/effects/sparks/sparks1.ogg', 100, TRUE)
mod.update_speed()
return
if(is_type_in_typecache(mod.wearer.loc, keep_turfs))
return
if(traveled_tiles) //leave ash every tile
new /obj/effect/temp_visual/light_ash(get_turf(src))
if(traveled_tiles <= 0)
return
traveled_tiles--
if(traveled_tiles == max_traveled_tiles - 1) // Just lost our speed buff
mod.update_speed()
for(var/obj/item/part as anything in mod.get_parts(all = TRUE))
part.set_armor(part.get_armor().subtract_other_armor(armor_mod))
if(traveled_tiles <= 0)
balloon_alert(mod.wearer, "ran out of ash!")
/obj/item/mod/module/sphere_transform
name = "MOD sphere transform module"
@@ -483,17 +544,60 @@
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.5
use_energy_cost = DEFAULT_CHARGE_DRAIN * 3
incompatible_modules = list(/obj/item/mod/module/sphere_transform)
cooldown_time = 1.25 SECONDS
cooldown_time = 1 SECONDS
required_slots = list(ITEM_SLOT_HEAD|ITEM_SLOT_MASK, ITEM_SLOT_OCLOTHING|ITEM_SLOT_ICLOTHING, ITEM_SLOT_GLOVES, ITEM_SLOT_FEET)
/// Time it takes us to complete the animation.
var/animate_time = 0.25 SECONDS
/// Armor values when active
var/datum/armor/armor_mod = /datum/armor/mod_sphere_transform
/// List of traits to add/remove from our subject as needed.
var/static/list/user_traits = list(
var/list/user_traits = list(
TRAIT_FORCED_STANDING,
TRAIT_HANDS_BLOCKED,
TRAIT_LAVA_IMMUNE,
TRAIT_NO_SLIP_ALL,
)
/// Has the module been upgraded with bileworm hide plating?
var/hide_upgrade = FALSE
/// How much hide is required to reinforce the MOD
var/hide_amount = 2 // These are rather rare as of now, should be increased later once other methods of crossing lava are removed
/datum/armor/mod_sphere_transform
melee = 20 // Can get up to 70 armor when ash covered and ballin, which is as good as a HECK suit... but you can't really attack anymore
bomb = 20
/obj/item/mod/module/sphere_transform/on_install()
. = ..()
RegisterSignal(mod, COMSIG_ATOM_ITEM_INTERACTION, PROC_REF(on_item_interaction))
// Isn't supposed to happen outside of deletion but just in case
/obj/item/mod/module/sphere_transform/on_uninstall(deleting)
. = ..()
// No need to drop the hide as we're supposed to be inbuilt and unremovable
UnregisterSignal(mod, COMSIG_ATOM_ITEM_INTERACTION)
/obj/item/mod/module/sphere_transform/proc/on_item_interaction(atom/movable/source, mob/living/user, obj/item/item, modifiers)
SIGNAL_HANDLER
if(!istype(item, /obj/item/stack/sheet/animalhide/bileworm))
return NONE
if (hide_upgrade)
to_chat(user, span_warning("[mod] is already reinforced with bileworm skin!"))
return ITEM_INTERACT_BLOCKING
var/obj/item/stack/sheet/animalhide/bileworm/hide = item
if (!hide.use(hide_amount))
to_chat(user, span_warning("You need more hide to fully reinforce [mod]!"))
return ITEM_INTERACT_BLOCKING
hide_upgrade = TRUE
overlay_state_inactive = "module_bileworm_bracing"
user_traits += TRAIT_LAVA_IMMUNE
mod.balloon_alert(user, "plating reinforced!")
if (active)
ADD_TRAIT(mod.wearer, TRAIT_LAVA_IMMUNE, REF(src))
update_clothing_slots()
return ITEM_INTERACT_SUCCESS
/obj/item/mod/module/sphere_transform/activate(mob/activator)
if(!mod.wearer.has_gravity())
@@ -507,13 +611,15 @@
mod.wearer.add_filter("mod_blur", 2, angular_blur_filter(size = 15))
mod.wearer.add_filter("mod_outline", 3, outline_filter(color = "#000000AA"))
mod.wearer.add_offsets(REF(src), y_add = -4)
mod.wearer.SpinAnimation(1.5)
mod.wearer.SpinAnimation(1.5, tag = "sphere_transform")
mod.wearer.add_traits(user_traits, REF(src))
mod.wearer.RemoveElement(/datum/element/footstep, FOOTSTEP_MOB_HUMAN, 1, -6)
mod.wearer.AddElement(/datum/element/footstep, FOOTSTEP_OBJ_ROBOT, 1, -6, sound_vary = TRUE)
mod.wearer.add_movespeed_mod_immunities(REF(src), /datum/movespeed_modifier/damage_slowdown)
mod.wearer.add_movespeed_modifier(/datum/movespeed_modifier/sphere)
RegisterSignal(mod.wearer, COMSIG_MOB_STATCHANGE, PROC_REF(on_statchange))
for(var/obj/item/part as anything in mod.get_parts(all = TRUE))
part.set_armor(part.get_armor().add_other_armor(armor_mod))
/obj/item/mod/module/sphere_transform/on_deactivation(mob/activator, display_message = TRUE, deleting = FALSE)
if(!deleting)
@@ -522,11 +628,13 @@
addtimer(CALLBACK(mod.wearer, TYPE_PROC_REF(/datum, remove_filter), list("mod_ball", "mod_blur", "mod_outline")), animate_time)
mod.wearer.remove_traits(user_traits, REF(src))
mod.wearer.remove_movespeed_mod_immunities(REF(src), /datum/movespeed_modifier/damage_slowdown)
animate(mod.wearer, time = 0)
animate(mod.wearer, tag = "sphere_transform")
mod.wearer.RemoveElement(/datum/element/footstep, FOOTSTEP_OBJ_ROBOT, 1, -6, sound_vary = TRUE)
mod.wearer.AddElement(/datum/element/footstep, FOOTSTEP_MOB_HUMAN, 1, -6)
mod.wearer.remove_movespeed_modifier(/datum/movespeed_modifier/sphere)
UnregisterSignal(mod.wearer, COMSIG_MOB_STATCHANGE)
for(var/obj/item/part as anything in mod.get_parts(all = TRUE))
part.set_armor(part.get_armor().subtract_other_armor(armor_mod))
/obj/item/mod/module/sphere_transform/used(mob/activator)
if(!lavaland_equipment_pressure_check(get_turf(src)))
@@ -539,7 +647,7 @@
. = ..()
if(!.)
return
var/obj/projectile/bomb = new /obj/projectile/bullet/mining_bomb(mod.wearer.loc)
var/obj/projectile/bullet/mining_bomb/bomb = new(mod.wearer.loc)
bomb.aim_projectile(target, mod.wearer)
bomb.firer = mod.wearer
playsound(src, 'sound/items/weapons/gun/general/grenade_launch.ogg', 75, TRUE)
@@ -547,17 +655,13 @@
drain_power(use_energy_cost)
/obj/item/mod/module/sphere_transform/on_active_process(seconds_per_tick)
animate(mod.wearer) //stop the animation
mod.wearer.SpinAnimation(1.5) //start it back again
if(!mod.wearer.has_gravity())
deactivate() //deactivate in no grav
/obj/item/mod/module/sphere_transform/proc/on_statchange(datum/source)
SIGNAL_HANDLER
if(!mod.wearer.stat)
return
deactivate()
if(mod.wearer.stat)
deactivate()
/obj/projectile/bullet/mining_bomb
name = "mining bomb"
@@ -596,46 +700,32 @@
light_power = 1
light_color = COLOR_LIGHT_ORANGE
/// Time to prime the explosion
var/prime_time = 0.5 SECONDS
var/prime_time = 0.1 SECONDS
/// Time to explode from the priming
var/explosion_time = 1 SECONDS
var/explosion_time = 0.9 SECONDS // Roughly this much until the blast part of the explosion animation
/// Damage done on explosion.
var/damage = 12
var/damage = 7
/// Damage multiplier on hostile fauna.
var/fauna_boost = 4
/// Image overlaid on explosion.
var/static/image/explosion_image
/obj/structure/mining_bomb/Initialize(mapload, atom/movable/firer)
. = ..()
generate_image()
/obj/structure/mining_bomb/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents)
if(same_z_layer)
return ..()
explosion_image = null
generate_image()
return ..()
/obj/structure/mining_bomb/proc/generate_image()
explosion_image = image('icons/effects/96x96.dmi', "judicial_explosion")
explosion_image.pixel_w = -32
explosion_image.pixel_z = -32
SET_PLANE_EXPLICIT(explosion_image, ABOVE_GAME_PLANE, src)
/obj/structure/mining_bomb/proc/prime(atom/movable/firer)
add_overlay(explosion_image)
var/mutable_appearance/explosion_image = mutable_appearance('icons/effects/96x96.dmi', "judicial_explosion", FLOAT_LAYER, src, ABOVE_GAME_PLANE)
explosion_image.pixel_w = -32
explosion_image.pixel_z = -32
var/turf/our_loc = get_turf(src)
our_loc.flick_overlay_view(explosion_image, 1.35 SECONDS)
addtimer(CALLBACK(src, PROC_REF(boom), firer), explosion_time)
/obj/structure/mining_bomb/proc/boom(atom/movable/firer)
visible_message(span_danger("[src] explodes!"))
playsound(src, 'sound/effects/magic/magic_missile.ogg', 200, vary = TRUE)
for(var/turf/closed/mineral/rock in circle_range_turfs(src, 2))
for(var/turf/closed/mineral/rock in circle_range_turfs(src, 1))
rock.gets_drilled()
for(var/mob/living/victim in range(1, src))
if(HAS_TRAIT(victim, TRAIT_MINING_AOE_IMMUNE))
continue
victim.apply_damage(damage * (ismining(victim) ? fauna_boost : 1), BRUTE, spread_damage = TRUE)
to_chat(victim, span_userdanger("You are hit by a mining bomb explosion!"))
if(!firer)
continue
if(ishostile(victim))