Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Departmental defense as the Found Fathers intended #22002

Merged
merged 19 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cb99772
Adds maintenance musket
Scrambledeggs00 Mar 2, 2024
e0b1f39
Added variance and dropoff, and buffed damage
Scrambledeggs00 Mar 8, 2024
6997529
Adds reload do-after and afterattack
Scrambledeggs00 Mar 8, 2024
082b463
Fixes icon and gets projectile to spread correctly
Scrambledeggs00 Mar 8, 2024
ecc7716
Adds smoke effect to firing cartridge
Scrambledeggs00 Mar 8, 2024
efa7d44
Merge branch 'master' of https://github.com/Scrambledeggs00/Yogstatio…
Scrambledeggs00 May 2, 2024
0d7cbeb
New cartridge and caliber and AP buff
Scrambledeggs00 May 2, 2024
8d726c6
Bayonet fix
Scrambledeggs00 May 2, 2024
98cab91
Made musket and cartridges craftable
Scrambledeggs00 May 2, 2024
448cea8
Merge branch 'master' of https://github.com/Scrambledeggs00/Yogstatio…
Scrambledeggs00 May 3, 2024
0510a34
No negative AP for BP cartridge
Scrambledeggs00 May 3, 2024
3a20e13
Update code/modules/projectiles/guns/ballistic/launchers.dm
Scrambledeggs00 May 6, 2024
15fd901
Update code/modules/projectiles/guns/ballistic/launchers.dm
Scrambledeggs00 May 6, 2024
07aa046
Reload bug fix and hopefully made moltijoe changes
Scrambledeggs00 May 6, 2024
b9514dd
Molti's changes
Scrambledeggs00 May 8, 2024
25ca9b2
Update code/modules/projectiles/guns/ballistic/launchers.dm
Scrambledeggs00 May 16, 2024
690351a
Update code/modules/projectiles/guns/ballistic/launchers.dm
Scrambledeggs00 May 16, 2024
4a11a4b
Fixed bug involving disapearing ammo
Scrambledeggs00 May 16, 2024
97f64a7
Lowered demolition mod to 0.25
Scrambledeggs00 May 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
46 changes: 46 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,49 @@
. = ..()
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/afterattack()
. = ..()
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 ..()
12 changes: 12 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,15 @@
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

/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.
Loading