Merge pull request #5501 from Anewbe/magazine_things

Adds smart magazine, magazine functionality
This commit is contained in:
Atermonera
2018-08-24 14:35:55 -07:00
committed by GitHub
13 changed files with 348 additions and 75 deletions

View File

@@ -41,6 +41,7 @@
loaded += new ammo_type(src)
if(ispath(magazine_type) && (load_method & MAGAZINE))
ammo_magazine = new magazine_type(src)
allowed_magazines += /obj/item/ammo_magazine/smart
update_icon()
/obj/item/weapon/gun/projectile/consume_next_projectile()
@@ -50,7 +51,7 @@
if(handle_casings != HOLD_CASINGS)
loaded -= chambered
else if(ammo_magazine && ammo_magazine.stored_ammo.len)
chambered = ammo_magazine.stored_ammo[1]
chambered = ammo_magazine.stored_ammo[ammo_magazine.stored_ammo.len]
if(handle_casings != HOLD_CASINGS)
ammo_magazine.stored_ammo -= chambered

View File

@@ -15,7 +15,7 @@
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/practice // For target practice
desc = "A bolt-action rifle with a lightweight synthetic wood stock, designed for competitive shooting. Comes shipped with practice rounds pre-loaded into the gun. Popular among professional marksmen. Uses 7.62mm rounds."
ammo_type = /obj/item/ammo_casing/a762p
ammo_type = /obj/item/ammo_casing/a762/practice
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/ceremonial
name = "ceremonial bolt-action rifle"

View File

@@ -266,8 +266,8 @@
var/global/list/ammo_types = list(
/obj/item/ammo_casing/a357 = ".357",
/obj/item/ammo_casing/a9mmf = "9mm",
/obj/item/ammo_casing/a45f = ".45",
/obj/item/ammo_casing/a9mm = "9mm",
/obj/item/ammo_casing/a45 = ".45",
/obj/item/ammo_casing/a10mm = "10mm",
/obj/item/ammo_casing/a12g = "12g",
/obj/item/ammo_casing/a12g = "12g",

View File

@@ -74,7 +74,7 @@
caliber = ".45"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
fire_sound = 'sound/weapons/gunshot_heavy.ogg'
ammo_type = /obj/item/ammo_casing/a45r
ammo_type = /obj/item/ammo_casing/a45/rubber
max_shells = 7