[MIRROR] Splits projectiles into different files for readability (#5800)
* Splits projectiles into different files for readability * Update tgstation.dme * I love how the dme cleans itself up
This commit is contained in:
committed by
Poojawa
parent
6a688f2588
commit
c72201e605
@@ -0,0 +1,47 @@
|
||||
/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 FALSE
|
||||
|
||||
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.forceMove(src)
|
||||
|
||||
if(bullet)
|
||||
bullet.forceMove(drop_location())
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
@@ -0,0 +1,7 @@
|
||||
/obj/item/ammo_box/magazine/internal
|
||||
desc = "Oh god, this shouldn't be here"
|
||||
flags_1 = CONDUCT_1|ABSTRACT_1
|
||||
|
||||
//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)
|
||||
@@ -0,0 +1,17 @@
|
||||
/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/grenadelauncher
|
||||
name = "grenade launcher internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/a40mm
|
||||
caliber = "40mm"
|
||||
max_ammo = 1
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/rocketlauncher
|
||||
name = "grenade launcher internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/a84mm
|
||||
caliber = "84mm"
|
||||
max_ammo = 1
|
||||
@@ -0,0 +1,11 @@
|
||||
/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/minigun
|
||||
name = "gatling gun fusion core"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/laser/gatling
|
||||
caliber = "gatling"
|
||||
max_ammo = 5000
|
||||
@@ -0,0 +1,22 @@
|
||||
/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/rev762
|
||||
name = "nagant revolver cylinder"
|
||||
ammo_type = /obj/item/ammo_casing/n762
|
||||
caliber = "n762"
|
||||
max_ammo = 7
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/cylinder/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/Initialize()
|
||||
stored_ammo += new ammo_type(src)
|
||||
. = ..()
|
||||
@@ -0,0 +1,15 @@
|
||||
/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/boltaction/enchanted/arcane_barrage
|
||||
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/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/com/compact
|
||||
name = "compact combat shotgun internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
|
||||
max_ammo = 4
|
||||
|
||||
/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
|
||||
@@ -0,0 +1,7 @@
|
||||
/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
|
||||
Reference in New Issue
Block a user