Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Fixes handle_bodyparts running needlessly when stat == DEAD #630

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Skyrat: Skyrat-SS13/Skyrat-tg#25010
Original PR: tgstation/tgstation#79716

About The Pull Request

What it says on the tin. I just noticed this now by chance: when I was doing my damage refactor and removing some deprecated code I accidentally moved the indentation up for handle_bodyparts(). This proc only has to be called on live mobs so this is adding unneeded overhead.

firefox_p49wTxNf7c
image

This PR just shifts the indentation of handle_bodyparts() back to being under the else block, where it belongs.

Why It's Good For The Game

Less redundant proc calls.

Changelog

Nothing player facing.

… == DEAD [MDB IGNORE] (#25010)

* [NO GBP] Fixes handle_bodyparts running needlessly when stat == DEAD (#79716)

## About The Pull Request

What it says on the tin. I just noticed this now by chance: when I was
doing my damage refactor and removing some deprecated code I
accidentally moved the indentation up for `handle_bodyparts()`. This
proc only has to be called on live mobs so this is adding unneeded
overhead.

![firefox_p49wTxNf7c](https://github.com/tgstation/tgstation/assets/13398309/49863d25-989e-48dc-af8c-4d47b457583c)

![image](https://github.com/tgstation/tgstation/assets/13398309/4b416515-613d-4a10-9289-dfae54d34b49)

This PR just shifts the indentation of `handle_bodyparts()` back to
being under the else block, where it belongs.

## Why It's Good For The Game

Less redundant proc calls.

## Changelog

Nothing player facing.

* [NO GBP] Fixes handle_bodyparts running needlessly when stat == DEAD

---------

Co-authored-by: Bloop <[email protected]>
@Iajret Iajret merged commit dcaf991 into master Nov 15, 2023
@Iajret Iajret deleted the upstream-mirror-25010 branch November 15, 2023 09:18
Iajret pushed a commit that referenced this pull request Jan 26, 2024
* General maintenance for cryo chamber (#80873)

The changes can be summarized into the following categories

1. **Qol**(Should not be a problem for feature freeze hopefully)
- Adds balloon alerts for screwdriver & wrench acts, when inserting a
beaker and other stuff
- Adds extra examines for the beaker inside the cryo, how to open
maintenance panel & other stuff. Most of the examines were not enclosed
in `span_notice`
- Adds screen tips for crowbar act, when inserting beaker into cryo etc
- Cryo can now be pried open when there is no power with a crowbar so
you can free someone stuck inside in case of an emergency
- Cryo now auto turns on immediately without a 2 second delay & without
the need for auto eject

2. **Fixes**
- Cryo won't drop the beaker onto the floor when ejected, but will put
it in the players hands as intended
- Fixes #80699. The cryo was on `ABOVE_MOB_LAYER` which rendered on top
of everything, Now its set to the default layer so mobs & other stuff
now render on top of it
- Loc checks were incorrect instead of doing `mob.loc == src`(which
would fail if the mob was standing in the open cro) we now do
`get_turf(mob) == get_turf(src)`(which works if the mob by anyway in on
the turf of the machine)

3. **Code Improvements**
- Get's rid of unused variables such as `sleep_factor`,
`unconscious_factor` etc. Simply unused
   - Autodocs remaining variables and procs
- Slightly touched on the UI shared by cryo, chem heater etc. Removes
the `transfer_amounts` var that went unused in these cases
 
4. **Refactors**
    - Converted UI to typescript
- Removes `check_nap_violations()` from `process()`. This proc checks if
the occupant has an ID card & money in the account which makes no sense
for cryo
- Cryo will turn off if there is no occupant OR if there is no beaker
- It no longer starts processing round start & only when the machine is
turned on/off thus saving cpu
- Removed old cryo icon states such `cell-open` , `cell-off` etc. These
were used for the old cryo tube from years ago but are no longer needed
now so the icon file size has been trimmed

:cl:
qol: adds more examines, screentips & balloon alerts for cryo actions,
cryo can be pried open with a crowbar when there is no power to free
someone trapped inside
qol: cryo auto turns on immediately without a 2 second delay & without
needing auto eject mode on
fix: ejecting beaker from cryotube will put it in the players hand & not
drop it on the floor
fix: mobs & other stuff now render on top of cryo tubes and not bottom
of it
fix: cryo checks for if the mob is on the same turf as cryo is now
fixed, i.e. you can no longer close the machine on yourself
code: removed unused vars from cryo, autodocs vars, removed unused
`transfer_amounts` from some chem machinery ui
refactor: removed unused icon states for cryo tube, cryo no longer
processes round start and it's UI is now typescript
/:cl:

* Modular

* Revert "Modular"

This reverts commit c0c550925187089623e761680b7e666e8279115e.

* This was no longer necessary

---------

Co-authored-by: SyncIt21 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants