allows the captain sabre sheat to hold stunswords.

This commit is contained in:
Ghommie
2019-07-27 22:47:36 +02:00
parent 39dea966ae
commit a9e1fadcd4
3 changed files with 32 additions and 35 deletions
+32 -35
View File
@@ -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 ..()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB