diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 4ca4c38f68a..afb2cba9365 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -412,6 +412,16 @@ var/list/uplink_items = list() item = /obj/item/weapon/melee/energy/sword/saber cost = 8 +/datum/uplink_item/dangerous/powerfist + name = "Power Fist" + desc = "The power-fist is a metal gauntlet with a built-in piston-ram powered by an external gas supply.\ + Upon hitting a target, the piston-ram will extend foward to make contact for some serious damage. \ + Using a wrench on the piston valve will allow you to tweak the amount of gas used per punch to \ + deal extra damage and hit targets further. Use a screwdriver to take out any attached tanks." + reference = "PF" + item = /obj/item/weapon/melee/powerfist + cost = 8 + /datum/uplink_item/dangerous/chainsaw name = "Chainsaw" desc = "A high powered chainsaw for cutting up ...you know...." diff --git a/code/game/objects/items/weapons/powerfist.dm b/code/game/objects/items/weapons/powerfist.dm new file mode 100644 index 00000000000..8feab4632d7 --- /dev/null +++ b/code/game/objects/items/weapons/powerfist.dm @@ -0,0 +1,100 @@ +/obj/item/weapon/melee/powerfist + name = "power-fist" + desc = "A metal gauntlet with a piston-powered ram ontop for that extra 'ompfh' in your punch." + icon_state = "powerfist" + item_state = "powerfist" + flags = CONDUCT + attack_verb = list("whacked", "fisted", "power-punched") + force = 12 + throwforce = 10 + throw_range = 7 + w_class = 3 + origin_tech = "combat=5;powerstorage=3;syndicate=3" + var/click_delay = 1.5 + var/fisto_setting = 1 + var/gasperfist = 3 + var/obj/item/weapon/tank/tank = null //Tank used for the gauntlet's piston-ram. + + +/obj/item/weapon/melee/powerfist/Destroy() + if(tank) + qdel(tank) + tank = null + return ..() + +/obj/item/weapon/melee/powerfist/examine(mob/user) + ..() + if(!in_range(user, src)) + to_chat(user, "You'll need to get closer to see any more.") + return + if(tank) + to_chat(user, "\icon [tank] It has \the [tank] mounted onto it.") + +/obj/item/weapon/melee/powerfist/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/weapon/tank)) + if(!tank) + var/obj/item/weapon/tank/IT = W + if(IT.volume <= 3) + to_chat(user, "\The [IT] is too small for \the [src].") + return + updateTank(W, 0, user) + else if(istype(W, /obj/item/weapon/wrench)) + switch(fisto_setting) + if(1) + fisto_setting = 2 + if(2) + fisto_setting = 3 + if(3) + fisto_setting = 1 + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + to_chat(user, "You tweak \the [src]'s piston valve to [fisto_setting].") + else if(istype(W, /obj/item/weapon/screwdriver)) + if(tank) + updateTank(tank, 1, user) + + +/obj/item/weapon/melee/powerfist/proc/updateTank(obj/item/weapon/tank/thetank, removing = 0, mob/living/carbon/human/user) + if(removing) + if(!tank) + to_chat(user, "\The [src] currently has no tank attached to it.") + return + to_chat(user, "You detach \the [thetank] from \the [src].") + tank.forceMove(get_turf(user)) + user.put_in_hands(tank) + tank = null + if(!removing) + if(tank) + to_chat(user, "\The [src] already has a tank.") + return + if(!user.unEquip(thetank)) + return + to_chat(user, "You hook \the [thetank] up to \the [src].") + tank = thetank + thetank.forceMove(src) + + +/obj/item/weapon/melee/powerfist/attack(mob/living/target, mob/living/user) + if(!tank) + to_chat(user, "\The [src] can't operate without a source of gas!") + return + if(tank && !tank.air_contents.remove(gasperfist * fisto_setting)) + to_chat(user, "\The [src]'s piston-ram lets out a weak hiss, it needs more gas!") + playsound(loc, 'sound/effects/refill.ogg', 50, 1) + return + + user.do_attack_animation(target) + + target.apply_damage(force * fisto_setting, BRUTE) + target.visible_message("[user]'s powerfist lets out a loud hiss as they punch [target.name]!", \ + "You cry out in pain as [user]'s punch flings you backwards!") + new/obj/effect/kinetic_blast(target.loc) + playsound(loc, 'sound/weapons/resonator_blast.ogg', 50, 1) + playsound(loc, 'sound/weapons/genhit2.ogg', 50, 1) + + var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src))) + spawn(0) + target.throw_at(throw_target, 5 * fisto_setting, 0.2) + + add_logs(target, user, "power fisted", src) + + user.changeNext_move(CLICK_CD_MELEE * click_delay) \ No newline at end of file diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi index 0ac606eb617..2a5ac2889c2 100644 Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index 1a84149f45f..f950b2bdf74 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index 7867fac04b4..2c9a230d1df 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ diff --git a/paradise.dme b/paradise.dme index 900a30964da..674cf8a6b15 100644 --- a/paradise.dme +++ b/paradise.dme @@ -817,6 +817,7 @@ #include "code\game\objects\items\weapons\paiwire.dm" #include "code\game\objects\items\weapons\pneumaticCannon.dm" #include "code\game\objects\items\weapons\power_cells.dm" +#include "code\game\objects\items\weapons\powerfist.dm" #include "code\game\objects\items\weapons\RCD.dm" #include "code\game\objects\items\weapons\RSF.dm" #include "code\game\objects\items\weapons\scissors.dm"