The big ammo simplification (#8171)

This commit is contained in:
Cadyn
2024-06-25 04:57:20 -07:00
committed by GitHub
parent 821e2cf9ca
commit abc16a2e2a
17 changed files with 2793 additions and 27 deletions

View File

@@ -1,3 +1,5 @@
//CHOMPEdit this file is unticked, see arms_ch.dm
/datum/category_item/autolathe/arms/syringegun_ammo
name = "syringe gun cartridge"
path =/obj/item/weapon/syringe_cartridge

View File

@@ -0,0 +1,73 @@
/datum/category_item/autolathe/arms/syringegun_ammo
name = "syringe gun cartridge"
path =/obj/item/weapon/syringe_cartridge
////////////////
/*Ammo casings*/
////////////////
/datum/category_item/autolathe/arms/shotgun_blanks
name = "ammunition (12g, blank)"
path =/obj/item/ammo_casing/a12g/blank
/datum/category_item/autolathe/arms/shotgun_beanbag
name = "ammunition (12g, beanbag)"
path =/obj/item/ammo_casing/a12g/beanbag
/datum/category_item/autolathe/arms/shotgun_flash
name = "ammunition (12g, flash)"
path =/obj/item/ammo_casing/a12g/flash
/datum/category_item/autolathe/arms/shotgun
name = "ammunition (12g, slug)"
path =/obj/item/ammo_casing/a12g
hidden = 1
/datum/category_item/autolathe/arms/shotgun_clip_beanbag
name = "2-round 12g speedloader (beanbag)"
path =/obj/item/ammo_magazine/clip/c12g/beanbag
/datum/category_item/autolathe/arms/shotgun_clip_slug
name = "2-round 12g speedloader (slug)"
path =/obj/item/ammo_magazine/clip/c12g
hidden = 1
/datum/category_item/autolathe/arms/shotgun_clip_pellet
name = "2-round 12g speedloader (buckshot)"
path =/obj/item/ammo_magazine/clip/c12g/pellet
hidden = 1
/datum/category_item/autolathe/arms/shotgun_clip_beanbag
name = "2-round 12g speedloader (beanbag)"
path =/obj/item/ammo_magazine/clip/c12g/beanbag
/datum/category_item/autolathe/arms/shotgun_pellet
name = "ammunition (12g, pellet)"
path =/obj/item/ammo_casing/a12g/pellet
hidden = 1
/datum/category_item/autolathe/arms/stunshell
name = "ammunition (stun cartridge, shotgun)"
path =/obj/item/ammo_casing/a12g/stunshell
hidden = 1
/datum/category_item/autolathe/arms/flechetteshell
name = "ammunition (flechette cartridge, shotgun)"
path =/obj/item/ammo_casing/a12g/flechette
hidden = 1
man_rating = 2
/datum/category_item/autolathe/arms/knuckledusters
name = "knuckle dusters"
path =/obj/item/clothing/gloves/knuckledusters
hidden = 1
/datum/category_item/autolathe/arms/tacknife
name = "tactical knife"
path =/obj/item/weapon/material/knife/tacknife
hidden = 1
/datum/category_item/autolathe/arms/flamethrower
name = "flamethrower"
path =/obj/item/weapon/flamethrower/full
hidden = 1

View File

@@ -1,3 +1,5 @@
//CHOMPEdit this file is unticked.
/datum/category_item/autolathe/arms/speedloader_357_flash
name = "speedloader (.357 flash)"
path =/obj/item/ammo_magazine/s357/flash

View File

@@ -1,4 +1,5 @@
//Created the autolathe entries here to keep stuff organized and also compact so the files aren't too spread out.
/* Begone fops of the past! Your ballistics are now cringe
/datum/category_item/autolathe/arms/smg_mp5
name = "mp5 magazine(9x19mm standard)"
path = /obj/item/ammo_magazine/mp5mag
@@ -370,4 +371,4 @@
name = ".45 LC"
path = /obj/item/ammo_casing/a45lc
hidden = 1
*/

View File

@@ -1217,7 +1217,7 @@
/obj/item/weapon/gun/projectile/automatic/c20r/update_icon()
..()
if(ammo_magazine)
icon_state = "c20r-[round(ammo_magazine.stored_ammo.len,4)]"
icon_state = "c20r-[round(CLAMP(ammo_magazine.stored_ammo.len*2/3,0,20),4)]"
else
icon_state = "c20r"
return
@@ -1278,7 +1278,7 @@
/obj/item/weapon/gun/projectile/automatic/z8/update_icon()
..()
if(ammo_magazine)
icon_state = "carbine-[round(ammo_magazine.stored_ammo.len,2)]"
icon_state = "carbine-[round(CLAMP(ammo_magazine.stored_ammo.len/2,0,10),2)]"
else
icon_state = "carbine-e"
return

View File

@@ -273,7 +273,9 @@
if(!(load_method & AM.mag_type) || caliber != AM.caliber || allowed_magazines && !is_type_in_list(A, allowed_magazines))
to_chat(user, "<span class='warning'>[AM] won't load into [src]!</span>")
return
switch(AM.mag_type)
var/loading_method = AM.mag_type & load_method
if(loading_method == (MAGAZINE & SPEEDLOADER)) loading_method = MAGAZINE //Default to magazine if both are valid
switch(loading_method)
if(MAGAZINE)
if(ammo_magazine)
to_chat(user, "<span class='warning'>[src] already has a magazine loaded.</span>") //already a magazine here

View File

@@ -1,18 +0,0 @@
/////// 5mm Caseless.
/datum/category_item/autolathe/arms/m5mmcaseless/
name = "5mm Caseless magazine"
path =/obj/item/ammo_magazine/m5mmcaseless
hidden = 0
resources = list(MAT_STEEL = 700, MAT_PHORON = 500)
/datum/category_item/autolathe/arms/m5mmcaseless/empty
name = "5mm Caseless magazine(empty)"
path =/obj/item/ammo_magazine/m5mmcaseless/empty
hidden = 0
resources = list(MAT_STEEL = 700)
/datum/category_item/autolathe/arms/m5mmcaseless/stun
name = "5mm Caseless magazine(stun)"
path =/obj/item/ammo_magazine/m5mmcaseless/stun
hidden = 0
resources = list(MAT_STEEL = 700, MAT_PHORON = 500)

View File

@@ -0,0 +1,25 @@
//Ammo flags
#define AMMO_FLAG_AP 1
#define AMMO_FLAG_HP 2
#define AMMO_FLAG_RUBBER 4
#define AMMO_FLAG_FLASH 8
#define AMMO_FLAG_PRACTICE 16
#define AMMO_FLAG_HUNTER 32
#define AMMO_FLAG_EMP 64
#define AMMO_FLAG_MEDIUM 128
#define AMMO_FLAG_LARGE 256
//Change these values for balance
#define AMMO_AP_DAMAGE_MULT 0.8 //20% reduction for AP damage
#define AMMO_ARMORPEN_SMALL 25 //Armor penetration for AP small ammo
#define AMMO_ARMORPEN_MEDIUM 50 //Armor penetration for AP medium ammo
#define AMMO_ARMORPEN_LARGE 80 //Armor penetration for AP large ammo
#define AMMO_HP_DAMAGE_MULT 1.3 //30% increase for HP damage
#define AMMO_HP_ARMORPEN -50 //Negative armorpen to balance it out
#define AMMO_RUBBER_AGONY_MULT 2 //Multiply a projectile's damage by this to get the agony for it's rubber counterpart
#define AMMO_RUBBER_DAMAGE_MULT 0.25 //Rubber bullets still do some regular damage. This is the multiplier for their damage amount.
#define AMMO_HUNTER_SA_DAMAGE_MULT 1.2 //Multiply by original projectile damage to get SA_bonus_damage
#define AMMO_HUNTER_DAMAGE_MULT 0.2 //Damage multiplier for hunter rounds, SA bonus makes up for it

View File

@@ -0,0 +1,579 @@
/datum/category_item/autolathe/arms/ammo_box_small
name = "ammo box (small)"
path = /obj/item/ammo_magazine/ammo_box/small
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_small_practice
name = "ammo box (small practice)"
path = /obj/item/ammo_magazine/ammo_box/small/practice
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_small_ap
name = "ammo box (small AP)"
path = /obj/item/ammo_magazine/ammo_box/small/ap
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_small_hp
name = "ammo box (small HP)"
path = /obj/item/ammo_magazine/ammo_box/small/hp
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_small_rubber
name = "ammo box (small rubber)"
path = /obj/item/ammo_magazine/ammo_box/small/rubber
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_small_emp
name = "ammo box (small haywire)"
path = /obj/item/ammo_magazine/ammo_box/small/emp
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_medium
name = "ammo box (medium)"
path = /obj/item/ammo_magazine/ammo_box/medium
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_medium_ap
name = "ammo box (medium AP)"
path = /obj/item/ammo_magazine/ammo_box/medium/ap
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_medium_hp
name = "ammo box (medium HP)"
path = /obj/item/ammo_magazine/ammo_box/medium/hp
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_medium_practice
name = "ammo box (medium practice)"
path = /obj/item/ammo_magazine/ammo_box/medium/practice
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_medium_hunter
name = "ammo box (medium hunter)"
path = /obj/item/ammo_magazine/ammo_box/medium/hunter
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_medium_large
name = "large ammo box (medium)"
path = /obj/item/ammo_magazine/ammo_box/medium/large
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_medium_large_ap
name = "large ammo box (medium AP)"
path = /obj/item/ammo_magazine/ammo_box/medium/large/ap
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_medium_large_hp
name = "large ammo box (medium HP)"
path = /obj/item/ammo_magazine/ammo_box/medium/large/hp
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_medium_large_practice
name = "large ammo box (medium practice)"
path = /obj/item/ammo_magazine/ammo_box/medium/large/practice
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_medium_large_hunter
name = "large ammo box (medium hunter)"
path = /obj/item/ammo_magazine/ammo_box/medium/large/hunter
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_large
name = "ammo box (large)"
path = /obj/item/ammo_magazine/ammo_box/large
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_large_ap
name = "ammo box (large AP)"
path = /obj/item/ammo_magazine/ammo_box/large/ap
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_large_hp
name = "ammo box (large HP)"
path = /obj/item/ammo_magazine/ammo_box/large/hp
hidden = 1
/datum/category_item/autolathe/arms/ammo_box_large_practice
name = "ammo box (large practice)"
path = /obj/item/ammo_magazine/ammo_box/large/practice
hidden = 1
/datum/category_item/autolathe/arms/clip_medium
name = "medium ammo clip"
path = /obj/item/ammo_magazine/clip/medium
hidden = 1
/datum/category_item/autolathe/arms/clip_medium_empty
name = "medium ammo clip"
path = /obj/item/ammo_magazine/clip/medium/empty
hidden = 1
/datum/category_item/autolathe/arms/clip_medium_rubber
name = "medium ammo clip (rubber)"
path = /obj/item/ammo_magazine/clip/medium/rubber
hidden = 1
/datum/category_item/autolathe/arms/clip_medium_practice
name = "medium ammo clip (practice)"
path = /obj/item/ammo_magazine/clip/medium/practice
hidden = 1
/datum/category_item/autolathe/arms/clip_medium_ap
name = "medium ammo clip (AP)"
path = /obj/item/ammo_magazine/clip/medium/ap
hidden = 1
/datum/category_item/autolathe/arms/clip_medium_hp
name = "medium ammo clip (HP)"
path = /obj/item/ammo_magazine/clip/medium/hp
hidden = 1
/datum/category_item/autolathe/arms/clip_medium_hunter
name = "medium ammo clip (hunter)"
path = /obj/item/ammo_magazine/clip/medium/hunter
hidden = 1
/datum/category_item/autolathe/arms/a57p90
name = "P90K Top-Mounted Magazine (5.7x28mm Standard)"
path = /obj/item/ammo_magazine/a57p90
hidden = 1
/datum/category_item/autolathe/arms/a57p90_ap
name = "P90K Top-Mounted Magazine (5.7x28mm Armor-Piercing)"
path = /obj/item/ammo_magazine/a57p90/ap
hidden = 1
/datum/category_item/autolathe/arms/a57p90_rubber
name = "P90K Top-Mounted Magazine (5.7x28mm Rubber)"
path = /obj/item/ammo_magazine/a57p90/rubber
hidden = 1
/datum/category_item/autolathe/arms/a57p90_hp
name = "P90K Top-Mounted Magazine (5.7x28mm Hollow-Point)"
path = /obj/item/ammo_magazine/a57p90/hp
hidden = 1
/datum/category_item/autolathe/arms/a57p90_empty
name = "P90K Top-Mounted Magazine (5.7x28mm Standard)"
path = /obj/item/ammo_magazine/a57p90/empty
hidden = 1
/datum/category_item/autolathe/arms/a57
name = "five-seven magazine(5.7x28mm standard)"
path = /obj/item/ammo_magazine/a57
hidden = 1
/datum/category_item/autolathe/arms/a57_ap
name = "five-seven magazine(5.7x28mm armor-piercing)"
path = /obj/item/ammo_magazine/a57/ap
hidden = 1
/datum/category_item/autolathe/arms/a57_hp
name = "five-seven magazine(5.7x28mm hollow-point)"
path = /obj/item/ammo_magazine/a57/hp
hidden = 1
/datum/category_item/autolathe/arms/a57_rubber
name = "five-seven magazine(5.7x28mm rubber)"
path = /obj/item/ammo_magazine/a57/rubber
hidden = 1
/datum/category_item/autolathe/arms/pistol
name = "pistol magazine"
path = /obj/item/ammo_magazine/pistol
hidden = 1
/datum/category_item/autolathe/arms/pistol_empty
name = "pistol magazine"
path = /obj/item/ammo_magazine/pistol/empty
hidden = 1
/datum/category_item/autolathe/arms/pistol_flash
name = "pistol magazine (flash)"
path = /obj/item/ammo_magazine/pistol/flash
hidden = 1
/datum/category_item/autolathe/arms/pistol_rubber
name = "pistol magazine (rubber)"
path = /obj/item/ammo_magazine/pistol/rubber
hidden = 1
/datum/category_item/autolathe/arms/pistol_practice
name = "pistol magazine (practice)"
path = /obj/item/ammo_magazine/pistol/practice
hidden = 1
/datum/category_item/autolathe/arms/pistol_ap
name = "pistol magazine (AP)"
path = /obj/item/ammo_magazine/pistol/ap
hidden = 1
/datum/category_item/autolathe/arms/pistol_hp
name = "pistol magazine (HP)"
path = /obj/item/ammo_magazine/pistol/hp
hidden = 1
/datum/category_item/autolathe/arms/pistol_emp
name = "pistol magazine (EMP)"
path = /obj/item/ammo_magazine/pistol/emp
hidden = 1
/datum/category_item/autolathe/arms/pistol_large
name = "extended pistol magazine"
path = /obj/item/ammo_magazine/pistol_large
hidden = 1
/datum/category_item/autolathe/arms/pistol_large_empty
name = "extended pistol magazine"
path = /obj/item/ammo_magazine/pistol_large/empty
hidden = 1
/datum/category_item/autolathe/arms/pistol_large_flash
name = "extended pistol magazine (flash)"
path = /obj/item/ammo_magazine/pistol_large/flash
hidden = 1
/datum/category_item/autolathe/arms/pistol_large_rubber
name = "extended pistol magazine (rubber)"
path = /obj/item/ammo_magazine/pistol_large/rubber
hidden = 1
/datum/category_item/autolathe/arms/pistol_large_practice
name = "extended pistol magazine (practice)"
path = /obj/item/ammo_magazine/pistol_large/practice
hidden = 1
/datum/category_item/autolathe/arms/pistol_large_ap
name = "extended pistol magazine (AP)"
path = /obj/item/ammo_magazine/pistol_large/ap
hidden = 1
/datum/category_item/autolathe/arms/pistol_large_hp
name = "extended pistol magazine (HP)"
path = /obj/item/ammo_magazine/pistol_large/hp
hidden = 1
/datum/category_item/autolathe/arms/smg
name = "SMG magazine"
path = /obj/item/ammo_magazine/smg
hidden = 1
/datum/category_item/autolathe/arms/smg_empty
name = "SMG magazine"
path = /obj/item/ammo_magazine/smg/empty
hidden = 1
/datum/category_item/autolathe/arms/smg_flash
name = "SMG magazine (flash)"
path = /obj/item/ammo_magazine/smg/flash
hidden = 1
/datum/category_item/autolathe/arms/smg_rubber
name = "SMG magazine (rubber)"
path = /obj/item/ammo_magazine/smg/rubber
hidden = 1
/datum/category_item/autolathe/arms/smg_practice
name = "SMG magazine (practice)"
path = /obj/item/ammo_magazine/smg/practice
hidden = 1
/datum/category_item/autolathe/arms/smg_ap
name = "SMG magazine (AP)"
path = /obj/item/ammo_magazine/smg/ap
hidden = 1
/datum/category_item/autolathe/arms/smg_hp
name = "SMG magazine (HP)"
path = /obj/item/ammo_magazine/smg/hp
hidden = 1
/datum/category_item/autolathe/arms/smg_emp
name = "SMG magazine (EMP)"
path = /obj/item/ammo_magazine/smg/emp
hidden = 1
/datum/category_item/autolathe/arms/smg_drum
name = "SMG drum magazine"
path = /obj/item/ammo_magazine/smg_drum
hidden = 1
/datum/category_item/autolathe/arms/smg_drum_empty
name = "SMG drum magazine"
path = /obj/item/ammo_magazine/smg_drum/empty
hidden = 1
/datum/category_item/autolathe/arms/smg_drum_flash
name = "SMG drum magazine (flash)"
path = /obj/item/ammo_magazine/smg_drum/flash
hidden = 1
/datum/category_item/autolathe/arms/smg_drum_rubber
name = "SMG drum magazine (rubber)"
path = /obj/item/ammo_magazine/smg_drum/rubber
hidden = 1
/datum/category_item/autolathe/arms/smg_drum_practice
name = "SMG drum magazine (practice)"
path = /obj/item/ammo_magazine/smg_drum/practice
hidden = 1
/datum/category_item/autolathe/arms/smg_drum_ap
name = "SMG drum magazine (AP)"
path = /obj/item/ammo_magazine/smg_drum/ap
hidden = 1
/datum/category_item/autolathe/arms/smg_drum_hp
name = "SMG drum magazine (HP)"
path = /obj/item/ammo_magazine/smg_drum/hp
hidden = 1
/datum/category_item/autolathe/arms/medium
name = "medium magazine"
path = /obj/item/ammo_magazine/medium
hidden = 1
/datum/category_item/autolathe/arms/medium_empty
name = "medium magazine (empty)"
path = /obj/item/ammo_magazine/medium/empty
hidden = 1
/datum/category_item/autolathe/arms/medium_rubber
name = "medium ammo magazine (rubber)"
path = /obj/item/ammo_magazine/medium/rubber
hidden = 1
/datum/category_item/autolathe/arms/medium_practice
name = "medium ammo magazine (practice)"
path = /obj/item/ammo_magazine/medium/practice
hidden = 1
/datum/category_item/autolathe/arms/medium_ap
name = "medium ammo magazine (AP)"
path = /obj/item/ammo_magazine/medium/ap
hidden = 1
/datum/category_item/autolathe/arms/medium_hp
name = "medium ammo magazine (HP)"
path = /obj/item/ammo_magazine/medium/hp
hidden = 1
/datum/category_item/autolathe/arms/medium_hunter
name = "medium ammo magazine (hunter)"
path = /obj/item/ammo_magazine/medium/hunter
hidden = 1
/datum/category_item/autolathe/arms/medium_small
name = "medium ammo short-capacity magazine"
path = /obj/item/ammo_magazine/medium_small
hidden = 1
/datum/category_item/autolathe/arms/medium_small_empty
name = "medium ammo short-capacity magazine"
path = /obj/item/ammo_magazine/medium_small/empty
hidden = 1
/datum/category_item/autolathe/arms/medium_small_rubber
name = "medium ammo short-capacity magazine (rubber)"
path = /obj/item/ammo_magazine/medium_small/rubber
hidden = 1
/datum/category_item/autolathe/arms/medium_small_practice
name = "medium ammo short-capacity magazine (practice)"
path = /obj/item/ammo_magazine/medium_small/practice
hidden = 1
/datum/category_item/autolathe/arms/medium_small_ap
name = "medium ammo short-capacity magazine (AP)"
path = /obj/item/ammo_magazine/medium_small/ap
hidden = 1
/datum/category_item/autolathe/arms/medium_small_hp
name = "medium ammo short-capacity magazine (HP)"
path = /obj/item/ammo_magazine/medium_small/hp
hidden = 1
/datum/category_item/autolathe/arms/medium_small_hunter
name = "medium ammo short-capacity magazine (hunter)"
path = /obj/item/ammo_magazine/medium_small/hunter
hidden = 1
/datum/category_item/autolathe/arms/medium_drum
name = "medium ammo drum magazine"
path = /obj/item/ammo_magazine/medium_drum
hidden = 1
/datum/category_item/autolathe/arms/medium_drum_empty
name = "medium ammo drum magazine"
path = /obj/item/ammo_magazine/medium_drum/empty
hidden = 1
/datum/category_item/autolathe/arms/medium_drum_rubber
name = "medium ammo drum magazine (rubber)"
path = /obj/item/ammo_magazine/medium_drum/rubber
hidden = 1
/datum/category_item/autolathe/arms/medium_drum_practice
name = "medium ammo drum magazine (practice)"
path = /obj/item/ammo_magazine/medium_drum/practice
hidden = 1
/datum/category_item/autolathe/arms/medium_drum_ap
name = "medium ammo drum magazine (AP)"
path = /obj/item/ammo_magazine/medium_drum/ap
hidden = 1
/datum/category_item/autolathe/arms/medium_drum_hp
name = "medium ammo drum magazine (HP)"
path = /obj/item/ammo_magazine/medium_drum/hp
hidden = 1
/datum/category_item/autolathe/arms/medium_box
name = "medium ammo magazine box"
path = /obj/item/ammo_magazine/medium_box
hidden = 1
/datum/category_item/autolathe/arms/medium_box_empty
name = "medium ammo magazine box"
path = /obj/item/ammo_magazine/medium_box/empty
hidden = 1
/datum/category_item/autolathe/arms/medium_box_rubber
name = "medium ammo magazine box (rubber)"
path = /obj/item/ammo_magazine/medium_box/rubber
hidden = 1
/datum/category_item/autolathe/arms/medium_box_practice
name = "medium ammo magazine box (practice)"
path = /obj/item/ammo_magazine/medium_box/practice
hidden = 1
/datum/category_item/autolathe/arms/medium_box_ap
name = "medium ammo magazine box (AP)"
path = /obj/item/ammo_magazine/medium_box/ap
hidden = 1
/datum/category_item/autolathe/arms/medium_box_hp
name = "medium ammo magazine box (HP)"
path = /obj/item/ammo_magazine/medium_box/hp
hidden = 1
/datum/category_item/autolathe/arms/large
name = "large ammo magazine"
path = /obj/item/ammo_magazine/large
hidden = 1
/datum/category_item/autolathe/arms/large_empty
name = "large ammo magazine"
path = /obj/item/ammo_magazine/large/empty
hidden = 1
/datum/category_item/autolathe/arms/large_practice
name = "large ammo magazine (practice)"
path = /obj/item/ammo_magazine/large/practice
hidden = 1
/datum/category_item/autolathe/arms/large_ap
name = "large ammo magazine (AP)"
path = /obj/item/ammo_magazine/large/ap
hidden = 1
/datum/category_item/autolathe/arms/large_hp
name = "large ammo magazine (HP)"
path = /obj/item/ammo_magazine/large/hp
hidden = 1
/datum/category_item/autolathe/arms/large_box
name = "large ammo magazine box"
path = /obj/item/ammo_magazine/large_box
hidden = 1
/datum/category_item/autolathe/arms/large_box_empty
name = "large ammo magazine box"
path = /obj/item/ammo_magazine/large_box/empty
hidden = 1
/datum/category_item/autolathe/arms/large_box_practice
name = "large ammo magazine box (practice)"
path = /obj/item/ammo_magazine/large_box/practice
hidden = 1
/datum/category_item/autolathe/arms/large_box_ap
name = "large ammo magazine box (AP)"
path = /obj/item/ammo_magazine/large_box/ap
hidden = 1
/datum/category_item/autolathe/arms/large_box_hp
name = "large ammo magazine box (HP)"
path = /obj/item/ammo_magazine/large_box/hp
hidden = 1
/datum/category_item/autolathe/arms/speedloader_six
name = "speedloader (6 round)"
path = /obj/item/ammo_magazine/speedloader_six
hidden = 1
/datum/category_item/autolathe/arms/speedloader_six_flash
name = "speedloader (6 round flash)"
path = /obj/item/ammo_magazine/speedloader_six/flash
hidden = 1
/datum/category_item/autolathe/arms/speedloader_six_rubber
name = "speedloader (6 round rubber)"
path = /obj/item/ammo_magazine/speedloader_six/rubber
hidden = 1
/datum/category_item/autolathe/arms/speedloader_six_practice
name = "speedloader (6 round practice)"
path = /obj/item/ammo_magazine/speedloader_six/practice
hidden = 1
/datum/category_item/autolathe/arms/speedloader_six_ap
name = "speedloader (6 round AP)"
path = /obj/item/ammo_magazine/speedloader_six/ap
hidden = 1
/datum/category_item/autolathe/arms/speedloader_six_hp
name = "speedloader (6 round HP)"
path = /obj/item/ammo_magazine/speedloader_six/hp
hidden = 1
/datum/category_item/autolathe/arms/speedloader_six_emp
name = "speedloader (6 round EMP)"
path = /obj/item/ammo_magazine/speedloader_six/emp
hidden = 1
/datum/category_item/autolathe/arms/speedloader_eight
name = "speedloader (8 round)"
path = /obj/item/ammo_magazine/speedloader_eight
hidden = 1
/datum/category_item/autolathe/arms/speedloader_eight_flash
name = "speedloader (8 round flash)"
path = /obj/item/ammo_magazine/speedloader_eight/flash
hidden = 1
/datum/category_item/autolathe/arms/speedloader_eight_rubber
name = "speedloader (8 round rubber)"
path = /obj/item/ammo_magazine/speedloader_eight/rubber
hidden = 1
/datum/category_item/autolathe/arms/speedloader_eight_practice
name = "speedloader (8 round practice)"
path = /obj/item/ammo_magazine/speedloader_eight/practice
hidden = 1
/datum/category_item/autolathe/arms/speedloader_eight_ap
name = "speedloader (8 round AP)"
path = /obj/item/ammo_magazine/speedloader_eight/ap
hidden = 1
/datum/category_item/autolathe/arms/speedloader_eight_hp
name = "speedloader (8 round HP)"
path = /obj/item/ammo_magazine/speedloader_eight/hp
hidden = 1
/datum/category_item/autolathe/arms/speedloader_eight_emp
name = "speedloader (8 round EMP)"
path = /obj/item/ammo_magazine/speedloader_eight/emp
hidden = 1

View File

@@ -0,0 +1,283 @@
//Replace old magazine with new
/obj/item/ammo_magazine/New(loc)
var/replacement_type = magazine_overrides[type]
if(replacement_type)
qdel(src)
return new replacement_type(loc)
. = ..()
//Override attackby to allow magazine to magazine transfer
/obj/item/ammo_magazine/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/ammo_casing))
var/obj/item/ammo_casing/C = W
if(C.caliber != caliber)
to_chat(user, "<span class='warning'>[C] does not fit into [src].</span>")
return
if(stored_ammo.len >= max_ammo)
to_chat(user, "<span class='warning'>[src] is full!</span>")
return
user.remove_from_mob(C)
C.forceMove(src)
stored_ammo.Add(C)
update_icon()
if(istype(W, /obj/item/ammo_magazine))
var/obj/item/ammo_magazine/L = W
if(L.caliber != caliber)
to_chat(user, "<span class='warning'>The ammo in [L] does not fit into [src].</span>")
return
if(!L.stored_ammo.len)
to_chat(user, "<span class='warning'>There's no more ammo [L]!</span>")
return
if(stored_ammo.len >= max_ammo)
to_chat(user, "<span class='warning'>[src] is full!</span>")
return
while(L.stored_ammo.len && stored_ammo.len < max_ammo)
var/obj/item/ammo_casing/AC = L.stored_ammo[1] //select the next casing.
L.stored_ammo -= AC //Remove this casing from loaded list of the clip.
AC.forceMove(src)
stored_ammo.Insert(1, AC) //add it to the head of our magazine's list
L.update_icon()
else
return //Don't play sound if nothing actually happens xD
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
//big boy list
var/global/list/magazine_overrides = list(
/obj/item/ammo_magazine/m9mmt = /obj/item/ammo_magazine/smg,
/obj/item/ammo_magazine/m9mm/compact = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m9mm = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m762 = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/m9mmAdvanced = /obj/item/ammo_magazine/smg,
/obj/item/ammo_magazine/m545 = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/m545saw = /obj/item/ammo_magazine/medium_box,
/obj/item/ammo_magazine/m45uzi = /obj/item/ammo_magazine/smg,
/obj/item/ammo_magazine/m45tommy = /obj/item/ammo_magazine/smg,
/obj/item/ammo_magazine/m45tommydrum = /obj/item/ammo_magazine/smg_drum,
/obj/item/ammo_magazine/m762/ext = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/m10mm = /obj/item/ammo_magazine/smg,
/obj/item/ammo_magazine/m95 = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/mtg = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/mg42 = /obj/item/ammo_magazine/medium_box,
/obj/item/ammo_magazine/mp5mag = /obj/item/ammo_magazine/smg,
/obj/item/ammo_magazine/asval = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/akm = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/ak74 = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/m762svd = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/m16 = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/ar10 = /obj/item/ammo_magazine/medium_small,
/obj/item/ammo_magazine/m41 = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/t12 = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/fal = /obj/item/ammo_magazine/medium_small,
/obj/item/ammo_magazine/type901 = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/awp = /obj/item/ammo_magazine/large,
/obj/item/ammo_magazine/hectate = /obj/item/ammo_magazine/large,
/obj/item/ammo_magazine/plamya = /obj/item/ammo_magazine/medium_drum,
/obj/item/ammo_magazine/ppsh = /obj/item/ammo_magazine/smg_drum,
/obj/item/ammo_magazine/pitchmag = /obj/item/ammo_magazine/smg,
/obj/item/ammo_magazine/molniya = /obj/item/ammo_magazine/medium_box,
/obj/item/ammo_magazine/pkm = /obj/item/ammo_magazine/medium_box,
/obj/item/ammo_magazine/rpd = /obj/item/ammo_magazine/medium_box,
/obj/item/ammo_magazine/kord = /obj/item/ammo_magazine/large_box,
/obj/item/ammo_magazine/ssp4 = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/sam48 = /obj/item/ammo_magazine/clip/medium,
/obj/item/ammo_magazine/m5mmcaseless = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/m45 = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m44 = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m9mm/luger = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m38 = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m10mm/pistol = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m44/rubber = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m2024 = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m762enbloc = /obj/item/ammo_magazine/clip/medium,
/obj/item/ammo_magazine/makarov = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/tp23s = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/tp23 = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m9mm/compact/flash = /obj/item/ammo_magazine/pistol/flash,
/obj/item/ammo_magazine/m9mmt/rubber = /obj/item/ammo_magazine/smg/rubber,
/obj/item/ammo_magazine/m10mm/rubber = /obj/item/ammo_magazine/smg/rubber,
/obj/item/ammo_magazine/ak74/plum = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/m16/patriot = /obj/item/ammo_magazine/medium_drum,
/obj/item/ammo_magazine/akm/drum = /obj/item/ammo_magazine/medium_drum,
/obj/item/ammo_magazine/m45/rubber = /obj/item/ammo_magazine/pistol/rubber,
/obj/item/ammo_magazine/m45/flash = /obj/item/ammo_magazine/pistol/flash,
/obj/item/ammo_magazine/m9mm/rubber = /obj/item/ammo_magazine/pistol/rubber,
/obj/item/ammo_magazine/m9mm/large = /obj/item/ammo_magazine/pistol_large,
/obj/item/ammo_magazine/m9mm/large/preban = /obj/item/ammo_magazine/pistol_large,
/obj/item/ammo_magazine/m9mm/large/preban/hp = /obj/item/ammo_magazine/pistol_large/hp,
/obj/item/ammo_magazine/m9mm/vp70 = /obj/item/ammo_magazine/smg,
/obj/item/ammo_magazine/tp23/rubber = /obj/item/ammo_magazine/pistol/rubber,
/obj/item/ammo_magazine/ammo_box/b357 = /obj/item/ammo_magazine/ammo_box/small,
/obj/item/ammo_magazine/ammo_box/b38 = /obj/item/ammo_magazine/ammo_box/small,
/obj/item/ammo_magazine/ammo_box/b10mm = /obj/item/ammo_magazine/ammo_box/small,
/obj/item/ammo_magazine/ammo_box/b44 = /obj/item/ammo_magazine/ammo_box/small,
/obj/item/ammo_magazine/ammo_box/b45 = /obj/item/ammo_magazine/ammo_box/small,
/obj/item/ammo_magazine/ammo_box/b145 = /obj/item/ammo_magazine/ammo_box/large,
/obj/item/ammo_magazine/ammo_box/b145/highvel = /obj/item/ammo_magazine/ammo_box/large/ap,
/obj/item/ammo_magazine/ammo_box/b762 = /obj/item/ammo_magazine/ammo_box/medium,
/obj/item/ammo_magazine/ammo_box/b545 = /obj/item/ammo_magazine/ammo_box/medium,
/obj/item/ammo_magazine/ammo_box/b545/large = /obj/item/ammo_magazine/ammo_box/medium/large,
/obj/item/ammo_magazine/s357 = /obj/item/ammo_magazine/speedloader_six,
/obj/item/ammo_magazine/s38 = /obj/item/ammo_magazine/speedloader_eight,
/obj/item/ammo_magazine/clip/sks = /obj/item/ammo_magazine/clip/medium,
/obj/item/ammo_magazine/clip/mosin = /obj/item/ammo_magazine/clip/medium,
/obj/item/ammo_magazine/clip/c762 = /obj/item/ammo_magazine/clip/medium,
/obj/item/ammo_magazine/clip/c545 = /obj/item/ammo_magazine/clip/medium,
/obj/item/ammo_magazine/s44 = /obj/item/ammo_magazine/speedloader_six,
/obj/item/ammo_magazine/s45 = /obj/item/ammo_magazine/speedloader_six,
/obj/item/ammo_magazine/s45lc = /obj/item/ammo_magazine/speedloader_six,
/obj/item/ammo_magazine/m545/small = /obj/item/ammo_magazine/medium_small,
/obj/item/ammo_magazine/mglock9mm = /obj/item/ammo_magazine/pistol_large,
/obj/item/ammo_magazine/ammo_box/b357/rubber = /obj/item/ammo_magazine/ammo_box/small/rubber,
/obj/item/ammo_magazine/ammo_box/b38/rubber = /obj/item/ammo_magazine/ammo_box/small/rubber,
/obj/item/ammo_magazine/ammo_box/b10mm/practice = /obj/item/ammo_magazine/ammo_box/small/practice,
/obj/item/ammo_magazine/ammo_box/b10mm/rubber = /obj/item/ammo_magazine/ammo_box/small/rubber,
/obj/item/ammo_magazine/ammo_box/b10mm/emp = /obj/item/ammo_magazine/ammo_box/small/emp,
/obj/item/ammo_magazine/ammo_box/b44/rubber = /obj/item/ammo_magazine/ammo_box/small/rubber,
/obj/item/ammo_magazine/ammo_box/b45/practice = /obj/item/ammo_magazine/ammo_box/small/practice,
/obj/item/ammo_magazine/ammo_box/b45/ap = /obj/item/ammo_magazine/ammo_box/small/ap,
/obj/item/ammo_magazine/ammo_box/b45/hp = /obj/item/ammo_magazine/ammo_box/small/hp,
/obj/item/ammo_magazine/ammo_box/b45/rubber = /obj/item/ammo_magazine/ammo_box/small/rubber,
/obj/item/ammo_magazine/ammo_box/b45/emp = /obj/item/ammo_magazine/ammo_box/small/emp,
/obj/item/ammo_magazine/ammo_box/b762/hp = /obj/item/ammo_magazine/ammo_box/medium/hp,
/obj/item/ammo_magazine/ammo_box/b762/ap = /obj/item/ammo_magazine/ammo_box/medium/ap,
/obj/item/ammo_magazine/ammo_box/b762/practice = /obj/item/ammo_magazine/ammo_box/medium/practice,
/obj/item/ammo_magazine/ammo_box/b762/hunter = /obj/item/ammo_magazine/ammo_box/medium/hunter,
/obj/item/ammo_magazine/ammo_box/b545/ap = /obj/item/ammo_magazine/ammo_box/medium/ap,
/obj/item/ammo_magazine/ammo_box/b545/hp = /obj/item/ammo_magazine/ammo_box/medium/hp,
/obj/item/ammo_magazine/ammo_box/b545/practice = /obj/item/ammo_magazine/ammo_box/medium/practice,
/obj/item/ammo_magazine/ammo_box/b545/hunter = /obj/item/ammo_magazine/ammo_box/medium/hunter,
/obj/item/ammo_magazine/ammo_box/b545/large/ap = /obj/item/ammo_magazine/ammo_box/medium/large/ap,
/obj/item/ammo_magazine/ammo_box/b545/large/hp = /obj/item/ammo_magazine/ammo_box/medium/large/hp,
/obj/item/ammo_magazine/ammo_box/b545/large/practice = /obj/item/ammo_magazine/ammo_box/medium/large/practice,
/obj/item/ammo_magazine/ammo_box/b545/large/hunter = /obj/item/ammo_magazine/ammo_box/medium/large/hunter,
/obj/item/ammo_magazine/s357/rubber = /obj/item/ammo_magazine/speedloader_six/rubber,
/obj/item/ammo_magazine/s357/flash = /obj/item/ammo_magazine/speedloader_six/flash,
/obj/item/ammo_magazine/s38/rubber = /obj/item/ammo_magazine/speedloader_eight/rubber,
/obj/item/ammo_magazine/s38/emp = /obj/item/ammo_magazine/speedloader_eight/emp,
/obj/item/ammo_magazine/m38/makarov = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m38/giskard = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/m45/empty = /obj/item/ammo_magazine/pistol/empty,
/obj/item/ammo_magazine/m45/practice = /obj/item/ammo_magazine/pistol/practice,
/obj/item/ammo_magazine/m45/ap = /obj/item/ammo_magazine/pistol/ap,
/obj/item/ammo_magazine/m45/hp = /obj/item/ammo_magazine/pistol/hp,
/obj/item/ammo_magazine/m45uzi/empty = /obj/item/ammo_magazine/smg/empty,
/obj/item/ammo_magazine/m45tommy/ap = /obj/item/ammo_magazine/smg/ap,
/obj/item/ammo_magazine/m45tommy/empty = /obj/item/ammo_magazine/smg/empty,
/obj/item/ammo_magazine/m45tommydrum/empty = /obj/item/ammo_magazine/smg_drum/empty,
/obj/item/ammo_magazine/m45tommydrum/ap = /obj/item/ammo_magazine/smg_drum/ap,
/obj/item/ammo_magazine/clip/c545/ap = /obj/item/ammo_magazine/clip/medium/ap,
/obj/item/ammo_magazine/clip/c545/hunter = /obj/item/ammo_magazine/clip/medium/hunter,
/obj/item/ammo_magazine/clip/c545/practice = /obj/item/ammo_magazine/clip/medium/practice,
/obj/item/ammo_magazine/clip/c762/ap = /obj/item/ammo_magazine/clip/medium/ap,
/obj/item/ammo_magazine/clip/c762/practice = /obj/item/ammo_magazine/clip/medium/practice,
/obj/item/ammo_magazine/clip/c762/hunter = /obj/item/ammo_magazine/clip/medium/hunter,
/obj/item/ammo_magazine/clip/sks/ap = /obj/item/ammo_magazine/clip/medium/ap,
/obj/item/ammo_magazine/clip/mosin/ap = /obj/item/ammo_magazine/clip/medium/ap,
/obj/item/ammo_magazine/s45/rubber = /obj/item/ammo_magazine/speedloader_six/rubber,
/obj/item/ammo_magazine/s45/practice = /obj/item/ammo_magazine/speedloader_six/practice,
/obj/item/ammo_magazine/s45/flash = /obj/item/ammo_magazine/speedloader_six/flash,
/obj/item/ammo_magazine/s45/ap = /obj/item/ammo_magazine/speedloader_six/ap,
/obj/item/ammo_magazine/m5mmcaseless/empty = /obj/item/ammo_magazine/medium/empty,
/obj/item/ammo_magazine/m9mm/empty = /obj/item/ammo_magazine/pistol/empty,
/obj/item/ammo_magazine/m9mm/flash = /obj/item/ammo_magazine/pistol/flash,
/obj/item/ammo_magazine/m9mm/practice = /obj/item/ammo_magazine/pistol/practice,
/obj/item/ammo_magazine/m9mm/large/empty = /obj/item/ammo_magazine/pistol_large/empty,
/obj/item/ammo_magazine/m9mm/compact/empty = /obj/item/ammo_magazine/pistol/empty,
/obj/item/ammo_magazine/m9mm/compact/rubber = /obj/item/ammo_magazine/pistol/rubber,
/obj/item/ammo_magazine/m9mm/compact/practice = /obj/item/ammo_magazine/pistol/practice,
/obj/item/ammo_magazine/m9mm/luger/empty = /obj/item/ammo_magazine/pistol/empty,
/obj/item/ammo_magazine/m9mm/luger/rubber = /obj/item/ammo_magazine/pistol/rubber,
/obj/item/ammo_magazine/m9mm/vp70/ap = /obj/item/ammo_magazine/smg/ap,
/obj/item/ammo_magazine/m9mm/vp70/hp = /obj/item/ammo_magazine/smg/hp,
/obj/item/ammo_magazine/m9mm/vp70/rubber = /obj/item/ammo_magazine/smg/rubber,
/obj/item/ammo_magazine/m9mm/vp70/flash = /obj/item/ammo_magazine/smg/flash,
/obj/item/ammo_magazine/m9mmt/empty = /obj/item/ammo_magazine/smg/empty,
/obj/item/ammo_magazine/m9mmt/flash = /obj/item/ammo_magazine/smg/flash,
/obj/item/ammo_magazine/m9mmt/practice = /obj/item/ammo_magazine/smg/practice,
/obj/item/ammo_magazine/m9mmt/ap = /obj/item/ammo_magazine/smg/ap,
/obj/item/ammo_magazine/m9mmAdvanced/ap = /obj/item/ammo_magazine/smg/ap,
/obj/item/ammo_magazine/m9mmAdvanced/empty = /obj/item/ammo_magazine/smg/empty,
/obj/item/ammo_magazine/m10mm/empty = /obj/item/ammo_magazine/smg/empty,
/obj/item/ammo_magazine/m10mm/practice = /obj/item/ammo_magazine/smg/practice,
/obj/item/ammo_magazine/m10mm/emp = /obj/item/ammo_magazine/smg/emp,
/obj/item/ammo_magazine/m10mm/pistol/practice = /obj/item/ammo_magazine/pistol/practice,
/obj/item/ammo_magazine/m10mm/pistol/rubber = /obj/item/ammo_magazine/pistol/rubber,
/obj/item/ammo_magazine/m10mm/pistol/emp = /obj/item/ammo_magazine/pistol/emp,
/obj/item/ammo_magazine/m10mm/pistol/empty = /obj/item/ammo_magazine/pistol/empty,
/obj/item/ammo_magazine/m10mm/ap = /obj/item/ammo_magazine/smg/ap,
/obj/item/ammo_magazine/m10mm/hp = /obj/item/ammo_magazine/smg/hp,
/obj/item/ammo_magazine/m545/empty = /obj/item/ammo_magazine/medium/empty,
/obj/item/ammo_magazine/m545/practice = /obj/item/ammo_magazine/medium/practice,
/obj/item/ammo_magazine/m545/ap = /obj/item/ammo_magazine/medium/ap,
/obj/item/ammo_magazine/m545/hunter = /obj/item/ammo_magazine/medium/hunter,
/obj/item/ammo_magazine/m545/ext = /obj/item/ammo_magazine/medium,
/obj/item/ammo_magazine/m545/small/empty = /obj/item/ammo_magazine/medium_small/empty,
/obj/item/ammo_magazine/m545/small/practice = /obj/item/ammo_magazine/medium_small/practice,
/obj/item/ammo_magazine/m545/small/ap = /obj/item/ammo_magazine/medium_small/ap,
/obj/item/ammo_magazine/m545/small/hunter = /obj/item/ammo_magazine/medium_small/hunter,
/obj/item/ammo_magazine/m545saw/empty = /obj/item/ammo_magazine/medium_box/empty,
/obj/item/ammo_magazine/m545saw/ap = /obj/item/ammo_magazine/medium_box/ap,
/obj/item/ammo_magazine/m545saw/hunter = /obj/item/ammo_magazine/medium_box,
/obj/item/ammo_magazine/m44/empty = /obj/item/ammo_magazine/pistol/empty,
/obj/item/ammo_magazine/s44/rubber = /obj/item/ammo_magazine/speedloader_six/rubber,
/obj/item/ammo_magazine/m762/empty = /obj/item/ammo_magazine/medium/empty,
/obj/item/ammo_magazine/m762/ap = /obj/item/ammo_magazine/medium/ap,
/obj/item/ammo_magazine/m762/ext/empty = /obj/item/ammo_magazine/medium/empty,
/obj/item/ammo_magazine/m762/ext/ap = /obj/item/ammo_magazine/medium/ap,
/obj/item/ammo_magazine/m762enbloc/ap = /obj/item/ammo_magazine/clip/medium/ap,
/obj/item/ammo_magazine/m762enbloc/empty = /obj/item/ammo_magazine/clip/medium/empty,
/obj/item/ammo_magazine/m762svd/empty = /obj/item/ammo_magazine/medium/empty,
/obj/item/ammo_magazine/m762svd/ap = /obj/item/ammo_magazine/medium/ap,
/obj/item/ammo_magazine/m2024/empty = /obj/item/ammo_magazine/pistol/empty,
/obj/item/ammo_magazine/m2024/rubber = /obj/item/ammo_magazine/pistol/rubber,
/obj/item/ammo_magazine/m2024/practice = /obj/item/ammo_magazine/pistol/practice,
/obj/item/ammo_magazine/m2024/flash = /obj/item/ammo_magazine/pistol/flash,
/obj/item/ammo_magazine/m2024/ap = /obj/item/ammo_magazine/pistol/ap,
/obj/item/ammo_magazine/mglock9mm/empty = /obj/item/ammo_magazine/pistol_large/empty,
/obj/item/ammo_magazine/mglock9mm/flash = /obj/item/ammo_magazine/pistol_large/flash,
/obj/item/ammo_magazine/mglock9mm/rubber = /obj/item/ammo_magazine/pistol_large/rubber,
/obj/item/ammo_magazine/mglock9mm/practice = /obj/item/ammo_magazine/pistol_large/practice,
/obj/item/ammo_magazine/mg42/empty = /obj/item/ammo_magazine/medium_box/empty,
/obj/item/ammo_magazine/mp5mag/ap = /obj/item/ammo_magazine/smg/ap,
/obj/item/ammo_magazine/mp5mag/hp = /obj/item/ammo_magazine/smg/hp,
/obj/item/ammo_magazine/mp5mag/rubber = /obj/item/ammo_magazine/smg/rubber,
/obj/item/ammo_magazine/pitchmag/rubber = /obj/item/ammo_magazine/smg/rubber,
/obj/item/ammo_magazine/asval/ap = /obj/item/ammo_magazine/medium/ap,
/obj/item/ammo_magazine/asval/rubber = /obj/item/ammo_magazine/medium/rubber,
/obj/item/ammo_magazine/akm/ap = /obj/item/ammo_magazine/medium/ap,
/obj/item/ammo_magazine/akm/hp = /obj/item/ammo_magazine/medium/hp,
/obj/item/ammo_magazine/akm/rubber = /obj/item/ammo_magazine/medium/rubber,
/obj/item/ammo_magazine/akm/drum/ap = /obj/item/ammo_magazine/medium_drum/ap,
/obj/item/ammo_magazine/ak74/ap = /obj/item/ammo_magazine/medium/ap,
/obj/item/ammo_magazine/ak74/hp = /obj/item/ammo_magazine/medium/hp,
/obj/item/ammo_magazine/ak74/rubber = /obj/item/ammo_magazine/medium/rubber,
/obj/item/ammo_magazine/ak74/plum/rubber = /obj/item/ammo_magazine/medium/rubber,
/obj/item/ammo_magazine/m16/ap = /obj/item/ammo_magazine/medium/ap,
/obj/item/ammo_magazine/m16/rubber = /obj/item/ammo_magazine/medium/rubber,
/obj/item/ammo_magazine/m16/hp = /obj/item/ammo_magazine/medium/hp,
/obj/item/ammo_magazine/m41/rubber = /obj/item/ammo_magazine/medium/rubber,
/obj/item/ammo_magazine/type901/ap = /obj/item/ammo_magazine/medium/ap,
/obj/item/ammo_magazine/ar10/ap = /obj/item/ammo_magazine/medium_small/ap,
/obj/item/ammo_magazine/fal/ap = /obj/item/ammo_magazine/medium_small/ap,
/obj/item/ammo_magazine/awp/ap = /obj/item/ammo_magazine/large/ap,
/obj/item/ammo_magazine/hectate/ap = /obj/item/ammo_magazine/large/ap,
/obj/item/ammo_magazine/plamya/ap = /obj/item/ammo_magazine/medium_drum/ap,
/obj/item/ammo_magazine/plamya/rubber = /obj/item/ammo_magazine/medium_drum/rubber,
/obj/item/ammo_magazine/molniya/ap = /obj/item/ammo_magazine/medium_box/ap,
/obj/item/ammo_magazine/pkm/ap = /obj/item/ammo_magazine/medium_box/ap,
/obj/item/ammo_magazine/rpd/ap = /obj/item/ammo_magazine/medium_box/ap,
/obj/item/ammo_magazine/ssp4/rubber = /obj/item/ammo_magazine/pistol/rubber,
/obj/item/ammo_magazine/makarov/rubber = /obj/item/ammo_magazine/pistol/rubber,
/obj/item/ammo_magazine/tp23s/rubber = /obj/item/ammo_magazine/pistol/rubber,
/obj/item/ammo_magazine/tp23s/highpower = /obj/item/ammo_magazine/pistol,
/obj/item/ammo_magazine/tp23/flash = /obj/item/ammo_magazine/pistol/flash,
/obj/item/ammo_magazine/tp23/hp = /obj/item/ammo_magazine/pistol/hp,
/obj/item/ammo_magazine/tp23/ap = /obj/item/ammo_magazine/pistol/ap,
/obj/item/ammo_magazine/tp23/emp = /obj/item/ammo_magazine/pistol/emp,
/obj/item/ammo_magazine/s45lc/rubber = /obj/item/ammo_magazine/speedloader_six/rubber,
/obj/item/ammo_magazine/s45lc/rifle = /obj/item/ammo_magazine/speedloader_six,
/obj/item/ammo_magazine/mtg/empty = /obj/item/ammo_magazine/medium/empty,
/obj/item/ammo_magazine/m95/empty = /obj/item/ammo_magazine/medium/empty,
)

View File

@@ -0,0 +1,644 @@
//Pistol magazine and subtypes
/obj/item/ammo_magazine/pistol
name = "pistol magazine"
icon_state = "m91"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
matter = list(MAT_STEEL = 600)
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
max_ammo = 10
multiple_sprites = 1
/obj/item/ammo_magazine/pistol/empty
initial_ammo = 0
/obj/item/ammo_magazine/pistol/flash
name = "pistol magazine (flash)"
ammo_type = /obj/item/ammo_casing/simple/small/flash
/obj/item/ammo_magazine/pistol/rubber
name = "pistol magazine (rubber)"
ammo_type = /obj/item/ammo_casing/simple/small/rubber
/obj/item/ammo_magazine/pistol/practice
name = "pistol magazine (practice)"
ammo_type = /obj/item/ammo_casing/simple/small/practice
/obj/item/ammo_magazine/pistol/ap
name = "pistol magazine (AP)"
ammo_type = /obj/item/ammo_casing/simple/small/ap
/obj/item/ammo_magazine/pistol/hp
name = "pistol magazine (HP)"
ammo_type = /obj/item/ammo_casing/simple/small/hp
/obj/item/ammo_magazine/pistol/emp
name = "pistol magazine (EMP)"
ammo_type = /obj/item/ammo_casing/simple/small/emp
//Large pistol magazine.
/obj/item/ammo_magazine/pistol_large
name = "extended pistol magazine"
// cringe ammo ban lore begone
icon_state = "m93"
origin_tech = list(TECH_COMBAT = 2, TECH_ILLEGAL = 1)
mag_type = MAGAZINE
matter = list(MAT_STEEL = 1000)
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
max_ammo = 17
multiple_sprites = 1
/obj/item/ammo_magazine/pistol_large/empty
initial_ammo = 0
/obj/item/ammo_magazine/pistol_large/flash
name = "extended pistol magazine (flash)"
ammo_type = /obj/item/ammo_casing/simple/small/flash
/obj/item/ammo_magazine/pistol_large/rubber
name = "extended pistol magazine (rubber)"
ammo_type = /obj/item/ammo_casing/simple/small/rubber
/obj/item/ammo_magazine/pistol_large/practice
name = "extended pistol magazine (practice)"
ammo_type = /obj/item/ammo_casing/simple/small/practice
/obj/item/ammo_magazine/pistol_large/ap
name = "extended pistol magazine (AP)"
ammo_type = /obj/item/ammo_casing/simple/small/ap
/obj/item/ammo_magazine/pistol_large/hp
name = "extended pistol magazine (HP)"
ammo_type = /obj/item/ammo_casing/simple/small/hp
//SMG Magazine
/obj/item/ammo_magazine/smg
name = "SMG magazine"
icon = 'icons/obj/ammo_ch.dmi'
icon_state = "mp5mag"
max_ammo = 30
mag_type = MAGAZINE
caliber = "small"
matter = list(DEFAULT_WALL_MATERIAL = 800)
multiple_sprites = 1
ammo_type = /obj/item/ammo_casing/simple/small
/obj/item/ammo_magazine/smg/empty
initial_ammo = 0
/obj/item/ammo_magazine/smg/flash
name = "SMG magazine (flash)"
ammo_type = /obj/item/ammo_casing/simple/small/flash
/obj/item/ammo_magazine/smg/rubber
name = "SMG magazine (rubber)"
ammo_type = /obj/item/ammo_casing/simple/small/rubber
/obj/item/ammo_magazine/smg/practice
name = "SMG magazine (practice)"
ammo_type = /obj/item/ammo_casing/simple/small/practice
/obj/item/ammo_magazine/smg/ap
name = "SMG magazine (AP)"
ammo_type = /obj/item/ammo_casing/simple/small/ap
/obj/item/ammo_magazine/smg/hp
name = "SMG magazine (HP)"
ammo_type = /obj/item/ammo_casing/simple/small/hp
/obj/item/ammo_magazine/smg/emp
name = "SMG magazine (EMP)"
ammo_type = /obj/item/ammo_casing/simple/small/emp
//SMG drum magazine
/obj/item/ammo_magazine/smg_drum
name = "SMG drum magazine"
icon = 'icons/obj/ammo_ch.dmi'
caliber = "small"
icon_state = "ppshmag"
max_ammo = 50
mag_type = MAGAZINE
multiple_sprites = 1
matter = list(DEFAULT_WALL_MATERIAL = 1500)
ammo_type = /obj/item/ammo_casing/simple/small
/obj/item/ammo_magazine/smg_drum/empty
initial_ammo = 0
/obj/item/ammo_magazine/smg_drum/flash
name = "SMG drum magazine (flash)"
ammo_type = /obj/item/ammo_casing/simple/small/flash
/obj/item/ammo_magazine/smg_drum/rubber
name = "SMG drum magazine (rubber)"
ammo_type = /obj/item/ammo_casing/simple/small/rubber
/obj/item/ammo_magazine/smg_drum/practice
name = "SMG drum magazine (practice)"
ammo_type = /obj/item/ammo_casing/simple/small/practice
/obj/item/ammo_magazine/smg_drum/ap
name = "SMG drum magazine (AP)"
ammo_type = /obj/item/ammo_casing/simple/small/ap
/obj/item/ammo_magazine/smg_drum/hp
name = "SMG drum magazine (HP)"
ammo_type = /obj/item/ammo_casing/simple/small/hp
//Medium magazines
/obj/item/ammo_magazine/medium
name = "medium magazine"
icon = 'icons/obj/ammo_ch.dmi'
icon_state = "556mag"
max_ammo = 30
mag_type = MAGAZINE
caliber = "medium"
matter = list(DEFAULT_WALL_MATERIAL = 1400)
multiple_sprites = 1
ammo_type = /obj/item/ammo_casing/simple/medium
/obj/item/ammo_magazine/medium/empty
initial_ammo = 0
/obj/item/ammo_magazine/medium/rubber
name = "medium ammo magazine (rubber)"
ammo_type = /obj/item/ammo_casing/simple/medium/rubber
/obj/item/ammo_magazine/medium/practice
name = "medium ammo magazine (practice)"
ammo_type = /obj/item/ammo_casing/simple/medium/practice
/obj/item/ammo_magazine/medium/ap
name = "medium ammo magazine (AP)"
ammo_type = /obj/item/ammo_casing/simple/medium/ap
/obj/item/ammo_magazine/medium/hp
name = "medium ammo magazine (HP)"
ammo_type = /obj/item/ammo_casing/simple/medium/hp
/obj/item/ammo_magazine/medium/hunter
name = "medium ammo magazine (HP)"
ammo_type = /obj/item/ammo_casing/simple/medium/hunter
//Medium short-capacity
/obj/item/ammo_magazine/medium_small
name = "medium ammo short-capacity magazine"
icon = 'icons/obj/ammo_ch.dmi'
caliber = "medium"
icon_state = "t12"
max_ammo = 20
mag_type = MAGAZINE
multiple_sprites = 1
matter = list(DEFAULT_WALL_MATERIAL = 1800)
ammo_type = /obj/item/ammo_casing/simple/medium
/obj/item/ammo_magazine/medium_small/empty
initial_ammo = 0
/obj/item/ammo_magazine/medium_small/rubber
name = "medium ammo short-capacity magazine (rubber)"
ammo_type = /obj/item/ammo_casing/simple/medium/rubber
/obj/item/ammo_magazine/medium_small/practice
name = "medium ammo short-capacity magazine (practice)"
ammo_type = /obj/item/ammo_casing/simple/medium/practice
/obj/item/ammo_magazine/medium_small/ap
name = "medium ammo short-capacity magazine (AP)"
ammo_type = /obj/item/ammo_casing/simple/medium/ap
/obj/item/ammo_magazine/medium_small/hp
name = "medium ammo short-capacity magazine (HP)"
ammo_type = /obj/item/ammo_casing/simple/medium/hp
/obj/item/ammo_magazine/medium_small/hunter
name = "medium ammo short-capacity magazine (hunter)"
ammo_type = /obj/item/ammo_casing/simple/medium/hunter
//Medium drum
/obj/item/ammo_magazine/medium_drum
name = "medium ammo drum magazine"
icon = 'icons/obj/ammo_ch.dmi'
caliber = "medium"
icon_state = "plamyamag"
max_ammo = 50
mag_type = MAGAZINE
multiple_sprites = 1
matter = list(DEFAULT_WALL_MATERIAL = 2500)
ammo_type = /obj/item/ammo_casing/simple/medium
/obj/item/ammo_magazine/medium_drum/empty
initial_ammo = 0
/obj/item/ammo_magazine/medium_drum/rubber
name = "medium ammo drum magazine (rubber)"
ammo_type = /obj/item/ammo_casing/simple/medium/rubber
/obj/item/ammo_magazine/medium_drum/practice
name = "medium ammo drum magazine (practice)"
ammo_type = /obj/item/ammo_casing/simple/medium/practice
/obj/item/ammo_magazine/medium_drum/ap
name = "medium ammo drum magazine (AP)"
ammo_type = /obj/item/ammo_casing/simple/medium/ap
/obj/item/ammo_magazine/medium_drum/hp
name = "medium ammo drum magazine (HP)"
ammo_type = /obj/item/ammo_casing/simple/medium/hp
//Medium clip
/obj/item/ammo_magazine/clip/medium
name = "medium ammo clip"
icon_state = "enbloc"
max_ammo = 10
caliber = "medium"
mag_type = MAGAZINE | SPEEDLOADER //Act as both, because the garand will use you like a magazine bb
multiple_sprites = 1
matter = list(DEFAULT_WALL_MATERIAL = 400)
ammo_type = /obj/item/ammo_casing/simple/medium
/obj/item/ammo_magazine/clip/medium/empty
initial_ammo = 0
/obj/item/ammo_magazine/clip/medium/rubber
name = "medium ammo clip (rubber)"
ammo_type = /obj/item/ammo_casing/simple/medium/rubber
/obj/item/ammo_magazine/clip/medium/practice
name = "medium ammo clip (practice)"
ammo_type = /obj/item/ammo_casing/simple/medium/practice
/obj/item/ammo_magazine/clip/medium/ap
name = "medium ammo clip (AP)"
ammo_type = /obj/item/ammo_casing/simple/medium/ap
/obj/item/ammo_magazine/clip/medium/hp
name = "medium ammo clip (HP)"
ammo_type = /obj/item/ammo_casing/simple/medium/hp
/obj/item/ammo_magazine/clip/medium/hunter
name = "medium ammo clip (hunter)"
ammo_type = /obj/item/ammo_casing/simple/medium/hunter
//Medium box
/obj/item/ammo_magazine/medium_box
name = "medium ammo magazine box"
icon = 'icons/obj/ammo_ch.dmi'
caliber = "medium"
icon_state = "molniyamag"
max_ammo = 100
mag_type = MAGAZINE
multiple_sprites = 1
matter = list(DEFAULT_WALL_MATERIAL = 8000)
ammo_type = /obj/item/ammo_casing/simple/medium
/obj/item/ammo_magazine/medium_box/empty
initial_ammo = 0
/obj/item/ammo_magazine/medium_box/rubber
name = "medium ammo magazine box (rubber)"
ammo_type = /obj/item/ammo_casing/simple/medium/rubber
/obj/item/ammo_magazine/medium_box/practice
name = "medium ammo magazine box (practice)"
ammo_type = /obj/item/ammo_casing/simple/medium/practice
/obj/item/ammo_magazine/medium_box/ap
name = "medium ammo magazine box (AP)"
ammo_type = /obj/item/ammo_casing/simple/medium/ap
/obj/item/ammo_magazine/medium_box/hp
name = "medium ammo magazine box (HP)"
ammo_type = /obj/item/ammo_casing/simple/medium/hp
//Large magazine
/obj/item/ammo_magazine/large
name = "large ammo magazine"
icon = 'icons/obj/ammo_ch.dmi'
caliber = "large"
icon_state = "awp"
max_ammo = 7
mag_type = MAGAZINE
multiple_sprites = 1
matter = list(DEFAULT_WALL_MATERIAL = 2400)
ammo_type = /obj/item/ammo_casing/simple/large
/obj/item/ammo_magazine/large/empty
initial_ammo = 0
/obj/item/ammo_magazine/large/practice
name = "large ammo magazine (practice)"
ammo_type = /obj/item/ammo_casing/simple/large/practice
/obj/item/ammo_magazine/large/ap
name = "large ammo magazine (AP)"
ammo_type = /obj/item/ammo_casing/simple/large/ap
/obj/item/ammo_magazine/large/hp
name = "large ammo magazine (HP)"
ammo_type = /obj/item/ammo_casing/simple/large/hp
//Large magazine box
/obj/item/ammo_magazine/large_box
name = "large ammo magazine box"
icon = 'icons/obj/ammo_ch.dmi'
caliber = "large"
icon_state = "kordmag"
max_ammo = 100
mag_type = MAGAZINE
multiple_sprites = 1
matter = list(DEFAULT_WALL_MATERIAL = 20000)
ammo_type = /obj/item/ammo_casing/simple/large
/obj/item/ammo_magazine/large_box/empty
initial_ammo = 0
/obj/item/ammo_magazine/large_box/practice
name = "large ammo magazine box (practice)"
ammo_type = /obj/item/ammo_casing/simple/large/practice
/obj/item/ammo_magazine/large_box/ap
name = "large ammo magazine box (AP)"
ammo_type = /obj/item/ammo_casing/simple/large/ap
/obj/item/ammo_magazine/large_box/hp
name = "large ammo magazine box (HP)"
ammo_type = /obj/item/ammo_casing/simple/large/hp
//Small ammo boxes
/obj/item/ammo_magazine/ammo_box/small
name = "ammo box (small)"
desc = "A box of small rounds"
icon_state = "pistol_s"
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
matter = list(MAT_STEEL = 1800)
max_ammo = 50
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/small/practice
name = "ammo box (small practice)"
desc = "A box of small practice rounds"
icon_state = "pistol_p"
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small/practice
matter = list(MAT_STEEL = 1440)
max_ammo = 50
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/small/ap
name = "ammo box (small AP)"
desc = "A box of small armor-piercing rounds"
icon_state = "pistol_ap"
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small/ap
matter = list(MAT_STEEL = 1200, MAT_PLASTEEL = 600)
max_ammo = 50
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/small/hp
name = "ammo box (small HP)"
desc = "A box of small hollow-point rounds"
icon_state = "pistol_hp"
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small/hp
matter = list(MAT_STEEL = 1440, MAT_PLASTIC = 360)
max_ammo = 50
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/small/rubber
name = "ammo box (small rubber)"
desc = "A box of small rubber rounds"
icon_state = "pistol_r"
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small/rubber
matter = list(MAT_STEEL = 1440)
max_ammo = 50
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/small/emp
name = "ammo box (small haywire)"
desc = "A box of small haywire rounds"
icon_state = "pistol_hw"
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small/emp
matter = list(MAT_STEEL = 3120, MAT_URANIUM = 2400)
max_ammo = 50
multiple_sprites = 1
//Medium ammo boxes
/obj/item/ammo_magazine/ammo_box/medium
name = "ammo box (medium)"
desc = "A box of medium rounds"
icon_state = "hrifle"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
matter = list(MAT_STEEL = 5400)
max_ammo = 30
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/medium/ap
name = "ammo box (medium AP)"
desc = "A box of medium armor-piercing rounds"
icon_state = "hrifle-ap"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium/ap
matter = list(MAT_STEEL = 8100)
max_ammo = 30
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/medium/hp
name = "ammo box (medium HP)"
desc = "A box of medium hollow-point rounds"
icon_state = "hrifle-hp"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium/hp
matter = list(MAT_STEEL = 5400)
max_ammo = 30
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/medium/practice
name = "ammo box (medium practice)"
desc = "A box of medium practice rounds"
icon_state = "hrifle_p"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium/practice
matter = list(MAT_STEEL = 2700)
max_ammo = 30
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/medium/hunter
name = "ammo box (medium hunter)"
desc = "A box of medium hunter rounds"
icon_state = "hrifle-hunter"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium/hunter
matter = list(MAT_STEEL = 5400)
max_ammo = 30
multiple_sprites = 1
/* Not fucking dealing with you right now >:(
/obj/item/ammo_magazine/ammo_box/medium/blank
name = "ammo box (medium blank)"
desc = "A box of medium blank rounds"
icon_state = "hrifle-practice"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium/blank
matter = list(MAT_STEEL = 2700)
max_ammo = 30
multiple_sprites = 1
*/
/obj/item/ammo_magazine/ammo_box/medium/large
name = "ammo box (medium)"
desc = "A steel box of medium rounds"
icon_state = "boxhrifle"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
matter = list(MAT_STEEL = 18000)
max_ammo = 100
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/medium/large/ap
name = "ammo box (medium AP)"
desc = "A steel box of medium armor-piercing rounds"
icon_state = "boxhrifle-ap"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium/ap
matter = list(MAT_STEEL = 27000)
max_ammo = 100
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/medium/large/hp
name = "ammo box (medium HP)"
desc = "A steel box of medium hollow-point rounds"
icon_state = "boxhrifle-hp"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium/hp
matter = list(MAT_STEEL = 18000)
max_ammo = 100
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/medium/large/practice
name = "ammo box (medium practice)"
desc = "A steel box of medium practice rounds"
icon_state = "boxhrifle-practice"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium/practice
matter = list(MAT_STEEL = 9000)
max_ammo = 100
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/medium/large/hunter
name = "ammo box (medium hunter)"
desc = "A steel box of medium hunter rounds"
icon_state = "boxhrifle-hunter"
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium/hunter
matter = list(MAT_STEEL = 18000)
max_ammo = 100
multiple_sprites = 1
//Large ammo boxes
/obj/item/ammo_magazine/ammo_box/large
name = "ammo box (large)"
desc = "A box of large rounds"
icon_state = "sniper"
caliber = "large"
ammo_type = /obj/item/ammo_casing/simple/large
matter = list(MAT_STEEL = 8750)
max_ammo = 25
multiple_sprites = 1
/obj/item/ammo_magazine/ammo_box/large/ap
name = "ammo box (large AP)"
matter = list(MAT_STEEL = 10000)
ammo_type = /obj/item/ammo_casing/simple/large/ap
/obj/item/ammo_magazine/ammo_box/large/hp
name = "ammo box (large HP)"
matter = list(MAT_STEEL = 10000)
ammo_type = /obj/item/ammo_casing/simple/large/hp
/obj/item/ammo_magazine/ammo_box/large/practice
name = "ammo box (large practice)"
matter = list(MAT_STEEL = 3000)
ammo_type = /obj/item/ammo_casing/simple/large/practice
//Speedloaders
/obj/item/ammo_magazine/speedloader_six
name = "speedloader (6 round)"
desc = "A speedloader for 6 round revolvers."
icon_state = "38"
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
matter = list(MAT_STEEL = 1260)
max_ammo = 6
multiple_sprites = 1
/obj/item/ammo_magazine/speedloader_six/flash
name = "speedloader (6 round flash)"
ammo_type = /obj/item/ammo_casing/simple/small/flash
/obj/item/ammo_magazine/speedloader_six/rubber
name = "speedloader (6 round rubber)"
ammo_type = /obj/item/ammo_casing/simple/small/rubber
/obj/item/ammo_magazine/speedloader_six/practice
name = "speedloader (6 round practice)"
ammo_type = /obj/item/ammo_casing/simple/small/practice
/obj/item/ammo_magazine/speedloader_six/ap
name = "speedloader (6 round AP)"
ammo_type = /obj/item/ammo_casing/simple/small/ap
/obj/item/ammo_magazine/speedloader_six/hp
name = "speedloader (6 round HP)"
ammo_type = /obj/item/ammo_casing/simple/small/hp
/obj/item/ammo_magazine/speedloader_six/emp
name = "speedloader (6 round EMP)"
ammo_type = /obj/item/ammo_casing/simple/small/emp
/obj/item/ammo_magazine/speedloader_eight
name = "speedloader (8 round)"
desc = "A speedloader for 8 round revolvers."
icon_state = "38"
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
matter = list(MAT_STEEL = 1260)
max_ammo = 8
multiple_sprites = 1
/obj/item/ammo_magazine/speedloader_eight/flash
name = "speedloader (8 round flash)"
ammo_type = /obj/item/ammo_casing/simple/small/flash
/obj/item/ammo_magazine/speedloader_eight/rubber
name = "speedloader (8 round rubber)"
ammo_type = /obj/item/ammo_casing/simple/small/rubber
/obj/item/ammo_magazine/speedloader_eight/practice
name = "speedloader (8 round practice)"
ammo_type = /obj/item/ammo_casing/simple/small/practice
/obj/item/ammo_magazine/speedloader_eight/ap
name = "speedloader (8 round AP)"
ammo_type = /obj/item/ammo_casing/simple/small/ap
/obj/item/ammo_magazine/speedloader_eight/hp
name = "speedloader (8 round HP)"
ammo_type = /obj/item/ammo_casing/simple/small/hp
/obj/item/ammo_magazine/speedloader_eight/emp
name = "speedloader (8 round EMP)"
ammo_type = /obj/item/ammo_casing/simple/small/emp

View File

@@ -0,0 +1,179 @@
/*
Leave this unticked by default. This was used to generate ammo_overrides.dm
*/
/obj/item/ammo_magazine/pistol
/obj/item/ammo_magazine/smg
/obj/item/ammo_magazine/smg_drum
/obj/item/ammo_magazine/medium
/obj/item/ammo_magazine/medium_drum
/obj/item/ammo_magazine/clip/medium
/obj/item/ammo_magazine/medium_box
/obj/item/ammo_magazine/large
/obj/item/ammo_magazine/large_box
/obj/item/ammo_magazine/pistol/rubber
/obj/item/ammo_magazine/pistol/flash
/obj/item/ammo_magazine/pistol/large
/obj/item/ammo_magazine/pistol/large/hp
/obj/item/ammo_magazine/smg/rubber
/obj/item/ammo_casing/simple/small
/obj/item/ammo_casing/simple/medium
/obj/item/ammo_casing/simple/large
/proc/output_all_ammo_types()
var/list/types = typesof(/obj/item/ammo_casing)
var/listof = list()
for(var/type in types)
var/obj/item/ammo_casing/casing = new type(null)
listof |= casing.caliber
qdel(casing)
var/output = ""
for(var/caliber in listof)
output += caliber + "\n"
rustg_file_write(output, "data/calibers.txt")
types = typesof(/obj/item/weapon/gun/projectile)
var/list/magtypes = list()
var/list/startmags = list()
for(var/type in types)
var/obj/item/weapon/gun/projectile/wep = new type(null)
magtypes |= wep.allowed_magazines
startmags |= wep.magazine_type
qdel(wep)
output = ""
for(var/type in magtypes)
output += "[type]\n"
output += "\n\n"
startmags -= magtypes
for(var/type in startmags)
output += "[type]\n"
output += "\n\n"
var/allmags = typesof(/obj/item/ammo_magazine)
allmags -= startmags
allmags -= magtypes
var/secondaryoutput = ""
for(var/type in allmags)
var/temp = type::parent_type
var/tryget = magazine_overrides[type]
if(tryget)
//output += "[type] = [tryget],\n"
continue
tryget = magazine_overrides[temp]
if(tryget)
var/leng = length("[temp]")
var/extra = copytext("[type]",leng+1)
output += "[type] = [tryget][extra],\n"
continue
secondaryoutput += "[type]\n"
output += "\n\n"
output += secondaryoutput
rustg_file_write(output, "data/magazines.txt")
/proc/override_gen()
var/list/types = typesof(/obj/item/weapon/gun/projectile)
var/list/casing_overrides = list(
"small" = /obj/item/ammo_casing/simple/small,
"medium" = /obj/item/ammo_casing/simple/medium,
"large" = /obj/item/ammo_casing/simple/large,
)
var/list/small_calibers = list(".380", "7.62x25mm", "9x18mm", ".45 LC", "9mm", ".45", "10mm", ".357", ".38", ".44")
var/list/medium_calibers = list("5mm caseless", "7.62x54mmR", "7.92x33mm", "9.5x40mm", "7.62x39mm", "5.56x45mm", "7.62mm", "5.45mm", "9x39mm", "mauser", ".48")
var/list/large_calibers = list(".338", ".50 BMG", "12.7x108mm", "14.5mm")
var/list/override_calibers = small_calibers + medium_calibers + large_calibers
var/output_small = ""
var/output_medium = ""
var/output_large = ""
for(var/type in types)
var/output = ""
var/obj/item/weapon/gun/projectile/wep = new type(null)
if(!(wep.caliber in override_calibers))
qdel(wep)
continue
output += "[type]\n"
var/new_caliber = "small"
var/new_caliber_num = 1
if(wep.caliber in medium_calibers)
new_caliber = "medium"
new_caliber_num = 2
if(wep.caliber in large_calibers)
new_caliber = "large"
new_caliber_num = 3
output += "\tcaliber = \"[new_caliber]\"\n"
if(!LAZYLEN(wep.allowed_magazines))
var/new_casing = casing_overrides[new_caliber]
output += "\tammo_type = [new_casing]\n"
var/old_casing = wep.ammo_type
if(!ispath(old_casing))
continue
var/obj/item/ammo_casing/casing = new old_casing(null)
var/projectile = casing.projectile_type
qdel(casing)
output += "\tprojectile_type = [projectile]\n"
output += "\n"
switch(new_caliber_num)
if(1)
output_small += output
if(2)
output_medium += output
if(3)
output_large += output
qdel(wep)
continue
var/base_magazine = wep.allowed_magazines[1]
var/obj/item/ammo_magazine/mag = new base_magazine(null)
var/ammo_type = mag.ammo_type
qdel(mag)
var/obj/item/ammo_casing/ammo = new ammo_type(null)
var/projectile_type = ammo.projectile_type
qdel(ammo)
output += "\tprojectile_type = [projectile_type]\n"
var/mag_list = "list("
for(var/allowed_mag in wep.allowed_magazines)
var/converted_mag = magazine_overrides[allowed_mag]
if(converted_mag) mag_list += "[converted_mag],"
mag_list = copytext(mag_list,1,-1)
mag_list += ")"
output += "\tallowed_magazines = [mag_list]\n"
var/start_mag = wep.magazine_type
var/start_mag_converted = magazine_overrides[start_mag]
output += "\tmagazine_type = [start_mag_converted]\n"
output += "\n"
switch(new_caliber_num)
if(1)
output_small += output
if(2)
output_medium += output
if(3)
output_large += output
qdel(wep)
var/output = ""
output += "/*\n\nSmall Weapons\n\n*/\n\n\n\n"
output += output_small
output += "\n\n/*\n\nMedium Weapons\n\n*/\n\n\n\n"
output += output_medium
output += "\n\n/*\n\nLarge Weapons\n\n*/\n\n\n\n"
output += output_large
rustg_file_write(output,"data/ammo_overrides.dm")
/world/New()
. = ..()
output_all_ammo_types()
//override_gen()

View File

@@ -0,0 +1,839 @@
/*
Small Weapons
*/
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/lever/repeater
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/lever/brushgun
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/lever/trailgun
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/revolver
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/revolver/lemat
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a38
/obj/item/weapon/gun/projectile/revolver/stainless
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/revolver/detective
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a38
/obj/item/weapon/gun/projectile/revolver/detective45
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/pistol/rubber
/obj/item/weapon/gun/projectile/revolver/lombardi
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/revolver/lombardi/panther
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/revolver/lombardi/gold
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/revolver/cappeacekeeper
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/pistol/strong
/obj/item/weapon/gun/projectile/revolver/mateba
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/revolver/deckard
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a38
/obj/item/weapon/gun/projectile/revolver/deckard/emp
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/ion/small
/obj/item/weapon/gun/projectile/revolver/webley
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/pistol/strong
/obj/item/weapon/gun/projectile/revolver/consul
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/pistol/rubber/strong
/obj/item/weapon/gun/projectile/revolver/nova
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/revolver/cerberus
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/revolver/nagant
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/revolver/nagant/skinned
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/revolver/saa
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/rifle/a45lc
/obj/item/weapon/gun/projectile/pistol
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/pistol/flash
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol/flash
/obj/item/weapon/gun/projectile/automatic/advanced_smg
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/smg,/obj/item/ammo_magazine/pistol)
magazine_type = /obj/item/ammo_magazine/smg/empty
/obj/item/weapon/gun/projectile/automatic/advanced_smg/loaded
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/smg,/obj/item/ammo_magazine/pistol)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/pdw
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/wt550
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg/rubber
/obj/item/weapon/gun/projectile/automatic/wt550/lethal
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/mini_uzi
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/tommygun
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/smg,/obj/item/ammo_magazine/smg_drum)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/combatsmg
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/c20r
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/c20r/rubber
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg/rubber
/obj/item/weapon/gun/projectile/automatic/c20r/empty
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg/empty
/obj/item/weapon/gun/projectile/automatic/sol
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/automatic/glock
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/automatic/cballistic
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/pistol
/obj/item/weapon/gun/projectile/automatic/cballistic/mp5a5
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/serdy
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/pistol
/obj/item/weapon/gun/projectile/automatic/serdy/ppsh
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a762x25
allowed_magazines = list(/obj/item/ammo_magazine/smg_drum)
magazine_type = /obj/item/ammo_magazine/smg_drum
/obj/item/weapon/gun/projectile/automatic/serdy/mp5
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/serdy/pitchgun
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/strong
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/serdy/vityaz
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/serdy/vityazb
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/smg)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/automatic/serdy/ssp4_silenced
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/contender
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/contender/tacticool
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/colt
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/colt/detective
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol/rubber
/obj/item/weapon/gun/projectile/sec
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol/rubber
/obj/item/weapon/gun/projectile/sec/flash
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol/flash
/obj/item/weapon/gun/projectile/sec/wood
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol/rubber
/obj/item/weapon/gun/projectile/silenced
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/silenced/empty
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol/empty
/obj/item/weapon/gun/projectile/deagle
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/strong
allowed_magazines = list(/obj/item/ammo_magazine/pistol)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/aps
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/derringer
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/a357
/obj/item/weapon/gun/projectile/luger
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/p92x
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/p92x/rubber
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol/rubber
/obj/item/weapon/gun/projectile/p92x/large
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol_large
/obj/item/weapon/gun/projectile/p92x/large/preban
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol_large
/obj/item/weapon/gun/projectile/p92x/large/preban/hp
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol_large/hp
/obj/item/weapon/gun/projectile/giskard
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/makarov
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/n99
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/ecureuil
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/ecureuil/tac
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/ecureuil/tac2
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/lamia
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/strong
allowed_magazines = list(/obj/item/ammo_magazine/pistol)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/ppk
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/m2024
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/pistol)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/fluff/m1911
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/revolvingrifle
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/rifle/a44rifle
/obj/item/weapon/gun/projectile/revolvingrifle/vintage
caliber = "small"
ammo_type = /obj/item/ammo_casing/simple/small
projectile_type = /obj/item/projectile/bullet/rifle/a44rifle
/obj/item/weapon/gun/projectile/serdy_pistols/ssp4
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/serdy_pistols/makarov
caliber = "small"
projectile_type = /obj/item/projectile/bullet/a9x18
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/serdy_pistols/vp70m
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/smg
/obj/item/weapon/gun/projectile/serdy_pistols/glock71
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/pistol,/obj/item/ammo_magazine/pistol_large)
magazine_type = /obj/item/ammo_magazine/pistol_large
/obj/item/weapon/gun/projectile/serdy_pistols/tp23s
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/strong
allowed_magazines = list(/obj/item/ammo_magazine/pistol)
magazine_type = /obj/item/ammo_magazine/pistol
/obj/item/weapon/gun/projectile/serdy_pistols/tp23
caliber = "small"
projectile_type = /obj/item/projectile/bullet/pistol/medium
allowed_magazines = list(/obj/item/ammo_magazine/pistol)
magazine_type = /obj/item/ammo_magazine/pistol/rubber
/*
Medium Weapons
*/
/obj/item/weapon/gun/projectile/shotgun/pump/rifle
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/practice
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/practice
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/moistnugget
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/ceremonial
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/blank
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/scoped
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/vox_hunting
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/lever
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/lever/vintage
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/shotgun/pump/surplus
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/automatic/sts35
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a545
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/z8
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium_small
/obj/item/weapon/gun/projectile/automatic/z8/empty
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium/empty
/obj/item/weapon/gun/projectile/automatic/l6_saw
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a545
allowed_magazines = list(/obj/item/ammo_magazine/medium_box,/obj/item/ammo_magazine/medium)
magazine_type = /obj/item/ammo_magazine/medium_box
/obj/item/weapon/gun/projectile/automatic/bullpup
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/fal
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium_small
/obj/item/weapon/gun/projectile/automatic/battlerifle
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a95
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/stg
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/mg42
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762/lmg
allowed_magazines = list(/obj/item/ammo_magazine/medium_box)
magazine_type = /obj/item/ammo_magazine/medium_box
/obj/item/weapon/gun/projectile/automatic/serdy/asval
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a9x39
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/krinkov
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762x39
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/akm
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762x39
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/scrapak
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762x39
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/ak74
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a545
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/ak74/variantu
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a545
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/ak74/variantun
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a545
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/ak74/variantm
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a545
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/hunter
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium_small/hunter
/obj/item/weapon/gun/projectile/automatic/serdy/m16a2
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a556
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/m4a1
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a556
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/patriot
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a556
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium_drum
/obj/item/weapon/gun/projectile/automatic/serdy/ar10
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/fal
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium_small
/obj/item/weapon/gun/projectile/automatic/serdy/keltec
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a556
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/keltec/survival
desc = "A snazzy survival rifle, small enough to fit into a backpack. Despite it's odd shape, it's pretty comfortable in the hands. This one is OD green. Additionally, it can only accept low capacity magazines."
allowed_magazines = list(/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium_small
/obj/item/weapon/gun/projectile/automatic/serdy/sks
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/rifle/a762x39
/obj/item/weapon/gun/projectile/automatic/serdy/mosin
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/automatic/serdy/mosin/scoped
caliber = "medium"
ammo_type = /obj/item/ammo_casing/simple/medium
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/weapon/gun/projectile/automatic/serdy/type901
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/type901/carbine
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/memegun
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762x39
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/tkb408
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762x39
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/groza
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762x39
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/plamya
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a9x39
allowed_magazines = list(/obj/item/ammo_magazine/medium_drum)
magazine_type = /obj/item/ammo_magazine/medium_drum
/obj/item/weapon/gun/projectile/automatic/serdy/molniya
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium_box)
magazine_type = /obj/item/ammo_magazine/medium_box
/obj/item/weapon/gun/projectile/automatic/serdy/pkm
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium_box)
magazine_type = /obj/item/ammo_magazine/medium_box
/obj/item/weapon/gun/projectile/automatic/serdy/rpd
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762x39
allowed_magazines = list(/obj/item/ammo_magazine/medium_box)
magazine_type = /obj/item/ammo_magazine/medium_box
/obj/item/weapon/gun/projectile/automatic/serdy/rpk
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762x39
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_drum)
magazine_type = /obj/item/ammo_magazine/medium_drum
/obj/item/weapon/gun/projectile/automatic/serdy/sr25c
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/altevian
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/sam48
allowed_magazines = list(/obj/item/ammo_magazine/clip/medium)
magazine_type = /obj/item/ammo_magazine/clip/medium
/obj/item/weapon/gun/projectile/caseless/prototype
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium/empty
/obj/item/weapon/gun/projectile/caseless/prototype/loaded
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/pistol
allowed_magazines = list(/obj/item/ammo_magazine/medium,/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/garand
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/clip/medium)
magazine_type = /obj/item/ammo_magazine/clip/medium
/obj/item/weapon/gun/projectile/SVD
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium_small)
magazine_type = /obj/item/ammo_magazine/medium_small
/obj/item/weapon/gun/projectile/automatic/serdy/m41ab
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium)
magazine_type = /obj/item/ammo_magazine/medium
/obj/item/weapon/gun/projectile/automatic/serdy/m41a
caliber = "medium"
projectile_type = /obj/item/projectile/bullet/rifle/a762
allowed_magazines = list(/obj/item/ammo_magazine/medium)
magazine_type = /obj/item/ammo_magazine/medium
/*
Large Weapons
*/
/obj/item/weapon/gun/projectile/heavysniper
caliber = "large"
ammo_type = /obj/item/ammo_casing/simple/large
projectile_type = /obj/item/projectile/bullet/rifle/a145
/obj/item/weapon/gun/projectile/heavysniper/collapsible
caliber = "large"
ammo_type = /obj/item/ammo_casing/simple/large
projectile_type = /obj/item/projectile/bullet/rifle/a145
/obj/item/weapon/gun/projectile/revolver/slab
caliber = "large"
ammo_type = /obj/item/ammo_casing/simple/large
projectile_type = /obj/item/projectile/bullet/rifle/a145
/obj/item/weapon/gun/projectile/automatic/serdy/awp
caliber = "large"
projectile_type = /obj/item/projectile/bullet/rifle/a338
allowed_magazines = list(/obj/item/ammo_magazine/large)
magazine_type = /obj/item/ammo_magazine/large
/obj/item/weapon/gun/projectile/automatic/serdy/hectate
caliber = "large"
projectile_type = /obj/item/projectile/bullet/rifle/a145
allowed_magazines = list(/obj/item/ammo_magazine/large)
magazine_type = /obj/item/ammo_magazine/large
/obj/item/weapon/gun/projectile/automatic/serdy/kord
caliber = "large"
projectile_type = /obj/item/projectile/bullet/rifle/a127x108
allowed_magazines = list(/obj/item/ammo_magazine/large_box)
magazine_type = /obj/item/ammo_magazine/large_box

View File

@@ -0,0 +1,132 @@
// Projectile.
/obj/item/projectile/simple_bullet
name = "Simple bullet!"
desc = "You shouldn't be able to read this!"
var/ammo_flags = 0
/obj/item/projectile/simple_bullet/launch_from_gun(atom/target, target_zone, mob/user, params, angle_override, forced_spread, obj/item/weapon/gun/launcher)
//We aren't actually going to launch! We're just a convenient placeholder. Spawn whatever projectile type the gun uses!
var/obj/item/projectile/projectile_type_real = launcher.projectile_type
var/damage = projectile_type_real::damage
if(ammo_flags & AMMO_FLAG_FLASH)
projectile_type_real = /obj/item/projectile/energy/flash
if(damage >= /obj/item/projectile/bullet/a357::damage) //Dynamic for if damage values change around. A .357 or anything stronger would produce a strong flash.
projectile_type_real = /obj/item/projectile/energy/flash/strong
var/obj/item/projectile/P = new projectile_type_real(src.loc)
qdel(src)
return P.launch_from_gun(target, target_zone, user, params, angle_override, forced_spread, launcher)
if(ammo_flags & AMMO_FLAG_AP)
var/obj/item/projectile/P = new projectile_type_real(src.loc)
P.damage = round(P.damage * AMMO_AP_DAMAGE_MULT) //damage reduction so AP isn't flat out better than normal
var/new_armor_piercing = AMMO_ARMORPEN_SMALL
if(ammo_flags & AMMO_FLAG_MEDIUM)
new_armor_piercing = AMMO_ARMORPEN_MEDIUM
if(ammo_flags & AMMO_FLAG_LARGE)
new_armor_piercing = AMMO_ARMORPEN_LARGE
P.armor_penetration = new_armor_piercing
qdel(src)
return P.launch_from_gun(target, target_zone, user, params, angle_override, forced_spread, launcher)
if(ammo_flags & AMMO_FLAG_HP)
var/obj/item/projectile/P = new projectile_type_real(src.loc)
P.damage = round(P.damage * AMMO_HP_DAMAGE_MULT) //damage increase for HP
P.armor_penetration = AMMO_HP_ARMORPEN
qdel(src)
return P.launch_from_gun(target, target_zone, user, params, angle_override, forced_spread, launcher)
if(ammo_flags & AMMO_FLAG_RUBBER)
var/obj/item/projectile/P = new projectile_type_real(src.loc)
P.agony = round(P.damage * AMMO_RUBBER_AGONY_MULT) //In exchange for agony proportional to damage
P.damage = round(P.damage * AMMO_RUBBER_DAMAGE_MULT) //Severely reduced damage
qdel(src)
return P.launch_from_gun(target, target_zone, user, params, angle_override, forced_spread, launcher)
if(ammo_flags & AMMO_FLAG_HUNTER)
var/obj/item/projectile/P = new projectile_type_real(src.loc)
P.SA_bonus_damage = round(P.damage * AMMO_HUNTER_SA_DAMAGE_MULT) //In exchange for SA damage
P.damage = round(P.damage * AMMO_HUNTER_DAMAGE_MULT) //Severely reduced damage
qdel(src)
return P.launch_from_gun(target, target_zone, user, params, angle_override, forced_spread, launcher)
if(ammo_flags & AMMO_FLAG_EMP) //Apparently EMP pistol rounds are a fucking thing. Cool.
projectile_type_real = /obj/item/projectile/ion/small
var/obj/item/projectile/P = new projectile_type_real(src.loc)
qdel(src)
return P.launch_from_gun(target, target_zone, user, params, angle_override, forced_spread, launcher)
//If we're still going, there's no special flags to apply, so just launch the correct projectile and qdel us
var/obj/item/projectile/P = new projectile_type_real(src.loc)
qdel(src)
return P.launch_from_gun(target, target_zone, user, params, angle_override, forced_spread, launcher)
//Casings
/obj/item/ammo_casing/simple
projectile_type = /obj/item/projectile/simple_bullet
var/ammo_flags = 0
/obj/item/ammo_casing/simple/New()
..()
var/obj/item/projectile/simple_bullet/P = BB
if(istype(P))
P.ammo_flags = ammo_flags
/obj/item/ammo_casing/simple/small
desc = "A small bullet casing, probably fit for a pistol or SMG"
caliber = "small"
matter = list(MAT_STEEL = 75)
/obj/item/ammo_casing/simple/medium
desc = "A medium bullet casing, probably fit for a rifle"
caliber = "medium"
icon_state = "rifle-casing"
projectile_type = /obj/item/projectile/bullet/rifle/a545
matter = list(MAT_STEEL = 180)
ammo_flags = AMMO_FLAG_MEDIUM
/obj/item/ammo_casing/simple/large
desc = "A large bullet casing, probably fit for a sniper."
icon_state = "lcasing"
caliber = "large"
projectile_type = /obj/item/projectile/bullet/rifle/a338
matter = list(MAT_STEEL = 800)
ammo_flags = AMMO_FLAG_LARGE
//Casings with modifiers
/obj/item/ammo_casing/simple/small/flash
ammo_flags = AMMO_FLAG_FLASH
/obj/item/ammo_casing/simple/small/rubber
ammo_flags = AMMO_FLAG_RUBBER
/obj/item/ammo_casing/simple/small/ap
ammo_flags = AMMO_FLAG_AP
/obj/item/ammo_casing/simple/small/hp
ammo_flags = AMMO_FLAG_HP
/obj/item/ammo_casing/simple/small/practice
ammo_flags = AMMO_FLAG_PRACTICE
/obj/item/ammo_casing/simple/small/emp
ammo_flags = AMMO_FLAG_EMP
/obj/item/ammo_casing/simple/medium/rubber
ammo_flags = AMMO_FLAG_RUBBER | AMMO_FLAG_MEDIUM
/obj/item/ammo_casing/simple/medium/ap
ammo_flags = AMMO_FLAG_AP | AMMO_FLAG_MEDIUM
/obj/item/ammo_casing/simple/medium/hp
ammo_flags = AMMO_FLAG_HP | AMMO_FLAG_MEDIUM
/obj/item/ammo_casing/simple/medium/practice
ammo_flags = AMMO_FLAG_PRACTICE | AMMO_FLAG_MEDIUM
/obj/item/ammo_casing/simple/medium/hunter
ammo_flags = AMMO_FLAG_HUNTER | AMMO_FLAG_MEDIUM
/obj/item/ammo_casing/simple/large/ap
ammo_flags = AMMO_FLAG_AP | AMMO_FLAG_LARGE
/obj/item/ammo_casing/simple/large/hp
ammo_flags = AMMO_FLAG_HP | AMMO_FLAG_LARGE
/obj/item/ammo_casing/simple/large/practice
ammo_flags = AMMO_FLAG_PRACTICE | AMMO_FLAG_LARGE

View File

@@ -0,0 +1,18 @@
/obj/item/weapon/gun/projectile/examine(mob/user)
. = ..()
//What types of magazine does this accept if it does accept magazines?
if(load_method & MAGAZINE)
var/magtypes = "This accepts the following magazine types: "
for(var/type in allowed_magazines)
//BYOND Fuckery cry about it
var/atom/byondeeznuts = type
var/mag_name = byondeeznuts::name
magtypes += "[mag_name], "
magtypes = copytext(magtypes, 1, -2) //Get rid of trailing command and space.
. += magtypes
/obj/item/weapon/gun/projectile/get_ammo_type()
if(caliber in list("small","medium","large"))
var/obj/item/projectile/P = src.projectile_type
return list(initial(P.hud_state), initial(P.hud_state_empty))
. = ..()

View File

@@ -447,8 +447,7 @@
#include "code\datums\sun.dm"
#include "code\datums\verb_callbacks_ch.dm"
#include "code\datums\weakrefs.dm"
#include "code\datums\autolathe\arms.dm"
#include "code\datums\autolathe\arms_vr.dm"
#include "code\datums\autolathe\arms_ch.dm"
#include "code\datums\autolathe\arms_yw.dm"
#include "code\datums\autolathe\autolathe.dm"
#include "code\datums\autolathe\devices.dm"
@@ -4682,7 +4681,6 @@
#include "modular_chomp\code\_onclick\hud\alert.dm"
#include "modular_chomp\code\ATMOSPHERICS\atmospherics.dm"
#include "modular_chomp\code\datums\http.dm"
#include "modular_chomp\code\datums\autolathe\arms.dm"
#include "modular_chomp\code\datums\autolathe\engineering_ch.dm"
#include "modular_chomp\code\datums\autolathe\general_ch.dm"
#include "modular_chomp\code\datums\changelog\changelog.dm"
@@ -4993,6 +4991,13 @@
#include "modular_chomp\code\modules\projectiles\gun.dm"
#include "modular_chomp\code\modules\projectiles\mob.dm"
#include "modular_chomp\code\modules\projectiles\projectile.dm"
#include "modular_chomp\code\modules\projectiles\ammo_refactor\_ammo_defines.dm"
#include "modular_chomp\code\modules\projectiles\ammo_refactor\ammo_autolathe.dm"
#include "modular_chomp\code\modules\projectiles\ammo_refactor\ammo_magazine_override.dm"
#include "modular_chomp\code\modules\projectiles\ammo_refactor\ammo_magazines.dm"
#include "modular_chomp\code\modules\projectiles\ammo_refactor\ammo_overrides.dm"
#include "modular_chomp\code\modules\projectiles\ammo_refactor\ammo_types.dm"
#include "modular_chomp\code\modules\projectiles\ammo_refactor\gun_overrides.dm"
#include "modular_chomp\code\modules\projectiles\clockwork\clockwork_guns_ch.dm"
#include "modular_chomp\code\modules\projectiles\guns\alts.dm"
#include "modular_chomp\code\modules\projectiles\guns\ammo.dm"