diff --git a/code/modules/mob/living/carbon/carbon_emote.dm b/code/modules/mob/living/carbon/carbon_emote.dm index a43c1680d0b..798459b90ca 100644 --- a/code/modules/mob/living/carbon/carbon_emote.dm +++ b/code/modules/mob/living/carbon/carbon_emote.dm @@ -179,6 +179,24 @@ var/obj/item/grab/grabbed = thing message = "twirls [grabbed.affecting.name] around!" grabbed.affecting.emote("spin") + else if(istype(thing, /obj/item/gun/energy/laser/lever_action)) + var/obj/item/gun/energy/laser/lever_action/gun = thing + if(HAS_TRAIT(user, TRAIT_CLUMSY)) + message = "attempts to twirl [thing] around in their hand, but pulls the trigger instead!" + gun.cycle_action(user) + var/shot_leg = pick("l_foot", "r_foot") + gun.process_fire(user, user, 0, params, zone_override = shot_leg) + user.drop_item() + else if(prob(50) && !HAS_TRAIT(user, TRAIT_BADASS)) + message = "attempts to twirl [thing] around in their hand, but fumbles!" + user.drop_item() + else + message = "twirls [thing] around in their hand!" + gun.cycle_action(user) + if(HAS_TRAIT(user, TRAIT_BADASS) && istype(user.get_inactive_hand(), /obj/item/gun/energy/laser/lever_action)) + var/obj/item/gun/energy/laser/lever_action/offhand = user.get_inactive_hand() + offhand.cycle_action() + message = "twirls [thing] around in their hand, and [offhand] in the other! What a badass!" else if(!(thing.flags & ABSTRACT)) message = "twirls [thing] around in their hand!" else diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 16b6cf251bf..2f271958cb7 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -177,6 +177,11 @@ /obj/item/stock_parts/cell/empty starting_charge = 0 +/obj/item/stock_parts/cell/lever_gun + name = "\improper cycle charge cell" + desc = "You shouldn't be seeing this." + maxcharge = 150 + /obj/item/stock_parts/cell/crap name = "\improper Nanotrasen brand rechargeable AA battery" desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT diff --git a/code/modules/projectiles/ammunition/energy_lens.dm b/code/modules/projectiles/ammunition/energy_lens.dm index 6897a0a1a4a..556d8eb9af7 100644 --- a/code/modules/projectiles/ammunition/energy_lens.dm +++ b/code/modules/projectiles/ammunition/energy_lens.dm @@ -27,6 +27,9 @@ e_cost = 83 select_name = "kill" +/obj/item/ammo_casing/energy/lasergun/lever_action + fire_sound = 'sound/weapons/laser4.ogg' + /obj/item/ammo_casing/energy/laser/hos e_cost = 120 diff --git a/code/modules/projectiles/guns/energy/special_eguns.dm b/code/modules/projectiles/guns/energy/special_eguns.dm index 88efdc059ca..fe414fd252b 100644 --- a/code/modules/projectiles/guns/energy/special_eguns.dm +++ b/code/modules/projectiles/guns/energy/special_eguns.dm @@ -18,6 +18,7 @@ * 17. DETECTIVE ENERGY REVOLVER * 18. VOX SPIKETHROWER * 19. VORTEX SHOTGUN +* 20. Model 2495 */ ////////////////////////////// // MARK: ION RIFLE @@ -1213,3 +1214,77 @@ COOLDOWN_START(src, emp_cooldown, 1 MINUTES) atom_say("Energy coils recharged!") update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS) + +////////////////////////////// +// MARK: MODEL 2495 +////////////////////////////// + +/obj/item/gun/energy/laser/lever_action + name = "model 2495" + desc = "A rifle styled after an ancient Earth design. Concealed beneath the wooden furniture and forged metal is a modern laser gun. Features a hand-powered charger that can be used anywhere." + cell_type = /obj/item/stock_parts/cell/lever_gun + icon_state = "lever_action" + item_state = "lever_action" + fire_sound = 'sound/weapons/gunshots/gunshot_lascarbine.ogg' + origin_tech = "combat=5;magnets=4" + w_class = WEIGHT_CLASS_NORMAL + flags = CONDUCT + slot_flags = ITEM_SLOT_BACK + can_charge = FALSE + ammo_type = list(/obj/item/ammo_casing/energy/lasergun/lever_action) + shaded_charge = FALSE + var/cycle_time = 1 SECONDS + COOLDOWN_DECLARE(cycle_cooldown) + +/obj/item/gun/energy/laser/lever_action/examine(mob/user) + . = ..() + . += "This weapon is rechargable by cycling the action, or by twirling the firearm with some skill." + +/obj/item/gun/energy/laser/lever_action/examine_more(mob/user) + ..() + . = list() + . += "The Model 2495 is Warp Tac's response to demand for a laserarm with the endurance required to be used far away from any support infrastructure for extended periods of time. \ + The forged metal and wooden body of the rifle is exceptionally ruggedized to resist rough handling, harsh climates, and whatever other general abuse may be thrown at it. \ + The internal components are beefier and larger than strictly required to lend further durability. Whilst it is quite heavy for a laserarm, it's only somewhat heavier than \ + average compared to a traditional ballistic rifle of similar size." + . += "" + . += "The main selling point of the rifle is the built-in recharging mechanism, operated by cycling a lever located around the trigger guard. \ + One full cycle provides enough energy for a single shot. Skillful users can twirl the rifle to operate the lever, although the operator's manual strongly cautions against doing so." + . += "" + . += "This weapon has long been one of Warp Tac's most popular products thanks to a large market among colonists, frontiersmen, and the occasional pirate outfit." + +/obj/item/gun/energy/laser/lever_action/emp_act() + return + +/obj/item/gun/energy/laser/lever_action/attack_self__legacy__attackchain(mob/living/user as mob) + if(!HAS_TRAIT(user, TRAIT_BADASS) && user.get_inactive_hand()) + to_chat(user, "You need both hands to cycle the action!") + return + cycle_action(user) + if(HAS_TRAIT(user, TRAIT_BADASS) && istype(user.get_inactive_hand(), /obj/item/gun/energy/laser/lever_action)) + var/obj/item/gun/energy/laser/lever_action/offhand = user.get_inactive_hand() + offhand.cycle_action() + +/obj/item/gun/energy/laser/lever_action/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread) + if(!COOLDOWN_FINISHED(src, cycle_cooldown)) + return + return ..() + +/obj/item/gun/energy/laser/lever_action/proc/cycle_action(mob/living/user) + if(!COOLDOWN_FINISHED(src, cycle_cooldown)) + return + if(cell.charge == cell.maxcharge) + return + cell.give(cell.maxcharge) + playsound(user, 'sound/weapons/gun_interactions/lever_action.ogg', 60, TRUE) + update_icon() + var/total_cycle_time = cycle_time + if(current_lens) + total_cycle_time /= current_lens.fire_rate_mult + COOLDOWN_START(src, cycle_cooldown, total_cycle_time) + +/obj/item/gun/energy/laser/lever_action/update_icon_state() + icon_state = initial(icon_state) + var/obj/item/ammo_casing/energy/shot = ammo_type[select] + if(cell.charge < shot.e_cost) + icon_state = "lever_action_e" diff --git a/code/modules/supply/supply_packs/pack_security.dm b/code/modules/supply/supply_packs/pack_security.dm index 5765b952d41..36ac74377fb 100644 --- a/code/modules/supply/supply_packs/pack_security.dm +++ b/code/modules/supply/supply_packs/pack_security.dm @@ -284,6 +284,14 @@ cost = 300 containername = "laser rifle ammo crate" +/datum/supply_packs/security/armory/lever_action + name = "Model 2495 Laser Rifle Crate" + contains = list(/obj/item/gun/energy/laser/lever_action, + /obj/item/gun/energy/laser/lever_action) + cost = 250 + containertype = /obj/structure/closet/crate/secure/plasma + containername = "lever action rifle crate" + /datum/supply_packs/security/armory/tranqammo name = "Tranquilizer Shell Crate" contains = list(/obj/item/storage/fancy/shell/tranquilizer, diff --git a/icons/mob/inhands/guns_lefthand.dmi b/icons/mob/inhands/guns_lefthand.dmi index ff338e63b95..a992479645e 100644 Binary files a/icons/mob/inhands/guns_lefthand.dmi and b/icons/mob/inhands/guns_lefthand.dmi differ diff --git a/icons/mob/inhands/guns_righthand.dmi b/icons/mob/inhands/guns_righthand.dmi index 4f5a3a51d66..591b9cd3698 100644 Binary files a/icons/mob/inhands/guns_righthand.dmi and b/icons/mob/inhands/guns_righthand.dmi differ diff --git a/icons/obj/guns/energy.dmi b/icons/obj/guns/energy.dmi index 39d8fb26edf..97dca5d7068 100644 Binary files a/icons/obj/guns/energy.dmi and b/icons/obj/guns/energy.dmi differ diff --git a/sound/weapons/gun_interactions/lever_action.ogg b/sound/weapons/gun_interactions/lever_action.ogg new file mode 100644 index 00000000000..8069e75980b Binary files /dev/null and b/sound/weapons/gun_interactions/lever_action.ogg differ diff --git a/sound/weapons/laser4.ogg b/sound/weapons/laser4.ogg new file mode 100644 index 00000000000..abb8b0ebf06 Binary files /dev/null and b/sound/weapons/laser4.ogg differ