Files
Bubberstation/code/_compile_options.dm
Mothblocks 4a7eb289ea Optimize cutting part of update_icon (Saves 130+ms of init) (#73965)
Avoids calling `cut_overlay` if we know that we manage every overlay
we're about to remove, and short-circuits to `overlays = null`. This
saves the cost of building the appearance list and performing `-=` of
the list.

More minor change, splits validation part of `POST_OVERLAY_CHANGE` into
`VALIDATE_OVERLAY_LIMIT`. This is because there is no point checking if
we hit the overlay limit after removing overlays, since we would've
checked in `add_overlay` in reasonable cases.
2023-03-14 16:22:24 -06:00

5.0 KiB