diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 4f27c593c7..3fc860a127 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -13,7 +13,7 @@ var/caliber = "" //Which kind of guns it can be loaded into var/projectile_type //The bullet type to create when New() is called var/obj/item/projectile/BB = null //The loaded bullet - make it so that the projectiles are created only when needed? -// var/spent_icon = null + var/caseless = null //Caseless ammo deletes its self once the projectile is fired. /obj/item/ammo_casing/New() ..() @@ -47,9 +47,7 @@ BB.name = "[initial(BB.name)] (\"[label_text]\")" /obj/item/ammo_casing/update_icon() -/* if(spent_icon && !BB) - icon_state = spent_icon*/ - if(!BB) // This is really just a much better way of doing this. + if(!BB) icon_state = "[initial(icon_state)]-spent" /obj/item/ammo_casing/examine(mob/user) diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index cfd96ac2aa..20bba9545f 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -188,6 +188,21 @@ name = "speedloader (.45 AP)" ammo_type = /obj/item/ammo_casing/a45/ap +///////// 5mm Caseless ///////// + +/obj/item/ammo_magazine/m5mmcaseless + name = "prototype rifle magazine (5mm caseless)" + ammo_type = /obj/item/ammo_casing/a5mmcaseless + icon_state = "caseless-mag" + caliber = "5mm caseless" + mag_type = MAGAZINE + max_ammo = 30 + multiple_sprites = 1 + +/obj/item/ammo_magazine/m5mmcaseless/stun + icon_state = "caseless-mag-alt" + ammo_type = /obj/item/ammo_casing/a5mmcaseless/stun + ///////// 9mm ///////// /obj/item/ammo_magazine/m9mm diff --git a/code/modules/projectiles/ammunition/rounds.dm b/code/modules/projectiles/ammunition/rounds.dm index e87c91409d..70b88b73f8 100644 --- a/code/modules/projectiles/ammunition/rounds.dm +++ b/code/modules/projectiles/ammunition/rounds.dm @@ -52,7 +52,7 @@ matter = list(DEFAULT_WALL_MATERIAL = 130, "uranium" = 100) /* - * .50 Action Express + * .44 */ /obj/item/ammo_casing/a44 @@ -322,6 +322,22 @@ desc = "A 5.45mm hunting bullet casing." projectile_type = /obj/item/projectile/bullet/rifle/a545/hunter +/* + * 5mm Caseless + */ + +/obj/item/ammo_casing/a5mmcaseless + desc = "A 5mm solid phoron caseless round." + caliber = "5mm caseless" + icon_state = "casing" // Placeholder. Should probably be purple. + projectile_type = /obj/item/projectile/bullet/pistol // Close enough to be comparable. + matter = list(DEFAULT_WALL_MATERIAL = 180) + caseless = 1 + +/obj/item/ammo_casing/a5mmcaseless/stun + desc = "A 5mm solid phoron caseless stun round." + projectile_type = /obj/item/projectile/energy/electrode // Maybe nerf this considering there's 30 rounds in a mag. + /* * Misc */ diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 6539ba7c4a..d0549bbf4c 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -10,7 +10,7 @@ w_class = ITEMSIZE_NORMAL matter = list(DEFAULT_WALL_MATERIAL = 1000) recoil = 1 - projectile_type = /obj/item/projectile/bullet/pistol/strong //Only used for Cham Guns + projectile_type = /obj/item/projectile/bullet/pistol/strong //Only used for chameleon guns var/caliber = ".357" //determines which casings will fit var/handle_casings = EJECT_CASINGS //determines how spent casings should be handled @@ -84,8 +84,12 @@ switch(handle_casings) if(EJECT_CASINGS) //eject casing onto ground. - chambered.loc = get_turf(src) - playsound(src.loc, "casing", 50, 1) + if(chambered.caseless) + qdel(chambered) + return + else + chambered.loc = get_turf(src) + playsound(src.loc, "casing", 50, 1) if(CYCLE_CASINGS) //cycle the casing back to the end. if(ammo_magazine) ammo_magazine.stored_ammo += chambered diff --git a/code/modules/projectiles/guns/projectile/caseless.dm b/code/modules/projectiles/guns/projectile/caseless.dm new file mode 100644 index 0000000000..8d5dd9a19c --- /dev/null +++ b/code/modules/projectiles/guns/projectile/caseless.dm @@ -0,0 +1,21 @@ +/obj/item/weapon/gun/projectile/caseless/prototype + name = "prototype caseless rifle" + desc = "A rifle cooked up in NanoTrasen's R&D labs that operates with Kraut Space Magic™ clockwork internals. Uses solid phoron 5mm caseless rounds." + icon_state = "caseless" + item_state = "caseless" + w_class = ITEMSIZE_LARGE + caliber = "5mm caseless" + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 3) + slot_flags = SLOT_BACK + load_method = MAGAZINE + magazine_type = null // R&D builds this. Starts unloaded. + allowed_magazines = list(/obj/item/ammo_magazine/m5mmcaseless) + +/obj/item/weapon/gun/projectile/caseless/prototype/update_icon() + if(ammo_magazine) + icon_state = initial(icon_state) + else + icon_state = "[initial(icon_state)]-empty" + +/obj/item/weapon/gun/projectile/caseless/prototype/loaded + magazine_type = /obj/item/ammo_magazine/m5mmcaseless \ No newline at end of file diff --git a/icons/mob/back.dmi b/icons/mob/back.dmi index b3b9a852c9..129db87f03 100644 Binary files a/icons/mob/back.dmi and b/icons/mob/back.dmi differ diff --git a/vorestation.dme b/vorestation.dme index a4b53f2eb8..c0fc13f7af 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2553,6 +2553,7 @@ #include "code\modules\projectiles\guns\projectile\automatic.dm" #include "code\modules\projectiles\guns\projectile\automatic_vr.dm" #include "code\modules\projectiles\guns\projectile\boltaction.dm" +#include "code\modules\projectiles\guns\projectile\caseless.dm" #include "code\modules\projectiles\guns\projectile\contender.dm" #include "code\modules\projectiles\guns\projectile\dartgun.dm" #include "code\modules\projectiles\guns\projectile\pistol.dm"