Skip to content

Commit

Permalink
Departmental defense as the Found Fathers intended (#22002)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

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

Co-authored-by: Molti <[email protected]>

* Reload bug fix and hopefully made moltijoe changes

* Molti's changes

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

Co-authored-by: Molti <[email protected]>

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

Co-authored-by: Molti <[email protected]>

* Fixed bug involving disapearing ammo

* Lowered demolition mod to 0.25

---------

Co-authored-by: Molti <[email protected]>
  • Loading branch information
Scrambledeggs00 and Moltijoe authored May 20, 2024
1 parent 4ecd189 commit aefeb5b
Show file tree
Hide file tree
Showing 13 changed files with 107 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions code/datums/components/crafting/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions code/modules/projectiles/ammunition/caseless/rocket.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions code/modules/projectiles/boxes_magazines/internal/grenade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
45 changes: 45 additions & 0 deletions code/modules/projectiles/guns/ballistic/launchers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..()
13 changes: 13 additions & 0 deletions code/modules/projectiles/projectile/special/rocket.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 modified icons/mob/clothing/back.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/weapons/guns_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/weapons/guns_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/ammo.dmi
Binary file not shown.
Binary file modified icons/obj/guns/projectile.dmi
Binary file not shown.
Binary file added sound/weapons/musket_cock.ogg
Binary file not shown.
Binary file added sound/weapons/musket_shot.ogg
Binary file not shown.

0 comments on commit aefeb5b

Please sign in to comment.