-
-
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.
Merge branch 'projectiles-modular-system' into projectiles-modular-ma…
…gnetic
- Loading branch information
Showing
6 changed files
with
89 additions
and
31 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,29 +1,3 @@ | ||
///do not do anything after firing. Manual action, like pump shotguns, or guns that want to define custom behaviour | ||
#define HOLD_CASINGS 0 | ||
///drop spent casings on the ground after firing | ||
#define EJECT_CASINGS 2 | ||
///cycle casings, like a revolver. Also works for multibarrelled guns | ||
#define CYCLE_CASINGS 3 | ||
//Gun loading types | ||
///The gun only accepts ammo_casings. ammo_magazines should never have this as their mag_type. | ||
#define SINGLE_CASING 1 | ||
///Transfers casings from the mag to the gun when used. | ||
#define SPEEDLOADER 2 | ||
///The magazine item itself goes inside the gun | ||
#define MAGAZINE 4 | ||
#define BULLET_IMPACT_NONE "none" | ||
#define BULLET_IMPACT_METAL "metal" | ||
#define BULLET_IMPACT_MEAT "meat" | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 silicons *// | ||
|
||
#define SOUNDS_BULLET_MEAT list('sound/effects/projectile_impact/bullet_meat1.ogg', 'sound/effects/projectile_impact/bullet_meat2.ogg', 'sound/effects/projectile_impact/bullet_meat3.ogg', 'sound/effects/projectile_impact/bullet_meat4.ogg') | ||
#define SOUNDS_BULLET_METAL list('sound/effects/projectile_impact/bullet_metal1.ogg', 'sound/effects/projectile_impact/bullet_metal2.ogg', 'sound/effects/projectile_impact/bullet_metal3.ogg') | ||
#define SOUNDS_LASER_MEAT list('sound/effects/projectile_impact/energy_meat1.ogg','sound/effects/projectile_impact/energy_meat2.ogg') | ||
#define SOUNDS_LASER_METAL list('sound/effects/projectile_impact/energy_metal1.ogg','sound/effects/projectile_impact/energy_metal2.ogg') | ||
|
||
// safety states | ||
/// no safeties are on this gun | ||
#define GUN_NO_SAFETY -1 | ||
/// safety off | ||
#define GUN_SAFETY_OFF 0 | ||
/// safety on | ||
#define GUN_SAFETY_ON 1 |
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,29 @@ | ||
///do not do anything after firing. Manual action, like pump shotguns, or guns that want to define custom behaviour | ||
#define HOLD_CASINGS 0 | ||
///drop spent casings on the ground after firing | ||
#define EJECT_CASINGS 2 | ||
///cycle casings, like a revolver. Also works for multibarrelled guns | ||
#define CYCLE_CASINGS 3 | ||
//Gun loading types | ||
///The gun only accepts ammo_casings. ammo_magazines should never have this as their mag_type. | ||
#define SINGLE_CASING 1 | ||
///Transfers casings from the mag to the gun when used. | ||
#define SPEEDLOADER 2 | ||
///The magazine item itself goes inside the gun | ||
#define MAGAZINE 4 | ||
#define BULLET_IMPACT_NONE "none" | ||
#define BULLET_IMPACT_METAL "metal" | ||
#define BULLET_IMPACT_MEAT "meat" | ||
|
||
#define SOUNDS_BULLET_MEAT list('sound/effects/projectile_impact/bullet_meat1.ogg', 'sound/effects/projectile_impact/bullet_meat2.ogg', 'sound/effects/projectile_impact/bullet_meat3.ogg', 'sound/effects/projectile_impact/bullet_meat4.ogg') | ||
#define SOUNDS_BULLET_METAL list('sound/effects/projectile_impact/bullet_metal1.ogg', 'sound/effects/projectile_impact/bullet_metal2.ogg', 'sound/effects/projectile_impact/bullet_metal3.ogg') | ||
#define SOUNDS_LASER_MEAT list('sound/effects/projectile_impact/energy_meat1.ogg','sound/effects/projectile_impact/energy_meat2.ogg') | ||
#define SOUNDS_LASER_METAL list('sound/effects/projectile_impact/energy_metal1.ogg','sound/effects/projectile_impact/energy_metal2.ogg') | ||
|
||
// safety states | ||
/// no safeties are on this gun | ||
#define GUN_NO_SAFETY -1 | ||
/// safety off | ||
#define GUN_SAFETY_OFF 0 | ||
/// safety on | ||
#define GUN_SAFETY_ON 1 |
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,9 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 silicons *// | ||
|
||
#warn impl all | ||
|
||
/** | ||
* called exactly once at the start of a firing cycle | ||
*/ | ||
/obj/item/gun/proc/begin_firing_cycle(datum/event_args/actor/actor, atom/target, angle, burst_count, burst_delay, ) |
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,6 +1,34 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 silicons *// | ||
|
||
/obj/item/gun | ||
//* Modular Components - Compatibility *// | ||
|
||
#warn impl all | ||
/** | ||
* hard check | ||
*/ | ||
/obj/item/gun/proc/can_install_component(obj/item/gun_component/component, force) | ||
SHOULD_NOT_OVERRIDE(TRUE) | ||
#warn slot enforcement | ||
return force || component.fits_on_gun(src, fits_modular_component(component)) | ||
|
||
/** | ||
* checks if we can attach a component; component gets final say | ||
*/ | ||
/obj/item/gun/proc/fits_modular_component(obj/item/gun_component/component) | ||
return TRUE | ||
|
||
//* Modular Components - Add / Remove *// | ||
|
||
/** | ||
* * moves the component into us if it wasn't already | ||
*/ | ||
/obj/item/gun/proc/attach_modular_component(obj/item/gun_component/component, force) | ||
#warn impl | ||
|
||
/** | ||
* * deletes the component if no location is provided to move it to | ||
*/ | ||
/obj/item/gun/proc/detach_modular_component(obj/item/gun_component/component, atom/new_loc) | ||
#warn impl | ||
|
||
#warn hook everything in attackby's |
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