diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index e3494e36cf..b746058588 100755 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -653,6 +653,9 @@ icon_state = "sheath" item_state = "sheath" w_class = WEIGHT_CLASS_BULKY + var/list/fitting_swords = list(/obj/item/melee/sabre, /obj/item/melee/baton/stunsword) + var/starting_sword = /obj/item/melee/sabre + var/sword_overlay /obj/item/storage/belt/sabre/ComponentInitialize() . = ..() @@ -660,35 +663,7 @@ STR.max_items = 1 STR.rustle_sound = FALSE STR.max_w_class = WEIGHT_CLASS_BULKY - STR.can_hold = typecacheof(list( - /obj/item/melee/sabre - )) - -/obj/item/storage/belt/sabre/rapier - name = "rapier sheath" - desc = "A black, thin sheath that looks to house only a long thin blade. Feels like its made of metal." - icon_state = "rsheath" - item_state = "rsheath" - force = 5 - throwforce = 15 - block_chance = 30 - w_class = WEIGHT_CLASS_BULKY - attack_verb = list("bashed", "slashes", "prods", "pokes") - -/obj/item/storage/belt/sabre/rapier/ComponentInitialize() - . = ..() - GET_COMPONENT(STR, /datum/component/storage) - STR.max_items = 1 - STR.rustle_sound = FALSE - STR.max_w_class = WEIGHT_CLASS_BULKY - STR.can_hold = typecacheof(list( - /obj/item/melee/rapier - )) - -/obj/item/storage/belt/sabre/rapier/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) - if(attack_type == PROJECTILE_ATTACK) - final_block_chance = 0 //To thin to block bullets - return ..() + STR.can_hold = typecacheof(fitting_swords) /obj/item/storage/belt/sabre/examine(mob/user) ..() @@ -709,18 +684,40 @@ /obj/item/storage/belt/sabre/update_icon() icon_state = initial(icon_state) item_state = initial(item_state) + sword_overlay = null if(contents.len) - icon_state += "-sabre" - item_state += "-sabre" + var/obj/item/I = contents[1] + sword_overlay = initial(I.icon_state) + add_overlay("-[sword_overlay]") + item_state += "-[I.icon_state]" if(loc && isliving(loc)) var/mob/living/L = loc L.regenerate_icons() ..() +/obj/item/storage/belt/sabre/worn_overlays(isinhands, icon_file) + . = ..() + if(!isinhands) + . += mutable_appearance(icon_file, "-[sword_overlay]") + /obj/item/storage/belt/sabre/PopulateContents() - new /obj/item/melee/sabre(src) + new starting_sword(src) update_icon() -/obj/item/storage/belt/sabre/rapier/PopulateContents() - new /obj/item/melee/rapier(src) - update_icon() +/obj/item/storage/belt/sabre/rapier + name = "rapier sheath" + desc = "A black, thin sheath that looks to house only a long thin blade. Feels like its made of metal." + icon_state = "rsheath" + item_state = "rsheath" + force = 5 + throwforce = 15 + block_chance = 30 + w_class = WEIGHT_CLASS_BULKY + attack_verb = list("bashed", "slashes", "prods", "pokes") + fitting_swords = list(/obj/item/melee/rapier) + starting_sword = /obj/item/melee/rapier + +/obj/item/storage/belt/sabre/rapier/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) + if(attack_type == PROJECTILE_ATTACK) + final_block_chance = 0 //To thin to block bullets + return ..() diff --git a/icons/mob/belt.dmi b/icons/mob/belt.dmi index f1e2f4e85a..f5ffd262f0 100644 Binary files a/icons/mob/belt.dmi and b/icons/mob/belt.dmi differ diff --git a/icons/obj/clothing/belts.dmi b/icons/obj/clothing/belts.dmi index 34c716f5d8..506cdffe8e 100644 Binary files a/icons/obj/clothing/belts.dmi and b/icons/obj/clothing/belts.dmi differ