[MIRROR] Makes clicking gun HUD icon swap (#12198)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-01-01 16:41:53 -07:00
committed by GitHub
parent 2a01cf11bc
commit 6cc824b9cb
9 changed files with 51 additions and 442 deletions
+2
View File
@@ -583,6 +583,7 @@ GLOBAL_LIST_INIT(global_huds, list(
var/atom/movable/screen/ammo/ammo_hud = new
ammo_hud_list[G] = ammo_hud
ammo_hud.screen_loc = ammo_hud.ammo_screen_loc_list[length(ammo_hud_list)]
ammo_hud.our_gun = WEAKREF(G)
ammo_hud.add_hud(user, G)
ammo_hud.update_hud(user, G)
@@ -591,6 +592,7 @@ GLOBAL_LIST_INIT(global_huds, list(
var/atom/movable/screen/ammo/ammo_hud = ammo_hud_list[G]
if(isnull(ammo_hud))
return
ammo_hud.our_gun = null
ammo_hud.remove_hud(user, G)
qdel(ammo_hud)
ammo_hud_list -= G
+15
View File
@@ -1009,6 +1009,21 @@
screen_loc = ui_ammo_hud1
var/warned = FALSE
var/static/list/ammo_screen_loc_list = list(ui_ammo_hud1, ui_ammo_hud2, ui_ammo_hud3 ,ui_ammo_hud4)
var/datum/weakref/our_gun
/atom/movable/screen/ammo/Click()
var/mob/user = usr
if(!user.checkClickCooldown())
return TRUE
if(user.stat || user.paralysis || user.stunned || user.weakened)
return TRUE
if(istype(user.loc,/obj/mecha)) // stops inventory actions in a mech
return TRUE
var/obj/item/gun/gun = our_gun.resolve()
if(!gun)
return TRUE
gun.switch_firemodes(user)
return TRUE
/atom/movable/screen/ammo/proc/add_hud(var/mob/living/user, var/obj/item/gun/G)
+6 -3
View File
@@ -24,7 +24,8 @@
/obj/item/gun/energy/gun
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. Most energy weapons can fire through windows harmlessly. To switch between stun and lethal, click the weapon \
in your hand. To recharge this weapon, use a weapon recharger."
in your hand. To recharge this weapon, use a weapon recharger. \
If the gun has multiple firemodes, you can cycle through them by clicking the ammo HUD in the top right of your screen."
/obj/item/gun/energy/gun/taser
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
@@ -37,7 +38,8 @@
/obj/item/gun/energy/gun/nuclear
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. Most energy weapons can fire through windows harmlessly. To switch between stun and lethal, click the weapon \
in your hand. Unlike most weapons, this weapon recharges itself."
in your hand or by clicking the ammo HUD in the top right of your screen. \
Unlike most weapons, this weapon recharges itself."
/obj/item/gun/energy/captain
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
@@ -51,7 +53,8 @@
/obj/item/gun/projectile
description_info = "This is a ballistic weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. To reload, click the weapon in your hand to unload (if needed), then add the appropriate ammo. The description \
will tell you what caliber you need."
will tell you what caliber you need. \
If the gun has multiple firemodes, you can cycle through them by clicking the ammo HUD in the top right of your screen."
/obj/item/gun/energy/chameleon
description_info = null //The chameleon gun adopts the description_info of the weapon it is impersonating as, to make meta-ing harder.
-1
View File
@@ -150,7 +150,6 @@
if(.)
return TRUE
var/turf/T = get_turf(user)
var/outdoors = T.is_outdoors()
if(do_after(user, 1.5 SECONDS, target = user) && !QDELETED(src))
new /obj/structure/extraction_point(get_turf(user))
qdel(src)
+23 -12
View File
@@ -56,15 +56,18 @@
update_icon()
/obj/item/gun/projectile/consume_next_projectile()
//get the next casing
if(loaded.len)
chambered = loaded[1] //load next casing.
if(handle_casings != HOLD_CASINGS)
loaded -= chambered
else if(ammo_magazine && ammo_magazine.stored_ammo.len)
chambered = ammo_magazine.stored_ammo[ammo_magazine.stored_ammo.len]
if(handle_casings != HOLD_CASINGS)
ammo_magazine.stored_ammo -= chambered
if(!manual_chamber) //CHOMPEdit Start - Manual Chambering
//get the next casing
if(loaded.len)
chambered = loaded[1] //load next casing.
if(handle_casings != HOLD_CASINGS)
loaded -= chambered
else if(ammo_magazine && ammo_magazine.stored_ammo.len)
chambered = ammo_magazine.stored_ammo[ammo_magazine.stored_ammo.len]
if(handle_casings != HOLD_CASINGS)
ammo_magazine.stored_ammo -= chambered
if(manual_chamber && auto_loading_type && CHECK_BITFIELD(auto_loading_type,OPEN_BOLT) && bolt_open)
chamber_bullet() //CHOMPEdit End - Manual Chambering
var/mob/living/M = loc // TGMC Ammo HUD
if(istype(M)) // TGMC Ammo HUD
@@ -82,7 +85,8 @@
/obj/item/gun/projectile/handle_click_empty()
..()
process_chambered()
if(!manual_chamber) //CHOMPEdit - Manual Chambering
process_chambered() //CHOMPEdit - Manual Chambering
/obj/item/gun/projectile/proc/process_chambered()
if (!chambered) return
@@ -197,6 +201,10 @@
//attempts to unload src. If allow_dump is set to 0, the speedloader unloading method will be disabled
/obj/item/gun/projectile/proc/unload_ammo(mob/user, var/allow_dump=1)
if(manual_chamber && only_open_load && !bolt_open) //CHOMPEdit - Manual Chambering
to_chat(user,span_warning("You must open the bolt to load or unload this gun!")) //CHOMPEdit - Manual Chambering
return //CHOMPEdit - Manual Chambering
if(ammo_magazine)
user.put_in_hands(ammo_magazine)
user.visible_message("[user] removes [ammo_magazine] from [src].", span_notice("You remove [ammo_magazine] from [src]."))
@@ -238,7 +246,10 @@
return TRUE
if(special_weapon_handling && !callback)
return FALSE
if(firemodes.len > 1)
if(manual_chamber) //CHOMPEdit Gun Rework
if(do_after(user, 0.4 SECONDS, src)) //CHOMPEdit Gun Rework
bolt_handle(user) //CHOMPEdit Gun Rework
else if(firemodes.len > 1) //CHOMPEdit Gun Rework
switch_firemodes(user)
else
unload_ammo(user)
@@ -251,7 +262,7 @@
/obj/item/gun/projectile/afterattack(atom/A, mob/living/user)
..()
if(auto_eject && ammo_magazine && ammo_magazine.stored_ammo && !ammo_magazine.stored_ammo.len)
if(auto_eject && ammo_magazine && ammo_magazine.stored_ammo && !ammo_magazine.stored_ammo.len && !(manual_chamber && chambered && chambered.BB != null)) //CHOMPEdit - Manual Chambering
ammo_magazine.loc = get_turf(src.loc)
user.visible_message(
"[ammo_magazine] falls out and clatters on the floor!",
+3 -155
View File
@@ -19,7 +19,6 @@
var/bolt_open = FALSE
var/bolt_locked = FALSE
var/bolt_release = "bolt release"
var/muzzle_velocity = 500 // meters per second
var/sound_ejectchamber = 'sound/weapons/ballistics/pistol_ejectchamber.ogg'
var/sound_eject = 'sound/weapons/ballistics/pistol_eject.ogg'
var/sound_chamber = 'sound/weapons/ballistics/pistol_chamber.ogg'
@@ -67,18 +66,6 @@
if(manual_chamber && auto_loading_type)
bolt_toggle()
/obj/item/gun/projectile/attack_self(mob/user as mob)
. = ..(user)
if(.)
return TRUE
if(manual_chamber)
if(do_after(user, 0.4 SECONDS, src))
bolt_handle(user)
else if(firemodes.len > 1)
switch_firemodes(user)
else
unload_ammo(user)
/obj/item/gun/projectile/proc/bolt_handle(mob/user)
var/previous_chambered = chambered
var/result = bolt_toggle(TRUE)
@@ -198,64 +185,9 @@
if(chambering) output |= BOLT_CASING_CHAMBERED
return output
/obj/item/gun/projectile/process_chambered()
if (!chambered) return 0
// Aurora forensics port, gunpowder residue.
if(chambered.leaves_residue)
var/mob/living/carbon/human/H = loc
if(istype(H))
if(!istype(H.gloves, /obj/item/clothing))
H.add_gunshotresidue(chambered)
else
var/obj/item/clothing/G = H.gloves
G.add_gunshotresidue(chambered)
switch(handle_casings)
if(EJECT_CASINGS) //eject casing onto ground.
if(chambered.caseless)
qdel(chambered)
chambered = null
return 0
else
chambered.loc = get_turf(src)
playsound(src, "casing", 50, 1)
chambered = null
return 1
if(CYCLE_CASINGS) //cycle the casing back to the end.
if(ammo_magazine)
ammo_magazine.stored_ammo += chambered
else
loaded += chambered
chambered = null
return 0
if(handle_casings != HOLD_CASINGS)
chambered = null
return 0
/obj/item/gun/projectile/consume_next_projectile()
if(!manual_chamber)
//get the next casing
if(loaded.len)
chambered = loaded[1] //load next casing.
if(handle_casings != HOLD_CASINGS)
loaded -= chambered
else if(ammo_magazine && ammo_magazine.stored_ammo.len)
chambered = ammo_magazine.stored_ammo[ammo_magazine.stored_ammo.len]
if(handle_casings != HOLD_CASINGS)
ammo_magazine.stored_ammo -= chambered
if(manual_chamber && auto_loading_type && CHECK_BITFIELD(auto_loading_type,OPEN_BOLT) && bolt_open)
chamber_bullet()
if(chambered)
return chambered.BB
return null
/obj/item/gun/projectile/proc/chamber_bullet()
if(chambered)
return 0
return FALSE
var/obj/item/ammo_casing/to_chamber
if(loaded.len)
to_chamber = loaded[1] //load next casing.
@@ -267,9 +199,9 @@
ammo_magazine.stored_ammo -= to_chamber
chambered = to_chamber
if(to_chamber)
return 1
return TRUE
else
return 0
return FALSE
/obj/item/gun/projectile/load_ammo(var/obj/item/A, mob/user)
if(istype(A, /obj/item/ammo_magazine))
@@ -390,38 +322,6 @@
update_icon()
/obj/item/gun/projectile/afterattack(atom/A, mob/living/user, adjacent, params)
afteratt(A,user,adjacent,params)
if(auto_eject && ammo_magazine && ammo_magazine.stored_ammo && !ammo_magazine.stored_ammo.len && !(manual_chamber && chambered && chambered.BB != null))
ammo_magazine.loc = get_turf(src.loc)
user.visible_message(
"[ammo_magazine] falls out and clatters on the floor!",
span_notice("[ammo_magazine] falls out and clatters on the floor!")
)
if(auto_eject_sound)
playsound(src, auto_eject_sound, 40, 1)
ammo_magazine.update_icon()
ammo_magazine = null
update_icon()
/obj/item/gun/projectile/proc/afteratt(atom/A, mob/living/user, adjacent, params)
if(adjacent) return //A is adjacent, is the user, or is on the user's person
if(!user.aiming)
user.aiming = new(user)
if(user && user.client && user.aiming && user.aiming.active && user.aiming.aiming_at != A)
PreFire(A,user,params) //They're using the new gun system, locate what they're aiming at.
return
if(user && user.a_intent == I_HELP && user.read_preference(/datum/preference/toggle/safefiring)) //regardless of what happens, refuse to shoot if help intent is on
to_chat(user, span_warning("You refrain from firing your [src] as your intent is set to help."))
return
else
Fire(A, user, params) //Otherwise, fire normally.
return
/obj/item/gun/projectile/special_check(var/mob/user)
if(..())
if(manual_chamber)
@@ -439,58 +339,6 @@
else
return 1
/obj/item/gun/projectile/unload_ammo(mob/user, var/allow_dump=1)
if(manual_chamber && only_open_load && !bolt_open)
to_chat(user,span_warning("You must open the bolt to load or unload this gun!"))
else
return ..()
/obj/item/gun/projectile/handle_click_empty(mob/user)
if (user)
user.visible_message("*click click*", span_danger("*click*"))
else
src.visible_message("*click click*")
playsound(src, 'sound/weapons/empty.ogg', 100, 1)
if(!manual_chamber)
process_chambered()
/obj/item/gun/projectile/Initialize(mapload, var/starts_loaded = 1)
. = ..()
if(manual_chamber)
verbs |= /obj/item/gun/projectile/verb/change_firemode
update_icon()
/obj/item/gun/projectile/verb/change_firemode()
set name = "Switch firemode"
set category = "Object"
set src in view(1)
switch_firemodes(usr)
/obj/item/gun/projectile/process_accuracy(obj/projectile, mob/living/user, atom/target, var/burst, var/held_twohanded)
. = ..()
var/obj/item/projectile/bullet/P = projectile
if(!istype(P))
return
P.velocity = muzzle_velocity
//Special ammo handling bullshit
/obj/item/gun/projectile/pirate/process_accuracy(obj/projectile, mob/living/user, atom/target, var/burst, var/held_twohanded)
. = ..()
var/obj/item/projectile/bullet/P = projectile
if(!istype(P))
return
P.sub_velocity(P.velocity * 0.3) //Yeah, a gun that supposedly shoots any bullet is gonna be pretty shit.
/obj/item/gun/projectile/revolver/lemat/process_accuracy(obj/projectile, mob/living/user, atom/target, var/burst, var/held_twohanded)
. = ..()
var/obj/item/projectile/bullet/P = projectile
P.velocity = initial(P.velocity)
if(!istype(P))
return
P.sub_velocity(P.velocity - 35)
#undef BOLT_NOEVENT
#undef BOLT_CLOSED
#undef BOLT_OPENED
@@ -1,162 +1,70 @@
#define GRAINS_PER_KG 15432.4
/obj/item/projectile/bullet
var/diam = 9 //mm
var/energy_add = 0 //See note below. Adds velocity, basically.
var/velocity = 500 //Meters per second
var/hollow_point = FALSE //Determines if the round leaves additional shrapnel in the wound
var/grains = 115 //I hope the unit is obvious
var/energy //Joules
var/old_bullet_act = TRUE //This makes it so that the game ignores the new ballistic stuff and uses old damage system for the bullet.
/*energy_add
Pretty much, when a bullet is a fired from a gun, it replaces the default muzzle velocity of the round with it's own muzzle velocity,
so if you want a certain round to have extra velocity, you have the option to add energy. For example,
if I have an AP round that shoots 650 m/s and the base round only shoots 600 m/s, I need to take the weight of the round in grains (say 60),
convert it to kilograms (divide by 15432 or some wacky number like that, just google grains to kilograms), then multiply the weight in kilograms by
the velocity squared for both the 650, and 600, and subtract the result for 650 from the result for 600, then that number is what I would put there.
If you want to be lazy, or you can't find more specific numbers for the AP/HP versions of a round, then just don't bother with changing any of that and
only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/launch_projectile(atom/target, target_zone, mob/user, params, angle_override, forced_spread = 0)
energy = 0.5 * velocity * velocity * (grains / GRAINS_PER_KG) + energy_add
sub_energy(0)
return ..()
/obj/item/projectile/bullet/proc/sub_velocity(var/amount)
velocity = max(0,velocity - amount)
energy = 0.5 * velocity * velocity * (grains / GRAINS_PER_KG)
/obj/item/projectile/bullet/proc/sub_energy(var/amount)
energy = max(0,energy - amount)
velocity = sqrt(2*energy/(grains / GRAINS_PER_KG))
#undef GRAINS_PER_KG
//Pistol projectiles
/obj/item/projectile/bullet/pistol //9x19mm
fire_sound = 'sound/weapons/ballistics/a9mm.ogg'
diam = 9
grains = 108
velocity = 381
/obj/item/projectile/bullet/pistol/ap
grains = 66
energy_add = 893
velocity = 595
armor_penetration = 15
/obj/item/projectile/bullet/pistol/hp
grains = 131
velocity = 350
energy_add = -96.18
hollow_point = TRUE
armor_penetration = -10
/obj/item/projectile/bullet/pistol/medium //.45
fire_sound = 'sound/weapons/ballistics/a45.ogg'
diam = 11.43
grains = 230
velocity = 295
/obj/item/projectile/bullet/pistol/medium/ap
grains = 173
energy_add = 374
velocity = 347
armor_penetration = 15
/obj/item/projectile/bullet/pistol/medium/hp
grains = 230
velocity = 286
armor_penetration = -10
/obj/item/projectile/bullet/pistol/strong //.357 and .44 are grouped because ftw //Time to fix that ffs, this is just .44 now.
diam = 10.9
grains = 240
velocity = 360
/obj/item/projectile/bullet/a57
fire_sound = 'sound/weapons/ballistics/smg_heavy.ogg'
diam = 5.7
grains = 31
velocity = 716
damage = 10
armor_penetration = 15 //Unfortunately my penetration code doesn't recognize the glory of 5.7x28 FN, so we must show it the wae.
hud_state = "smg_light"
/obj/item/projectile/bullet/a57/ap
grains = 23
energy_add = 312.75
velocity = 850
damage = 15
armor_penetration = 25 //Also, no, this isn't as high as it looks because of the formulas I was using. This would have around a 35% chance of piercing combat armor(50 bullet armor)
hud_state = "smg_ap"
/obj/item/projectile/bullet/a57/hp
hollow_point = TRUE
damage = 15
armor_penetration = -10
hud_state = "smg"
/obj/item/projectile/bullet/a357
fire_sound = 'sound/weapons/gunshot4.ogg'
diam = 9.1
grains = 125
velocity = 440
damage = 20
hud_state = "revolver"
/obj/item/projectile/bullet/a357/ap
energy_add = 298.07
velocity = 480
armor_penetration = 15
hud_state = "revolver_heavy"
/obj/item/projectile/bullet/a357/hp
hollow_point = TRUE
armor_penetration = -10
hud_state = "revolver_slim"
/obj/item/projectile/bullet/a38
fire_sound = 'sound/weapons/gunshot2.ogg'
diam = 9.1
grains = 147
velocity = 270
hud_state = "revolver_small"
/obj/item/projectile/bullet/a38/ap
grains = 125
energy_add = 138
velocity = 300
armor_penetration = 15
hud_state = "pistol_lightap"
/obj/item/projectile/bullet/a38/hp
grains = 158
energy_add = 175.07
velocity = 297
hollow_point = TRUE
armor_penetration = -10
hud_state = "pistol_hollow"
/obj/item/projectile/bullet/a762x25
fire_sound = 'sound/weapons/gunshot2.ogg'
diam = 7.92
grains = 85
velocity = 469
hud_state = "pistol_light"
/obj/item/projectile/bullet/a9x18
fire_sound = 'sound/weapons/gunshot2.ogg'
diam = 9.27
grains = 95
velocity = 319
hud_state = "pistol"
/obj/item/projectile/bullet/a9x18/rubber
armor_penetration = -10
grains = 102
velocity = 301
damage = 10
agony = 40
embed_chance = 0
@@ -165,31 +73,19 @@ only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/a10mm
fire_sound = 'sound/weapons/gunshot2.ogg'
diam = 10.17
grains = 180
velocity = 400
hud_state = "pistol"
damage = 20
/obj/item/projectile/bullet/a10mm/ap
grains = 200
energy_add = 435
velocity = 440
armor_penetration = 15
hud_state = "pistol_ap"
/obj/item/projectile/bullet/a10mm/hp
grains = 135
energy_add = 700.7
velocity = 490
armor_penetration = -10
hollow_point = TRUE
hud_state = "pistol_hollow"
/obj/item/projectile/bullet/a10mm/rubber
armor_penetration = -10
grains = 142
velocity = 301
damage = 10
agony = 50
embed_chance = 0
@@ -198,43 +94,25 @@ only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/a380
fire_sound = 'sound/weapons/gunshot2.ogg'
diam = 9
grains= 95
velocity = 300
hud_state = "pistol_light"
/obj/item/projectile/bullet/a380/ap
grains = 45
energy_add = 648.74
velocity = 559
armor_penetration = 15
hud_state = "pistol_lightap"
/obj/item/projectile/bullet/a380/hp
grains = 95
energy_add = 170
velocity = 343
armor_penetration = -10
hollow_point = TRUE
hud_state = "pistol_hollow"
/obj/item/projectile/bullet/a22lr
fire_sound = 'sound/weapons/gunshot_pathetic.ogg'
grains = 40
diam = 5.7
velocity = 370
hud_state = "pistol_light"
/obj/item/projectile/bullet/a22lr/ap
grains = 31
velocity = 530
armor_penetration = 15
hud_state = "pistol_ap"
/obj/item/projectile/bullet/a22lr/hp
grains = 38
velocity = 380
hollow_point = TRUE
armor_penetration = -5
hud_state = "pistol_hollow"
@@ -242,16 +120,11 @@ only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/shotgun //Slug
fire_sound = 'sound/weapons/ballistics/a12g.ogg'
grains = 657
velocity = 489
armor_penetration = -15 //Slugs needed a nerf. Will probably fix the stats for shotguns in general in future updates.
/obj/item/projectile/bullet/shotgun/buckshot //#00 Buckshot
damage = 13
name = "buckshot pellet"
diam = 8.38
grains = 53.8
velocity = 489
armor_penetration = 0
/obj/item/projectile/bullet/shotgun/buckshot/shell
@@ -266,26 +139,15 @@ only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/rifle/a762 //7.62x51 NATO
fire_sound = 'sound/weapons/ballistics/a762.ogg'
diam = 7.82
grains = 147
velocity = 850
/obj/item/projectile/bullet/rifle/a762/ap
grains = 150.5
velocity = 854.6
armor_penetration = 25
/obj/item/projectile/bullet/rifle/a762/hp
grains = 175
energy_add = -539.978
velocity = 792
armor_penetration = -10
hollow_point = TRUE
/obj/item/projectile/bullet/rifle/a762/rubber
armor_penetration = -10
grains = 142
velocity = 661
damage = 25 //this still hurts like a motherfucker
agony = 100
embed_chance = 0
@@ -294,27 +156,18 @@ only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/rifle/a762x39 //7.62x39 Soviet
fire_sound = 'sound/weapons/ballistics/a762.ogg'
diam = 7.85
grains = 122
velocity = 730
hud_state = "rifle"
/obj/item/projectile/bullet/rifle/a762x39/ap
grains = 123
velocity = 740
energy_add = 117.16
armor_penetration = 25
hud_state = "rifle_ap"
/obj/item/projectile/bullet/rifle/a762x39/hp
hollow_point = TRUE
armor_penetration = -10
hud_state = "hivelo_iff"
/obj/item/projectile/bullet/rifle/a762x39/rubber
armor_penetration = -10
grains = 142
velocity = 661
damage = 15 //this still hurts like a motherfucker
agony = 70
embed_chance = 0
@@ -323,19 +176,12 @@ only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/rifle/a545
fire_sound = 'sound/weapons/ballistics/a545.ogg'
diam = 5.6
grains = 53
velocity = 880
/obj/item/projectile/bullet/rifle/a545/ap
grains = 57
velocity = 890
armor_penetration = 15
/obj/item/projectile/bullet/rifle/a545/rubber
armor_penetration = -10
grains = 82
velocity = 761
damage = 15
agony = 60
embed_chance = 0
@@ -343,31 +189,21 @@ only use the hollow_point and armor_penetration values.*/
check_armour = "melee"
/obj/item/projectile/bullet/rifle/a545/hp
hollow_point = TRUE
armor_penetration = -10
/obj/item/projectile/bullet/rifle/a556 //5.56x45mm NATO
diam = 5.7
grains = 62
velocity = 961
hud_state = "rifle"
/obj/item/projectile/bullet/rifle/a556/ap
grains = 52
velocity = 1030
energy_add = 462.92
armor_penetration = 25
hud_state = "rifle_ap"
/obj/item/projectile/bullet/rifle/a556/hp
hollow_point = TRUE
armor_penetration = -10
hud_state = "hivelo_iff"
/obj/item/projectile/bullet/rifle/a556/rubber
armor_penetration = -10
grains = 82
velocity = 861
damage = 15
agony = 60
embed_chance = 0
@@ -376,79 +212,39 @@ only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/rifle/a145 // 14.5×114mm
fire_sound = 'sound/weapons/ballistics/a145.ogg'
diam = 14.88
grains = 921
velocity = 1000
/obj/item/projectile/bullet/rifle/a145/highvel
grains = 700
energy_add = 9979
velocity = 1200
/obj/item/projectile/bullet/rifle/a44rifle
fire_sound = 'sound/weapons/ballistics/a44rifle.ogg'
diam = 10.9
grains = 240
velocity = 536.448
/obj/item/projectile/bullet/rifle/a95 //I hate you. There is no real world analog for 9.5x40mm, I will guestimate from the 9x39mm russian round and give it some bonus for future points or whatever
diam = 9.5
grains = 310
velocity = 365 //cadyn cope above, beware ^^
hud_state = "rifle"
//beware of cadyn cope above ^^ - Ocelot
/obj/item/projectile/bullet/rifle/a9x39 //We also have actual 9x39mm
damage = 30 //9mm pistol with 7.62 cartridge? idk russiain chambers.
fire_sound = 'sound/weapons/ballistics/a545.ogg'
diam = 9.25
grains = 259
velocity = 280
hud_state = "smartgun"
/obj/item/projectile/bullet/rifle/a9x39/ap
grains = 267
armor_penetration = 25
hud_state = "minigun"
/obj/item/projectile/bullet/rifle/a9x39/rubber
armor_penetration = -10
grains = 282
velocity = 161
damage = 20
agony = 70
embed_chance = 0
sharp = FALSE
check_armour = "melee"
/obj/item/projectile/bullet/rifle/a10x24
grains = 210
diam = 10.2
velocity = 840
hud_state = "rifle"
/obj/item/projectile/bullet/rifle/a10x24/rubber
armor_penetration = -10
grains = 280
velocity = 400
damage = 20
agony = 80
embed_chance = 0
sharp = FALSE
check_armour = "melee"
/obj/item/projectile/bullet/rifle/a762/lmg //This is actually 7.92x57 ffs
diam = 7.92
grains = 181
velocity = 820
hud_state = "rifle"
/obj/item/projectile/bullet/rifle/a762x54
fire_sound = 'sound/weapons/ballistics/a762x54.ogg'
diam = 7.92
grains = 151
velocity = 830
hitscan = 1
hud_state = "sniper_crude"
@@ -459,9 +255,6 @@ only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/rifle/a338
fire_sound = 'sound/weapons/ballistics/a762x54.ogg'
damage = 45
diam = 8.61
grains = 250
velocity = 921
hitscan = 1
penetrating = 2
hud_state = "sniper_crude"
@@ -473,9 +266,6 @@ only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/rifle/a50bmg
fire_sound = 'sound/weapons/ballistics/a145.ogg'
damage = 65
diam = 13
grains = 750
velocity = 860
hitscan = 1
penetrating = 2
hud_state = "sniper_supersonic"
@@ -486,74 +276,17 @@ only use the hollow_point and armor_penetration values.*/
/obj/item/projectile/bullet/rifle/a127x108 //Bigass fuckoff LMG round, bigger than 50 BMG
fire_sound = 'sound/weapons/serdy/strela.ogg'
damage = 60
diam = 13
grains = 855
velocity = 820
penetrating = 2
armor_penetration=30
armor_penetration = 30
hud_state = "sniper_fire"
/obj/item/projectile/bullet/rifle/a45lc //yee haw
diam = 11.43
grains = 250
velocity = 600
/obj/item/projectile/bullet/rifle/a45lc/rifle
grains = 267
velocity = 800
/obj/item/projectile/bullet/rifle/a45lc
armor_penetration = 15
/obj/item/projectile/bullet/rifle/a45lc/rubber
armor_penetration = -10
grains = 282
velocity = 200
damage = 20
agony = 70
embed_chance = 0
sharp = FALSE
check_armour = "melee"
//NOTE: Ammo casings and magazines used to be in this part of the file. They have been moved to respective files in the projectiles/ammunition folder.
//Various "We're not dealing with this shit because of how bad it is" (Some of these may be implemented into the new system with later updates)
/obj/item/projectile/bullet/magnetic
old_bullet_act = TRUE
/obj/item/projectile/bullet/pellet
old_bullet_act = TRUE
/obj/item/projectile/bullet/pellet/shotgun/flak
old_bullet_act = TRUE
/obj/item/projectile/bullet/rifle/a762/hunter
old_bullet_act = TRUE
/obj/item/projectile/bullet/rifle/a545/hunter
old_bullet_act = TRUE
/obj/item/projectile/bullet/suffocationbullet
old_bullet_act = TRUE
/obj/item/projectile/bullet/cyanideround
old_bullet_act = TRUE
/obj/item/projectile/bullet/burstbullet
old_bullet_act = TRUE
/obj/item/projectile/bullet/incendiary
old_bullet_act = TRUE
/obj/item/projectile/bullet/practice
old_bullet_act = TRUE
/obj/item/projectile/bullet/blank
old_bullet_act = TRUE
/obj/item/projectile/bullet/srmrocket
old_bullet_act = TRUE
/obj/item/projectile/bullet/chemdart
old_bullet_act = TRUE
/obj/item/projectile/bullet/gyro
old_bullet_act = TRUE
@@ -106,7 +106,6 @@
/obj/item/projectile/bullet/rifle/a556/hp
damage = 40
hollow_point = TRUE
armor_penetration = -10
hud_state = "hivelo_iff"
@@ -455,7 +455,6 @@
)
auto_loading_type = CLOSED_BOLT | LOCK_OPEN_EMPTY | LOCK_SLAPPABLE
load_method = MAGAZINE
muzzle_velocity = 880
w_class = ITEMSIZE_HUGE
actions_types = list(/datum/action/item_action/use_scope)
accuracy = 10