Bow Update: Fletching instruction manual, bows using projectile damage multipliers, unhardcoded bow sprites, hot pink death (#84435)

## About The Pull Request

Adds a new crate to the Service section of cargo. The Fletching and
Bow-Making Starter Kit. Comes with some materials and a fletching
instruction manual.

The manual teaches you how to make shortbows (18 force from normal
arrows utilizing projectile multipliers), arrows, holy arrows (but you
need a divine bow to make them), quivers (but they only hold 10 arrows),
plastic arrows and violins. For reasons.


![image](https://github.com/tgstation/tgstation/assets/40847847/576732f2-03b4-47b7-9bad-d85ff06480f0)


### Fixes

Bows now no longer utilize hardcoded sprites for their loaded sprite.
Now they use overlays.

Bows properly become undrawn once fired. No longer can your bow
magically launch arrows by sheer force of will.

## Why It's Good For The Game

Initially I just wanted to provide a way for bow wielding chaplains to
produce additional arrows for their bow. Running out of those always
felt pretty lame. But then I got to thinking; actually, I kind of want
to LARP sometimes as an archer. I think that'd be kind of goofy and fun.
So I bundled that together into a solution for both.

The shortbow is really, really not meant to be a meaningful weapon. It's
just kind of silly, and meant to let people pretend to be Robin Hood and
occasionally hurt someone in a workplace accident. I'm particularly
thinking of clowns being the perfect users for this with their clumsy
trait. I will make this weaker if I have too.

(I am not, at this moment, redoing flaming arrows okay? I saw the code
comment. I know. Not right now. @tralezab, if you have any flaming arrow
sprites lying around, please let me know.)

## Changelog
🆑
add: Fletching starter kit! Make your own bow, shoot your friends in an
unfortunate workplace accident. Replace all those holy arrows you lost.
fix: Bows now properly undraw once they have fired an arrow.
code: Bows now utilize overlays in order to display loaded arrows.
Unique overlays per arrow.
/🆑
This commit is contained in:
necromanceranne
2024-07-07 17:57:32 +02:00
committed by GitHub
parent 743b95b50a
commit e4adc1a939
15 changed files with 179 additions and 19 deletions
@@ -249,3 +249,18 @@
/obj/item/stack/cable_coil = 2,
)
category = CAT_EQUIPMENT
/datum/crafting_recipe/violin
name = "Violin"
result = /obj/item/instrument/violin
reqs = list(
/obj/item/stack/sheet/mineral/wood = 4,
/obj/item/stack/sheet/cloth = 2,
/obj/item/stack/sheet/iron = 1,
)
tool_paths = list(
/obj/item/hatchet,
)
time = 30 SECONDS
category = CAT_ENTERTAINMENT
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED
@@ -260,3 +260,14 @@
)
category = CAT_EQUIPMENT
tool_behaviors = list(TOOL_WELDER, TOOL_WIRECUTTER)
/datum/crafting_recipe/arrow_quiver
name = "Archery Quiver"
result = /obj/item/storage/bag/quiver/lesser
time = 10
reqs = list(
/obj/item/stack/sheet/leather = 4,
/obj/item/stack/sheet/cardboard = 4
)
category = CAT_EQUIPMENT
tool_behaviors = list(TOOL_WELDER, TOOL_WIRECUTTER)
@@ -375,6 +375,21 @@
category = CAT_WEAPON_RANGED
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED
/datum/crafting_recipe/shortbow
name = "Shortbow"
result = /obj/item/gun/ballistic/bow/shortbow
reqs = list(
/obj/item/stack/sheet/mineral/wood = 4,
/obj/item/stack/sheet/cloth = 2,
/obj/item/stack/sheet/iron = 1,
)
tool_paths = list(
/obj/item/hatchet,
)
time = 30 SECONDS
category = CAT_WEAPON_RANGED
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED
/datum/crafting_recipe/photoncannon
name = "Photon Cannon"
result = /obj/item/gun/energy/photon
@@ -111,3 +111,46 @@
)
category = CAT_WEAPON_AMMO
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED
/datum/crafting_recipe/arrow
name = "Arrow"
result = /obj/item/ammo_casing/arrow
reqs = list(
/obj/item/stack/sheet/mineral/wood = 1,
/obj/item/stack/sheet/cloth = 1,
/obj/item/stack/sheet/iron = 1,
)
tool_paths = list(
/obj/item/hatchet,
)
time = 5 SECONDS
category = CAT_WEAPON_AMMO
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED
/datum/crafting_recipe/plastic_arrow
name = "Plastic Arrow"
result = /obj/item/ammo_casing/arrow/plastic
reqs = list(
/obj/item/stack/sheet/plastic = 1,
)
tool_paths = list(
/obj/item/hatchet,
)
time = 5 SECONDS
category = CAT_WEAPON_AMMO
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED
/datum/crafting_recipe/holy_arrow
name = "Holy Arrow"
result = /obj/item/ammo_casing/arrow/holy
reqs = list(
/obj/item/ammo_casing/arrow = 1,
/datum/reagent/water/holywater = 10,
)
tool_paths = list(
/obj/item/gun/ballistic/bow/divine,
)
time = 5 SECONDS
category = CAT_WEAPON_AMMO
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED
@@ -0,0 +1,22 @@
/obj/item/book/granter/crafting_recipe/fletching
name = "Whittle Me This: Fletching for the Modern Spacer"
desc = "A how-to guide to crafting and maintaining wooden bows, fletching arrows, and... making violins?"
crafting_recipe_types = list(
/datum/crafting_recipe/arrow,
/datum/crafting_recipe/plastic_arrow,
/datum/crafting_recipe/shortbow,
/datum/crafting_recipe/holy_arrow,
/datum/crafting_recipe/arrow_quiver,
/datum/crafting_recipe/violin,
)
icon_state = "book4"
uses = INFINITY
remarks = list(
"Okay, so the quality of the wood has some impact.",
"I feel like the violin chapter is in here as a joke, surely...",
"The author seems oddly proud about how many years they've been hunting in 'these parts'...",
"i really wish they'd stop with all the marriage euphemisms...",
"I need membership? Membership with what?",
"Okay, I think I get the point already...",
)
@@ -26,7 +26,7 @@
name = "Redfield Castle Archer"
icon_state = "medisim_archer"
belt = /obj/item/storage/bag/quiver
belt = /obj/item/storage/bag/quiver/full
suit = /obj/item/clothing/suit/armor/vest/cuirass
l_hand = /obj/item/gun/ballistic/bow
+6 -5
View File
@@ -309,11 +309,12 @@
risky espionage hallway operations. Enjoy our product!"
contraband = TRUE
cost = CARGO_CRATE_VALUE * 6
contains = list(/obj/item/clothing/under/syndicate/floortilecamo = 3,
/obj/item/clothing/mask/floortilebalaclava = 3,
/obj/item/clothing/gloves/combat/floortile = 3,
/obj/item/clothing/shoes/jackboots/floortile = 3,
/obj/item/storage/backpack/floortile = 3
contains = list(
/obj/item/clothing/under/syndicate/floortilecamo = 3,
/obj/item/clothing/mask/floortilebalaclava = 3,
/obj/item/clothing/gloves/combat/floortile = 3,
/obj/item/clothing/shoes/jackboots/floortile = 3,
/obj/item/storage/backpack/floortile = 3
)
crate_name = "floortile camouflauge crate"
crate_type = /obj/structure/closet/crate/secure/weapon
+14
View File
@@ -303,3 +303,17 @@
contains = list(/obj/item/wallframe/barsign/all_access)
crate_name = "bar sign crate"
discountable = SUPPLY_PACK_RARE_DISCOUNTABLE
/datum/supply_pack/service/bowmaking
name = "Fletching and Bow-Making Starter Kit"
desc = "A fairly outdated copy of 'Whittle Me This: Fletching for the Modern Spacer', along with some useful materials. \
For those looking to get into bow-making, or give their LARPing a little more edge, you can't go wrong. Also has \
instructions for making violins."
cost = CARGO_CRATE_VALUE * 5
contains = list(
/obj/item/book/granter/crafting_recipe/fletching = 1,
/obj/item/stack/sheet/mineral/wood = 10,
/obj/item/stack/sheet/cloth = 10,
)
crate_name = "bowmaking starter kit crate"
crate_type = /obj/structure/closet/crate/wooden
@@ -27,7 +27,12 @@
/obj/item/gun/ballistic/bow/update_icon_state()
. = ..()
icon_state = chambered ? "[base_icon_state]_[drawn ? "drawn" : "nocked"]" : "[base_icon_state]"
icon_state = "[base_icon_state][drawn ? "_drawn" : ""]"
/obj/item/gun/ballistic/bow/update_overlays()
. = ..()
if(chambered)
. += "[chambered.base_icon_state][drawn ? "_drawn" : ""]"
/obj/item/gun/ballistic/bow/click_alt(mob/user)
if(isnull(chambered))
@@ -72,6 +77,11 @@
return FALSE
return ..() //fires, removing the arrow
/obj/item/gun/ballistic/bow/postfire_empty_checks(last_shot_succeeded)
if(!chambered && !get_ammo())
drawn = FALSE
update_appearance()
/obj/item/gun/ballistic/bow/equipped(mob/user, slot, initial)
. = ..()
if(slot != ITEM_SLOT_HANDS && chambered)
@@ -58,22 +58,34 @@
name = "holy arrow"
desc = "Here it comes, cultist scum!"
icon_state = "holy_arrow_projectile"
damage = 20 //still a lot but this is roundstart gear so far less
embedding = list(
embed_chance = 50,
fall_chance = 2,
jostle_chance = 0,
ignore_throwspeed_threshold = TRUE,
pain_stam_pct = 0.5,
pain_mult = 3,
rip_time = 1 SECONDS
)
/obj/projectile/bullet/arrow/holy/Initialize(mapload)
. = ..()
//50 damage to revenants
AddElement(/datum/element/bane, target_type = /mob/living/basic/revenant, damage_multiplier = 0, added_damage = 30)
/// plastic arrows
// completely dogshit quality and they break when they hit something.
/obj/item/ammo_casing/arrow/plastic
name = "plastic arrow"
desc = "The earliest mining teams within the Spinward Sector were the somewhat stout ancestors of the modern settlers. These teams \
found themselves often unable to access the quality materials they were digging up for equipment maintenance, all being sent off-site. \
Left with few options, and in need of a way to protect themselves in the hostile work enviroments of the Spinward, they turned \
to the one material they had in abundance."
icon_state = "plastic_arrow"
base_icon_state = "plastic_arrow"
projectile_type = /obj/projectile/bullet/arrow/plastic
reusable = FALSE //cheap shit
/// plastic arrow projectile
/obj/projectile/bullet/arrow/plastic
name = "plastic arrow"
desc = "If this is about to kill you, you should feel genuine shame."
damage = 5
stamina = 50
weak_against_armour = TRUE
icon_state = "plastic_arrow_projectile"
/// special pyre sect arrow
/// in the future, this needs a special sprite, but bows don't support non-hardcoded arrow sprites
/obj/item/ammo_casing/arrow/holy/blazing
@@ -99,5 +111,5 @@
human_target.adjust_fire_stacks(2)
human_target.ignite_mob()
return
to_chat(human_target, span_danger("[src] reacts with the flames on y-"))
to_chat(human_target, span_danger("[src] reacts with the flames enveloping you! Oh shit!"))
explosion(src, light_impact_range = 1, flame_range = 2) //ow
@@ -8,6 +8,7 @@
worn_icon_state = "harpoon_quiver"
/// type of arrow the quivel should hold
var/arrow_path = /obj/item/ammo_casing/arrow
var/max_slots = 40
/obj/item/storage/bag/quiver/Initialize(mapload)
. = ..()
@@ -17,7 +18,10 @@
atom_storage.max_total_storage = 100
atom_storage.set_holdable(/obj/item/ammo_casing/arrow)
/obj/item/storage/bag/quiver/PopulateContents()
/obj/item/storage/bag/quiver/lesser
max_slots = 10
/obj/item/storage/bag/quiver/full/PopulateContents()
. = ..()
for(var/i in 1 to 10)
new arrow_path(src)
@@ -29,3 +33,8 @@
inhand_icon_state = "holyquiver"
worn_icon_state = "holyquiver"
arrow_path = /obj/item/ammo_casing/arrow/holy
/obj/item/storage/bag/quiver/holy/PopulateContents()
. = ..()
for(var/i in 1 to 10)
new arrow_path(src)
@@ -4,6 +4,12 @@
name = "longbow"
desc = "While pretty finely crafted, surely you can find something better to use in the current year."
/// Shortbow, made via the crafting recipe
/obj/item/gun/ballistic/bow/shortbow
name = "shortbow"
desc = "A simple homemade shortbow. Great for LARPing. Or poking out someones eye."
projectile_damage_multiplier = 0.36
///chaplain's divine archer bow
/obj/item/gun/ballistic/bow/divine
name = "divine bow"
@@ -15,6 +21,7 @@
slot_flags = ITEM_SLOT_BACK
obj_flags = UNIQUE_RENAME
accepted_magazine_type = /obj/item/ammo_box/magazine/internal/bow/holy
projectile_damage_multiplier = 0.4
/obj/item/ammo_box/magazine/internal/bow/holy
name = "divine bowstring"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

+1
View File
@@ -2467,6 +2467,7 @@
#include "code\game\objects\items\granters\crafting\combat_baking.dm"
#include "code\game\objects\items\granters\crafting\death_sandwich.dm"
#include "code\game\objects\items\granters\crafting\desserts.dm"
#include "code\game\objects\items\granters\crafting\fletching.dm"
#include "code\game\objects\items\granters\crafting\pipegun.dm"
#include "code\game\objects\items\granters\crafting\rebarxbowsyndie.dm"
#include "code\game\objects\items\granters\crafting\regal_condor.dm"