[FIX] My webbings, where are they? (#25570)

* Changes necrosis_prob to use decaylevel.

* Reverts previous change to create a new branch.

* Reverts (https://github.com/ParadiseSS13/Paradise/pull/24667)

* Does not revert the previous PR, it builds upon it. Allowing items on the belt slot with the "special" var set to TRUE to overlay suits.

Judo Belt, Webbings, and Bandolier are the current selection.

* Fully fleshes out the layering of special belts.

* Adds more belts to the special layer.

* Fixes an oversight with the captain's rapier being left out. 😭

* Fixes a few more oversights caused by a pull/fetch.

* Moves around an if statement to fix the order of operations, which was causing items that should've been OVER the suit item to be appear UNDER it.

* Should resolve the merge conflict.

* Partial revert

* Merge conflict resolution

* Refactors how a 'special belt' is defined and handled. Makes it more readable.

* renames all instances of `special` to `layer_over_suit`
This commit is contained in:
Spaghetti-bit
2024-05-30 12:14:34 +00:00
committed by GitHub
parent d57a350951
commit f1838b83e9
4 changed files with 62 additions and 25 deletions
@@ -846,6 +846,21 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
/mob/living/carbon/human/update_inv_belt()
remove_overlay(BELT_LAYER)
remove_overlay(SPECIAL_BELT_LAYER)
var/overlay_layer = BELT_LAYER
// Certain belts should go OVER the suit. But not all.
/* Items (on the belt slot) that go over the suit:
- /obj/item/storage/belt/security/webbing
- /obj/item/storage/belt/bandolier
- /obj/item/judobelt
- /obj/item/storage/belt/chef
- /obj/item/storage/belt/mining/..
- /obj/item/storage/belt/rapier
- /obj/item/defibrillator/compact/..
- /obj/item/nullrod/..
- /obj/item/claymore/..
*/
if(client && hud_used)
var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_HUD_BELT]
if(inv)
@@ -856,20 +871,32 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
belt.screen_loc = ui_belt
if(belt)
update_observer_view(belt)
// Manual checks for outliers (Claymores, null rods, defibs, judobelt, etc.) - Items that are belts but not storages.
var/list/special_belts = list(
/obj/item/defibrillator/compact,
/obj/item/nullrod,
/obj/item/judobelt,
/obj/item/claymore)
overlay_layer = is_type_in_list(belt, special_belts) ? SPECIAL_BELT_LAYER : BELT_LAYER
if(istype(belt, /obj/item/storage/belt))
var/obj/item/storage/belt/B = belt
overlay_layer = B.layer_over_suit ? SPECIAL_BELT_LAYER : BELT_LAYER
var/t_state = belt.item_state
update_observer_view(belt)
if(!t_state)
t_state = belt.icon_state
if(belt.icon_override)
t_state = "[t_state]_be"
overlays_standing[BELT_LAYER] = mutable_appearance(belt.icon_override, "[t_state]", layer = -BELT_LAYER)
overlays_standing[overlay_layer] = mutable_appearance(belt.icon_override, "[t_state]", layer = -overlay_layer)
else if(belt.sprite_sheets && belt.sprite_sheets[dna.species.sprite_sheet_name])
overlays_standing[BELT_LAYER] = mutable_appearance(belt.sprite_sheets[dna.species.sprite_sheet_name], "[t_state]", layer = -BELT_LAYER)
overlays_standing[overlay_layer] = mutable_appearance(belt.sprite_sheets[dna.species.sprite_sheet_name], "[t_state]", layer = -overlay_layer)
else
overlays_standing[BELT_LAYER] = mutable_appearance('icons/mob/clothing/belt.dmi', "[t_state]", layer = -BELT_LAYER)
apply_overlay(BELT_LAYER)
overlays_standing[overlay_layer] = mutable_appearance('icons/mob/clothing/belt.dmi', "[t_state]", layer = -overlay_layer)
apply_overlay(BELT_LAYER)
apply_overlay(SPECIAL_BELT_LAYER)
/mob/living/carbon/human/update_inv_wear_suit()
remove_overlay(SUIT_LAYER)