diff --git a/code/game/objects/items/weapons/material/sledgehammer_construction_ch.dm b/code/game/objects/items/weapons/material/sledgehammer_construction_ch.dm new file mode 100644 index 0000000000..4cae8981c8 --- /dev/null +++ b/code/game/objects/items/weapons/material/sledgehammer_construction_ch.dm @@ -0,0 +1,124 @@ +/obj/item/weapon/hammer_head + name = "hammer head" + desc = "A rectangular plasteel head. Feels very heavy in your hand.." + icon = 'icons/obj/hammer_construction_ch.dmi' + icon_state = "hammer_construction_1" + description_info = "You need rods, metal, a wrench and welding fuel to finish this up." + + var/construction_stage = 1 + +/obj/item/weapon/hammer_head/attackby(var/obj/item/thing, var/mob/user) + + if(istype(thing, /obj/item/stack/rods) && construction_stage == 1) + var/obj/item/stack/rods = thing + if(rods.get_amount() < 4) + to_chat(user, "You need at least 4 rods for this task.") + return + rods.use(4) + user.visible_message("\The [user] puts some rods together in \the [src] hole.") + increment_construction_stage() + return + + if(istype(thing, /obj/item/weapon/weldingtool) && construction_stage == 2) + var/obj/item/weapon/weldingtool/welder = thing + if(!welder.isOn()) + to_chat(user, "Turn it on first!") + return + + if(!welder.remove_fuel(0,user)) + to_chat(user, "You need more fuel!") + return + + user.visible_message("\The [user] weld the rods to the head \the [src] together with \the [thing].") + playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1) + spawn(5) + increment_construction_stage() + return + + if(istype(thing, /obj/item/stack/rods) && construction_stage == 3) + var/obj/item/stack/rods = thing + if(rods.get_amount() < 4) + to_chat(user, "You need at least 4 rods for this task.") + return + rods.use(4) + user.visible_message("\The [user] jams \the [thing]'s into \the [src].") + increment_construction_stage() + return + + if(istype(thing, /obj/item/weapon/weldingtool) && construction_stage == 4) + var/obj/item/weapon/weldingtool/welder = thing + + if(!welder.isOn()) + to_chat(user, "Turn it on first!") + return + + if(!welder.remove_fuel(0,user)) + to_chat(user, "You need more fuel!") + return + + user.visible_message("\The [user] welds the rods together of the handle into place, forming a long irregular shaft.") + playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1) + + increment_construction_stage() + return + + if(istype(thing, /obj/item/stack/material) && construction_stage == 5) + var/obj/item/stack/material/reinforcing = thing + var/material/reinforcing_with = reinforcing.get_material() + if(reinforcing_with.name == DEFAULT_WALL_MATERIAL) // Steel + if(reinforcing.get_amount() < 3) + to_chat(user, "You need at least 3 [reinforcing.singular_name]\s for this task.") + return + reinforcing.use(3) + user.visible_message("\The [user] shapes some metal sheets around the rods.") + increment_construction_stage() + return + + if(istype(thing, /obj/item/weapon/weldingtool) && construction_stage == 6) + var/obj/item/weapon/weldingtool/welder = thing + if(!welder.isOn()) + to_chat(user, "Turn it on first!") + return + if(!welder.remove_fuel(10,user)) + to_chat(user, "You need more fuel!") + return + user.visible_message("\The [user] heats up the metal sheets until it glows red.") + playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1) + increment_construction_stage() + return + + + if(istype(thing, /obj/item/weapon/tool/wrench) && construction_stage == 7) + user.visible_message("\The [user] whacks at \the [src] like a caveman, shaping the metal with \the [thing] into a rough handle, finishing it off.") + increment_construction_stage() + playsound(src.loc, 'sound/weapons/smash5.ogg', 100, 1) + var/obj/item/weapon/material/twohanded/sledgehammer/sledge = new(loc) + var/put_in_hands + var/mob/M = src.loc + if(istype(M)) + put_in_hands = M == user + M.drop_from_inventory(src) + if(put_in_hands) + user.put_in_hands(sledge) + qdel(src) + return + + + return ..() + +/obj/item/weapon/hammer_head/proc/increment_construction_stage() + if(construction_stage < 7) + construction_stage++ + icon_state = "hammer_construction_[construction_stage]" + +/obj/item/weapon/hammer_head/examine(var/mob/user) + . = ..(user,2) + if(.) + switch(construction_stage) + if(2) to_chat(user, "It has a bunch of rods sticking out of the hole.") + if(3) to_chat(user, "It has a short rough metal shaft sticking to it, quite short.") + if(4) to_chat(user, "It has a bunch of rods jammed into the shaft/") + if(4) to_chat(user, "It has a pretty long rough metal shaft sticking out of it, it look hard to grab.") + if(5) to_chat(user, "It has a few sheets bent in half across the handle.") + if(6) to_chat(user, "It has red hot, pliable looking metal sheets spread over the handle. What a sloppy job.") + if(7) to_chat(user, "It has a roughly shaped metal handle.") diff --git a/code/game/objects/items/weapons/material/twohanded_ch.dm b/code/game/objects/items/weapons/material/twohanded_ch.dm new file mode 100644 index 0000000000..9cd8ed4d0c --- /dev/null +++ b/code/game/objects/items/weapons/material/twohanded_ch.dm @@ -0,0 +1,100 @@ + +/* +* +*Sledgehammer +*Mjollnir +* +*/ + +/obj/item/weapon/material/twohanded/sledgehammer // a SLEGDGEHAMMER + icon_state = "sledgehammer0" + base_icon = "sledgehammer" + name = "sledgehammer" + desc = "A long, heavy hammer meant to be used with both hands. Typically used for breaking rocks and driving posts, it can also be used for breaking bones or driving points home." + description_info = "This weapon can cleave, striking nearby lesser, hostile enemies close to the primary target. It must be held in both hands to do this." + unwielded_force_divisor = 0.25 + force = 25 + force_divisor = 0.9 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor + hitsound = 'sound/weapons/heavysmash.ogg' + icon = 'icons/obj/hammer_sprites_ch.dmi' + w_class = ITEMSIZE_HUGE + slowdown = 1.5 + dulled_divisor = 0.95 //Still metal on a stick + sharp = 0 + edge = 0 + force_wielded = 23 //A fair bit less than the fireaxe. + attack_verb = list("attacked", "smashed", "crushed", "wacked", "pounded") + applies_material_colour = 0 + + item_icons = list( + slot_l_hand_str = 'icons/mob/items/lefthand_material_ch.dmi', + slot_r_hand_str = 'icons/mob/items/righthand_material_ch.dmi', + ) + +/obj/item/weapon/material/twohanded/sledgehammer/update_held_icon() + var/mob/living/M = loc + if(istype(M) && !issmall(M) && M.item_is_in_hands(src) && !M.hands_are_full()) + wielded = 1 + pry = 1 + force = force_wielded + name = "[base_name] (wielded)" + update_icon() + else + wielded = 0 + pry = 0 + force = force_unwielded + name = "[base_name]" + update_icon() + ..() + +/obj/item/weapon/material/twohanded/sledgehammer/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) + if(!proximity) return + ..() + if(A && wielded) + if(istype(A,/obj/structure/window)) + var/obj/structure/window/W = A + W.shatter() + else if(istype(A,/obj/structure/grille)) + qdel(A) + else if(istype(A,/obj/effect/plant)) + var/obj/effect/plant/P = A + P.die_off() + +// This cannot go into afterattack since some mobs delete themselves upon dying. +/obj/item/weapon/material/twohanded/sledgehammer/pre_attack(var/mob/living/target, var/mob/living/user) + if(istype(target)) + cleave(user, target) + +/obj/item/weapon/material/twohanded/sledgehammer/mjollnir + icon_state = "mjollnir0" + base_icon = "mjollnir" + name = "Mjollnir" + desc = "A long, heavy hammer. This weapons crackles with barely contained energy." + force_divisor = 2 + hitsound = 'sound/effects/lightningbolt.ogg' + force = 50 + throwforce = 15 + force_wielded = 75 + slowdown = 0 + +/obj/item/weapon/material/twohanded/sledgehammer/mjollnir/afterattack(mob/living/G, mob/user) + ..() + + if(wielded) + if(prob(10)) + G.electrocute_act(500, src, def_zone = BP_TORSO) + return + if(prob(10)) + G.dust() + return + else + G.stun_effect_act(10 , 50,def_zone = BP_TORSO, src) + G.take_organ_damage(10) + G.Paralyse(20) + playsound(src.loc, "sparks", 50, 1) + return + +/obj/item/weapon/material/twohanded/sledgehammer/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons. + icon_state = "mjollnir[wielded]" + return + diff --git a/code/modules/materials/material_recipes_ch.dm b/code/modules/materials/material_recipes_ch.dm new file mode 100644 index 0000000000..a1d34d67be --- /dev/null +++ b/code/modules/materials/material_recipes_ch.dm @@ -0,0 +1,3 @@ +/material/plasteel/generate_recipes() + . = ..() + recipes += new/datum/stack_recipe("Hammer Head", /obj/item/weapon/hammer_head, 2) diff --git a/icons/mob/items/lefthand_material_ch.dmi b/icons/mob/items/lefthand_material_ch.dmi new file mode 100644 index 0000000000..0dc4ee6e8f Binary files /dev/null and b/icons/mob/items/lefthand_material_ch.dmi differ diff --git a/icons/mob/items/righthand_material_ch.dmi b/icons/mob/items/righthand_material_ch.dmi new file mode 100644 index 0000000000..be41665bee Binary files /dev/null and b/icons/mob/items/righthand_material_ch.dmi differ diff --git a/icons/obj/hammer_construction_ch.dmi b/icons/obj/hammer_construction_ch.dmi new file mode 100644 index 0000000000..d777c33678 Binary files /dev/null and b/icons/obj/hammer_construction_ch.dmi differ diff --git a/icons/obj/hammer_sprites_ch.dmi b/icons/obj/hammer_sprites_ch.dmi new file mode 100644 index 0000000000..ea7dc26a66 Binary files /dev/null and b/icons/obj/hammer_sprites_ch.dmi differ diff --git a/sound/weapons/smash5.ogg b/sound/weapons/smash5.ogg new file mode 100644 index 0000000000..aa56170bb4 Binary files /dev/null and b/sound/weapons/smash5.ogg differ diff --git a/vorestation.dme b/vorestation.dme index 0090be550b..a663b93f5f 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1245,9 +1245,11 @@ #include "code\game\objects\items\weapons\material\material_weapons.dm" #include "code\game\objects\items\weapons\material\misc.dm" #include "code\game\objects\items\weapons\material\shards.dm" +#include "code\game\objects\items\weapons\material\sledgehammer_construction_ch.dm" #include "code\game\objects\items\weapons\material\swords.dm" #include "code\game\objects\items\weapons\material\thrown.dm" #include "code\game\objects\items\weapons\material\twohanded.dm" +#include "code\game\objects\items\weapons\material\twohanded_ch.dm" #include "code\game\objects\items\weapons\material\whetstone.dm" #include "code\game\objects\items\weapons\melee\deflect.dm" #include "code\game\objects\items\weapons\melee\energy.dm" @@ -2194,6 +2196,7 @@ #include "code\modules\maps\tg\reader.dm" #include "code\modules\materials\fifty_spawner_mats.dm" #include "code\modules\materials\material_recipes.dm" +#include "code\modules\materials\material_recipes_ch.dm" #include "code\modules\materials\material_recipes_vr.dm" #include "code\modules\materials\material_sheets.dm" #include "code\modules\materials\material_synth.dm"