diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 384a1e4ee4..e17fe20977 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -579,6 +579,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/proc/get_belt_overlay() //Returns the icon used for overlaying the object on a belt
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state)
+/obj/item/proc/get_worn_belt_overlay(icon_file)
+ return
+
/obj/item/proc/update_slot_icon()
if(!ismob(loc))
return
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index 0d45960767..daeceb7f87 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -89,6 +89,12 @@
if(istype(B))
playsound(B, 'sound/items/sheath.ogg', 25, 1)
+/obj/item/melee/sabre/get_belt_overlay()
+ return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "sabre")
+
+/obj/item/melee/sabre/get_worn_belt_overlay(icon_file)
+ return mutable_appearance(icon_file, "-sabre")
+
/obj/item/melee/sabre/suicide_act(mob/living/user)
user.visible_message("[user] is trying to cut off all [user.p_their()] limbs with [src]! it looks like [user.p_theyre()] trying to commit suicide!")
var/i = 0
@@ -147,13 +153,19 @@
flags_1 = CONDUCT_1
obj_flags = UNIQUE_RENAME
w_class = WEIGHT_CLASS_BULKY
- sharpness = IS_SHARP_ACCURATE //It cant be sharpend cook -_-
+ sharpness = IS_SHARP_ACCURATE //It cant be sharpend cook -_-
attack_verb = list("slashed", "cut", "pierces", "pokes")
/obj/item/melee/rapier/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 20, 65, 0)
+/obj/item/melee/rapier/get_belt_overlay()
+ return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "rapier")
+
+/obj/item/melee/rapier/get_worn_belt_overlay(icon_file)
+ return mutable_appearance(icon_file, "-rapier")
+
/obj/item/melee/classic_baton
name = "police baton"
desc = "A wooden truncheon for beating criminal scum."
diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm
index b746058588..d71b91c8dc 100755
--- a/code/game/objects/items/storage/belt.dm
+++ b/code/game/objects/items/storage/belt.dm
@@ -10,6 +10,7 @@
attack_verb = list("whipped", "lashed", "disciplined")
max_integrity = 300
var/content_overlays = FALSE //If this is true, the belt will gain overlays based on what it's holding
+ var/worn_overlays = FALSE //worn counterpart of the above.
/obj/item/storage/belt/suicide_act(mob/living/carbon/user)
user.visible_message("[user] begins belting [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!")
@@ -23,6 +24,12 @@
add_overlay(M)
..()
+/obj/item/storage/belt/worn_overlays(isinhands, icon_file)
+ . = ..()
+ if(!isinhands && worn_overlays)
+ for(var/obj/item/I in contents)
+ . += I.get_worn_belt_overlay(icon_file)
+
/obj/item/storage/belt/Initialize()
. = ..()
update_icon()
@@ -653,9 +660,10 @@
icon_state = "sheath"
item_state = "sheath"
w_class = WEIGHT_CLASS_BULKY
+ content_overlays = TRUE
+ worn_overlays = TRUE
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()
. = ..()
@@ -682,27 +690,13 @@
to_chat(user, "[src] is empty.")
/obj/item/storage/belt/sabre/update_icon()
- icon_state = initial(icon_state)
- item_state = initial(item_state)
- sword_overlay = null
- if(contents.len)
- 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))
+ . = ..()
+ if(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 starting_sword(src)
- update_icon()
/obj/item/storage/belt/sabre/rapier
name = "rapier sheath"
diff --git a/icons/mob/custom_w.dmi b/icons/mob/custom_w.dmi
index d974d0ca6c..c22ff7f159 100644
Binary files a/icons/mob/custom_w.dmi and b/icons/mob/custom_w.dmi differ
diff --git a/icons/obj/clothing/belt_overlays.dmi b/icons/obj/clothing/belt_overlays.dmi
index d7bf32d7b1..717937c034 100644
Binary files a/icons/obj/clothing/belt_overlays.dmi and b/icons/obj/clothing/belt_overlays.dmi differ
diff --git a/icons/obj/clothing/belts.dmi b/icons/obj/clothing/belts.dmi
index 506cdffe8e..5290c43073 100644
Binary files a/icons/obj/clothing/belts.dmi and b/icons/obj/clothing/belts.dmi differ
diff --git a/icons/obj/custom.dmi b/icons/obj/custom.dmi
index eb4f5813c8..bf976060c7 100644
Binary files a/icons/obj/custom.dmi and b/icons/obj/custom.dmi differ
diff --git a/modular_citadel/code/game/objects/items/stunsword.dm b/modular_citadel/code/game/objects/items/stunsword.dm
index 1262b0018a..7a5398f7d2 100644
--- a/modular_citadel/code/game/objects/items/stunsword.dm
+++ b/modular_citadel/code/game/objects/items/stunsword.dm
@@ -7,6 +7,14 @@
lefthand_file = 'modular_citadel/icons/mob/inhands/stunsword_left.dmi'
righthand_file = 'modular_citadel/icons/mob/inhands/stunsword_right.dmi'
+/obj/item/melee/baton/stunsword/get_belt_overlay()
+ if(istype(loc, /obj/item/storage/belt/sabre))
+ return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "stunsword")
+ return ..()
+
+/obj/item/melee/baton/stunsword/get_worn_belt_overlay(icon_file)
+ return mutable_appearance(icon_file, "-stunsword")
+
/obj/item/ssword_kit
name = "stunsword kit"
desc = "a modkit for making a stunbaton into a stunsword"
diff --git a/modular_citadel/code/modules/client/loadout/__donator.dm b/modular_citadel/code/modules/client/loadout/__donator.dm
index e75a63f540..e3dbbbd490 100644
--- a/modular_citadel/code/modules/client/loadout/__donator.dm
+++ b/modular_citadel/code/modules/client/loadout/__donator.dm
@@ -226,7 +226,7 @@
/datum/gear/darksabre
name = "Dark Sabre"
category = SLOT_IN_BACKPACK
- path = /obj/item/toy/sword/darksabre
+ path = /obj/item/toy/darksabre
ckeywhitelist = list("inferno707")
datum/gear/darksabresheath
diff --git a/modular_citadel/code/modules/custom_loadout/custom_items.dm b/modular_citadel/code/modules/custom_loadout/custom_items.dm
index 0ce4fbdd78..ece673587f 100644
--- a/modular_citadel/code/modules/custom_loadout/custom_items.dm
+++ b/modular_citadel/code/modules/custom_loadout/custom_items.dm
@@ -49,7 +49,7 @@
item_color = "steele"
medaltype = "medal-silver"
-/obj/item/toy/sword/darksabre
+/obj/item/toy/darksabre
name = "Kiara's Sabre"
desc = "This blade looks as dangerous as its owner."
icon = 'icons/obj/custom.dmi'
@@ -58,9 +58,13 @@
item_state = "darksabre"
lefthand_file = 'modular_citadel/icons/mob/inhands/stunsword_left.dmi'
righthand_file = 'modular_citadel/icons/mob/inhands/stunsword_right.dmi'
- w_class = WEIGHT_CLASS_SMALL
attack_verb = list("attacked", "struck", "hit")
+/obj/item/toy/darksabre/get_belt_overlay()
+ return mutable_appearance('icons/obj/custom.dmi', "darksheath-darksabre")
+
+/obj/item/toy/darksabre/get_worn_belt_overlay(icon_file)
+ return mutable_appearance(icon_file, "darksheath-darksabre")
/obj/item/storage/belt/sabre/darksabre
name = "Ornate Sheathe"
@@ -69,32 +73,8 @@
alternate_worn_icon = 'icons/mob/custom_w.dmi'
icon_state = "darksheath"
item_state = "darksheath"
- w_class = WEIGHT_CLASS_BULKY
-
-/obj/item/storage/belt/sabre/darksabre/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/toy/sword/darksabre
- ))
-
-/obj/item/storage/belt/sabre/darksabre/update_icon()
- icon_state = "darksheath"
- item_state = "darksheath"
- if(contents.len)
- icon_state += "-darksabre"
- item_state += "-darksabre"
- if(loc && isliving(loc))
- var/mob/living/L = loc
- L.regenerate_icons()
- ..()
-
-/obj/item/storage/belt/sabre/darksabre/PopulateContents()
- new /obj/item/toy/sword/darksabre(src)
- update_icon()
+ fitting_swords = list(/obj/item/toy/darksabre)
+ starting_sword = /obj/item/toy/darksabre
/obj/item/clothing/suit/armor/vest/darkcarapace
name = "Dark Armor"