From 9930fa9a646654d638b68e75e8b44165ed42d24c Mon Sep 17 00:00:00 2001 From: Singul0 <127663818+Singul0@users.noreply.github.com> Date: Wed, 6 May 2026 15:06:47 +0700 Subject: [PATCH 1/7] initial commit (WIP) --- .../projectiles/ammunition/caseless/bullet.dm | 16 ++ .../boxes_magazines/internal/single.dm | 10 ++ .../projectiles/guns/ballistic/_powder.dm | 2 +- .../guns/ballistic/powder/blunderbluss.dm | 164 ++++++++++++++++++ .../guns/ballistic/powder/musket.dm | 2 +- .../modules/projectiles/projectile/bullets.dm | 7 + icons/roguetown/weapons/64/guns.dmi | Bin 4671 -> 2394 bytes icons/roguetown/weapons/ammo.dmi | Bin 14870 -> 15168 bytes vanderlin.dme | 1 + 9 files changed, 200 insertions(+), 2 deletions(-) create mode 100644 code/modules/projectiles/guns/ballistic/powder/blunderbluss.dm diff --git a/code/modules/projectiles/ammunition/caseless/bullet.dm b/code/modules/projectiles/ammunition/caseless/bullet.dm index c85e6f1928f..c41005b6bc0 100644 --- a/code/modules/projectiles/ammunition/caseless/bullet.dm +++ b/code/modules/projectiles/ammunition/caseless/bullet.dm @@ -10,6 +10,22 @@ force = DAMAGE_KNIFE - 7 item_weight = 75 GRAMS +/obj/item/ammo_casing/caseless/pelletshot + name = "pelletshot" + desc = "A handful of pellet shots, made to punch many holes into a packed bunch of enemies." + projectile_type = /obj/projectile/bullet/pellet + caliber = "pelletshot" //shotgun variant of lead balls essentially + icon = 'icons/roguetown/weapons/ammo.dmi' + icon_state = "pellets" + dropshrink = 0.5 + possible_item_intents = list(INTENT_USE) + pellets = 6 + variance = 10 + randomspread = TRUE + + force = DAMAGE_KNIFE - 7 + item_weight = 75 GRAMS + /obj/item/ammo_casing/caseless/cball name = "large cannonball" desc = "A round lead ball. Complex and still spherical." diff --git a/code/modules/projectiles/boxes_magazines/internal/single.dm b/code/modules/projectiles/boxes_magazines/internal/single.dm index 9b974444069..59ac7eecc6c 100644 --- a/code/modules/projectiles/boxes_magazines/internal/single.dm +++ b/code/modules/projectiles/boxes_magazines/internal/single.dm @@ -20,6 +20,16 @@ ammo_type = /obj/item/ammo_casing/caseless/bullet caliber = "musketball" +//I mean, blunderbusses are mechanically just shotguns if you squint enough +/obj/item/ammo_box/magazine/internal/shotgun + name = "barrel" + max_ammo = 1 + ammo_type = /obj/item/ammo_casing/caseless/pelletshot + caliber = "blundershot" + +/obj/item/ammo_box/magazine/internal/shotgun/empty + start_empty = TRUE + /obj/item/ammo_box/magazine/internal/barrel/empty start_empty = TRUE diff --git a/code/modules/projectiles/guns/ballistic/_powder.dm b/code/modules/projectiles/guns/ballistic/_powder.dm index c692f4b116b..082a8b66205 100644 --- a/code/modules/projectiles/guns/ballistic/_powder.dm +++ b/code/modules/projectiles/guns/ballistic/_powder.dm @@ -140,7 +140,7 @@ return var/skill = GET_MOB_SKILL_VALUE(user, /datum/attribute/skill/combat/firearms) - if(skill < 10) + if(skill < 10) balloon_alert(user, "don't know how!") return diff --git a/code/modules/projectiles/guns/ballistic/powder/blunderbluss.dm b/code/modules/projectiles/guns/ballistic/powder/blunderbluss.dm new file mode 100644 index 00000000000..2b98e562ca9 --- /dev/null +++ b/code/modules/projectiles/guns/ballistic/powder/blunderbluss.dm @@ -0,0 +1,164 @@ +/obj/item/gun/ballistic/powder/wheellock/blunderbuss + name = "blunderbuss" + desc = "The current peak of Grenzelholfian firearms. It uses a much less complex firing mechanism than previous weapons." + icon = 'icons/roguetown/weapons/64/guns.dmi' + icon_state = "blunderbuss" + base_icon_state = "blunderbuss" + experimental_inhand = TRUE + experimental_onback = TRUE + bigboy = TRUE + SET_BASE_PIXEL(-16, -16) + inhand_x_dimension = 64 + inhand_y_dimension = 64 + slot_flags = ITEM_SLOT_BACK + w_class = WEIGHT_CLASS_BULKY + max_integrity = 100 + sellprice = 400 + item_weight = 4.5 KILOGRAMS + + possible_item_intents = list(/datum/intent/shoot/musket, /datum/intent/shoot/musket/arc, POLEARM_BASH) //TODO: CHECK THIS + force = 10 + can_parry = TRUE + wdefense = AVERAGE_PARRY + wlength = WLENGTH_LONG + + accepted_magazine_type = /obj/item/ammo_box/magazine/internal/shotgun + spawn_magazine_type = /obj/item/ammo_box/magazine/internal/shotgun + weapon_weight = WEAPON_HEAVY + recoil = 10 + randomspread = 2 + spread = 2 + projectile_damage_multiplier = 3.5 + + ramrod_type = /obj/item/ramrod/blunderbuss + powder_required = 10 + /// The bayonet if affixed + var/obj/item/weapon/knife/dagger/bayonet/bayonet = null + +/obj/item/gun/ballistic/powder/wheellock/blunderbuss/Initialize(mapload) + bayonet = new(src) + return ..() + +/obj/item/gun/ballistic/powder/wheellock/blunderbuss/Destroy(force) + if(!QDELETED(bayonet)) + QDEL_NULL(bayonet) + return ..() + +/obj/item/gun/ballistic/powder/wheellock/blunderbuss/Exited(atom/movable/exited, atom/newLoc) + . = ..() + if(exited == bayonet) + bayonet = null + +/obj/item/gun/ballistic/powder/wheellock/blunderbuss/update_icon_state() + . = ..() + icon_state = "[base_icon_state][cocked ? "_cocked" : "_uncocked"][ramrod ? "_ramrod" : ""][bayonet ? "_bayonet" : ""]" // God weeps + +/obj/item/gun/ballistic/powder/wheellock/blunderbuss/attackby(obj/item/attacking_item, mob/living/user, list/modifiers) + . = ..() + if(!bayonet && istype(attacking_item, /obj/item/weapon/knife/dagger/bayonet)) + balloon_alert(user, "attached!") + user.transferItemToLoc(attacking_item, src) + bayonet = attacking_item + update_appearance(UPDATE_ICON_STATE) + +/obj/item/gun/ballistic/powder/wheellock/blunderbuss/attack_hand_secondary(mob/user, list/modifiers) + . = ..() + if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN) + return + + if(!bayonet) + return + + balloon_alert(user, "removed!") + user.put_in_hands(bayonet) + update_appearance(UPDATE_ICON_STATE) + + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + +/obj/item/gun/ballistic/powder/wheellock/blunderbuss/pre_attack(atom/target, mob/living/user, list/modifiers) + . = ..() + if(bayonet && user.cmode) // Bayonet acts as a proxy attacker if present + INVOKE_ASYNC(bayonet, TYPE_PROC_REF(/obj/item, melee_attack_chain), user, target, modifiers - RIGHT_CLICK) + return TRUE + +/obj/item/ramrod/blunderbuss + name = "blunderbuss ramrod" + icon_state = "ramrod_musket" + item_weight = 300 GRAMS + +/obj/item/gun/ballistic/powder/wheellock/blunderbuss/getonmobprop(tag) + . = ..() + if(tag) + switch(tag) + if("gen") + return list( + "shrink" = 0.5, + "sx" = -2, + "sy" = 0, + "nx" = 11, + "ny" = 0, + "wx" = -4, + "wy" = -4, + "ex" = 2, + "ey" = 0, + "nturn" = 0, + "sturn" = 0, + "wturn" = 0, + "eturn" = 0, + "nflip" = 0, + "sflip" = 0, + "wflip" = 5, + "eflip" = 0, + "northabove" = 0, + "southabove" = 1, + "eastabove" = 1, + "westabove" = 0 + ) + if("wielded") + return list( + "shrink" = 0.5, + "sx" = 0, + "sy" = -3, + "nx" = 0, + "ny" = -2, + "wx" = -4, + "wy" = -3, + "ex" = 4, + "ey" = -3, + "nturn" = -45, + "sturn" = 45, + "wturn" = 45, + "eturn" = 45, + "nflip" = 4, + "sflip" = 0, + "wflip" = 5, + "eflip" = 0, + "northabove" = 0, + "southabove" = 1, + "eastabove" = 1, + "westabove" = 0 + ) + if("onback") + return list( + "shrink" = 0.5, + "sx" = 1, + "sy" = -1, + "nx" = 1, + "ny" = -1, + "wx" = -1, + "wy" = 0, + "ex" = 1, + "ey" = -1, + "nturn" = 0, + "sturn" = 0, + "wturn" = 0, + "eturn" = 0, + "nflip" = 5, + "sflip" = 5, + "wflip" = 5, + "eflip" = 5, + "northabove" = 1, + "southabove" = 0, + "eastabove" = 0, + "westabove" = 0 + ) diff --git a/code/modules/projectiles/guns/ballistic/powder/musket.dm b/code/modules/projectiles/guns/ballistic/powder/musket.dm index 488797e766d..3daf75b5f9c 100644 --- a/code/modules/projectiles/guns/ballistic/powder/musket.dm +++ b/code/modules/projectiles/guns/ballistic/powder/musket.dm @@ -49,7 +49,7 @@ /obj/item/gun/ballistic/powder/musket/update_icon_state() . = ..() - icon_state = "[base_icon_state][cocked ? "_cocked" : ""][ramrod ? "_ramrod" : ""][bayonet ? "_bayonet" : ""]" // God weeps + icon_state = "[base_icon_state][cocked ? "_cocked" : "_uncocked"][ramrod ? "_ramrod" : ""][bayonet ? "_bayonet" : ""]" // God weeps /obj/item/gun/ballistic/powder/musket/attackby(obj/item/attacking_item, mob/living/user, list/modifiers) . = ..() diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 2c4adac151c..1813ffed597 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -8,3 +8,10 @@ flag = "piercing" hitsound_wall = "ricochet" impact_effect_type = /obj/effect/temp_visual/impact_effect + +/obj/projectile/bullet/pellet + name = "pellet" + damage = 15 + armor_penetration = 100 + speed = 0.6 + woundclass = BCLASS_SHOT diff --git a/icons/roguetown/weapons/64/guns.dmi b/icons/roguetown/weapons/64/guns.dmi index 1c3ca3fe6478a7e8bfc8e73ae8244482efaa5206..61abf9fcca7e5387d56511a9b4b86a100ad9c597 100644 GIT binary patch literal 2394 zcmZveXH*kw6UT!s7PwJSf+(P%pdtnkMWiH@m|y`xkZJ%0BQH&gAc-U@C{~IEkkBJw z!`!Ge2?Pa|BEbt%q(!BKk`N(8Sd#4Cc=hW0;eL2#e)E53XZD=gIcKjNvd1YcRa**! z!IbRqwoWjZ0!Dsdi|5M~v5NP!+#Nr3z!_UpQ{(2fzoDrVV{4v$FVSU>K6?AcD`92< z_}!YwmG|z1IjmM9nyw8E@bhv$;C{r3R$LZONyyDTjoobSdvL>6wH=ykRxVdsVx+6G zAHB`T#Ud`w>Rg!5W<8zNtF?lHeAcZ-xK@C5@^%W5PWFdknBlGy@_<8fc8j$2k2oG4 za4Iq&Gz11alUZ=Pa_K9BRhM{!TdXUuS%*cWsEqn}Z`jz(+!Cx@kDU}Ksn{;CqlG}{ zg-sQT4Gk49J}7Nr?5vJsRvj6%z1pW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