Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gun Tweaks #3730

Merged
merged 5 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions code/__DEFINES/guns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,34 @@
#define GUN_NO_SAFETY_MALFUNCTION_CHANCE_MEDIUM 10
#define GUN_NO_SAFETY_MALFUNCTION_CHANCE_HIGH 15

//slowdown defines
#define NO_SLOWDOWN 0.0
#define LIGHT_PISTOL_SLOWDOWN 0.05
#define PISTOL_SLOWDOWN 0.1
#define REVOLVER_SLOWDOWN 0.15
#define HEAVY_REVOLVER_SLOWDOWN 0.2
#define PDW_SLOWDOWN 0.25
#define SMG_SLOWDOWN 0.3
#define SHOTGUN_SLOWDOWN 0.4
#define HEAVY_SHOTGUN_SLOWDOWN 0.45
#define LIGHT_RIFLE_SLOWDOWN 0.45
#define RIFLE_SLOWDOWN 0.55
#define HEAVY_RIFLE_SLOWDOWN 0.6
#define DMR_SLOWDOWN 0.6
#define SAW_SLOWDOWN 0.7
#define SNIPER_SLOWDOWN 0.9
#define HMG_SLOWDOWN 1
#define AMR_SLOWDOWN 1


//laser slowdown
#define LASER_PISTOL_SLOWDOWN 0.05
#define LASER_SMG_SLOWDOWN 0.2
#define LASER_RIFLE_SLOWDOWN 0.35
#define HEAVY_LASER_RIFLE_SLOWDOWN 0.45
#define LASER_SNIPER_SLOWDOWN 0.6


/////////////////
// ATTACHMENTS //
/////////////////
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/attachments/energy_bayonet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharpness = IS_BLUNT
slot = ATTACHMENT_SLOT_MUZZLE
attach_features_flags = ATTACH_TOGGLE
attach_features_flags = ATTACH_TOGGLE | ATTACH_REMOVABLE_HAND

light_range = 2
light_power = 0.6
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/ammunition/energy/laser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
fire_sound = 'sound/weapons/gun/laser/e-fire.ogg'

/obj/item/ammo_casing/energy/laser/smg
projectile_type = /obj/projectile/beam/laser/weak/negative_ap
projectile_type = /obj/projectile/beam/laser/weak
e_cost = 799 //12 shots with a normal power cell, 25 with an upgraded
select_name = "kill"
delay = 0.13 SECONDS
Expand Down
36 changes: 1 addition & 35 deletions code/modules/projectiles/guns/ballistic/assault.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
gun_firemodes = list(FIREMODE_SEMIAUTO, FIREMODE_FULLAUTO)
default_firemode = FIREMODE_SEMIAUTO
wield_delay = 0.8 SECONDS
wield_slowdown = 0.6
wield_slowdown = RIFLE_SLOWDOWN

fire_delay = 0.2 SECONDS

Expand Down Expand Up @@ -270,37 +270,3 @@
default_firemode = FIREMODE_FULLAUTO

spread_unwielded = 20

//techinically a battle rifle, i'm putting it here for organisation sake

/obj/item/gun/ballistic/automatic/marksman/vickland //weapon designed by Apogee-dev
name = "\improper Vickland"
desc = "The pride of the Saint-Roumain Militia, the Vickland is a rare semi-automatic battle rifle produced by Hunter's Pride exclusively for SRM use. It is unusual in its class for its internal rotary magazine, which must be reloaded using stripper clips. Chambered in .308."
icon = 'icons/obj/guns/manufacturer/hunterspride/48x32.dmi'
lefthand_file = 'icons/obj/guns/manufacturer/hunterspride/lefthand.dmi'
righthand_file = 'icons/obj/guns/manufacturer/hunterspride/righthand.dmi'
mob_overlay_icon = 'icons/obj/guns/manufacturer/hunterspride/onmob.dmi'

fire_sound = 'sound/weapons/gun/rifle/vickland.ogg'
icon_state = "vickland"
item_state = "vickland"
weapon_weight = WEAPON_MEDIUM
w_class = WEIGHT_CLASS_BULKY
internal_magazine = TRUE
default_ammo_type = /obj/item/ammo_box/magazine/internal/vickland
allowed_ammo_types = list(
/obj/item/ammo_box/magazine/internal/vickland,
)
fire_sound = 'sound/weapons/gun/rifle/vickland.ogg'

manufacturer = MANUFACTURER_HUNTERSPRIDE
zoomable = FALSE //no scope on it

rack_sound = 'sound/weapons/gun/rifle/ar_cock.ogg'

fire_delay = 0.4 SECONDS

spread_unwielded = 25
recoil = 0
recoil_unwielded = 4
wield_slowdown = 0.75
18 changes: 1 addition & 17 deletions code/modules/projectiles/guns/ballistic/automatic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,7 @@
spread_unwielded = 13
recoil = 0
recoil_unwielded = 4
wield_slowdown = 0.35

// Laser rifle (rechargeable magazine) //

/obj/item/gun/ballistic/automatic/laser //TODO: REMOVE
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"
item_state = "arg"
default_ammo_type = /obj/item/ammo_box/magazine/recharge
allowed_ammo_types = list(
/obj/item/ammo_box/magazine/recharge,
)
fire_delay = 0.2 SECONDS
burst_size = 0
fire_sound = 'sound/weapons/laser.ogg'
casing_ejector = FALSE
wield_slowdown = PDW_SLOWDOWN

/obj/item/gun/ballistic/automatic/zip_pistol
name = "makeshift pistol"
Expand Down
139 changes: 1 addition & 138 deletions code/modules/projectiles/guns/ballistic/gauss.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,143 +29,6 @@
spread_unwielded = 25
recoil = 0
recoil_unwielded = 4
wield_slowdown = 0.75
wield_slowdown = HEAVY_RIFLE_SLOWDOWN
wield_delay = 1 SECONDS
fire_select_icon_state_prefix = "pellet_"

/obj/item/gun/ballistic/automatic/powered/gauss/modelh
name = "Model H"
desc = "A standard-issue pistol exported from the Solarian Confederation. It fires slow flesh-rending ferromagnetic slugs at a high energy cost, however they are ineffective on any armor."

icon = 'icons/obj/guns/manufacturer/solararmories/48x32.dmi'
lefthand_file = 'icons/obj/guns/manufacturer/solararmories/lefthand.dmi'
righthand_file = 'icons/obj/guns/manufacturer/solararmories/righthand.dmi'
mob_overlay_icon = 'icons/obj/guns/manufacturer/solararmories/onmob.dmi'
icon_state = "model-h"
item_state = "model-h"
fire_sound = 'sound/weapons/gun/gauss/modelh.ogg'
load_sound = 'sound/weapons/gun/gauss/pistol_reload.ogg'

default_ammo_type = /obj/item/ammo_box/magazine/modelh
allowed_ammo_types = list(
/obj/item/ammo_box/magazine/modelh,
)
default_cell_type = /obj/item/stock_parts/cell/gun/solgov
allowed_cell_types = list(
/obj/item/stock_parts/cell/gun/solgov,
)

slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
fire_delay = 0.6 SECONDS //pistol, but heavy caliber.
show_magazine_on_sprite = FALSE
empty_indicator = FALSE
manufacturer = MANUFACTURER_SOLARARMORIES
recoil = 2
recoil_unwielded = 4
spread = 6
spread_unwielded = 12
fire_select_icon_state_prefix = "slug_"

valid_attachments = list(
/obj/item/attachment/laser_sight,
/obj/item/attachment/rail_light,
)

/obj/item/gun/ballistic/automatic/powered/gauss/modelh/no_mag
default_ammo_type = FALSE

/obj/item/gun/ballistic/automatic/powered/gauss/modelh/suns
desc = "A standard-issue pistol exported from the Solarian Confederation. It fires slow flesh-rending ferromagnetic slugs at a high energy cost, however they are ineffective on any armor. It is painted in the colors of SUNS."
default_ammo_type = /obj/item/ammo_box/magazine/modelh
allowed_ammo_types = list(
/obj/item/ammo_box/magazine/modelh,
)
icon_state = "model-h_suns"
item_state = "model-h_suns"

/obj/item/gun/ballistic/automatic/powered/gauss/claris
name = "Claris"
desc = "An antiquated Solarian rifle. Chambered in ferromagnetic pellets, just as the founding Solarians intended."
default_ammo_type = /obj/item/ammo_box/magazine/internal/claris
allowed_ammo_types = list(
/obj/item/ammo_box/magazine/internal/claris,
)
icon = 'icons/obj/guns/manufacturer/solararmories/48x32.dmi'
lefthand_file = 'icons/obj/guns/manufacturer/solararmories/lefthand.dmi'
righthand_file = 'icons/obj/guns/manufacturer/solararmories/righthand.dmi'
mob_overlay_icon = 'icons/obj/guns/manufacturer/solararmories/onmob.dmi'
icon_state = "claris"
item_state = "claris"
fire_sound = 'sound/weapons/gun/gauss/claris.ogg'
load_sound = 'sound/weapons/gun/gauss/sniper_reload.ogg'
default_cell_type = /obj/item/stock_parts/cell/gun/solgov
allowed_cell_types = list(
/obj/item/stock_parts/cell/gun/solgov,
)
slot_flags = ITEM_SLOT_BACK
fire_delay = 0.4 SECONDS
bolt_type = BOLT_TYPE_NO_BOLT
internal_magazine = TRUE
show_magazine_on_sprite = FALSE
empty_indicator = FALSE
manufacturer = MANUFACTURER_SOLARARMORIES
fire_select_icon_state_prefix = "pellet_"

valid_attachments = list(
/obj/item/attachment/laser_sight,
/obj/item/attachment/rail_light,
/obj/item/attachment/bayonet,
/obj/item/attachment/energy_bayonet
)


/obj/item/gun/ballistic/automatic/powered/gauss/claris/suns
desc = "An antiquated Solarian rifle. Chambered in ferromagnetic pellets, just as the founding Solarians intended. Evidently, SUNS' founders echo the sentiment, as it appears to be painted in their colors."
icon_state = "claris_suns"
item_state = "claris_suns"

/obj/item/gun/ballistic/automatic/powered/gauss/gar
name = "Solar 'GAR' Carbine"
desc = "A Solarian carbine, unusually modern for its producers. Launches ferromagnetic lances at alarming speeds."
default_ammo_type = /obj/item/ammo_box/magazine/gar
allowed_ammo_types = list(
/obj/item/ammo_box/magazine/gar,
)
icon = 'icons/obj/guns/manufacturer/solararmories/48x32.dmi'
lefthand_file = 'icons/obj/guns/manufacturer/solararmories/lefthand.dmi'
righthand_file = 'icons/obj/guns/manufacturer/solararmories/righthand.dmi'
mob_overlay_icon = 'icons/obj/guns/manufacturer/solararmories/onmob.dmi'
icon_state = "gar"
item_state = "gar"
fire_sound = 'sound/weapons/gun/gauss/gar.ogg'
load_sound = 'sound/weapons/gun/gauss/rifle_reload.ogg'
default_cell_type = /obj/item/stock_parts/cell/gun/solgov
allowed_cell_types = list(
/obj/item/stock_parts/cell/gun/solgov,
)
slot_flags = ITEM_SLOT_BACK
burst_size = 1
fire_delay = 0.2 SECONDS

actions_types = list()
empty_indicator = FALSE
manufacturer = MANUFACTURER_SOLARARMORIES

valid_attachments = list(
/obj/item/attachment/laser_sight,
/obj/item/attachment/rail_light,
/obj/item/attachment/bayonet,
/obj/item/attachment/energy_bayonet
)

gun_firemodes = list(FIREMODE_SEMIAUTO, FIREMODE_FULLAUTO)
default_firemode = FIREMODE_SEMIAUTO

wield_delay = 0.7 SECONDS
fire_select_icon_state_prefix = "lance_"

/obj/item/gun/ballistic/automatic/powered/gauss/gar/suns
desc = "A Solarian carbine, unusually modern for its producers. It's just modern enough for SUNS, however, who have painted the weapon in their colors. Launches ferromagnetic lances at alarming speeds."
icon_state = "gar_suns"
item_state = "gar_suns"
5 changes: 3 additions & 2 deletions code/modules/projectiles/guns/ballistic/hmg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
gun_firemodes = list(FIREMODE_FULLAUTO)
default_firemode = FIREMODE_FULLAUTO

wield_slowdown = HMG_SLOWDOWN

spread = 4
spread_unwielded = 80
recoil = 1
recoil_unwielded = 4
wield_slowdown = 3

gunslinger_recoil_bonus = 2
gunslinger_spread_bonus = 20
Expand Down Expand Up @@ -194,7 +195,7 @@
recoil = 1 //identical to other LMGS
recoil_unwielded = 4 //same as skm

wield_slowdown = 1 //not as severe as other lmgs, but worse than the normal skm
wield_slowdown = SAW_SLOWDOWN //not as severe as other lmgs, but worse than the normal skm
wield_delay = 0.85 SECONDS //faster than normal lmgs, slower than stock skm

has_bipod = TRUE
Expand Down
3 changes: 1 addition & 2 deletions code/modules/projectiles/guns/ballistic/marksman.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

/obj/item/gun/ballistic/automatic/marksman
show_magazine_on_sprite = TRUE

burst_size = 1
zoomable = TRUE //this var as true without setting anything else produces a 2x zoom
wield_slowdown = 2
wield_slowdown = DMR_SLOWDOWN
wield_delay = 1 SECONDS
Loading
Loading