Files
ebd2f8bc5e [MIRROR] Replaces my old and crusty pp-95 with the cool new nukeops tech on the block, smart SMGs (#29126)
* Replaces my old and crusty pp-95 with the cool new nukeops tech on the block, smart SMGs (#85211)

## About The Pull Request

![image](https://github.com/user-attachments/assets/c399db0d-c8b8-4f0e-b20d-e81e153a4fac)

![smart
bullet](https://github.com/user-attachments/assets/02af6174-f967-487c-b5ee-90c73300d179)

Adds the Abielle Smart-SMG to replace the pp-95 entirely.

The Abielle performs nearly identically to the pp-95 in nearly all
aspects, doing 0.5 less damage because it's not a projectile modifier on
9mm anymore.

What the Abielle does do majorly differently, is give it's bullets a
slight homing ability VS whatever you clicked on. This keeps the weapon
equally useless to it's predecessor at spraying blindly down hallways,
while rewarding careful aim with bullets that slightly track the target.

## Why It's Good For The Game

The surplus smg sucks, and I don't mean performance-wise (although it
certainly does, that's the idea). The surplus smg sucks because
typically you would be better suited using it as a melee weapon due to
the inaccuracy and low damage. Making the cheapo "I forgot to buy a
weapon" gun practically useless is super punishing especially for newer
ops who might not remember to buy a weapon first. The smartgun makes the
surplus smg still pretty shit compared to the other nukeops guns that
can down a man nearly instantly, but means that reinforcements or broke
ass nukeops can still be relatively effective so long as they can click
on a spaceman across the screen.

## Changelog
🆑
balance: The nukeops surplus smg, the pp-95, has been reworked into the
Abielle Smart-SMG. It performs nearly identically to the pp-95, however
it's projectiles get a slight homing ability towards whatever you click
on.
sound: New firing sounds for the surplus smg, credit to the m41 sound
effects from tgmc
image: New sprites for the surplus smg, made by me
/🆑

* Replaces my old and crusty pp-95 with the cool new nukeops tech on the block, smart SMGs

---------

Co-authored-by: Paxilmaniac <82386923+Paxilmaniac@users.noreply.github.com>
2024-07-31 07:30:46 +05:30

353 lines
12 KiB
Plaintext

/obj/item/gun/ballistic/automatic
w_class = WEIGHT_CLASS_NORMAL
can_suppress = TRUE
burst_size = 3
fire_delay = 2
actions_types = list(/datum/action/item_action/toggle_firemode)
semi_auto = TRUE
fire_sound = 'sound/weapons/gun/smg/shot.ogg'
fire_sound_volume = 90
rack_sound = 'sound/weapons/gun/smg/smgrack.ogg'
suppressed_sound = 'sound/weapons/gun/smg/shot_suppressed.ogg'
burst_fire_selection = TRUE
/obj/item/gun/ballistic/automatic/proto
name = "\improper Nanotrasen Saber SMG"
desc = "A prototype full-auto 9mm submachine gun, designated 'SABR'. Has a threaded barrel for suppressors."
icon_state = "saber"
burst_size = 1
actions_types = list()
mag_display = TRUE
empty_indicator = TRUE
accepted_magazine_type = /obj/item/ammo_box/magazine/smgm9mm
pin = null
bolt_type = BOLT_TYPE_LOCKING
show_bolt_icon = FALSE
/obj/item/gun/ballistic/automatic/proto/Initialize(mapload)
. = ..()
AddComponent(/datum/component/automatic_fire, 0.2 SECONDS)
/obj/item/gun/ballistic/automatic/proto/unrestricted
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/c20r
name = "\improper C-20r SMG"
desc = "A bullpup three-round burst .45 SMG, designated 'C-20r'. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp."
icon_state = "c20r"
inhand_icon_state = "c20r"
selector_switch_icon = TRUE
accepted_magazine_type = /obj/item/ammo_box/magazine/smgm45
fire_delay = 2
burst_size = 3
pin = /obj/item/firing_pin/implant/pindicate
mag_display = TRUE
mag_display_ammo = TRUE
empty_indicator = TRUE
/obj/item/gun/ballistic/automatic/c20r/add_bayonet_point()
AddComponent(/datum/component/bayonet_attachable, offset_x = 26, offset_y = 12)
/obj/item/gun/ballistic/automatic/c20r/update_overlays()
. = ..()
if(!chambered && empty_indicator) //this is duplicated due to a layering issue with the select fire icon.
. += "[icon_state]_empty"
/obj/item/gun/ballistic/automatic/c20r/unrestricted
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/c20r/Initialize(mapload)
. = ..()
update_appearance()
/obj/item/gun/ballistic/automatic/wt550
name = "\improper WT-550 Autorifle"
desc = "Recalled by Nanotrasen due to public backlash around heat distribution resulting in unintended discombobulation. \
This outcry was fabricated through various Syndicate-backed misinformation operations to force Nanotrasen to abandon \
its ballistics weapon program, cornering them into the energy weapons market. Most often found today in the hands of pirates, \
underfunded security personnel, cargo technicians, theoritical physicists and gang bangers out on the rim. \
Light-weight and fully automatic. Uses 4.6x30mm rounds."
icon_state = "wt550"
w_class = WEIGHT_CLASS_BULKY
inhand_icon_state = "arg"
accepted_magazine_type = /obj/item/ammo_box/magazine/wt550m9
fire_delay = 2
can_suppress = FALSE
burst_size = 1
actions_types = list()
mag_display = TRUE
mag_display_ammo = TRUE
empty_indicator = TRUE
/obj/item/gun/ballistic/automatic/wt550/Initialize(mapload)
. = ..()
AddComponent(/datum/component/automatic_fire, 0.3 SECONDS)
/obj/item/gun/ballistic/automatic/wt550/add_bayonet_point()
AddComponent(/datum/component/bayonet_attachable, offset_x = 25, offset_y = 12)
/obj/item/gun/ballistic/automatic/smartgun
name = "\improper Abielle Smart-SMG"
desc = "An old experiment in smart-weapon technology that guides bullets towards the target the gun was aimed at when fired. \
While the tracking functions worked fine, the gun is prone to insanely wide spread thanks to it's practically non-existant barrel."
icon_state = "smartgun"
inhand_icon_state = "smartgun"
accepted_magazine_type = /obj/item/ammo_box/magazine/smartgun
burst_size = 4
fire_delay = 1
spread = 40
dual_wield_spread = 20
actions_types = list()
bolt_type = BOLT_TYPE_LOCKING
can_suppress = FALSE
mag_display = TRUE
empty_indicator = TRUE
click_on_low_ammo = FALSE
/// List of the possible firing sounds
var/list/firing_sound_list = list(
'sound/weapons/gun/smartgun/smartgun_shoot_1.ogg',
'sound/weapons/gun/smartgun/smartgun_shoot_2.ogg',
'sound/weapons/gun/smartgun/smartgun_shoot_3.ogg',
)
/obj/item/gun/ballistic/automatic/smartgun/fire_sounds()
var/picked_fire_sound = pick(firing_sound_list)
playsound(src, picked_fire_sound, fire_sound_volume, vary_fire_sound)
/obj/item/gun/ballistic/automatic/mini_uzi
name = "\improper Type U3 Uzi"
desc = "A lightweight, burst-fire submachine gun, for when you really want someone dead. Uses 9mm rounds."
icon_state = "miniuzi"
accepted_magazine_type = /obj/item/ammo_box/magazine/uzim9mm
burst_size = 2
bolt_type = BOLT_TYPE_OPEN
show_bolt_icon = FALSE
mag_display = TRUE
rack_sound = 'sound/weapons/gun/pistol/slide_lock.ogg'
/**
* Weak uzi for syndicate chimps. It comes in a 4 TC kit.
* Roughly 9 damage per bullet every 0.2 seconds, equaling out to downing an opponent in a bit over a second, if they have no armor.
*/
/obj/item/gun/ballistic/automatic/mini_uzi/chimpgun
name = "\improper MONK-10"
desc = "Developed by Syndicate monkeys, for syndicate Monkeys. Despite the name, this weapon resembles an Uzi significantly more than a MAC-10. Uses 9mm rounds. There's a label on the other side of the gun that says \"Do what comes natural.\""
projectile_damage_multiplier = 0.4
projectile_wound_bonus = -25
pin = /obj/item/firing_pin/monkey
/obj/item/gun/ballistic/automatic/m90
name = "\improper M-90gl Carbine"
desc = "A three-round burst .223 toploading carbine, designated 'M-90gl'. Has an attached underbarrel grenade launcher."
desc_controls = "Right-click to use grenade launcher."
icon_state = "m90"
w_class = WEIGHT_CLASS_BULKY
inhand_icon_state = "m90"
selector_switch_icon = TRUE
accepted_magazine_type = /obj/item/ammo_box/magazine/m223
can_suppress = FALSE
var/obj/item/gun/ballistic/revolver/grenadelauncher/underbarrel
burst_size = 3
fire_delay = 2
spread = 5
pin = /obj/item/firing_pin/implant/pindicate
mag_display = TRUE
empty_indicator = TRUE
fire_sound = 'sound/weapons/gun/smg/shot_alt.ogg'
/obj/item/gun/ballistic/automatic/m90/Initialize(mapload)
. = ..()
underbarrel = new /obj/item/gun/ballistic/revolver/grenadelauncher(src)
update_appearance()
/obj/item/gun/ballistic/automatic/m90/Destroy()
QDEL_NULL(underbarrel)
return ..()
/obj/item/gun/ballistic/automatic/m90/unrestricted
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/m90/unrestricted/Initialize(mapload)
. = ..()
underbarrel = new /obj/item/gun/ballistic/revolver/grenadelauncher/unrestricted(src)
update_appearance()
/obj/item/gun/ballistic/automatic/m90/try_fire_gun(atom/target, mob/living/user, params)
if(LAZYACCESS(params2list(params), RIGHT_CLICK))
return underbarrel.try_fire_gun(target, user, params)
return ..()
/obj/item/gun/ballistic/automatic/m90/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(isammocasing(tool))
if(istype(tool, underbarrel.magazine.ammo_type))
underbarrel.attack_self(user)
underbarrel.attackby(tool, user, list2params(modifiers))
return ITEM_INTERACT_BLOCKING
return ..()
/obj/item/gun/ballistic/automatic/tommygun
name = "\improper Thompson SMG"
desc = "Based on the classic 'Chicago Typewriter'."
icon_state = "tommygun"
inhand_icon_state = "shotgun"
selector_switch_icon = TRUE
w_class = WEIGHT_CLASS_BULKY
slot_flags = 0
accepted_magazine_type = /obj/item/ammo_box/magazine/tommygunm45
can_suppress = FALSE
burst_size = 1
actions_types = list()
fire_delay = 1
bolt_type = BOLT_TYPE_OPEN
empty_indicator = TRUE
show_bolt_icon = FALSE
/// Rate of fire, set on initialize only
var/rof = 0.1 SECONDS
/obj/item/gun/ballistic/automatic/tommygun/Initialize(mapload)
. = ..()
AddComponent(/datum/component/automatic_fire, rof)
/**
* Weak tommygun for syndicate chimps. It comes in a 4 TC kit.
* Roughly 9 damage per bullet every 0.2 seconds, equaling out to downing an opponent in a bit over a second, if they have no armor.
*/
/obj/item/gun/ballistic/automatic/tommygun/chimpgun
name = "\improper Typewriter"
desc = "It was the best of times, it was the BLURST of times!? You stupid monkeys!"
fire_delay = 2
rof = 0.2 SECONDS
projectile_damage_multiplier = 0.4
projectile_wound_bonus = -25
pin = /obj/item/firing_pin/monkey
/obj/item/gun/ballistic/automatic/ar
name = "\improper NT-ARG 'Boarder'"
desc = "A robust assault rifle used by Nanotrasen fighting forces."
icon_state = "arg"
inhand_icon_state = "arg"
slot_flags = 0
accepted_magazine_type = /obj/item/ammo_box/magazine/m223
can_suppress = FALSE
burst_size = 3
fire_delay = 1
// L6 SAW //
/obj/item/gun/ballistic/automatic/l6_saw
name = "\improper L6 SAW"
desc = "A heavily modified 7mm light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the receiver below the designation."
icon_state = "l6"
inhand_icon_state = "l6closedmag"
base_icon_state = "l6"
w_class = WEIGHT_CLASS_HUGE
slot_flags = 0
accepted_magazine_type = /obj/item/ammo_box/magazine/m7mm
weapon_weight = WEAPON_HEAVY
burst_size = 1
actions_types = list()
can_suppress = FALSE
spread = 7
pin = /obj/item/firing_pin/implant/pindicate
bolt_type = BOLT_TYPE_OPEN
show_bolt_icon = FALSE
mag_display = TRUE
mag_display_ammo = TRUE
tac_reloads = FALSE
fire_sound = 'sound/weapons/gun/l6/shot.ogg'
rack_sound = 'sound/weapons/gun/l6/l6_rack.ogg'
suppressed_sound = 'sound/weapons/gun/general/heavy_shot_suppressed.ogg'
var/cover_open = FALSE
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/l6_saw/Initialize(mapload)
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
AddComponent(/datum/component/automatic_fire, 0.2 SECONDS)
/obj/item/gun/ballistic/automatic/l6_saw/examine(mob/user)
. = ..()
. += "<b>alt + click</b> to [cover_open ? "close" : "open"] the dust cover."
if(cover_open && magazine)
. += span_notice("It seems like you could use an <b>empty hand</b> to remove the magazine.")
/obj/item/gun/ballistic/automatic/l6_saw/click_alt(mob/user)
cover_open = !cover_open
balloon_alert(user, "cover [cover_open ? "opened" : "closed"]")
playsound(src, 'sound/weapons/gun/l6/l6_door.ogg', 60, TRUE)
update_appearance()
return CLICK_ACTION_SUCCESS
/obj/item/gun/ballistic/automatic/l6_saw/update_icon_state()
. = ..()
inhand_icon_state = "[base_icon_state][cover_open ? "open" : "closed"][magazine ? "mag":"nomag"]"
/obj/item/gun/ballistic/automatic/l6_saw/update_overlays()
. = ..()
. += "l6_door_[cover_open ? "open" : "closed"]"
/obj/item/gun/ballistic/automatic/l6_saw/try_fire_gun(atom/target, mob/living/user, params)
if(cover_open)
balloon_alert(user, "close the cover!")
return FALSE
. = ..()
if(.)
update_appearance()
return .
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/gun/ballistic/automatic/l6_saw/attack_hand(mob/user, list/modifiers)
if (loc != user)
..()
return
if (!cover_open)
balloon_alert(user, "open the cover!")
return
..()
/obj/item/gun/ballistic/automatic/l6_saw/attackby(obj/item/A, mob/user, params)
if(!cover_open && istype(A, accepted_magazine_type))
balloon_alert(user, "open the cover!")
return
..()
// Old Semi-Auto Rifle //
/obj/item/gun/ballistic/automatic/surplus
name = "Surplus Rifle"
desc = "One of countless obsolete ballistic rifles that still sees use as a cheap deterrent. Uses 10mm ammo and its bulky frame prevents one-hand firing."
icon_state = "surplus"
worn_icon_state = null
weapon_weight = WEAPON_HEAVY
accepted_magazine_type = /obj/item/ammo_box/magazine/m10mm/rifle
fire_delay = 30
burst_size = 1
can_unsuppress = TRUE
can_suppress = TRUE
w_class = WEIGHT_CLASS_HUGE
slot_flags = ITEM_SLOT_BACK
actions_types = list()
mag_display = TRUE
// Laser rifle (rechargeable magazine) //
/obj/item/gun/ballistic/automatic/laser
name = "laser rifle"
desc = "Though sometimes mocked for the relatively weak firepower of their energy weapons, the logistic miracle of rechargeable ammunition has given Nanotrasen a decisive edge over many a foe."
icon_state = "oldrifle"
w_class = WEIGHT_CLASS_BULKY
inhand_icon_state = "arg"
accepted_magazine_type = /obj/item/ammo_box/magazine/recharge
empty_indicator = TRUE
fire_delay = 2
can_suppress = FALSE
burst_size = 0
actions_types = list()
fire_sound = 'sound/weapons/laser.ogg'
casing_ejector = FALSE