initial commit - cross reference with 5th port - obviously has compile errors

This commit is contained in:
LetterJay
2016-07-03 02:17:19 -05:00
commit 35a1723e98
4355 changed files with 2221257 additions and 0 deletions
@@ -0,0 +1,408 @@
/obj/item/ammo_casing/a357
desc = "A .357 bullet casing."
caliber = "357"
projectile_type = /obj/item/projectile/bullet
/obj/item/ammo_casing/a762
desc = "A 7.62 bullet casing."
icon_state = "762-casing"
caliber = "a762"
projectile_type = /obj/item/projectile/bullet
/obj/item/ammo_casing/a762/enchanted
projectile_type = /obj/item/projectile/bullet/weakbullet3
/obj/item/ammo_casing/a50
desc = "A .50AE bullet casing."
caliber = ".50"
projectile_type = /obj/item/projectile/bullet
/obj/item/ammo_casing/c38
desc = "A .38 bullet casing."
caliber = "38"
projectile_type = /obj/item/projectile/bullet/weakbullet2
/obj/item/ammo_casing/c10mm
desc = "A 10mm bullet casing."
caliber = "10mm"
projectile_type = /obj/item/projectile/bullet/midbullet3
/obj/item/ammo_casing/c9mm
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/weakbullet3
/obj/item/ammo_casing/c9mmap
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type =/obj/item/projectile/bullet/armourpiercing
/obj/item/ammo_casing/c9mmtox
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/toxinbullet
/obj/item/ammo_casing/c9mminc
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/incendiary/firebullet
/obj/item/ammo_casing/c46x30mm
desc = "A 4.6x30mm bullet casing."
caliber = "4.6x30mm"
projectile_type = /obj/item/projectile/bullet/weakbullet3
/obj/item/ammo_casing/c46x30mmap
desc = "A 4.6x30mm bullet casing."
caliber = "4.6x30mm"
projectile_type =/obj/item/projectile/bullet/armourpiercing
/obj/item/ammo_casing/c46x30mmtox
desc = "A 4.6x30mm bullet casing."
caliber = "4.6x30mm"
projectile_type = /obj/item/projectile/bullet/toxinbullet
/obj/item/ammo_casing/c46x30mminc
desc = "A 4.6x30mm bullet casing."
caliber = "4.6x30mm"
projectile_type = /obj/item/projectile/bullet/incendiary/firebullet
/obj/item/ammo_casing/c45
desc = "A .45 bullet casing."
caliber = ".45"
projectile_type = /obj/item/projectile/bullet/midbullet
/obj/item/ammo_casing/c45nostamina
desc = "A .45 bullet casing."
caliber = ".45"
projectile_type = /obj/item/projectile/bullet/midbullet3
/obj/item/ammo_casing/n762
desc = "A 7.62x38mmR bullet casing."
caliber = "n762"
projectile_type = /obj/item/projectile/bullet
/obj/item/ammo_casing/a556
desc = "A 5.56mm bullet casing."
caliber = "a556"
projectile_type = /obj/item/projectile/bullet/heavybullet
/obj/item/ammo_casing/a40mm
name = "40mm HE shell"
desc = "A cased high explosive grenade that can only be activated once fired out of a grenade launcher."
caliber = "40mm"
icon_state = "40mmHE"
projectile_type = /obj/item/projectile/bullet/a40mm
/////SNIPER ROUNDS
/obj/item/ammo_casing/point50
desc = "A .50 bullet casing."
caliber = ".50"
projectile_type = /obj/item/projectile/bullet/sniper
icon_state = ".50"
/obj/item/ammo_casing/soporific
desc = "A .50 bullet casing, specialised in sending the target to sleep, instead of hell."
caliber = ".50"
projectile_type = /obj/item/projectile/bullet/sniper/soporific
icon_state = ".50"
/obj/item/ammo_casing/haemorrhage
desc = "A .50 bullet casing, specialised in causing massive bloodloss"
caliber = ".50"
projectile_type = /obj/item/projectile/bullet/sniper/haemorrhage
icon_state = ".50"
/obj/item/ammo_casing/penetrator
desc = "A .50 caliber penetrator round casing."
caliber = ".50"
projectile_type = /obj/item/projectile/bullet/sniper/penetrator
icon_state = ".50"
/// SAW ROUNDS
/obj/item/ammo_casing/mm556x45
desc = "A 556x45mm bullet casing."
icon_state = "762-casing"
caliber = "mm55645"
projectile_type = /obj/item/projectile/bullet/saw
/obj/item/ammo_casing/mm556x45/bleeding
desc = "A 556x45mm bullet casing with specialized inner-casing, that when it makes contact with a target, release tiny shrapnel to induce internal bleeding."
icon_state = "762-casing"
projectile_type = /obj/item/projectile/bullet/saw/bleeding
/obj/item/ammo_casing/mm556x45/hollow
desc = "A 556x45mm bullet casing designed to cause more damage to unarmored targets."
projectile_type = /obj/item/projectile/bullet/saw/hollow
/obj/item/ammo_casing/mm556x45/ap
desc = "A 556x45mm bullet casing designed with a hardened-tipped core to help penetrate armored targets."
projectile_type = /obj/item/projectile/bullet/saw/ap
/obj/item/ammo_casing/mm556x45/incen
desc = "A 556x45mm bullet casing designed with a chemical-filled capsule on the tip that when bursted, reacts with the atmosphere to produce a fireball, engulfing the target in flames. "
projectile_type = /obj/item/projectile/bullet/saw/incen
//SHOTGUN ROUNDS
/obj/item/ammo_casing/shotgun
name = "shotgun slug"
desc = "A 12 gauge lead slug."
icon_state = "blshell"
caliber = "shotgun"
projectile_type = /obj/item/projectile/bullet
materials = list(MAT_METAL=4000)
/obj/item/ammo_casing/shotgun/buckshot
name = "buckshot shell"
desc = "A 12 gauge buckshot shell."
icon_state = "gshell"
projectile_type = /obj/item/projectile/bullet/pellet
pellets = 6
variance = 25
/obj/item/ammo_casing/shotgun/rubbershot
name = "rubber shot"
desc = "A shotgun casing filled with densely-packed rubber balls, used to incapacitate crowds from a distance."
icon_state = "bshell"
projectile_type = /obj/item/projectile/bullet/rpellet
pellets = 6
variance = 25
materials = list(MAT_METAL=4000)
/obj/item/ammo_casing/shotgun/beanbag
name = "beanbag slug"
desc = "A weak beanbag slug for riot control."
icon_state = "bshell"
projectile_type = /obj/item/projectile/bullet/weakbullet
materials = list(MAT_METAL=250)
/obj/item/ammo_casing/shotgun/improvised
name = "improvised shell"
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards."
icon_state = "improvshell"
projectile_type = /obj/item/projectile/bullet/pellet/weak
materials = list(MAT_METAL=250)
pellets = 10
variance = 25
/obj/item/ammo_casing/shotgun/improvised/overload/
name = "overloaded improvised shell"
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards. This one has been packed with even more \
propellant. It's like playing russian roulette, with a shotgun."
icon_state = "improvshell"
projectile_type = /obj/item/projectile/bullet/pellet/overload
materials = list(MAT_METAL=250)
pellets = 4
variance = 40
/obj/item/ammo_casing/shotgun/stunslug
name = "taser slug"
desc = "A stunning taser slug."
icon_state = "stunshell"
projectile_type = /obj/item/projectile/bullet/stunshot
materials = list(MAT_METAL=250)
/obj/item/ammo_casing/shotgun/meteorshot
name = "meteorshot shell"
desc = "A shotgun shell rigged with CMC technology, which launches a massive slug when fired."
icon_state = "mshell"
projectile_type = /obj/item/projectile/bullet/meteorshot
/obj/item/ammo_casing/shotgun/breaching
name = "breaching shell"
desc = "An economic version of the meteorshot, utilizing similar technologies. Great for busting down doors."
icon_state = "mshell"
projectile_type = /obj/item/projectile/bullet/meteorshot/weak
/obj/item/ammo_casing/shotgun/pulseslug
name = "pulse slug"
desc = "A delicate device which can be loaded into a shotgun. The primer acts as a button which triggers the gain medium and fires a powerful \
energy blast. While the heat and power drain limit it to one use, it can still allow an operator to engage targets that ballistic ammunition \
would have difficulty with."
icon_state = "pshell"
projectile_type = /obj/item/projectile/beam/pulse/shot
/obj/item/ammo_casing/shotgun/incendiary
name = "incendiary slug"
desc = "An incendiary-coated shotgun slug."
icon_state = "ishell"
projectile_type = /obj/item/projectile/bullet/incendiary/shell
/obj/item/ammo_casing/shotgun/frag12
name = "FRAG-12 slug"
desc = "A high explosive breaching round for a 12 gauge shotgun."
icon_state = "heshell"
projectile_type = /obj/item/projectile/bullet/frag12
/obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
name = "dragonsbreath shell"
desc = "A shotgun shell which fires a spread of incendiary pellets."
icon_state = "ishell2"
projectile_type = /obj/item/projectile/bullet/incendiary/shell/dragonsbreath
pellets = 4
variance = 35
/obj/item/ammo_casing/shotgun/ion
name = "ion shell"
desc = "An advanced shotgun shell which uses a subspace ansible crystal to produce an effect similar to a standard ion rifle. \
The unique properties of the crystal splot the pulse into a spread of individually weaker bolts."
icon_state = "ionshell"
projectile_type = /obj/item/projectile/ion/weak
pellets = 4
variance = 35
/obj/item/ammo_casing/shotgun/laserslug
name = "laser slug"
desc = "An advanced shotgun shell that uses a micro laser to replicate the effects of a laser weapon in a ballistic package."
icon_state = "lshell"
projectile_type = /obj/item/projectile/beam/laser
/obj/item/ammo_casing/shotgun/techshell
name = "unloaded technological shell"
desc = "A high-tech shotgun shell which can be loaded with materials to produce unique effects."
icon_state = "cshell"
projectile_type = null
/obj/item/ammo_casing/shotgun/dart
name = "shotgun dart"
desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical."
icon_state = "cshell"
projectile_type = /obj/item/projectile/bullet/dart
/obj/item/ammo_casing/shotgun/dart/New()
..()
flags |= OPENCONTAINER
create_reagents(30)
reagents.set_reacting(FALSE)
/obj/item/ammo_casing/shotgun/dart/attackby()
return
/obj/item/ammo_casing/shotgun/dart/bioterror
desc = "A shotgun dart filled with deadly toxins."
/obj/item/ammo_casing/shotgun/dart/bioterror/New()
..()
reagents.add_reagent("neurotoxin", 6)
reagents.add_reagent("spore", 6)
reagents.add_reagent("mutetoxin", 6) //;HELP OPS IN MAINT
reagents.add_reagent("coniine", 6)
reagents.add_reagent("sodium_thiopental", 6)
// Caseless Ammunition
/obj/item/ammo_casing/caseless
desc = "A caseless bullet casing."
/obj/item/ammo_casing/caseless/fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, params, distro, quiet)
if (..())
loc = null
return 1
else
return 0
/obj/item/ammo_casing/caseless/update_icon()
..()
icon_state = "[initial(icon_state)]"
/obj/item/ammo_casing/caseless/a75
desc = "A .75 bullet casing."
caliber = "75"
icon_state = "s-casing-live"
projectile_type = /obj/item/projectile/bullet/gyro
/obj/item/ammo_casing/caseless/magspear
name = "magnetic spear"
desc = "A reusable spear that is typically loaded into kinetic spearguns."
projectile_type = /obj/item/projectile/bullet/reusable/magspear
caliber = "speargun"
icon_state = "magspear"
throwforce = 15 //still deadly when thrown
throw_speed = 3
/obj/item/ammo_casing/caseless/laser
name = "laser casing"
desc = "You shouldn't be seeing this."
caliber = "laser"
icon_state = "s-casing-live"
projectile_type = /obj/item/projectile/beam
fire_sound = 'sound/weapons/Laser.ogg'
/obj/item/ammo_casing/caseless/laser/gatling
projectile_type = /obj/item/projectile/beam/weak
variance = 0.8
click_cooldown_override = 1
/obj/item/ammo_casing/caseless/foam_dart
name = "foam dart"
desc = "Its nerf or nothing! Ages 8 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart
caliber = "foam_force"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart"
var/modified = 0
/obj/item/ammo_casing/caseless/foam_dart/update_icon()
..()
if (modified)
icon_state = "foamdart_empty"
desc = "Its nerf or nothing! ... Although, this one doesn't look too safe."
if(BB)
BB.icon_state = "foamdart_empty"
else
icon_state = "foamdart"
desc = "Its nerf or nothing! Ages 8 and up."
if(BB)
BB.icon_state = "foamdart_empty"
/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
..()
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if (istype(A, /obj/item/weapon/screwdriver) && !modified)
modified = 1
FD.damage_type = BRUTE
update_icon()
else if ((istype(A, /obj/item/weapon/pen)) && modified && !FD.pen)
if(!user.unEquip(A))
return
A.loc = FD
FD.pen = A
FD.damage = 5
FD.nodamage = 0
user << "<span class='notice'>You insert [A] into [src].</span>"
return
/obj/item/ammo_casing/caseless/foam_dart/attack_self(mob/living/user)
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if(FD.pen)
FD.damage = initial(FD.damage)
FD.nodamage = initial(FD.nodamage)
user.put_in_hands(FD.pen)
user << "<span class='notice'>You remove [FD.pen] from [src].</span>"
FD.pen = null
/obj/item/ammo_casing/caseless/foam_dart/riot
name = "riot foam dart"
desc = "Whose smart idea was it to use toys as crowd control? Ages 18 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/riot
icon_state = "foamdart_riot"
@@ -0,0 +1,69 @@
/obj/item/ammo_box/a357
name = "speed loader (.357)"
desc = "Designed to quickly reload revolvers."
icon_state = "357"
ammo_type = /obj/item/ammo_casing/a357
max_ammo = 7
multiple_sprites = 1
/obj/item/ammo_box/c38
name = "speed loader (.38)"
desc = "Designed to quickly reload revolvers."
icon_state = "38"
ammo_type = /obj/item/ammo_casing/c38
max_ammo = 6
multiple_sprites = 1
/obj/item/ammo_box/c9mm
name = "ammo box (9mm)"
icon_state = "9mmbox"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/c9mm
max_ammo = 30
/obj/item/ammo_box/c10mm
name = "ammo box (10mm)"
icon_state = "10mmbox"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/c10mm
max_ammo = 20
/obj/item/ammo_box/c45
name = "ammo box (.45)"
icon_state = "45box"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/c45
max_ammo = 20
/obj/item/ammo_box/a40mm
name = "ammo box (40mm grenades)"
icon_state = "40mm"
ammo_type = /obj/item/ammo_casing/a40mm
max_ammo = 4
multiple_sprites = 1
/obj/item/ammo_box/a762
name = "stripper clip (7.62mm)"
desc = "A stripper clip."
icon_state = "762"
ammo_type = /obj/item/ammo_casing/a762
max_ammo = 5
multiple_sprites = 1
/obj/item/ammo_box/n762
name = "ammo box (7.62x38mmR)"
icon_state = "10mmbox"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/n762
max_ammo = 14
/obj/item/ammo_box/foambox
name = "ammo box (Foam Darts)"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foambox"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
max_ammo = 40
/obj/item/ammo_box/foambox/riot
icon_state = "foambox_riot"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
@@ -0,0 +1,219 @@
/obj/item/ammo_casing/energy
name = "energy weapon lens"
desc = "The part of the gun that makes the laser go pew"
caliber = "energy"
projectile_type = /obj/item/projectile/energy
var/e_cost = 100 //The amount of energy a cell needs to expend to create this shot.
var/select_name = "energy"
fire_sound = 'sound/weapons/Laser.ogg'
/obj/item/ammo_casing/energy/laser
projectile_type = /obj/item/projectile/beam/laser
select_name = "kill"
/obj/item/ammo_casing/energy/lasergun
projectile_type = /obj/item/projectile/beam/laser
e_cost = 83
select_name = "kill"
/obj/item/ammo_casing/energy/laser/hos
e_cost = 100
/obj/item/ammo_casing/energy/laser/practice
projectile_type = /obj/item/projectile/beam/practice
select_name = "practice"
/obj/item/ammo_casing/energy/laser/scatter
projectile_type = /obj/item/projectile/beam/scatter
pellets = 5
variance = 25
select_name = "scatter"
/obj/item/ammo_casing/energy/laser/heavy
projectile_type = /obj/item/projectile/beam/laser/heavylaser
select_name = "anti-vehicle"
fire_sound = 'sound/weapons/lasercannonfire.ogg'
/obj/item/ammo_casing/energy/laser/pulse
projectile_type = /obj/item/projectile/beam/pulse
e_cost = 200
select_name = "DESTROY"
fire_sound = 'sound/weapons/pulse.ogg'
/obj/item/ammo_casing/energy/laser/bluetag
projectile_type = /obj/item/projectile/beam/lasertag/bluetag
select_name = "bluetag"
/obj/item/ammo_casing/energy/laser/redtag
projectile_type = /obj/item/projectile/beam/lasertag/redtag
select_name = "redtag"
/obj/item/ammo_casing/energy/xray
projectile_type = /obj/item/projectile/beam/xray
e_cost = 50
fire_sound = 'sound/weapons/laser3.ogg'
/obj/item/ammo_casing/energy/electrode
projectile_type = /obj/item/projectile/energy/electrode
select_name = "stun"
fire_sound = 'sound/weapons/taser.ogg'
e_cost = 200
/obj/item/ammo_casing/energy/electrode/gun
fire_sound = 'sound/weapons/gunshot.ogg'
e_cost = 100
/obj/item/ammo_casing/energy/electrode/hos
e_cost = 200
/obj/item/ammo_casing/energy/ion
projectile_type = /obj/item/projectile/ion
select_name = "ion"
fire_sound = 'sound/weapons/IonRifle.ogg'
/obj/item/ammo_casing/energy/declone
projectile_type = /obj/item/projectile/energy/declone
select_name = "declone"
fire_sound = 'sound/weapons/pulse3.ogg'
/obj/item/ammo_casing/energy/mindflayer
projectile_type = /obj/item/projectile/beam/mindflayer
select_name = "MINDFUCK"
fire_sound = 'sound/weapons/Laser.ogg'
/obj/item/ammo_casing/energy/flora
fire_sound = 'sound/effects/stealthoff.ogg'
/obj/item/ammo_casing/energy/flora/yield
projectile_type = /obj/item/projectile/energy/florayield
select_name = "yield"
/obj/item/ammo_casing/energy/flora/mut
projectile_type = /obj/item/projectile/energy/floramut
select_name = "mutation"
/obj/item/ammo_casing/energy/temp
projectile_type = /obj/item/projectile/temp
select_name = "freeze"
e_cost = 250
fire_sound = 'sound/weapons/pulse3.ogg'
/obj/item/ammo_casing/energy/temp/hot
projectile_type = /obj/item/projectile/temp/hot
select_name = "bake"
/obj/item/ammo_casing/energy/meteor
projectile_type = /obj/item/projectile/meteor
select_name = "goddamn meteor"
/obj/item/ammo_casing/energy/kinetic
projectile_type = /obj/item/projectile/kinetic
select_name = "kinetic"
e_cost = 500
fire_sound = 'sound/weapons/Kenetic_accel.ogg' // fine spelling there chap
/obj/item/ammo_casing/energy/kinetic/super
projectile_type = /obj/item/projectile/kinetic/super
/obj/item/ammo_casing/energy/kinetic/hyper
projectile_type = /obj/item/projectile/kinetic/hyper
/obj/item/ammo_casing/energy/disabler
projectile_type = /obj/item/projectile/beam/disabler
select_name = "disable"
e_cost = 50
fire_sound = "sound/weapons/taser2.ogg"
/obj/item/ammo_casing/energy/plasma
projectile_type = /obj/item/projectile/plasma
select_name = "plasma burst"
fire_sound = 'sound/weapons/plasma_cutter.ogg'
delay = 15
e_cost = 25
/obj/item/ammo_casing/energy/plasma/adv
projectile_type = /obj/item/projectile/plasma/adv
delay = 10
e_cost = 10
/obj/item/ammo_casing/energy/wormhole
projectile_type = /obj/item/projectile/beam/wormhole
e_cost = 0
fire_sound = "sound/weapons/pulse3.ogg"
var/obj/item/weapon/gun/energy/wormhole_projector/gun = null
select_name = "blue"
/obj/item/ammo_casing/energy/wormhole/orange
projectile_type = /obj/item/projectile/beam/wormhole/orange
select_name = "orange"
/obj/item/ammo_casing/energy/bolt
projectile_type = /obj/item/projectile/energy/bolt
select_name = "bolt"
e_cost = 500
fire_sound = 'sound/weapons/Genhit.ogg'
/obj/item/ammo_casing/energy/bolt/large
projectile_type = /obj/item/projectile/energy/bolt/large
select_name = "heavy bolt"
obj/item/ammo_casing/energy/net
projectile_type = /obj/item/projectile/energy/net
select_name = "netting"
pellets = 6
variance = 40
/obj/item/ammo_casing/energy/trap
projectile_type = /obj/item/projectile/energy/trap
select_name = "snare"
/obj/item/ammo_casing/energy/instakill
projectile_type = /obj/item/projectile/beam/instakill
e_cost = 0
select_name = "DESTROY"
/obj/item/ammo_casing/energy/instakill/blue
projectile_type = /obj/item/projectile/beam/instakill/blue
/obj/item/ammo_casing/energy/instakill/red
projectile_type = /obj/item/projectile/beam/instakill/red
/obj/item/ammo_casing/energy/shock_revolver
fire_sound = 'sound/magic/lightningbolt.ogg'
e_cost = 200
select_name = "stun"
projectile_type = /obj/item/projectile/energy/shock_revolver
/obj/item/ammo_casing/energy/gravityrepulse
projectile_type = /obj/item/projectile/gravityrepulse
e_cost = 0
fire_sound = "sound/weapons/wave.ogg"
select_name = "repulse"
delay = 50
var/obj/item/weapon/gun/energy/gravity_gun/gun = null
/obj/item/ammo_casing/energy/gravityrepulse/New(var/obj/item/weapon/gun/energy/gravity_gun/G)
gun = G
/obj/item/ammo_casing/energy/gravityattract
projectile_type = /obj/item/projectile/gravityattract
e_cost = 0
fire_sound = "sound/weapons/wave.ogg"
select_name = "attract"
delay = 50
var/obj/item/weapon/gun/energy/gravity_gun/gun = null
/obj/item/ammo_casing/energy/gravityattract/New(var/obj/item/weapon/gun/energy/gravity_gun/G)
gun = G
/obj/item/ammo_casing/energy/gravitychaos
projectile_type = /obj/item/projectile/gravitychaos
e_cost = 0
fire_sound = "sound/weapons/wave.ogg"
select_name = "chaos"
delay = 50
var/obj/item/weapon/gun/energy/gravity_gun/gun = null
/obj/item/ammo_casing/energy/gravitychaos/New(var/obj/item/weapon/gun/energy/gravity_gun/G)
gun = G
@@ -0,0 +1,499 @@
////////////////INTERNAL MAGAZINES//////////////////////
/obj/item/ammo_box/magazine/internal
desc = "Oh god, this shouldn't be here"
//internals magazines are accessible, so replace spent ammo if full when trying to put a live one in
/obj/item/ammo_box/magazine/internal/give_round(obj/item/ammo_casing/R)
return ..(R,1)
// Revolver internal mags
/obj/item/ammo_box/magazine/internal/cylinder
name = "revolver cylinder"
ammo_type = /obj/item/ammo_casing/a357
caliber = "357"
max_ammo = 7
/obj/item/ammo_box/magazine/internal/cylinder/ammo_count(countempties = 1)
var/boolets = 0
for(var/obj/item/ammo_casing/bullet in stored_ammo)
if(bullet && (bullet.BB || countempties))
boolets++
return boolets
/obj/item/ammo_box/magazine/internal/cylinder/get_round(keep = 0)
rotate()
var/b = stored_ammo[1]
if(!keep)
stored_ammo[1] = null
return b
/obj/item/ammo_box/magazine/internal/cylinder/proc/rotate()
var/b = stored_ammo[1]
stored_ammo.Cut(1,2)
stored_ammo.Insert(0, b)
/obj/item/ammo_box/magazine/internal/cylinder/proc/spin()
for(var/i in 1 to rand(0, max_ammo*2))
rotate()
/obj/item/ammo_box/magazine/internal/cylinder/give_round(obj/item/ammo_casing/R, replace_spent = 0)
if(!R || (caliber && R.caliber != caliber) || (!caliber && R.type != ammo_type))
return 0
for(var/i in 1 to stored_ammo.len)
var/obj/item/ammo_casing/bullet = stored_ammo[i]
if(!bullet || !bullet.BB) // found a spent ammo
stored_ammo[i] = R
R.loc = src
if(bullet)
bullet.loc = get_turf(src.loc)
return 1
return 0
/obj/item/ammo_box/magazine/internal/cylinder/rev38
name = "detective revolver cylinder"
ammo_type = /obj/item/ammo_casing/c38
caliber = "38"
max_ammo = 6
/obj/item/ammo_box/magazine/internal/cylinder/grenademulti
name = "grenade launcher internal magazine"
ammo_type = /obj/item/ammo_casing/a40mm
caliber = "40mm"
max_ammo = 6
/obj/item/ammo_box/magazine/internal/cylinder/rev762
name = "nagant revolver cylinder"
ammo_type = /obj/item/ammo_casing/n762
caliber = "n762"
max_ammo = 7
// Shotgun internal mags
/obj/item/ammo_box/magazine/internal/shot
name = "shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
caliber = "shotgun"
max_ammo = 4
multiload = 0
/obj/item/ammo_box/magazine/internal/shot/ammo_count(countempties = 1)
if (!countempties)
var/boolets = 0
for(var/obj/item/ammo_casing/bullet in stored_ammo)
if(bullet.BB)
boolets++
return boolets
else
return ..()
/obj/item/ammo_box/magazine/internal/shot/tube
name = "dual feed shotgun internal tube"
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
max_ammo = 4
/obj/item/ammo_box/magazine/internal/shot/lethal
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
/obj/item/ammo_box/magazine/internal/shot/com
name = "combat shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
max_ammo = 6
/obj/item/ammo_box/magazine/internal/shot/dual
name = "double-barrel shotgun internal magazine"
max_ammo = 2
/obj/item/ammo_box/magazine/internal/shot/improvised
name = "improvised shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/improvised
max_ammo = 1
/obj/item/ammo_box/magazine/internal/shot/riot
name = "riot shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
max_ammo = 6
/obj/item/ammo_box/magazine/internal/grenadelauncher
name = "grenade launcher internal magazine"
ammo_type = /obj/item/ammo_casing/a40mm
caliber = "40mm"
max_ammo = 1
/obj/item/ammo_box/magazine/internal/speargun
name = "speargun internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/magspear
caliber = "speargun"
max_ammo = 1
/obj/item/ammo_box/magazine/internal/rus357
name = "russian revolver cylinder"
ammo_type = /obj/item/ammo_casing/a357
caliber = "357"
max_ammo = 6
multiload = 0
/obj/item/ammo_box/magazine/internal/rus357/New()
stored_ammo += new ammo_type(src)
/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
/obj/item/ammo_box/magazine/internal/boltaction/enchanted
max_ammo =1
ammo_type = /obj/item/ammo_casing/a762/enchanted
/obj/item/ammo_box/magazine/internal/shot/toy
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
caliber = "foam_force"
max_ammo = 4
/obj/item/ammo_box/magazine/internal/shot/toy/crossbow
max_ammo = 5
/obj/item/ammo_box/magazine/internal/minigun
name = "gatling gun fusion core"
ammo_type = /obj/item/ammo_casing/caseless/laser/gatling
caliber = "gatling"
max_ammo = 5000
///////////EXTERNAL MAGAZINES////////////////
/obj/item/ammo_box/magazine/m10mm
name = "pistol magazine (10mm)"
desc = "A gun magazine."
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-8"
ammo_type = /obj/item/ammo_casing/c45
caliber = ".45"
max_ammo = 8
/obj/item/ammo_box/magazine/m45/update_icon()
..()
icon_state = "45-[ammo_count() ? "8" : "0"]"
/obj/item/ammo_box/magazine/wt550m9
name = "wt550 magazine (4.6x30mm)"
icon_state = "46x30mmt-20"
ammo_type = /obj/item/ammo_casing/c46x30mm
caliber = "4.6x30mm"
max_ammo = 20
/obj/item/ammo_box/magazine/wt550m9/update_icon()
..()
icon_state = "46x30mmt-[round(ammo_count(),4)]"
/obj/item/ammo_box/magazine/wt550m9/wtap
name = "wt550 magazine (Armour Piercing 4.6x30mm)"
ammo_type = /obj/item/ammo_casing/c46x30mmap
/obj/item/ammo_box/magazine/wt550m9/wttx
name = "wt550 magazine (Toxin Tipped 4.6x30mm)"
ammo_type = /obj/item/ammo_casing/c46x30mmtox
/obj/item/ammo_box/magazine/wt550m9/wtic
name = "wt550 magazine (Incindiary 4.6x30mm)"
ammo_type = /obj/item/ammo_casing/c46x30mminc
/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-42"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 21
/obj/item/ammo_box/magazine/smgm9mm/update_icon()
..()
icon_state = "smg9mm-[ammo_count() ? "42" : "0"]"
/obj/item/ammo_box/magazine/smgm9mm/ap
name = "SMG magazine (Armour Piercing 9mm)"
ammo_type = /obj/item/ammo_casing/c9mmap
/obj/item/ammo_box/magazine/smgm9mm/toxin
name = "SMG magazine (Toxin Tipped 9mm)"
ammo_type = /obj/item/ammo_casing/c9mmtox
/obj/item/ammo_box/magazine/smgm9mm/fire
name = "SMG Magazine (Incindiary 9mm)"
ammo_type = /obj/item/ammo_casing/c9mminc
/obj/item/ammo_box/magazine/pistolm9mm
name = "pistol magazine (9mm)"
icon_state = "9x19p-8"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 15
/obj/item/ammo_box/magazine/pistolm9mm/update_icon()
..()
icon_state = "9x19p-[ammo_count() ? "8" : "0"]"
/obj/item/ammo_box/magazine/smgm45
name = "SMG magazine (.45)"
icon_state = "c20r45-24"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/c45nostamina
caliber = ".45"
max_ammo = 24
/obj/item/ammo_box/magazine/smgm45/update_icon()
..()
icon_state = "c20r45-[round(ammo_count(),2)]"
obj/item/ammo_box/magazine/tommygunm45
name = "drum magazine (.45)"
icon_state = "drum45"
ammo_type = /obj/item/ammo_casing/c45
caliber = ".45"
max_ammo = 50
/obj/item/ammo_box/magazine/m50
name = "handgun magazine (.50ae)"
icon_state = "50ae"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/a50
caliber = ".50"
max_ammo = 7
multiple_sprites = 1
/obj/item/ammo_box/magazine/m75
name = "specialized magazine (.75)"
icon_state = "75"
ammo_type = /obj/item/ammo_casing/caseless/a75
caliber = "75"
multiple_sprites = 2
max_ammo = 8
/obj/item/ammo_box/magazine/m556
name = "toploader magazine (5.56mm)"
icon_state = "5.56m"
origin_tech = "combat=5;syndicate=1"
ammo_type = /obj/item/ammo_casing/a556
caliber = "a556"
max_ammo = 30
multiple_sprites = 2
/obj/item/ammo_box/magazine/m12g
name = "shotgun magazine (12g taser slugs)"
desc = "A drum magazine."
icon_state = "m12gs"
ammo_type = /obj/item/ammo_casing/shotgun/stunslug
origin_tech = "combat=3;syndicate=1"
caliber = "shotgun"
max_ammo = 8
/obj/item/ammo_box/magazine/m12g/update_icon()
..()
icon_state = "[initial(icon_state)]-[Ceiling(ammo_count(0)/8)*8]"
/obj/item/ammo_box/magazine/m12g/buckshot
name = "shotgun magazine (12g buckshot slugs)"
icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
/obj/item/ammo_box/magazine/m12g/slug
name = "shotgun magazine (12g slugs)"
icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun
/obj/item/ammo_box/magazine/m12g/dragon
name = "shotgun magazine (12g dragon's breath)"
icon_state = "m12gf"
ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
/obj/item/ammo_box/magazine/m12g/bioterror
name = "shotgun magazine (12g bioterror)"
icon_state = "m12gt"
ammo_type = /obj/item/ammo_casing/shotgun/dart/bioterror
/obj/item/ammo_box/magazine/m12g/breach
name = "shotgun magazine (12g breacher slugs)"
icon_state = "m12gbc"
ammo_type = /obj/item/ammo_casing/shotgun/breaching
//// SNIPER MAGAZINES
/obj/item/ammo_box/magazine/sniper_rounds
name = "sniper rounds (.50)"
icon_state = ".50mag"
origin_tech = "combat=6;syndicate=2"
ammo_type = /obj/item/ammo_casing/point50
max_ammo = 6
caliber = ".50"
/obj/item/ammo_box/magazine/sniper_rounds/update_icon()
if(ammo_count())
icon_state = "[initial(icon_state)]-ammo"
else
icon_state = "[initial(icon_state)]"
/obj/item/ammo_box/magazine/sniper_rounds/soporific
name = "sniper rounds (Zzzzz)"
desc = "Soporific sniper rounds, designed for happy days and dead quiet nights..."
icon_state = "soporific"
origin_tech = "combat=6;syndicate=3"
ammo_type = /obj/item/ammo_casing/soporific
max_ammo = 3
caliber = ".50"
/obj/item/ammo_box/magazine/sniper_rounds/haemorrhage
name = "sniper rounds (Bleed)"
desc = "Haemorrhage sniper rounds, leaves your target in a pool of crimson pain"
icon_state = "haemorrhage"
ammo_type = /obj/item/ammo_casing/haemorrhage
max_ammo = 5
caliber = ".50"
/obj/item/ammo_box/magazine/sniper_rounds/penetrator
name = "sniper rounds (penetrator)"
desc = "An extremely powerful round capable of passing straight through cover and anyone unfortunate enough to be behind it."
ammo_type = /obj/item/ammo_casing/penetrator
origin_tech = "combat=6;syndicate=3"
max_ammo = 5
//// SAW MAGAZINES
/obj/item/ammo_box/magazine/mm556x45
name = "box magazine (5.56x45mm)"
icon_state = "a762-50"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/mm556x45
caliber = "mm55645"
max_ammo = 50
/obj/item/ammo_box/magazine/mm556x45/bleeding
name = "box magazine (Bleeding 5.56x45mm)"
origin_tech = "combat=3"
ammo_type = /obj/item/ammo_casing/mm556x45/bleeding
/obj/item/ammo_box/magazine/mm556x45/hollow
name = "box magazine (Hollow-Point 5.56x45mm)"
origin_tech = "combat=3"
ammo_type = /obj/item/ammo_casing/mm556x45/hollow
/obj/item/ammo_box/magazine/mm556x45/ap
name = "box magazine (Armor Penetrating 5.56x45mm)"
origin_tech = "combat=4"
ammo_type = /obj/item/ammo_casing/mm556x45/ap
/obj/item/ammo_box/magazine/mm556x45/incen
name = "box magazine (Incendiary 5.56x45mm)"
origin_tech = "combat=4"
ammo_type = /obj/item/ammo_casing/mm556x45/incen
/obj/item/ammo_box/magazine/mm556x45/update_icon()
..()
icon_state = "a762-[round(ammo_count(),10)]"
////TOY GUN MAGAZINES
/obj/item/ammo_box/magazine/toy
name = "foam force META magazine"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
caliber = "foam_force"
/obj/item/ammo_box/magazine/toy/smg
name = "foam force SMG magazine"
icon_state = "smg9mm-20"
max_ammo = 20
/obj/item/ammo_box/magazine/toy/smg/update_icon()
..()
icon_state = "smg9mm-[round(ammo_count(),5)]"
/obj/item/ammo_box/magazine/toy/smg/riot
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
/obj/item/ammo_box/magazine/toy/pistol
name = "foam force pistol magazine"
icon_state = "9x19p"
max_ammo = 8
multiple_sprites = 2
/obj/item/ammo_box/magazine/toy/pistol/riot
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
/obj/item/ammo_box/magazine/toy/smgm45
name = "donksoft SMG magazine"
caliber = "foam_force"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
max_ammo = 20
/obj/item/ammo_box/magazine/toy/smgm45/update_icon()
..()
icon_state = "c20r45-[round(ammo_count(),2)]"
/obj/item/ammo_box/magazine/toy/m762
name = "donksoft box magazine"
caliber = "foam_force"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot
max_ammo = 50
/obj/item/ammo_box/magazine/toy/m762/update_icon()
..()
icon_state = "a762-[round(ammo_count(),10)]"
//// RECHARGEABLE MAGAZINES
/obj/item/ammo_box/magazine/recharge
name = "power pack"
desc = "A rechargeable, detachable battery that serves as a magazine for laser rifles."
icon_state = "oldrifle-20"
ammo_type = /obj/item/ammo_casing/caseless/laser
caliber = "laser"
max_ammo = 20
/obj/item/ammo_box/magazine/recharge/update_icon()
desc = "[initial(desc)] It has [stored_ammo.len] shot\s left."
icon_state = "oldrifle-[round(ammo_count(),4)]"
/obj/item/ammo_box/magazine/recharge/attack_self() //No popping out the "bullets"
return
@@ -0,0 +1,46 @@
/obj/item/ammo_casing/magic
name = "magic casing"
desc = "I didn't even know magic needed ammo..."
projectile_type = /obj/item/projectile/magic
/obj/item/ammo_casing/magic/change
projectile_type = /obj/item/projectile/magic/change
/obj/item/ammo_casing/magic/animate
projectile_type = /obj/item/projectile/magic/animate
/obj/item/ammo_casing/magic/heal
projectile_type = /obj/item/projectile/magic/resurrection
/obj/item/ammo_casing/magic/death
projectile_type = /obj/item/projectile/magic/death
/obj/item/ammo_casing/magic/teleport
projectile_type = /obj/item/projectile/magic/teleport
/obj/item/ammo_casing/magic/door
projectile_type = /obj/item/projectile/magic/door
/obj/item/ammo_casing/magic/fireball
projectile_type = /obj/item/projectile/magic/fireball
/obj/item/ammo_casing/magic/chaos
projectile_type = /obj/item/projectile/magic
/obj/item/ammo_casing/magic/chaos/newshot()
projectile_type = pick(typesof(/obj/item/projectile/magic))
..()
/obj/item/ammo_casing/magic/honk
projectile_type = /obj/item/projectile/bullet/honker
/obj/item/ammo_casing/syringegun
name = "syringe gun spring"
desc = "A high-power spring that throws syringes."
projectile_type = null
/obj/item/ammo_casing/energy/c3dbullet
projectile_type = /obj/item/projectile/bullet/midbullet3
select_name = "spraydown"
fire_sound = 'sound/weapons/gunshot_smg.ogg'
e_cost = 20