mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #4750 from VOREStation/upstream-merge-5886
[MIRROR] Introduces caseless ammo, and a caseless rifle
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
var/caliber = "" //Which kind of guns it can be loaded into
|
var/caliber = "" //Which kind of guns it can be loaded into
|
||||||
var/projectile_type //The bullet type to create when New() is called
|
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/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()
|
/obj/item/ammo_casing/New()
|
||||||
..()
|
..()
|
||||||
@@ -47,9 +47,7 @@
|
|||||||
BB.name = "[initial(BB.name)] (\"[label_text]\")"
|
BB.name = "[initial(BB.name)] (\"[label_text]\")"
|
||||||
|
|
||||||
/obj/item/ammo_casing/update_icon()
|
/obj/item/ammo_casing/update_icon()
|
||||||
/* if(spent_icon && !BB)
|
if(!BB)
|
||||||
icon_state = spent_icon*/
|
|
||||||
if(!BB) // This is really just a much better way of doing this.
|
|
||||||
icon_state = "[initial(icon_state)]-spent"
|
icon_state = "[initial(icon_state)]-spent"
|
||||||
|
|
||||||
/obj/item/ammo_casing/examine(mob/user)
|
/obj/item/ammo_casing/examine(mob/user)
|
||||||
|
|||||||
@@ -188,6 +188,21 @@
|
|||||||
name = "speedloader (.45 AP)"
|
name = "speedloader (.45 AP)"
|
||||||
ammo_type = /obj/item/ammo_casing/a45/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 /////////
|
///////// 9mm /////////
|
||||||
|
|
||||||
/obj/item/ammo_magazine/m9mm
|
/obj/item/ammo_magazine/m9mm
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
matter = list(DEFAULT_WALL_MATERIAL = 130, "uranium" = 100)
|
matter = list(DEFAULT_WALL_MATERIAL = 130, "uranium" = 100)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* .50 Action Express
|
* .44
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/obj/item/ammo_casing/a44
|
/obj/item/ammo_casing/a44
|
||||||
@@ -322,6 +322,22 @@
|
|||||||
desc = "A 5.45mm hunting bullet casing."
|
desc = "A 5.45mm hunting bullet casing."
|
||||||
projectile_type = /obj/item/projectile/bullet/rifle/a545/hunter
|
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
|
* Misc
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
w_class = ITEMSIZE_NORMAL
|
w_class = ITEMSIZE_NORMAL
|
||||||
matter = list(DEFAULT_WALL_MATERIAL = 1000)
|
matter = list(DEFAULT_WALL_MATERIAL = 1000)
|
||||||
recoil = 1
|
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/caliber = ".357" //determines which casings will fit
|
||||||
var/handle_casings = EJECT_CASINGS //determines how spent casings should be handled
|
var/handle_casings = EJECT_CASINGS //determines how spent casings should be handled
|
||||||
@@ -84,8 +84,12 @@
|
|||||||
|
|
||||||
switch(handle_casings)
|
switch(handle_casings)
|
||||||
if(EJECT_CASINGS) //eject casing onto ground.
|
if(EJECT_CASINGS) //eject casing onto ground.
|
||||||
chambered.loc = get_turf(src)
|
if(chambered.caseless)
|
||||||
playsound(src.loc, "casing", 50, 1)
|
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(CYCLE_CASINGS) //cycle the casing back to the end.
|
||||||
if(ammo_magazine)
|
if(ammo_magazine)
|
||||||
ammo_magazine.stored_ammo += chambered
|
ammo_magazine.stored_ammo += chambered
|
||||||
|
|||||||
21
code/modules/projectiles/guns/projectile/caseless.dm
Normal file
21
code/modules/projectiles/guns/projectile/caseless.dm
Normal file
@@ -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<69> 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
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 100 KiB |
@@ -2645,6 +2645,7 @@
|
|||||||
#include "code\modules\projectiles\guns\projectile\automatic.dm"
|
#include "code\modules\projectiles\guns\projectile\automatic.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile\automatic_vr.dm"
|
#include "code\modules\projectiles\guns\projectile\automatic_vr.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile\boltaction.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\contender.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile\dartgun.dm"
|
#include "code\modules\projectiles\guns\projectile\dartgun.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile\pistol.dm"
|
#include "code\modules\projectiles\guns\projectile\pistol.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user