diff --git a/code/game/objects/items/weapons/melee/shock_maul.dm b/code/game/objects/items/weapons/melee/shock_maul.dm index f96ffbcc8b1..76e708a32b4 100644 --- a/code/game/objects/items/weapons/melee/shock_maul.dm +++ b/code/game/objects/items/weapons/melee/shock_maul.dm @@ -4,6 +4,8 @@ icon_state = "forcemaul" item_state = "forcemaul" slot_flags = SLOT_BACK + + //stopping power/lethality force = 35 var/unwielded_force_divisor = 0.25 var/wielded = 0 @@ -17,6 +19,11 @@ var/weaken_force = 2 //stun power var/weaken_force_unwielded = 0 //can't stun at all if used onehanded var/weaken_force_disarm = 1.5 //stun multiplier when in disarm mode + + //mining interacts + var/excavation_amount = 200 + var/destroy_artefacts = TRUE //sorry, breaks stuff + can_cleave = TRUE //SSSSMITE! attackspeed = 15 //very slow!! sharp = FALSE @@ -97,18 +104,18 @@ update_icon() return -/obj/item/weapon/melee/shock_maul/proc/deductcharge(var/chrgdeductamt) +/obj/item/weapon/melee/shock_maul/proc/deductcharge() if(status == 1) //Only deducts charge when it's on if(bcell) - if(bcell.checked_use(chrgdeductamt)) + if(bcell.checked_use(hitcost)) return 1 else return 0 return null -/obj/item/weapon/melee/shock_maul/proc/powercheck(var/chrgdeductamt) +/obj/item/weapon/melee/shock_maul/proc/powercheck() if(bcell) - if(bcell.charge < chrgdeductamt) + if(bcell.charge < hitcost) status = 0 update_held_icon() @@ -182,7 +189,7 @@ force *= charge_force_mult else if(status) status = 0 - user.visible_message("[user] safely disengages \the [src]'s power fifeld.","\The [src] is now off.") + user.visible_message("[user] safely disengages \the [src]'s power field.","\The [src] is now off.") update_held_icon() playsound(src, "sparks", 75, 1, -1) if(!bcell) @@ -191,9 +198,21 @@ to_chat(user, "\The [src] is out of charge.") add_fingerprint(user) -/obj/item/weapon/melee/shock_maul/attack(mob/M, mob/user) - deductcharge(hitcost) - return ..() +/obj/item/weapon/melee/shock_maul/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) + if(!proximity) return + ..() + if(A && wielded && status) + deductcharge() + status = 0 + user.visible_message("\The [src] discharges with a thunderous, hair-raising crackle!") + playsound(src, 'sound/weapons/resonator_blast.ogg', 100, 1, -1) + update_held_icon() + if(istype(A,/obj/structure/window)) + var/obj/structure/window/W = A + W.shatter() + else if(istype(A,/obj/structure/grille)) + qdel(A) + powercheck(hitcost) /obj/item/weapon/melee/shock_maul/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone) . = ..() @@ -204,12 +223,14 @@ //yeet 'em away, boys! if(status) var/atom/target_zone = get_edge_target_turf(user,get_dir(user, target)) - target.throw_at(target_zone, launch_force, 2, user, FALSE) + if(!target.anchored) + target.throw_at(target_zone, launch_force, 2, user, FALSE) target.Weaken(weaken_force) + deductcharge() status = 0 user.visible_message("\The [src] discharges with a thunderous, hair-raising crackle!") - playsound(src, "sparks", 75, 1, -1) + playsound(src, 'sound/weapons/resonator_blast.ogg', 100, 1, -1) update_held_icon() powercheck(hitcost) diff --git a/code/game/objects/random/mob_vr.dm b/code/game/objects/random/mob_vr.dm index d32f365dc85..5eb18d7de0c 100644 --- a/code/game/objects/random/mob_vr.dm +++ b/code/game/objects/random/mob_vr.dm @@ -73,6 +73,7 @@ prob(2);/obj/item/weapon/twohanded/fireaxe,\ prob(2);/obj/item/weapon/gun/projectile/luger/brown,\ prob(2);/obj/item/weapon/gun/launcher/crossbow,\ + prob(2);/obj/item/weapon/melee/shock_maul,\ /* prob(1);/obj/item/weapon/gun/projectile/automatic/battlerifle,\ */ // Too OP prob(1);/obj/item/weapon/gun/projectile/deagle/gold,\ prob(1);/obj/item/weapon/gun/energy/imperial,\ diff --git a/code/modules/mining/abandonedcrates_vr.dm b/code/modules/mining/abandonedcrates_vr.dm index e5297e4f6c9..cd6113f5051 100644 --- a/code/modules/mining/abandonedcrates_vr.dm +++ b/code/modules/mining/abandonedcrates_vr.dm @@ -99,6 +99,7 @@ list(pick(/obj/item/weapon/grenade/spawnergrenade/spesscarp, /obj/item/weapon/grenade/spawnergrenade/spider, /obj/item/weapon/grenade/explosive/frag), 7) = 1, list(/obj/item/weapon/grenade/flashbang/clusterbang, 7) = 1, list(/obj/item/weapon/card/emag, 11) = 1, + list(/obj/item/weapon/melee/shock_maul, 11) = 5, list(/obj/item/weapon/storage/backpack/sport/hyd/catchemall, 11) = 1 )) var/path = choice[1] diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 9cff48c9bac..a7bbbd9d343 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -371,7 +371,6 @@ var/list/mining_overlay_cache = list() valid_tool = 1 digspeed = P.digspeed - if(valid_tool) if (sand_dug) to_chat(user, "This area has already been dug.") @@ -442,6 +441,51 @@ var/list/mining_overlay_cache = list() to_chat(user, "\The [src] has been excavated to a depth of [excavation_level]cm.") return + if (istype(W, /obj/item/weapon/melee/shock_maul)) + if(!istype(user.loc, /turf)) + return + + var/obj/item/weapon/melee/shock_maul/S = W + if(!S.wielded || !S.status) //if we're not wielded OR not powered up, do nothing + to_chat(user, "\The [src] must be wielded in two hands and powered on to be used for mining!") + return + + var/newDepth = excavation_level + S.excavation_amount // Used commonly below + + //handle any archaeological finds we might uncover + var/fail_message = "" + if(finds && finds.len) + var/datum/find/F = finds[1] + if(newDepth > F.excavation_required) // Digging too deep can break the item. At least you won't summon a Balrog (probably) + fail_message = ". [pick("There is a crunching noise","[S] collides with some different rock","Part of the rock face crumbles away","Something breaks under [S]")]" + wreckfinds(S.destroy_artefacts) + + to_chat(user, "You smash through \the [src][fail_message].") + + if(newDepth >= 200) // This means the rock is mined out fully + if(S.destroy_artefacts) + GetDrilled(0) + else + excavate_turf() + return + + excavation_level += S.excavation_amount + update_archeo_overlays(S.excavation_amount) + + //drop some rocks + next_rock += S.excavation_amount + while(next_rock > 50) + next_rock -= 50 + var/obj/item/weapon/ore/O = new(src) + geologic_data.UpdateNearbyArtifactInfo(src) + O.geologic_data = geologic_data + + user.visible_message("\The [src] discharges with a thunderous, hair-raising crackle!") + playsound(src, 'sound/weapons/resonator_blast.ogg', 100, 1, -1) + S.deductcharge() + S.status = 0 + S.update_held_icon() + if (istype(W, /obj/item/weapon/pickaxe)) if(!istype(user.loc, /turf)) return diff --git a/icons/inventory/back/mob.dmi b/icons/inventory/back/mob.dmi index fac62128ecf..2b311c0a247 100644 Binary files a/icons/inventory/back/mob.dmi and b/icons/inventory/back/mob.dmi differ