diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 4e1fe01e..743126e4 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -327,9 +327,9 @@ status_type = STATUS_EFFECT_REPLACE alert_type = null var/mutable_appearance/marked_underlay - var/obj/item/twohanded/required/kinetic_crusher/hammer_synced + var/obj/item/twohanded/kinetic_crusher/hammer_synced -/datum/status_effect/crusher_mark/on_creation(mob/living/new_owner, obj/item/twohanded/required/kinetic_crusher/new_hammer_synced) +/datum/status_effect/crusher_mark/on_creation(mob/living/new_owner, obj/item/twohanded/kinetic_crusher/new_hammer_synced) . = ..() if(.) hammer_synced = new_hammer_synced diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index b4afaac1..538fd003 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -1,17 +1,17 @@ /*********************Mining Hammer****************/ -/obj/item/twohanded/required/kinetic_crusher +/obj/item/twohanded/kinetic_crusher icon = 'icons/obj/mining.dmi' - icon_state = "mining_hammer1" - item_state = "mining_hammer1" + icon_state = "mining_hammer" + item_state = "mining_hammer0" lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi' name = "proto-kinetic crusher" desc = "An early design of the proto-kinetic accelerator, it is little more than an combination of various mining tools cobbled together, forming a high-tech club. \ While it is an effective mining tool, it did little to aid any but the most skilled and/or suicidal miners against local fauna." - force = 20 //As much as a bone spear, but this is significantly more annoying to carry around due to requiring the use of both hands at all times + force = 0 //just in case w_class = WEIGHT_CLASS_BULKY slot_flags = ITEM_SLOT_BACK - force_unwielded = 20 //It's never not wielded so these are the same + force_unwielded = 0 //ditto force_wielded = 20 throwforce = 5 throw_speed = 4 @@ -22,29 +22,32 @@ hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("smashed", "crushed", "cleaved", "chopped", "pulped") sharpness = IS_SHARP + actions_types = list(/datum/action/item_action/toggle_light) var/list/trophies = list() var/charged = TRUE var/charge_time = 15 var/detonation_damage = 50 var/backstab_bonus = 30 + var/light_on = FALSE + var/brightness_on = 5 //same light as a lit seclite on a PKA -/obj/item/twohanded/required/kinetic_crusher/Initialize() +/obj/item/twohanded/kinetic_crusher/Initialize() . = ..() AddComponent(/datum/component/butchering, 60, 110) //technically it's huge and bulky, but this provides an incentive to use it -/obj/item/twohanded/required/kinetic_crusher/Destroy() +/obj/item/twohanded/kinetic_crusher/Destroy() QDEL_LIST(trophies) return ..() -/obj/item/twohanded/required/kinetic_crusher/examine(mob/living/user) - ..() - to_chat(user, "Mark a large creature with the destabilizing force, then hit them in melee to do [force + detonation_damage] damage.") - to_chat(user, "Does [force + detonation_damage + backstab_bonus] damage if the target is backstabbed, instead of [force + detonation_damage].") +/obj/item/twohanded/kinetic_crusher/examine(mob/living/user) + . =..() + . += "Mark a large creature with the destabilizing force, then hit them in melee to do [force + detonation_damage] damage." + . += "Does [force + detonation_damage + backstab_bonus] damage if the target is backstabbed, instead of [force + detonation_damage]." for(var/t in trophies) var/obj/item/crusher_trophy/T = t - to_chat(user, "It has \a [T] attached, which causes [T.effect_desc()].") + . += "It has \a [T] attached, which causes [T.effect_desc()]." -/obj/item/twohanded/required/kinetic_crusher/attackby(obj/item/I, mob/living/user) +/obj/item/twohanded/kinetic_crusher/attackby(obj/item/I, mob/living/user) if(istype(I, /obj/item/crowbar)) if(LAZYLEN(trophies)) to_chat(user, "You remove [src]'s trophies.") @@ -60,7 +63,11 @@ else return ..() -/obj/item/twohanded/required/kinetic_crusher/attack(mob/living/target, mob/living/carbon/user) +/obj/item/twohanded/kinetic_crusher/attack(mob/living/target, mob/living/carbon/user) + if(!wielded) + to_chat(user, "[src] is too heavy to use with one hand. You fumble and drop everything.") + user.drop_all_held_items() + return var/datum/status_effect/crusher_damage/C = target.has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) var/target_health = target.health ..() @@ -71,7 +78,7 @@ if(!QDELETED(C) && !QDELETED(target)) C.total_damage += target_health - target.health //we did some damage, but let's not assume how much we did -/obj/item/twohanded/required/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams) +/obj/item/twohanded/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams) . = ..() if(istype(target, /obj/item/crusher_trophy)) var/obj/item/crusher_trophy/T = target @@ -122,12 +129,36 @@ if(user && lavaland_equipment_pressure_check(get_turf(user))) //CIT CHANGE - makes sure below only happens in low pressure environments user.adjustStaminaLoss(-30)//CIT CHANGE - makes crushers heal stamina -/obj/item/twohanded/required/kinetic_crusher/proc/Recharge() +/obj/item/twohanded/kinetic_crusher/proc/Recharge() if(!charged) charged = TRUE - icon_state = "mining_hammer1" + update_icon() playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1) +/obj/item/twohanded/kinetic_crusher/ui_action_click(mob/user, actiontype) + light_on = !light_on + playsound(user, 'sound/weapons/empty.ogg', 100, TRUE) + update_brightness(user) + update_icon() + +/obj/item/twohanded/kinetic_crusher/proc/update_brightness(mob/user = null) + if(light_on) + set_light(brightness_on) + else + set_light(0) +/obj/item/twohanded/kinetic_crusher/update_icon() + ..() + cut_overlays() + if(!charged) + add_overlay("[icon_state]_uncharged") + if(light_on) + add_overlay("[icon_state]_lit") + spawn(1) + for(var/X in actions) + var/datum/action/A = X + A.UpdateButtonIcon() + item_state = "mining_hammer[wielded]" + //destablizing force /obj/item/projectile/destabilizer name = "destabilizing force" @@ -138,7 +169,7 @@ flag = "bomb" range = 6 log_override = TRUE - var/obj/item/twohanded/required/kinetic_crusher/hammer_synced + var/obj/item/twohanded/kinetic_crusher/hammer_synced /obj/item/projectile/destabilizer/Destroy() hammer_synced = null @@ -177,12 +208,12 @@ return "errors" /obj/item/crusher_trophy/attackby(obj/item/A, mob/living/user) - if(istype(A, /obj/item/twohanded/required/kinetic_crusher)) + if(istype(A, /obj/item/twohanded/kinetic_crusher)) add_to(A, user) else ..() -/obj/item/crusher_trophy/proc/add_to(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user) +/obj/item/crusher_trophy/proc/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user) for(var/t in H.trophies) var/obj/item/crusher_trophy/T = t if(istype(T, denied_type) || istype(src, T.denied_type)) @@ -194,7 +225,7 @@ to_chat(user, "You attach [src] to [H].") return TRUE -/obj/item/crusher_trophy/proc/remove_from(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user) +/obj/item/crusher_trophy/proc/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user) forceMove(get_turf(H)) H.trophies -= src return TRUE @@ -281,12 +312,12 @@ /obj/item/crusher_trophy/legion_skull/effect_desc() return "a kinetic crusher to recharge [bonus_value*0.1] second\s faster" -/obj/item/crusher_trophy/legion_skull/add_to(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user) +/obj/item/crusher_trophy/legion_skull/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user) . = ..() if(.) H.charge_time -= bonus_value -/obj/item/crusher_trophy/legion_skull/remove_from(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user) +/obj/item/crusher_trophy/legion_skull/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user) . = ..() if(.) H.charge_time += bonus_value @@ -339,7 +370,7 @@ /obj/item/crusher_trophy/demon_claws/effect_desc() return "melee hits to do [bonus_value * 0.2] more damage and heal you for [bonus_value * 0.1], with 5X effect on mark detonation" -/obj/item/crusher_trophy/demon_claws/add_to(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user) +/obj/item/crusher_trophy/demon_claws/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user) . = ..() if(.) H.force += bonus_value * 0.2 @@ -347,7 +378,7 @@ H.force_wielded += bonus_value * 0.2 H.detonation_damage += bonus_value * 0.8 -/obj/item/crusher_trophy/demon_claws/remove_from(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user) +/obj/item/crusher_trophy/demon_claws/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user) . = ..() if(.) H.force -= bonus_value * 0.2 diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index e871d9eb..56504018 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -30,7 +30,7 @@ new /datum/data/mining_equipment("500 Point Transfer Card", /obj/item/card/mining_point_card/mp500, 500), new /datum/data/mining_equipment("Tracking Implant Kit", /obj/item/storage/box/minertracker, 600), new /datum/data/mining_equipment("Jaunter", /obj/item/wormhole_jaunter, 750), - new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/twohanded/required/kinetic_crusher, 750), + new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/twohanded/kinetic_crusher, 750), new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/gun/energy/kinetic_accelerator, 750), new /datum/data/mining_equipment("Survival Medipen", /obj/item/reagent_containers/hypospray/medipen/survival, 750), new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/storage/firstaid/brute, 800), @@ -201,7 +201,7 @@ new /obj/item/stack/marker_beacon/thirty(drop_location) if("Crusher Kit") new /obj/item/extinguisher/mini(drop_location) - new /obj/item/twohanded/required/kinetic_crusher(drop_location) + new /obj/item/twohanded/kinetic_crusher(drop_location) if("Mining Conscription Kit") new /obj/item/storage/backpack/duffelbag/mining_conscript(drop_location) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index 301b270e..d62f59cd 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -127,7 +127,7 @@ var/client/C = L.client SSmedals.UnlockMedal("Boss [BOSS_KILL_MEDAL]", C) SSmedals.UnlockMedal("[medaltype] [BOSS_KILL_MEDAL]", C) - if(crusher_kill && istype(L.get_active_held_item(), /obj/item/twohanded/required/kinetic_crusher)) + if(crusher_kill && istype(L.get_active_held_item(), /obj/item/twohanded/kinetic_crusher)) SSmedals.UnlockMedal("[medaltype] [BOSS_KILL_MEDAL_CRUSHER]", C) SSmedals.SetScore(BOSS_SCORE, C, 1) SSmedals.SetScore(score_type, C, 1) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm index 05dec578..96b19160 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm @@ -20,7 +20,7 @@ lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE mob_size = MOB_SIZE_LARGE var/icon_aggro = null - var/crusher_drop_mod = 5 + var/crusher_drop_mod = 25 /mob/living/simple_animal/hostile/asteroid/Initialize(mapload) . = ..() @@ -58,7 +58,7 @@ /mob/living/simple_animal/hostile/asteroid/death(gibbed) SSblackbox.record_feedback("tally", "mobs_killed_mining", 1, type) var/datum/status_effect/crusher_damage/C = has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) - if(C && crusher_loot && prob((C.total_damage/maxHealth) * crusher_drop_mod)) //on average, you'll need to kill 20 creatures before getting the item + if(C && crusher_loot && prob((C.total_damage/maxHealth) * crusher_drop_mod)) //on average, you'll need to kill 4 creatures only using the crusher before getting the item spawn_crusher_loot() ..(gibbed) diff --git a/icons/mob/inhands/weapons/hammers_lefthand.dmi b/icons/mob/inhands/weapons/hammers_lefthand.dmi index 0ea340f1..d9c2dcf5 100644 Binary files a/icons/mob/inhands/weapons/hammers_lefthand.dmi and b/icons/mob/inhands/weapons/hammers_lefthand.dmi differ diff --git a/icons/mob/inhands/weapons/hammers_righthand.dmi b/icons/mob/inhands/weapons/hammers_righthand.dmi index dbe34513..e7a4ea33 100644 Binary files a/icons/mob/inhands/weapons/hammers_righthand.dmi and b/icons/mob/inhands/weapons/hammers_righthand.dmi differ diff --git a/icons/obj/mining.dmi b/icons/obj/mining.dmi index 6e05bf54..a9aa3667 100644 Binary files a/icons/obj/mining.dmi and b/icons/obj/mining.dmi differ