<commit_before>////////////////INTERNAL MAGAZINES//////////////////////
/obj/item/ammo_box/magazine/internal/cylinder
	name = "revolver cylinder"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/a357"
	caliber = "357"
	max_ammo = 7


/obj/item/ammo_box/magazine/internal/cylinder/ammo_count(var/countempties = 1)
	if (!countempties)
		var/boolets = 0
		for (var/i = 1, i <= stored_ammo.len, i++)
			var/obj/item/ammo_casing/bullet = stored_ammo[i]
			if (bullet.BB)
				boolets++
		return boolets
	else
		return stored_ammo.len

/obj/item/ammo_box/magazine/internal/cylinder/rus357
	name = "russian revolver cylinder"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/a357"
	caliber = "357"
	max_ammo = 6
	multiload = 0

/obj/item/ammo_box/magazine/internal/cylinder/rus357/New()
	stored_ammo += new ammo_type(src)

/obj/item/ammo_box/magazine/internal/cylinder/rev38
	name = "d-tiv revolver cylinder"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/c38"
	caliber = "38"
	max_ammo = 6

/obj/item/ammo_box/magazine/internal/shot
	name = "shotgun internal magazine"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
	caliber = "shotgun"
	max_ammo = 4
	multiload = 0

/obj/item/ammo_box/magazine/internal/shotcom
	name = "combat shotgun internal magazine"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/shotgun/buckshot"
	caliber = "shotgun"
	max_ammo = 8
	multiload = 0

/obj/item/ammo_box/magazine/internal/cylinder/dualshot
	name = "double-barrel shotgun internal magazine"
	desc = "This doesn't even exist"
	ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
	caliber = "shotgun"
	max_ammo = 2
	multiload = 0

/obj/item/ammo_box/magazine/internal/cylinder/improvised
	name = "improvised shotgun internal magazine"
	desc = "This doesn't even exist"
	ammo_type = "/obj/item/ammo_casing/shotgun/improvised"
	caliber = "shotgun"
	max_ammo = 1
	multiload = 0

/obj/item/ammo_box/magazine/internal/shotriot
	name = "riot shotgun internal magazine"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/shotgun/rubbershot"
	caliber = "shotgun"
	max_ammo = 6
	multiload = 0

/obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher
	name = "grenade launcher internal magazine"
	ammo_type = "/obj/item/ammo_casing/a40mm"
	caliber = "40mm"
	max_ammo = 1

/obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher/multi
	ammo_type = "/obj/item/ammo_casing/a40mm"
	max_ammo = 6

/obj/item/ammo_box/magazine/internal/boltaction
	name = "bolt action rifle internal magazine"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/a762"
	caliber = "a762"
	max_ammo = 5
	multiload = 1

///////////EXTERNAL MAGAZINES////////////////

/obj/item/ammo_box/magazine/m10mm
	name = "pistol magazine (10mm)"
	icon_state = "9x19p"
	origin_tech = "combat=2"
	ammo_type = "/obj/item/ammo_casing/c10mm"
	caliber = "10mm"
	max_ammo = 8
	multiple_sprites = 2

/obj/item/ammo_box/magazine/m45
	name = "handgun magazine (.45)"
	icon_state = "45"
	ammo_type = "/obj/item/ammo_casing/c45"
	caliber = ".45"
	max_ammo = 8

/obj/item/ammo_box/magazine/m45/update_icon()
	..()
	icon_state = "[initial(icon_state)]-[ammo_count() ? "8" : "0"]"

/obj/item/ammo_box/magazine/uzim9mm
	name = "uzi magazine (9mm)"
	icon_state = "uzi9mm-32"
	ammo_type = /obj/item/ammo_casing/c9mm
	caliber = "9mm"
	max_ammo = 32

/obj/item/ammo_box/magazine/uzim9mm/update_icon()
	..()
	icon_state = "uzi9mm-[round(ammo_count(),4)]"

/obj/item/ammo_box/magazine/smgm9mm
	name = "SMG magazine (9mm)"
	icon_state = "smg9mm"
	ammo_type = "/obj/item/ammo_casing/c9mm"
	caliber = "9mm"
	max_ammo = 42
	materials = list(MAT_METAL = 2000)

/obj/item/ammo_box/magazine/smgm9mm/ap
	name = "SMG magazine (Armour Piercing 9mm)"
	ammo_type = /obj/item/ammo_casing/c9mmap
	materials = list(MAT_METAL = 3000)

/obj/item/ammo_box/magazine/smgm9mm/toxin
	name = "SMG magazine (Toxin Tipped 9mm)"
	ammo_type = /obj/item/ammo_casing/c9mmtox
	materials = list(MAT_METAL = 3000)

/obj/item/ammo_box/magazine/smgm9mm/fire
	name = "SMG Magazine (Incendiary 9mm)"
	ammo_type = /obj/item/ammo_casing/c9mminc
	materials = list(MAT_METAL = 3000)

/obj/item/ammo_box/magazine/smgm9mm/update_icon()
	..()
	icon_state = "[initial(icon_state)]-[round(ammo_count(),6)]"

/obj/item/ammo_box/magazine/smgm45
	name = "SMG magazine (.45)"
	icon_state = "c20r45"
	origin_tech = "combat=2"
	ammo_type = "/obj/item/ammo_casing/c45"
	caliber = ".45"
	max_ammo = 20

/obj/item/ammo_box/magazine/smgm45/update_icon()<commit_msg>ammo tweak<commit_after>////////////////INTERNAL MAGAZINES//////////////////////
/obj/item/ammo_box/magazine/internal/cylinder
	name = "revolver cylinder"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/a357"
	caliber = "357"
	max_ammo = 7


/obj/item/ammo_box/magazine/internal/cylinder/ammo_count(var/countempties = 1)
	if (!countempties)
		var/boolets = 0
		for (var/i = 1, i <= stored_ammo.len, i++)
			var/obj/item/ammo_casing/bullet = stored_ammo[i]
			if (bullet.BB)
				boolets++
		return boolets
	else
		return stored_ammo.len

/obj/item/ammo_box/magazine/internal/cylinder/rus357
	name = "russian revolver cylinder"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/a357"
	caliber = "357"
	max_ammo = 6
	multiload = 0

/obj/item/ammo_box/magazine/internal/cylinder/rus357/New()
	stored_ammo += new ammo_type(src)

/obj/item/ammo_box/magazine/internal/cylinder/rev38
	name = "d-tiv revolver cylinder"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/c38"
	caliber = "38"
	max_ammo = 6

/obj/item/ammo_box/magazine/internal/shot
	name = "shotgun internal magazine"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
	caliber = "shotgun"
	max_ammo = 4
	multiload = 0

/obj/item/ammo_box/magazine/internal/shotcom
	name = "combat shotgun internal magazine"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/shotgun/buckshot"
	caliber = "shotgun"
	max_ammo = 8
	multiload = 0

/obj/item/ammo_box/magazine/internal/cylinder/dualshot
	name = "double-barrel shotgun internal magazine"
	desc = "This doesn't even exist"
	ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
	caliber = "shotgun"
	max_ammo = 2
	multiload = 0

/obj/item/ammo_box/magazine/internal/cylinder/improvised
	name = "improvised shotgun internal magazine"
	desc = "This doesn't even exist"
	ammo_type = "/obj/item/ammo_casing/shotgun/improvised"
	caliber = "shotgun"
	max_ammo = 1
	multiload = 0

/obj/item/ammo_box/magazine/internal/shotriot
	name = "riot shotgun internal magazine"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/shotgun/rubbershot"
	caliber = "shotgun"
	max_ammo = 6
	multiload = 0

/obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher
	name = "grenade launcher internal magazine"
	ammo_type = "/obj/item/ammo_casing/a40mm"
	caliber = "40mm"
	max_ammo = 1

/obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher/multi
	ammo_type = "/obj/item/ammo_casing/a40mm"
	max_ammo = 6

/obj/item/ammo_box/magazine/internal/boltaction
	name = "bolt action rifle internal magazine"
	desc = "Oh god, this shouldn't be here"
	ammo_type = "/obj/item/ammo_casing/a762"
	caliber = "a762"
	max_ammo = 5
	multiload = 1

///////////EXTERNAL MAGAZINES////////////////

/obj/item/ammo_box/magazine/m10mm
	name = "pistol magazine (10mm)"
	icon_state = "9x19p"
	origin_tech = "combat=2"
	ammo_type = "/obj/item/ammo_casing/c10mm"
	caliber = "10mm"
	max_ammo = 8
	multiple_sprites = 2

/obj/item/ammo_box/magazine/m45
	name = "handgun magazine (.45)"
	icon_state = "45"
	ammo_type = "/obj/item/ammo_casing/c45"
	caliber = ".45"
	max_ammo = 8

/obj/item/ammo_box/magazine/m45/update_icon()
	..()
	icon_state = "[initial(icon_state)]-[ammo_count() ? "8" : "0"]"

/obj/item/ammo_box/magazine/uzim9mm
	name = "uzi magazine (9mm)"
	icon_state = "uzi9mm-32"
	ammo_type = /obj/item/ammo_casing/c9mm
	caliber = "9mm"
	max_ammo = 32

/obj/item/ammo_box/magazine/uzim9mm/update_icon()
	..()
	icon_state = "uzi9mm-[round(ammo_count(),4)]"

/obj/item/ammo_box/magazine/smgm9mm
	name = "SMG magazine (9mm)"
	icon_state = "smg9mm"
	ammo_type = "/obj/item/ammo_casing/c9mm"
	caliber = "9mm"
	max_ammo = 30
	materials = list(MAT_METAL = 2000)

/obj/item/ammo_box/magazine/smgm9mm/ap
	name = "SMG magazine (Armour Piercing 9mm)"
	ammo_type = /obj/item/ammo_casing/c9mmap
	materials = list(MAT_METAL = 3000)

/obj/item/ammo_box/magazine/smgm9mm/toxin
	name = "SMG magazine (Toxin Tipped 9mm)"
	ammo_type = /obj/item/ammo_casing/c9mmtox
	materials = list(MAT_METAL = 3000)

/obj/item/ammo_box/magazine/smgm9mm/fire
	name = "SMG Magazine (Incendiary 9mm)"
	ammo_type = /obj/item/ammo_casing/c9mminc
	materials = list(MAT_METAL = 3000)

/obj/item/ammo_box/magazine/smgm9mm/update_icon()
	..()
	icon_state = "[initial(icon_state)]-[round(ammo_count(),6)]"

/obj/item/ammo_box/magazine/smgm45
	name = "SMG magazine (.45)"
	icon_state = "c20r45"
	origin_tech = "combat=2"
	ammo_type = "/obj/item/ammo_casing/c45"
	caliber = ".45"
	max_ammo = 20

/obj/item/ammo_box/magazine/smgm45/update_icon()
{'fraction_non_alphanumeric': 0.14746146383529157, 'fraction_numerical': 0.03212245337932521, 'mean_word_length': 3.9614973262032085, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2759989', 'n_tokens_mistral': 4274, 'n_tokens_neox': 3968, 'n_words': 690}