-
-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
projectiles v8 - ammo & magazines (#6637)
completely overhauls ammo, magazines, and calibers; makes things a lot more standardized and efficient.
- Loading branch information
Showing
208 changed files
with
5,184 additions
and
5,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,40 @@ | ||
// /obj/item/ammo_casing casing_flags | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 silicons *// | ||
|
||
//* /obj/item/ammo_casing casing_flags *// | ||
|
||
/// delete after fire (usually for caseless) | ||
#define CASING_DELETE (1<<0) | ||
/// we're modified; otherwise, we assume that our type alone is enough to encode our information. | ||
/// you must change this if var-changing a casing, or it might get deleted when it enters a magazine! | ||
#define CASING_MODIFIED (1<<2) | ||
|
||
DEFINE_BITFIELD_NEW(ammo_casing_flags, list( | ||
/obj/item/ammo_casing = list( | ||
"casing_flags", | ||
), | ||
), list( | ||
BITFIELD_NEW("Delete after firing", CASING_DELETE), | ||
BITFIELD_NEW("Ferromagnetic", CASING_FERROMAGNETIC), | ||
BITFIELD_NEW("Is Modified", CASING_MODIFIED), | ||
BITFIELD_NEW("Non Chemical", CASING_NONCHEMICAL), | ||
)) | ||
|
||
//* Firing Method (Priming) Flags *// | ||
|
||
/// chemical propellant ignition | ||
#define CASING_PRIMER_CHEMICAL (1<<0) | ||
/// magnetic acceleration | ||
#define CASING_PRIMER_MAGNETIC (1<<1) | ||
/// activate microbattery cell | ||
#define CASING_PRIMER_MICROBATTERY (1<<2) | ||
|
||
DEFINE_BITFIELD(casing_flags, list( | ||
BITFIELD(CASING_DELETE), | ||
DEFINE_BITFIELD_NEW(ammo_casing_primer, list( | ||
/obj/item/ammo_casing = list( | ||
"casing_primer", | ||
), | ||
), list( | ||
BITFIELD_NEW("Chemical", CASING_PRIMER_CHEMICAL), | ||
BITFIELD_NEW("Magnetic", CASING_PRIMER_MAGNETIC), | ||
BITFIELD_NEW("Microbattery", CASING_PRIMER_MICROBATTERY), | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 silicons *// | ||
|
||
//* /obj/item/ammo_magazine magazine_type | ||
|
||
/// normal magazines | ||
#define MAGAZINE_TYPE_NORMAL (1<<0) | ||
/// revolver-like speedloader | ||
#define MAGAZINE_TYPE_SPEEDLOADER (1<<1) | ||
/// stripper clip | ||
#define MAGAZINE_TYPE_CLIP (1<<2) | ||
/// loose pouch | ||
#define MAGAZINE_TYPE_POUCH (1<<3) | ||
/// structured box | ||
#define MAGAZINE_TYPE_BOX (1<<3) | ||
|
||
DEFINE_BITFIELD_NEW(ammo_magazine_types, list( | ||
/obj/item/ammo_magazine = list( | ||
"magazine_type", | ||
), | ||
), list( | ||
BITFIELD_NEW("Normal", MAGAZINE_TYPE_NORMAL), | ||
BITFIELD_NEW("Speedloader", MAGAZINE_TYPE_SPEEDLOADER), | ||
BITFIELD_NEW("Stripper Clip", MAGAZINE_TYPE_CLIP), | ||
BITFIELD_NEW("Ammo Pouch", MAGAZINE_TYPE_POUCH), | ||
BITFIELD_NEW("Ammo Box", MAGAZINE_TYPE_BOX), | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 silicons *// | ||
|
||
//* rendering system | ||
//* this is currently only used on ammo magazines, as guns use composition of datums | ||
//* to determine their renderers instead. | ||
|
||
/// no automatic rendering | ||
#define GUN_RENDERING_DISABLED 0 | ||
/// overlay rendering | ||
#define GUN_RENDERING_OVERLAYS 1 | ||
/// state rendering | ||
#define GUN_RENDERING_STATES 2 | ||
/// for some guns, we render segmented overlays with offsets | ||
#define GUN_RENDERING_SEGMENTS 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.