Files
Bubberstation/code/modules/mob/mob_update_icons.dm
Ghom c1122a0ae9 Adds an element to water turfs that makes things... look like they're actually immersed in water. (#76208)
## About The Pull Request
This PR adds an element, for now added to water turfs, that gives
passing movables an overlay to make them look immersed in that turf.

You can definitely see in the code what sort of stupid stuff I've had to
do to work around some of the flaws with the inbuilt features. Why?
Because I needed a (vis_contents) overlay that:
- can cover the entire width of the movable it's added to, whether it
has a 32 px icon, 64, 96 etc, plus some to be safe.
- doesn't look misplaced around movables with an icon larger than 32 px.
- can be animated, so it doesn't rotate or scale (or rather, do so but
in the opposite direction) with living mobs when resized, spinning or
lying down or standing up, despite the KEEP_TOGETHER appearance flag,
which ignores whether the overlay has the RESET_TRANSFORM flag.
- looks inset in the movable and doesn't spill into other movables of
the same plane (that's what happened with normal inset overlays without
the KEEP_TOGETHER flag)
- doesn't render above other movables covering the owner of the overlay.

If someone comes with a better and tested solution, go and tell I guess.
How visuals are handled by this engine still eludes me at times, but I
doubt planes would be a better solution to this.

The rest of the PR includes checks to make sure the overlay isn't added
to movables with planes lower/higher than
FLOOR_PLANE/ABOVE_ALL_MOB_PLANE, that are flying or being thrown, as
well as certain types such as effects.

## Why It's Good For The Game
Adding some literal immersion to the game, since movables and mobs look
like they're treading on water like Jesus right now. You can see a
couple screenshots by scrolling down a little.

## Changelog

🆑
image: walking on water will now immerse you in it... visually, at
least.
/🆑
2023-07-21 22:00:09 +02:00

89 lines
2.1 KiB
Plaintext

//Most of these are defined at this level to reduce on checks elsewhere in the code.
//Having them here also makes for a nice reference list of the various overlay-updating procs available
///Redraws the entire mob. For carbons, this is rather expensive, please use the individual update_X procs.
/mob/proc/regenerate_icons() //TODO: phase this out completely if possible
return
///Updates every item slot passed into it.
/mob/proc/update_clothing(slot_flags)
return
/mob/proc/update_icons()
return
///Updates the handcuff overlay & HUD element.
/mob/proc/update_worn_handcuffs()
return
///Updates the legcuff overlay & HUD element.
/mob/proc/update_worn_legcuffs()
return
///Updates the back overlay & HUD element.
/mob/proc/update_worn_back()
return
///Updates the held items overlay(s) & HUD element.
/mob/proc/update_held_items()
return
///Updates the mask overlay & HUD element.
/mob/proc/update_worn_mask()
return
///Updates the neck overlay & HUD element.
/mob/proc/update_worn_neck()
return
///Updates the oversuit overlay & HUD element.
/mob/proc/update_worn_oversuit()
return
///Updates the undersuit/uniform overlay & HUD element.
/mob/proc/update_worn_undersuit()
return
///Updates the belt overlay & HUD element.
/mob/proc/update_worn_belt()
return
///Updates the on-head overlay & HUD element.
/mob/proc/update_worn_head()
return
///Updates every part of a carbon's body. Including parts, mutant parts, lips, underwear, and socks.
/mob/proc/update_body()
return
/mob/proc/update_hair()
return
///Updates the glasses overlay & HUD element.
/mob/proc/update_worn_glasses()
return
///Updates the id overlay & HUD element.
/mob/proc/update_worn_id()
return
///Updates the shoes overlay & HUD element.
/mob/proc/update_worn_shoes()
return
///Updates the glasses overlay & HUD element.
/mob/proc/update_worn_gloves()
return
///Updates the handcuff overlay & HUD element.
/mob/proc/update_suit_storage()
return
///Updates the handcuff overlay & HUD element.
/mob/proc/update_pockets()
return
///Updates the handcuff overlay & HUD element.
/mob/proc/update_inv_ears()
return