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

Musket return #799

Merged
merged 12 commits into from
Dec 19, 2024
1 change: 1 addition & 0 deletions code/__DEFINES/calibers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#define CALIBER_762X54 "7.62x54mm Rimmed" //SVD and mosin
#define CALIBER_557 ".557/440" //Martini Henry
#define CALIBER_RAILGUN "rail projectile"
#define CALIBER_19MM "19mm ball"

// --- Explosives ---
#define CALIBER_20MM "20x28mm grenade"
Expand Down
4 changes: 4 additions & 0 deletions code/datums/jobs/job/shipside.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ Godspeed, captain! And remember, you are not above the law."})
glasses = /obj/item/clothing/glasses/sunglasses/aviator/yellow
head = null
back = FALSE
r_hand = /obj/item/weapon/gun/shotgun/double/musket
l_hand = /obj/item/ammo_magazine/packet/musket

//Field Commander
/datum/job/terragov/command/fieldcommander
Expand Down Expand Up @@ -234,6 +236,8 @@ You are in charge of logistics and the overwatch system. You are also in line to
head = null
w_uniform = /obj/item/clothing/under/marine/whites/blacks
shoes = /obj/item/clothing/shoes/laceup
r_hand = /obj/item/weapon/gun/shotgun/double/musketoon
l_hand = /obj/item/ammo_magazine/packet/musket/small

//Transport Officer
/datum/job/terragov/command/transportofficer
Expand Down
23 changes: 23 additions & 0 deletions code/modules/projectiles/ammo_datums/bullet/sniper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,26 @@
damage = 120
penetration = 60
sundering = 20

/datum/ammo/bullet/sniper/musket
name = "musket lead bullet"
icon_state = "musket"
handful_icon_state = "musket"
hud_state = "musket_ball"
hud_state_empty = "musket_ball_empty"
handful_amount = 3
flags_ammo_behavior = AMMO_BALLISTIC
damage = 220
penetration = 50
accurate_range_min = 2
var/shatter_duration = 5 SECONDS

/datum/ammo/bullet/sniper/musket/on_hit_mob(mob/M, obj/projectile/proj)
if(!isliving(M))
return

var/mob/living/living_victim = M
living_victim.apply_status_effect(STATUS_EFFECT_SHATTER, shatter_duration)

/datum/ammo/bullet/sniper/musket/on_hit_mob(mob/M,obj/projectile/P)
staggerstun(M, P, slowdown = 1, knockback = 1)
4 changes: 2 additions & 2 deletions code/modules/projectiles/gun_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@
COMSIG_HUMAN_MARKSMAN_AURA_CHANGED))
gun_user.client?.mouse_pointer_icon = initial(gun_user.client.mouse_pointer_icon)
SEND_SIGNAL(gun_user, COMSIG_GUN_USER_UNSET)
gun_user.hud_used.remove_ammo_hud(src)
gun_user.hud_used?.remove_ammo_hud(src)
gun_user = null

if(!user)
Expand All @@ -475,7 +475,7 @@
gun_user = user
SEND_SIGNAL(gun_user, COMSIG_GUN_USER_SET, src)
if(flags_gun_features & GUN_AMMO_COUNTER)
gun_user.hud_used.add_ammo_hud(src, get_ammo_list(), get_display_ammo_count())
gun_user.hud_used?.add_ammo_hud(src, get_ammo_list(), get_display_ammo_count())
if(master_gun)
return
setup_bullet_accuracy()
Expand Down
105 changes: 100 additions & 5 deletions code/modules/projectiles/guns/shotguns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,6 @@

flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES|GUN_WIELDED_FIRING_ONLY
attachable_offset = list("muzzle_x" = 45, "muzzle_y" = 23,"rail_x" = 17, "rail_y" = 25, "under_x" = 19, "under_y" = 14, "stock_x" = 15, "stock_y" = 12)
/* RU TGMC EDIT
actions_types = list(/datum/action/item_action/aim_mode) RU TGMC EDIT
aim_slowdown = 0.35
aim_time = 0.5 SECONDS
RU TGMC EDIT */

fire_delay = 1 SECONDS

Expand All @@ -505,6 +500,106 @@ RU TGMC EDIT */

placed_overlay_iconstate = "wood"

//***********************************************************
// Old but powerful

/obj/item/weapon/gun/shotgun/double/musket
name = "\improper Croweson musket"
desc = "A breech-loading rifle with room for a single round of 19mm ball."
icon = 'icons/Marine/gun64.dmi'
icon_state = "musket"
item_state = "musket"
inhand_x_dimension = 64
inhand_y_dimension = 32
item_icons = list(
slot_l_hand_str = 'icons/mob/items_lefthand_64.dmi',
slot_r_hand_str = 'icons/mob/items_righthand_64.dmi',
)
Helg2 marked this conversation as resolved.
Show resolved Hide resolved
caliber = CALIBER_19MM
muzzle_flash_lum = 6
max_chamber_items = 1
type_of_casings = null
ammo_datum_type = /datum/ammo/bullet/sniper/musket
default_ammo_type = /datum/ammo/bullet/sniper/musket
gun_skill_category = SKILL_RIFLES
fire_sound = 'sound/weapons/guns/fire/tgmc/kinetic/gun_martinihenry.ogg'
reload_sound = 'sound/weapons/guns/interact/martini_reload.ogg'
cocked_sound = 'sound/weapons/guns/interact/martini_cocked.ogg'
opened_sound = 'sound/weapons/guns/interact/martini_open.ogg'
attachable_allowed = list(
/obj/item/attachable/bayonet,
/obj/item/attachable/bayonetknife,
/obj/item/attachable/bayonetknife/som,
/obj/item/attachable/magnetic_harness,
)

flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES|GUN_WIELDED_FIRING_ONLY
attachable_offset = list("muzzle_x" = 55, "muzzle_y" = 19,"rail_x" = 35, "rail_y" = 20, "under_x" = 19, "under_y" = 14, "stock_x" = 15, "stock_y" = 12)

accuracy_mult = 1
fire_delay = 3.5 SECONDS
accuracy_mult_unwielded = 0.5

scatter = -25
scatter_unwielded = 10

recoil = 1
recoil_unwielded = 5

damage_falloff_mult = 2
wield_delay = 2 SECONDS
movement_acc_penalty_mult = 2

//***********************************************************
// Younger brother of musket

/obj/item/weapon/gun/shotgun/double/musketoon
name = "\improper Croweson musketoon"
desc = "Shorter-barrelled version of the musket with room for a single round of 19mm ball."
icon = 'icons/Marine/gun64.dmi'
icon_state = "musketoon"
item_state = "musketoon"
item_icons = list(
slot_l_hand_str = 'icons/mob/items_lefthand_1.dmi',
slot_r_hand_str = 'icons/mob/items_righthand_1.dmi',
)
Helg2 marked this conversation as resolved.
Show resolved Hide resolved
caliber = CALIBER_19MM
muzzle_flash_lum = 3
max_chamber_items = 1
type_of_casings = null
ammo_datum_type = /datum/ammo/bullet/sniper/musket
default_ammo_type = /datum/ammo/bullet/sniper/musket
gun_skill_category = SKILL_PISTOLS
fire_sound = 'sound/weapons/guns/fire/tgmc/kinetic/gun_martinihenry.ogg'
reload_sound = 'sound/weapons/guns/interact/martini_reload.ogg'
cocked_sound = 'sound/weapons/guns/interact/martini_cocked.ogg'
opened_sound = 'sound/weapons/guns/interact/martini_open.ogg'
attachable_allowed = list(
/obj/item/attachable/bayonet,
/obj/item/attachable/bayonetknife,
/obj/item/attachable/bayonetknife/som,
/obj/item/attachable/magnetic_harness,
)

flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES
attachable_offset = list("muzzle_x" = 40, "muzzle_y" = 20,"rail_x" = 16, "rail_y" = 20, "under_x" = 19, "under_y" = 14, "stock_x" = 15, "stock_y" = 12)
w_class = WEIGHT_CLASS_SMALL

accuracy_mult_unwielded = 1
fire_delay = 1 SECONDS

scatter = -25
scatter_unwielded = -5

damage_falloff_mult = 3
recoil = -1
recoil_unwielded = 1

damage_mult = 0.5
aim_slowdown = 1
wield_delay = 0.5 SECONDS
movement_acc_penalty_mult = 1

//***********************************************************
// Derringer

Expand Down
18 changes: 18 additions & 0 deletions code/modules/projectiles/magazines/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,21 @@
caliber = CALIBER_10X27_CASELESS
current_rounds = 200
max_rounds = 200

/obj/item/ammo_magazine/packet/musket
name = "sack of musket lead rounds"
desc = "A sack filled with lead bullets."
icon_state = "musket_sack_m"
default_ammo = /datum/ammo/bullet/sniper/musket
max_rounds = 54
caliber = CALIBER_19MM
w_class = WEIGHT_CLASS_NORMAL
icon_state_mini = "musket_sack_m"

/obj/item/ammo_magazine/packet/musket/small
name = "a small sack of musket lead rounds"
desc = "A small sack filled with lead bullets."
icon_state = "musket_sack_s"
max_rounds = 27
w_class = WEIGHT_CLASS_SMALL
icon_state_mini = "musket_sack_s"
1 change: 0 additions & 1 deletion code/modules/projectiles/magazines/specialist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -451,4 +451,3 @@
max_rounds = 5
reload_delay = 10
icon_state_mini = "mag_dmr"

Binary file modified icons/Marine/gun64.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/back.dmi
Binary file not shown.
Binary file modified icons/mob/hud/ammo.dmi
Binary file not shown.
Binary file modified icons/mob/items_lefthand_1.dmi
Binary file not shown.
Binary file modified icons/mob/items_lefthand_64.dmi
Binary file not shown.
Binary file modified icons/mob/items_righthand_1.dmi
Binary file not shown.
Binary file modified icons/mob/items_righthand_64.dmi
Binary file not shown.
Binary file modified icons/mob/suit_slot.dmi
Binary file not shown.
Binary file modified icons/obj/items/ammo/handful.dmi
Binary file not shown.
Binary file modified icons/obj/items/ammo/packet.dmi
Binary file not shown.
Loading