The Second Coming of the Rebar Crossbow (#96525)

This commit is contained in:
KingkumaArt
2026-07-03 10:47:20 +10:00
committed by GitHub
parent b3b996275b
commit ee71baf704
9 changed files with 67 additions and 51 deletions
+29 -27
View File
@@ -516,13 +516,41 @@
slot_flags = ITEM_SLOT_BACK|ITEM_SLOT_SUITSTORE|ITEM_SLOT_NECK
resistance_flags = FLAMMABLE
storage_type = /datum/storage/bag/rebar_quiver
actions_types = list(/datum/action/item_action/reload_rebar)
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 6.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5)
/obj/item/storage/bag/rebar_quiver/Initialize(mapload)
. = ..()
update_appearance(UPDATE_OVERLAYS)
/obj/item/storage/bag/rebar_quiver/ui_action_click(mob/user, actiontype)
if(istype(actiontype, /datum/action/item_action/reload_rebar))
reload_held_rebar(user)
/obj/item/storage/bag/rebar_quiver/proc/reload_held_rebar(mob/user)
if(!contents.len)
user.balloon_alert(user, "no bolts left!")
return
var/obj/held_item = user.get_active_held_item()
if(!held_item || !istype(held_item, /obj/item/gun/ballistic/rifle/rebarxbow))
user.balloon_alert(user, "no held crossbow!")
return
var/obj/item/gun/ballistic/rifle/rebarxbow/held_crossbow = held_item
if(held_crossbow.magazine.contents.len >= held_crossbow.magazine.max_ammo)
user.balloon_alert(user, "no more room!")
return
if(!do_after(user, held_crossbow.reload_time, user,timed_action_flags = held_crossbow.doafter_flags))
return
var/obj/item/ammo_casing/rebar/ammo_to_load = contents[1]
held_crossbow.item_interaction(user, ammo_to_load)
/obj/item/storage/bag/rebar_quiver/syndicate
icon_state = "syndie_quiver_0"
worn_icon_state = "syndie_quiver_0"
inhand_icon_state = "holyquiver"
desc = "A specialized quiver meant to hold any kind of bolts intended for use with the rebar crossbow. \
desc = "A specialized quiver meant to hold any kind of bolts intended for use with the rebar crossbow. Allows moving while reloading.\
Clearly a better design than a cut up oxygen tank..."
slot_flags = ITEM_SLOT_NECK
w_class = WEIGHT_CLASS_NORMAL
@@ -530,10 +558,6 @@
actions_types = list(/datum/action/item_action/reload_rebar)
storage_type = /datum/storage/bag/rebar_quiver/syndicate
/obj/item/storage/bag/rebar_quiver/syndicate/Initialize(mapload)
. = ..()
update_appearance(UPDATE_OVERLAYS)
/obj/item/storage/bag/rebar_quiver/syndicate/PopulateContents()
for(var/to_fill in 1 to 20)
new /obj/item/ammo_casing/rebar/syndie(src)
@@ -550,28 +574,6 @@
if(14 to 20)
icon_state = "syndie_quiver_3"
/obj/item/storage/bag/rebar_quiver/syndicate/ui_action_click(mob/user, actiontype)
if(istype(actiontype, /datum/action/item_action/reload_rebar))
reload_held_rebar(user)
/obj/item/storage/bag/rebar_quiver/syndicate/proc/reload_held_rebar(mob/user)
if(!contents.len)
user.balloon_alert(user, "no bolts left!")
return
var/obj/held_item = user.get_active_held_item()
if(!held_item || !istype(held_item, /obj/item/gun/ballistic/rifle/rebarxbow))
user.balloon_alert(user, "no held crossbow!")
return
var/obj/item/gun/ballistic/rifle/rebarxbow/held_crossbow = held_item
if(held_crossbow.magazine.contents.len >= held_crossbow.magazine.max_ammo)
user.balloon_alert(user, "no more room!")
return
if(!do_after(user, 1.2 SECONDS, user))
return
var/obj/item/ammo_casing/rebar/ammo_to_load = contents[1]
held_crossbow.item_interaction(user, ammo_to_load)
/obj/item/storage/bag/quiver
name = "quiver"
desc = "Holds arrows for your bow. Good, because while pocketing arrows is possible, it surely can't be pleasant."