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

Ammo twix #83

Merged
merged 20 commits into from
Aug 20, 2024
21 changes: 10 additions & 11 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,16 @@
#define AMMO_IGNORE_ARMOR (1<<9) //Projectile direct damage will ignore both hard and soft armor
#define AMMO_IGNORE_RESIST (1<<10) //Unused.
#define AMMO_BALLISTIC (1<<11) //Generates blood splatters on mob hit
#define AMMO_SUNDERING (1<<12)
#define AMMO_SPECIAL_PROCESS (1<<13)
#define AMMO_SENTRY (1<<14) //Used to identify ammo from sentry guns and other automated sources
#define AMMO_FLAME (1<<15) //Used to identify flamethrower projectiles and similar projectiles
#define AMMO_IFF (1<<16) //Used to identify ammo that have intrinsec IFF properties
#define AMMO_HITSCAN (1<<17) //If the projectile from this ammo is hitscan
#define AMMO_LEAVE_TURF (1<<18) //If the projectile does something with on_leave_turf()
#define AMMO_PASS_THROUGH_TURF (1<<19) //If the projectile passes through walls causing damage to them
#define AMMO_PASS_THROUGH_MOVABLE (1<<20) //If the projectile passes through mobs and objects causing damage to them
#define AMMO_PASS_THROUGH_MOB (1<<21) //If the projectile passes through mobs only causing damage to them
#define AMMO_SOUND_PITCH (1<<22) //If the projectile ricochet and miss sound is pitched up
#define AMMO_SPECIAL_PROCESS (1<<12)
#define AMMO_SENTRY (1<<13) //Used to identify ammo from sentry guns and other automated sources
#define AMMO_FLAME (1<<14) //Used to identify flamethrower projectiles and similar projectiles
#define AMMO_IFF (1<<15) //Used to identify ammo that have intrinsec IFF properties
#define AMMO_HITSCAN (1<<16) //If the projectile from this ammo is hitscan
#define AMMO_LEAVE_TURF (1<<17) //If the projectile does something with on_leave_turf()
#define AMMO_PASS_THROUGH_TURF (1<<18) //If the projectile passes through walls causing damage to them
#define AMMO_PASS_THROUGH_MOVABLE (1<<19) //If the projectile passes through mobs and objects causing damage to them
#define AMMO_PASS_THROUGH_MOB (1<<20) //If the projectile passes through mobs only causing damage to them
#define AMMO_SOUND_PITCH (1<<21) //If the projectile ricochet and miss sound is pitched up

//Gun defines for gun related thing. More in the projectile folder.
//flags_gun_features
Expand Down
8 changes: 8 additions & 0 deletions code/__DEFINES/greyscale_guns.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
// bands
#define AMMO_BAND_COLOR_EXTENDED "#9C9A19"
#define AMMO_BAND_COLOR_AP "#1F951F"
#define AMMO_BAND_COLOR_HOLLOWPOINT "#a8ff9d"
#define AMMO_BAND_COLOR_INCENDIARY "#9C2219"
#define AMMO_BAND_COLOR_EXPLOSIVE "#3f1111"
#define AMMO_BAND_COLOR_SABOT "#663618"

#define GUN_ICONSTATE_LOADED "loaded"
#define GUN_ICONSTATE_UNLOADED "unloaded"
#define GUN_ICONSTATE_UNRACKED "unracked"
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ GLOBAL_LIST_INIT(bitfields, list(
"AMMO_IGNORE_ARMOR" = AMMO_IGNORE_ARMOR,
"AMMO_IGNORE_RESIST" = AMMO_IGNORE_RESIST,
"AMMO_BALLISTIC" = AMMO_BALLISTIC,
"AMMO_SUNDERING" = AMMO_SUNDERING,
"AMMO_SPECIAL_PROCESS" = AMMO_SPECIAL_PROCESS,
"AMMO_SENTRY" = AMMO_SENTRY,
"AMMO_FLAME" = AMMO_FLAME,
Expand Down
1 change: 0 additions & 1 deletion code/datums/components/harvester.dm
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@

if(/datum/reagent/medicine/tricordrazine)
target.apply_damage(weapon.force*0.6, BRUTE, user.zone_selected)
target.adjust_sunder(7.5) //Same amount as a shotgun slug
target.apply_status_effect(/datum/status_effect/shatter, 3 SECONDS)

if(!loaded_reagents[loaded_reagent])
Expand Down
36 changes: 36 additions & 0 deletions code/game/objects/machinery/vending/marine_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@
"Rifles" = list(
/obj/item/weapon/gun/rifle/standard_assaultrifle = -1,
/obj/item/ammo_magazine/rifle/standard_assaultrifle = -1,
/obj/item/ammo_magazine/rifle/standard_assaultrifle/ap = -1,
/obj/item/ammo_magazine/rifle/standard_assaultrifle/hp = -1,
/obj/item/weapon/gun/rifle/standard_carbine = -1,
/obj/item/ammo_magazine/rifle/standard_carbine = -1,
/obj/item/ammo_magazine/rifle/standard_carbine/ap = -1,
/obj/item/ammo_magazine/rifle/standard_carbine/hp = -1,
/obj/item/weapon/gun/rifle/standard_skirmishrifle = -1,
/obj/item/ammo_magazine/rifle/standard_skirmishrifle = -1,
/obj/item/ammo_magazine/rifle/standard_skirmishrifle/ap = -1,
/obj/item/ammo_magazine/rifle/standard_skirmishrifle/hp = -1,
/obj/item/weapon/gun/rifle/tx11 = -1,
/obj/item/ammo_magazine/rifle/tx11 = -1,
/obj/item/weapon/gun/shotgun/pump/lever/repeater = -1,
Expand Down Expand Up @@ -93,6 +99,7 @@
/obj/item/ammo_magazine/pistol/standard_pocketpistol = -1,
/obj/item/weapon/gun/pistol/vp70 = -1,
/obj/item/ammo_magazine/pistol/vp70 = -1,
/obj/item/ammo_magazine/pistol/vp70/hp = -1,
/obj/item/weapon/gun/pistol/plasma_pistol = -1,
/obj/item/ammo_magazine/pistol/plasma_pistol = -1,
/obj/item/weapon/gun/shotgun/double/derringer = -1,
Expand Down Expand Up @@ -176,6 +183,7 @@
/obj/item/cell/lasgun/lasrifle = -1,
/obj/item/ammo_magazine/packet/p9mm = -1,
/obj/item/ammo_magazine/packet/p9mmap = -1,
/obj/item/ammo_magazine/packet/p9mmhp = -1,
/obj/item/ammo_magazine/packet/acp = -1,
/obj/item/ammo_magazine/packet/pthreeightyacp = -1,
/obj/item/ammo_magazine/packet/magnum = -1,
Expand All @@ -184,7 +192,11 @@
/obj/item/ammo_magazine/packet/t500/qk = -1,
/obj/item/ammo_magazine/packet/p10x20mm = -1,
/obj/item/ammo_magazine/packet/p10x24mm = -1,
/obj/item/ammo_magazine/packet/p10x24mm/ap = -1,
/obj/item/ammo_magazine/packet/p10x24mm/hp = -1,
/obj/item/ammo_magazine/packet/p10x25mm = -1,
/obj/item/ammo_magazine/packet/p10x25mm/ap = -1,
/obj/item/ammo_magazine/packet/p10x25mm/hp = -1,
/obj/item/ammo_magazine/packet/p10x26mm = -1,
/obj/item/ammo_magazine/packet/p10x265mm = -1,
/obj/item/ammo_magazine/packet/p10x27mm = -1,
Expand Down Expand Up @@ -233,10 +245,16 @@
"Rifles" = list(
/obj/item/weapon/gun/rifle/standard_assaultrifle = -1,
/obj/item/ammo_magazine/rifle/standard_assaultrifle = -1,
/obj/item/ammo_magazine/rifle/standard_assaultrifle/ap = -1,
/obj/item/ammo_magazine/rifle/standard_assaultrifle/hp = -1,
/obj/item/weapon/gun/rifle/standard_carbine = -1,
/obj/item/ammo_magazine/rifle/standard_carbine = -1,
/obj/item/ammo_magazine/rifle/standard_carbine/ap = -1,
/obj/item/ammo_magazine/rifle/standard_carbine/hp = -1,
/obj/item/weapon/gun/rifle/standard_skirmishrifle = -1,
/obj/item/ammo_magazine/rifle/standard_skirmishrifle = -1,
/obj/item/ammo_magazine/rifle/standard_skirmishrifle/ap = -1,
/obj/item/ammo_magazine/rifle/standard_skirmishrifle/hp = -1,
/obj/item/weapon/gun/rifle/tx11 = -1,
/obj/item/ammo_magazine/rifle/tx11 = -1,
/obj/item/weapon/gun/shotgun/pump/lever/repeater = -1,
Expand Down Expand Up @@ -323,6 +341,7 @@
/obj/item/ammo_magazine/pistol/standard_pocketpistol = -1,
/obj/item/weapon/gun/pistol/vp70 = -1,
/obj/item/ammo_magazine/pistol/vp70 = -1,
/obj/item/ammo_magazine/pistol/vp70/hp = -1,
/obj/item/weapon/gun/pistol/plasma_pistol = -1,
/obj/item/ammo_magazine/pistol/plasma_pistol = -1,
/obj/item/weapon/gun/shotgun/double/derringer = -1,
Expand Down Expand Up @@ -400,6 +419,7 @@
"Boxes" = list(
/obj/item/ammo_magazine/packet/p9mm = -1,
/obj/item/ammo_magazine/packet/p9mmap = -1,
/obj/item/ammo_magazine/packet/p9mmhp = -1,
/obj/item/ammo_magazine/packet/acp = -1,
/obj/item/ammo_magazine/packet/pthreeightyacp = -1,
/obj/item/ammo_magazine/packet/magnum = -1,
Expand All @@ -408,7 +428,11 @@
/obj/item/ammo_magazine/packet/t500/qk = -1,
/obj/item/ammo_magazine/packet/p10x20mm = -1,
/obj/item/ammo_magazine/packet/p10x24mm = -1,
/obj/item/ammo_magazine/packet/p10x24mm/ap = -1,
/obj/item/ammo_magazine/packet/p10x24mm/hp = -1,
/obj/item/ammo_magazine/packet/p10x25mm = -1,
/obj/item/ammo_magazine/packet/p10x25mm/ap = -1,
/obj/item/ammo_magazine/packet/p10x25mm/hp = -1,
/obj/item/ammo_magazine/packet/p10x26mm = -1,
/obj/item/ammo_magazine/packet/p10x265mm = -1,
/obj/item/ammo_magazine/packet/p10x27mm = -1,
Expand Down Expand Up @@ -458,10 +482,16 @@
"Rifles" = list(
/obj/item/weapon/gun/rifle/standard_assaultrifle = -1,
/obj/item/ammo_magazine/rifle/standard_assaultrifle = -1,
/obj/item/ammo_magazine/rifle/standard_assaultrifle/ap = -1,
/obj/item/ammo_magazine/rifle/standard_assaultrifle/hp = -1,
/obj/item/weapon/gun/rifle/standard_carbine = -1,
/obj/item/ammo_magazine/rifle/standard_carbine = -1,
/obj/item/ammo_magazine/rifle/standard_carbine/ap = -1,
/obj/item/ammo_magazine/rifle/standard_carbine/hp = -1,,
/obj/item/weapon/gun/rifle/standard_skirmishrifle = -1,
/obj/item/ammo_magazine/rifle/standard_skirmishrifle = -1,
/obj/item/ammo_magazine/rifle/standard_skirmishrifle/ap = -1,
/obj/item/ammo_magazine/rifle/standard_skirmishrifle/hp = -1,
/obj/item/weapon/gun/rifle/tx55 = -1,
/obj/item/ammo_magazine/rifle/standard_carbine,
/obj/item/weapon/gun/rifle/tx11 = -1,
Expand Down Expand Up @@ -552,6 +582,7 @@
/obj/item/ammo_magazine/pistol/standard_pocketpistol = -1,
/obj/item/weapon/gun/pistol/vp70 = -1,
/obj/item/ammo_magazine/pistol/vp70 = -1,
/obj/item/ammo_magazine/pistol/vp70/hp = -1,
/obj/item/weapon/gun/pistol/plasma_pistol = -1,
/obj/item/ammo_magazine/pistol/plasma_pistol = -1,
/obj/item/weapon/gun/shotgun/double/derringer = -1,
Expand Down Expand Up @@ -644,6 +675,7 @@
"Boxes" = list(
/obj/item/ammo_magazine/packet/p9mm = -1,
/obj/item/ammo_magazine/packet/p9mmap = -1,
/obj/item/ammo_magazine/packet/p9mmhp = -1,
/obj/item/ammo_magazine/packet/acp = -1,
/obj/item/ammo_magazine/packet/pthreeightyacp = -1,
/obj/item/ammo_magazine/packet/magnum = -1,
Expand All @@ -652,7 +684,11 @@
/obj/item/ammo_magazine/packet/t500/qk = -1,
/obj/item/ammo_magazine/packet/p10x20mm = -1,
/obj/item/ammo_magazine/packet/p10x24mm = -1,
/obj/item/ammo_magazine/packet/p10x24mm/ap = -1,
/obj/item/ammo_magazine/packet/p10x24mm/hp = -1,
/obj/item/ammo_magazine/packet/p10x25mm = -1,
/obj/item/ammo_magazine/packet/p10x25mm/ap = -1,
/obj/item/ammo_magazine/packet/p10x25mm/hp = -1,
/obj/item/ammo_magazine/packet/p10x26mm = -1,
/obj/item/ammo_magazine/packet/p10x265mm = -1,
/obj/item/ammo_magazine/packet/p10x27mm = -1,
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/damage_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
var/effective_penetration = max(0, penetration - hard_armor_remaining)
hard_armor_remaining -= (penetration - effective_penetration)

if(penetration < 0) //hollow-point
effective_penetration = penetration

var/sunder_ratio = clamp(1 - ((sunder - hard_armor_remaining) * 0.01), 0, 1) //sunder is reduced by whatever remaining hardarmour there is

return clamp(damage_amount * (1 - ((get_soft_armor(armor_type, def_zone) * sunder_ratio - effective_penetration) * 0.01)), 0, damage_amount)
Expand Down
8 changes: 4 additions & 4 deletions code/modules/projectiles/ammo_datums/artillery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
/datum/ammo/bullet/atgun_spread
name = "Shrapnel"
icon_state = "flechette"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING|AMMO_PASS_THROUGH_MOB
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_PASS_THROUGH_MOB
accuracy_var_low = 15
accuracy_var_high = 5
max_range = 6
Expand All @@ -145,7 +145,7 @@

/datum/ammo/bullet/atgun_spread/incendiary
name = "incendiary flechette"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING|AMMO_PASS_THROUGH_MOB|AMMO_INCENDIARY|AMMO_LEAVE_TURF
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_PASS_THROUGH_MOB|AMMO_INCENDIARY|AMMO_LEAVE_TURF
damage = 20
penetration = 10
sundering = 1.5
Expand Down Expand Up @@ -205,7 +205,7 @@
/datum/ammo/bullet/ags_spread
name = "Shrapnel"
icon_state = "flechette"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING|AMMO_PASS_THROUGH_MOB
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_PASS_THROUGH_MOB
accuracy_var_low = 15
accuracy_var_high = 5
max_range = 6
Expand All @@ -216,7 +216,7 @@

/datum/ammo/bullet/ags_spread/incendiary
name = "White phosphorous shrapnel"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING|AMMO_INCENDIARY
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_INCENDIARY
damage = 20
penetration = 10
sundering = 1.5
Expand Down
20 changes: 10 additions & 10 deletions code/modules/projectiles/ammo_datums/bullet/machinegun.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/datum/ammo/bullet/machinegun //Adding this for the MG Nests (~Art)
name = "machinegun bullet"
icon_state = "bullet" // Keeping it bog standard with the turret but allows it to be changed.
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING
flags_ammo_behavior = AMMO_BALLISTIC
hud_state = "minigun"
hud_state_empty = "smartgun_empty"
accurate_range = 12
Expand All @@ -15,7 +15,7 @@
name = "minigun bullet"
hud_state = "minigun"
hud_state_empty = "smartgun_empty"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING
flags_ammo_behavior = AMMO_BALLISTIC
accuracy_var_low = 3
accuracy_var_high = 3
accurate_range = 5
Expand All @@ -37,7 +37,7 @@
name = "autocannon high-velocity bullet"
hud_state = "minigun"
hud_state_empty = "smartgun_empty"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING|AMMO_PASS_THROUGH_TURF|AMMO_PASS_THROUGH_MOVABLE
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_PASS_THROUGH_TURF|AMMO_PASS_THROUGH_MOVABLE
accurate_range_min = 6
accuracy_var_low = 3
accuracy_var_high = 3
Expand Down Expand Up @@ -65,7 +65,7 @@
/datum/ammo/bullet/auto_cannon/flak
name = "autocannon smart-detonating bullet"
hud_state = "sniper_flak"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING|AMMO_EXPLOSIVE
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_EXPLOSIVE
damage = 50
penetration = 30
sundering = 5
Expand All @@ -84,7 +84,7 @@
bullet_color = COLOR_SOFT_RED //Red bullets to indicate friendly fire restriction
hud_state = "smartgun"
hud_state_empty = "smartgun_empty"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING|AMMO_IFF
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_IFF
accurate_range = 12
damage = 30
penetration = 10
Expand All @@ -95,20 +95,20 @@
bullet_color = COLOR_SOFT_RED //Red bullets to indicate friendly fire restriction
hud_state = "smartgun"
hud_state_empty = "smartgun_empty"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING
flags_ammo_behavior = AMMO_BALLISTIC
accurate_range = 12
damage = 20
damage = 18
penetration = 15
sundering = 2
additional_xeno_penetration = 20

/datum/ammo/bullet/smart_minigun
name = "smartminigun bullet"
bullet_color = COLOR_SOFT_RED //Red bullets to indicate friendly fire restriction
hud_state = "smartgun_minigun"
hud_state_empty = "smartgun_empty"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_SUNDERING
flags_ammo_behavior = AMMO_BALLISTIC
accurate_range = 12
damage = 10
penetration = 25
sundering = 1
additional_xeno_penetration = 10
damage_falloff = 0.1
Loading
Loading