Archery Tweaks (#8670)

* Add proper custom arrows. (cross)Bows "render" proper arrows over themselves in inventory and on ground. Hardlight bow no longer deletes other arrows on removal.

* Fix subtyping issue.
Add Chitin arrow type.

* Remember to hit save, kids.

* Fixfix. Add true Unga arrow utilizing the Ancient Art of Sharp Rocks.
This commit is contained in:
Mechoid
2022-07-31 22:09:53 -08:00
committed by GitHub
parent d841b1452f
commit e072e147a4
10 changed files with 217 additions and 58 deletions
+2 -36
View File
@@ -69,10 +69,10 @@
reqs = list(list(/obj/item/handcuffs/cable = 1),
list(/obj/item/stack/rods = 1),
list(/obj/item/material/shard = 1,
/obj/item/material/butterflyblade = 1)
/obj/item/material/butterflyblade = 1)
)
parts = list(/obj/item/material/shard = 1,
/obj/item/material/butterflyblade = 1)
/obj/item/material/butterflyblade = 1)
time = 40
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -94,40 +94,6 @@
S.set_material(M.material.name)
qdel(M)
/datum/crafting_recipe/shortbow
name = "Shortbow"
result = /obj/item/gun/launcher/crossbow/bow
reqs = list(list(/obj/item/stack/material/wood = 10),
list(/obj/item/stack/material/cloth = 5))
time = 120
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
/datum/crafting_recipe/arrow_sandstone
name = "Wood arrow (sandstone tip)"
result = /obj/item/arrow/wood
reqs = list(list(/obj/item/stack/material/wood = 2),
list(/obj/item/stack/material/sandstone = 2))
time = 20
category = CAT_WEAPONRY
subcategory = CAT_AMMO
/datum/crafting_recipe/arrow_marble
name = "Wood arrow (marble tip)"
result = /obj/item/arrow/wood
reqs = list(list(/obj/item/stack/material/wood = 2),
list(/obj/item/stack/material/marble = 2))
time = 20
category = CAT_WEAPONRY
subcategory = CAT_AMMO
/datum/crafting_recipe/quiver
name = "Arrow quiver"
result = /obj/item/storage/bag/quiver
reqs = list(list(/obj/item/stack/material/leather = 8))
time = 60
category = CAT_STORAGE
/datum/crafting_recipe/material_armor
name = "Material Armor Plate"
result = /obj/item/clothing/accessory/material/advanced
@@ -0,0 +1,107 @@
/*
* Bows, Arrows, and Accessories.
*/
/datum/crafting_recipe/shortbow
name = "Shortbow"
result = /obj/item/gun/launcher/crossbow/bow
reqs = list(list(/obj/item/stack/material/wood = 10),
list(/obj/item/stack/material/cloth = 5))
time = 120
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
/datum/crafting_recipe/arrow_sandstone
name = "Wood Arrow (Sandstone Tip)"
result = /obj/item/arrow/wood
reqs = list(list(/obj/item/stack/material/wood = 2),
list(/obj/item/stack/material/sandstone = 2))
time = 2 SECONDS
category = CAT_WEAPONRY
subcategory = CAT_AMMO
/datum/crafting_recipe/arrow_marble
name = "Wood Arrow (Marble Tip)"
result = /obj/item/arrow/wood
reqs = list(list(/obj/item/stack/material/wood = 2),
list(/obj/item/stack/material/marble = 2))
time = 2 SECONDS
category = CAT_WEAPONRY
subcategory = CAT_AMMO
/datum/crafting_recipe/arrow_chitin
name = "Wood Arrow (Chitin Tip)"
result = /obj/item/arrow/wood/chitin
reqs = list(list(/obj/item/stack/material/wood = 2),
list(/obj/item/stack/material/chitin = 2),
list(/obj/item/stack/material/cloth = 1))
time = 3 SECONDS
category = CAT_WEAPONRY
subcategory = CAT_AMMO
/datum/crafting_recipe/arrow_metal_material
name = "Metal Arrow (Custom Tip)"
result = /obj/item/material/arrow
reqs = list(list(/obj/item/handcuffs/cable = 1),
list(/obj/item/stack/material = 3))
parts = list(
/obj/item/stack/material = 3
)
tool_paths = list(
/obj/item/material/sharpeningkit
)
time = 6 SECONDS
category = CAT_WEAPONRY
subcategory = CAT_AMMO
/datum/crafting_recipe/arrow_metal_material/on_craft_completion(mob/user, atom/result)
var/obj/item/stack/material/M
for(var/path in parts)
var/obj/item/material/N = locate(path) in result
if(istype(N, path))
if(!istype(M))
M = N
else
N.forceMove(get_turf(result))
if(!istype(M))
return
var/obj/item/material/arrow/A = result
A.set_material(M.material.name)
qdel(M)
/datum/crafting_recipe/arrow_wood_material
name = "Wood Arrow (Crude Tip)"
result = /obj/item/material/arrow/crude
reqs = list(list(/obj/item/stack/material/wood = 2),
list(/obj/item/material/knife/machete/hatchet/stone = 1),
list(/obj/item/stack/material/cloth = 1))
parts = list(
/obj/item/material/knife/machete/hatchet/stone = 1
)
time = 3 SECONDS
category = CAT_WEAPONRY
subcategory = CAT_AMMO
/datum/crafting_recipe/arrow_wood_material/on_craft_completion(mob/user, atom/result)
var/obj/item/material/M
for(var/path in parts)
var/obj/item/material/N = locate(path) in result
if(istype(N, path))
if(!istype(M))
M = N
else
N.forceMove(get_turf(result))
if(!istype(M))
return
var/obj/item/material/arrow/A = result
A.set_material(M.material.name)
qdel(M)
/datum/crafting_recipe/quiver
name = "Arrow quiver"
result = /obj/item/storage/bag/quiver
reqs = list(list(/obj/item/stack/material/leather = 8))
time = 60
category = CAT_STORAGE