Departmental defense as the Found Fathers intended (#22002)

* Adds maintenance musket

* Added variance and dropoff, and buffed damage

* Adds reload do-after and afterattack

* Fixes icon and gets projectile to spread correctly

* Adds smoke effect to firing cartridge

* New cartridge and caliber and AP buff

* Bayonet fix

* Made musket and cartridges craftable

* No negative AP for BP cartridge

* Update code/modules/projectiles/guns/ballistic/launchers.dm

Co-authored-by: Molti <108117184+Moltijoe@users.noreply.github.com>

* Update code/modules/projectiles/guns/ballistic/launchers.dm

Co-authored-by: Molti <108117184+Moltijoe@users.noreply.github.com>

* Reload bug fix and hopefully made moltijoe changes

* Molti's changes

* Update code/modules/projectiles/guns/ballistic/launchers.dm

Co-authored-by: Molti <108117184+Moltijoe@users.noreply.github.com>

* Update code/modules/projectiles/guns/ballistic/launchers.dm

Co-authored-by: Molti <108117184+Moltijoe@users.noreply.github.com>

* Fixed bug involving disapearing ammo

* Lowered demolition mod to 0.25

---------

Co-authored-by: Molti <108117184+Moltijoe@users.noreply.github.com>
This commit is contained in:
Scrambledeggs
2024-05-20 06:50:23 -04:00
committed by GitHub
parent 4ecd189032
commit aefeb5be80
13 changed files with 107 additions and 0 deletions

View File

@@ -27,6 +27,7 @@
#define CALIBER_FOAM "foam_force" // Foam darts (Toy Guns)
#define CALIBER_GATLING "gatling" // Gatling (Osprey Minigun) (Don't ask)
#define CALIBER_SPEAR "speargun" // Spear (Speargun)
#define CALIBER_MUSKET "musket" // Musket Cartridge (Maintenance Musket)
/// Magic and other esoteric non-gun stuff
#define CALIBER_ARROW "arrow" // Bows

View File

@@ -188,6 +188,17 @@
time = 12
category = CAT_WEAPON_RANGED
/datum/crafting_recipe/maint_musket
name = "Maintenance Musket"
reqs = list(/obj/item/pipe = 1,
/obj/item/stack/sheet/metal = 1,
/obj/item/weaponcrafting/stock = 1,
/obj/item/stack/packageWrap = 5)
tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_WELDER, TOOL_WRENCH)
result = /obj/item/gun/ballistic/maint_musket
time = 10 SECONDS
category = CAT_WEAPON_RANGED
/datum/crafting_recipe/sledgehammer
name = "Sledgehammer"
result = /obj/item/melee/sledgehammer
@@ -453,6 +464,24 @@
time = 0.5 SECONDS
category = CAT_WEAPON_AMMO
/datum/crafting_recipe/cartridge_welder
name = "Cartridge Welding Fuel" //Reversed so that they're together in the menu
result = /obj/item/ammo_casing/caseless/cartridge
reqs = list(/obj/item/stack/sheet/cloth = 1,
/datum/reagent/fuel = 10)
tool_behaviors = list(TOOL_SCREWDRIVER)
time = 2 SECONDS
category = CAT_WEAPON_AMMO
/datum/crafting_recipe/cartridge_BP
name = "Cartridge Black Powder"
result = /obj/item/ammo_casing/caseless/cartridge/black_powder
reqs = list(/obj/item/stack/sheet/cloth = 1,
/datum/reagent/blackpowder = 10)
tool_behaviors = list(TOOL_SCREWDRIVER)
time = 2 SECONDS
category = CAT_WEAPON_AMMO
/datum/crafting_recipe/wood_arrow
name = "Wood Arrow"
result = /obj/item/ammo_casing/reusable/arrow/wood

View File

@@ -37,3 +37,17 @@
projectile_type = /obj/projectile/bullet/bolt
firing_effect_type = /obj/effect/particle_effect/sparks/electricity
w_class = WEIGHT_CLASS_TINY
/obj/item/ammo_casing/caseless/cartridge
name = "welding fuel cartridge"
desc = "A musket cartridge crafted by hand. This one uses welding fuel as its propellant."
caliber = CALIBER_MUSKET
icon_state = "cartridge"
projectile_type = /obj/projectile/bullet/cartridge
firing_effect_type = /obj/effect/particle_effect/fluid/smoke
/obj/item/ammo_casing/caseless/cartridge/black_powder
name = "black powder cartridge"
desc = "A musket cartridge crafted by hand. This one uses black powder as its propellant."
icon_state = "cartridge_BP"
projectile_type = /obj/projectile/bullet/cartridge/black_powder

View File

@@ -28,3 +28,8 @@
caliber = null
max_ammo = 1
/obj/item/ammo_box/magazine/internal/cartridge
name = "cartridges"
ammo_type = /obj/item/ammo_casing/caseless/cartridge
caliber = CALIBER_MUSKET
max_ammo = 1

View File

@@ -148,3 +148,48 @@
. = ..()
playsound(loc, "sparks", 75, 1, -1)
do_sparks(8, 3, usr)
/obj/item/gun/ballistic/maint_musket
name = "maintenance musket"
desc = "A weapon with notoriously poor accuracy; it makes up for this by being quick and easy to smash together."
icon_state = "maint_musket"
item_state = "maint_musket"
mag_type = /obj/item/ammo_box/magazine/internal/cartridge
w_class = WEIGHT_CLASS_HUGE
weapon_weight = WEAPON_HEAVY
slot_flags = ITEM_SLOT_BACK
casing_ejector = FALSE
bolt_type = BOLT_TYPE_NO_BOLT
internal_magazine = TRUE
empty_indicator = FALSE
can_bayonet = TRUE
knife_x_offset = 27
knife_y_offset = 13
can_suppress = FALSE
force = 5
cartridge_wording = "cartridge"
fire_sound = 'sound/weapons/musket_shot.ogg'
load_sound = 'sound/weapons/musket_cock.ogg'
pin = /obj/item/firing_pin
var/reloading_active = FALSE
/obj/item/gun/ballistic/maint_musket/process_chamber()
magazine.get_round(FALSE)
/obj/item/gun/ballistic/maint_musket/attackby(obj/item/A, mob/user, params)
if(istype(A, /obj/item/ammo_casing/caseless/cartridge))
if(reloading_active)
to_chat(user, span_warning("You're already reloading it!"))
return
if(magazine.stored_ammo.len > 0)
user.balloon_alert(user, "Already loaded!")
return
user.visible_message(span_warning("[user] starts reloading the [src]!"), span_notice("You start reloading the [src]."))
reloading_active = TRUE
if(!do_after(user, 5 SECONDS, user))
reloading_active = FALSE
user.balloon_alert(user, "You were interrupted!")
return
reloading_active = FALSE
return ..()

View File

@@ -93,3 +93,16 @@
icon_state = "bolt"
desc = "A smaller and faster rod."
damage = 25
/obj/projectile/bullet/cartridge
name = "cartridge"
desc = "A small metal ball fired from a musket."
damage = 25
armour_penetration = -30 //Cheap ammo means poor AP
spread = 40
demolition_mod = 0.25
/obj/projectile/bullet/cartridge/black_powder
damage = 30
armour_penetration = 0
spread = 20

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Binary file not shown.