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

Misc Fixes #359

Merged
merged 17 commits into from
Aug 9, 2024
Merged

Misc Fixes #359

merged 17 commits into from
Aug 9, 2024

Commits on Aug 6, 2024

  1. sentry laptop now uses camera manager (#5309)

    The sentry laptop had a bunch of custom code for handling gunsight
    cameras. This PR refactors it to exclusively use the camera_manager
    component.
    
    <!-- Remove this text and explain what the purpose of your PR is.
    
    Mention if you have tested your changes. If you changed a map, make sure
    you used the mapmerge tool.
    If this is an Issue Correction, you can type "Fixes Issue #169420" to
    link the PR to the corresponding Issue number #169420.
    
    Remember: something that is self-evident to you might not be to others.
    Explain your rationale fully, even if you feel it goes without saying.
    -->
    
    Reduction of duplicated code.
    <details>
    <summary>Screenshots & Videos</summary>
    
    Put screenshots and videos here with an empty line between the
    screenshots and the `<details>` tags.
    
    </details>
    
    :cl:
    refactor: sentry laptop now uses camera manager component
    /:cl:
    mullenpaul authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    67c21a2 View commit details
    Browse the repository at this point in the history
  2. Update sentry_computer.dm

    Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    59248e3 View commit details
    Browse the repository at this point in the history
  3. Port Overlay Lighting Fixes (#5331)

    This PR ports tgstation/tgstation#79939 and
    fixes a few other things in the overlay_lighting component.
    
    Less hard deletes and lights in objects disables the light (despite
    actually still being on).
    
    Fixes:
    
    https://github.com/cmss13-devs/cmss13/assets/76988376/4a89b0de-ccb2-4d80-a081-2ec2d311f753
    <details>
    <summary>Screenshots & Videos</summary>
    
    ![flares](https://github.com/cmss13-devs/cmss13/assets/76988376/12765f93-78e9-42f3-90f9-5118ad62af65)
    
    https://github.com/cmss13-devs/cmss13/assets/76988376/cb7b2d6d-9f2d-4e0e-86cd-82371582524e
    
    </details>
    :cl: Drathek
    refactor: Refactored the overlay_lighting component to better handle
    objects deleting
    fix: Fix putting lights in bags somereason keeping the light on
    /:cl:
    Drulikar authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    3307a37 View commit details
    Browse the repository at this point in the history
  4. Fix runtimes and multitool bricking if a sentry_computer is deleted (…

    …#5345)
    
    This PR resolves some runtimes and the bricking of a multitool if it is
    loaded with a deleted sentry. The weakref resolve in the multitool
    wasn't checked if the resolve passed. Additionally, the sentries would
    remain encrypted to a non-existent computer. If bricking an encrypted
    sentry is intended, it needs to be handled more gracefully.
    
    Fixes a runtime when using a multitool linked to a deleted
    sentry_computer:
    
    ![image](https://github.com/cmss13-devs/cmss13/assets/76988376/4db7c411-aff1-4b56-9cee-b2cec6e05519)
    
    Fixes a runtime when using said multitool to unpair the sentry from a
    deleted sentry_computer.
    
    ![image](https://github.com/cmss13-devs/cmss13/assets/76988376/946f002d-2246-4632-a554-e2cfd6ad5a9d)
    <details>
    <summary>Screenshots & Videos</summary>
    
    1. Link tuner w/ a laptop
    2. Delete laptop
    3. Spawn a new laptop
    4. Use tuner on new laptop
    5. Runtime when trying to clear because the weakref resolve wasn't
    checked.
    
    https://github.com/cmss13-devs/cmss13/assets/76988376/bfe447ce-a6dc-4d88-b3e8-b4ee6efb1daf
    
    </details>
    :cl: Drathek
    fix: Fix handling of sentry_computer deletion
    /:cl:
    Drulikar authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    5db1781 View commit details
    Browse the repository at this point in the history
  5. Lockdown actually closes doors on DS (#5015)

    Lockdown actually closes doors on DS.
    
    It used to be the case before the gui rework. I think. Anyway DP should
    be able to control doors, hunting for the moment when all doors are
    closed to lock them is extremely not fun.
    
    <details>
    :)</details>
    
    :cl: ihatethisengine
    add: Locking down dropship's doors closes them before locking.
    /:cl:
    ihatethisengine authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    8eb219b View commit details
    Browse the repository at this point in the history
  6. Remove Direct Hit Limb Penalty against Xenos (#4788)

    <!-- Remove this text and explain what the purpose of your PR is.
    
    Mention if you have tested your changes. If you changed a map, make sure
    you used the mapmerge tool.
    If this is an Issue Correction, you can type "Fixes Issue #169420" to
    link the PR to the corresponding Issue number #169420.
    
    Remember: something that is self-evident to you might not be to others.
    Explain your rationale fully, even if you feel it goes without saying.
    -->
    
    Selecting a body part on doll at bottom right applies an inherent
    accuracy debuff to shots (an hand is harder to hit than chest).
    
    This penalty still applied to sprite-click attacks on Xenomorphs,
    despite the localized damage having no effect.
    
    This means that you'd have to constantly reset your aimed part to chest
    every time you try to shoot a Xeno, or would suffer a "free" penalty.
    
    Old flow went as follow:
     * Get base Hit Chance and Roll
    * If it's only a near hit, or target's not the shot clicked target, the
    shot targeted limb is reset to a random one
     * Hit chance receives a penalty based on aimed limb
     * We proceed checking hit chance vs roll
    
    Because of the above problem this is changed to:
    
    * Get base Hit Chance and Roll
    * If it's a near hit (including limb penalty), a near xeno hit
    (excluding limb penalty), or not the sprite-clicked target, aimed limb
    is reset to a random one
    * Else if the target is a xeno and it was a proper direct hit, there is
    no penalty -- functionally similar to a chest shot
    * Else Finally, apply per-limb penalty as usual
    * We proceed checking hit chance vs roll
    
    Avoids an invisible noobtrap debuff for just about everyone in the game
    that isn't in the know - and the neccessity to constantly reset
    targeting to chest for medics.
    
    The problem was tested by a player on discord -- the fix i tested just
    was spawning stuff and shooting up the place observing RNG misses. I did
    not take detailed statistics over time to confirm.
    
    :cl:
    fix: Sprite-click shots onto Xenos are no longer affected by
    limb-targeting penalty, because it was an accuracy debuff when there is
    no inherent benefit to targeting Xeno limbs.
    /:cl:
    fira authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    8042778 View commit details
    Browse the repository at this point in the history
  7. Fixes notifications emitting light (#6088)

    # About the pull request
    Fixes #5985, albeit there might be a better approach.
    
    # Explain why it's good for the game
    bug fix, tested it with the steps listed in the issue. Worked as far as
    I could tell.
    
    # Changelog
    :cl:
    fix: Notifications should no longer emit light.
    /:cl:
    
    ---------
    
    Co-authored-by: DOOM <N/A>
    vero5123 authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    064e119 View commit details
    Browse the repository at this point in the history
  8. Sound Environment update (#6620)

    Changes to how a client's sound `environment`  and `echo` is handled:
    https://www.byond.com/docs/ref/#/sound/var/environment
    https://www.byond.com/docs/ref/#/sound/var/echo
    
    A client's `soundOutput` now has sole control over environment and echo.
    The environment is updated when the mob moves into a different area, or
    if the mob's environment override is set.
    The echo is used to enable or disable the environmental reverb
    per-sound.
    
    <!-- Remove this text and explain what the purpose of your PR is.
    
    Mention if you have tested your changes. If you changed a map, make sure
    you used the mapmerge tool.
    If this is an Issue Correction, you can type "Fixes Issue #169420" to
    link the PR to the corresponding Issue number #169420.
    
    Remember: something that is self-evident to you might not be to others.
    Explain your rationale fully, even if you feel it goes without saying.
    -->
    
    Issue: an environment applies to all sounds for that client, current and
    future, until another one is set. It applies to in-world sounds as well
    as, say, admin pings.
    
    Solution: since an echo is applied per-sound, by adjusting the echo's
    Room & RoomHF fields the environmental effects can be enabled or
    disabled (more accurately, made so quiet as to be inaudible). This is
    set to off by default, and is only enabled for positional sounds. Admin
    pings are safe.
    
    Idea from here: tgstation/tgstation#55333
    Boots without issue. Sound environments change at appropriate points.
    Sound environments effect only positional sounds.
    :cl:
    code: environmental reverb applies more reliably and only to positional
    sounds
    /:cl:
    Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    dc9000c View commit details
    Browse the repository at this point in the history
  9. Fixes ocassional observer minimap desync (#5095)

    Fixes annoying bug involving jumptocoord hrefs in some deadchat
    messages, making ghost's minimap desync with the map observer is in.
    <!-- Remove this text and explain what the purpose of your PR is.
    
    Mention if you have tested your changes. If you changed a map, make sure
    you used the mapmerge tool.
    If this is an Issue Correction, you can type "Fixes Issue #169420" to
    link the PR to the corresponding Issue number #169420.
    
    Remember: something that is self-evident to you might not be to others.
    Explain your rationale fully, even if you feel it goes without saying.
    -->
    Bugs bad. Removing bugs good.
    <details>
    <summary>Screenshots & Videos</summary>
    
    Put screenshots and videos here with an empty line between the
    screenshots and the `<details>` tags.
    
    </details>
    :cl: MrDas
    fix: Observer minimap should no longer occasionally show wrong / no map.
    /:cl:
    Das15 authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    7293785 View commit details
    Browse the repository at this point in the history
  10. Fixes monkey orbiting breaking the camera (#5383)

    <!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
    not be viewable. -->
    
    Fixes orbiting a monkey/farwa/stok/etc. locking your camera onto it.
    
    This was happening due to `RegisterSignal(src, COMSIG_MOVABLE_MOVED,
    PROC_REF(observer_move_react))` not being called if the target mob
    didn't have a HUD, meaning that the client's `eye` wouldn't be set back
    to their body when they tried moving away.
    I also moved the `COMSIG_PARENT_QDELETING` one over too so that the same
    doesn't happen if the target mob is deleted.
    
    (The other signals all seem to be HUD related.)
    
    Bug!
    <!-- Include any screenshots/videos/debugging steps of the modified code
    functioning successfully, ideally including edge cases. -->
    <details>
    <summary>Screenshots & Videos</summary>
    
    https://github.com/cmss13-devs/cmss13/assets/57483089/c188db1f-4fb2-4634-baeb-b87ab6e17ae8
    
    https://github.com/cmss13-devs/cmss13/assets/57483089/05348463-49ed-442c-80c3-9c880b4f3d91
    
    https://github.com/cmss13-devs/cmss13/assets/57483089/3f0c8da7-d688-4523-8f63-9f743e699326
    
    https://github.com/cmss13-devs/cmss13/assets/57483089/b39eefa3-3138-437b-bffe-89813ee0a46b
    
    </details>
    
    <!-- If your PR modifies aspects of the game that can be concretely
    observed by players or admins you should add a changelog. If your change
    does NOT meet this description, remove this section. Be sure to properly
    label your changes in the changelog. Please note that maintainers freely
    reserve the right to remove and add tags should they deem it
    appropriate. You can attempt to finagle the system all you want, but
    it's best to shoot for clear communication right off the bat. -->
    <!-- If you add a name after the ':cl', that name will be used in the
    changelog. You must add your CKEY after the CL if your GitHub name
    doesn't match. Maintainers freely reserve the right to remove and add
    tags should they deem it appropriate. -->
    
    :cl:
    fix: Fixed observing a monkey/farwa/stok/etc. locking the camera onto
    it.
    /:cl:
    
    <!-- Both :cl:'s are required for the changelog to work! -->
    SabreML authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    66785c5 View commit details
    Browse the repository at this point in the history
  11. Makes TGUI transfer over when changing bodies (#5388)

    Makes any open TGUI windows transfer over when a player's mind is
    transferred to a new body. *(At least if it's done through
    `/datum/mind/proc/transfer_to()`)*
    This is mainly useful for xeno players who want to evolve, since it
    means they won't need to re-open any interfaces they had open.
    
    The changes in `code/controllers/subsystem/minimap.dm` are there so that
    the tacmap image remains visible to the player after a transfer, since
    the client changing bodies seems to remove it from their
    [`screen`](https://www.byond.com/docs/ref/#/client/var/screen) list.
    
    (This *could* have hidden side effects of interfaces staying open when
    they shouldn't, so I'd appreciate this being testmerged for a bit just
    in case.)
    
    QOL addition so that you don't have to manually re-open them yourself.
    <details>
    <summary>Screenshots & Videos</summary>
    
    https://github.com/cmss13-devs/cmss13/assets/57483089/70549c92-915b-4881-95ca-d1625a346f4b
    
    </details>
    :cl:
    qol: Made open TGUI windows transfer over when a xeno player evolves.
    /:cl:
    SabreML authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    8d7e697 View commit details
    Browse the repository at this point in the history
  12. Makes observers see the marine version of CAS warnings (#5561)

    Makes the CAS warning messages for observers say 'Dropship' rather than
    'Large bird'.
    
    It seems a bit weird that observers get the "in-character" xeno version
    of the messages, rather than the "correct" version.
    <details>
    <summary>Screenshots & Videos</summary>
    
    Put screenshots and videos here with an empty line between the
    screenshots and the `<details>` tags.
    
    </details>
    (no idea what CL category to make this)
    
    :cl:
    spellcheck: Made observers see the marine version of CAS warnings,
    rather than the xeno one.
    /:cl:
    SabreML authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    215678c View commit details
    Browse the repository at this point in the history
  13. Makes observers able to see the UI of Xeno players (and also action b…

    …uttons) (#5751)
    
    Makes auto-observing work for xenomorphs *and* humans by moving it to
    `/carbon`, and also makes it show the target's action buttons.
    
    I'm pretty confident that this all works correctly, but I would still
    recommend testmerging it anyway.
    It's ~~probable~~possible that I missed something somewhere and an
    observer could get stuck being unable to click anything, or something
    like that.
    
    This makes auto-observing a bit more consistent, more interesting for
    observers, and could actually help newer players to learn how to play
    some castes. (Which abilities to use and when, where to target, etc.)
    <details>
    <summary>Screenshots & Videos</summary>
    
    https://github.com/cmss13-devs/cmss13/assets/57483089/54fbb8c6-f9fa-444b-b80c-228b4e6e3480
    
    </details>
    :cl:
    add: Added 'observe' functionality to Xenomorphs, allowing observers to
    view the target's UI.
    add: Made observing a player also show their action buttons.
    /:cl:
    SabreML authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    9cb87a2 View commit details
    Browse the repository at this point in the history
  14. Small auto-observe fixes (#5788)

    Fixes/tweaks a couple of auto-observe things that I noticed after #5751.
    Specifically:
    - Fixes `runtime error: client_screen_add overridden. Use override =
    TRUE to suppress this warning`/`runtime error: client_screen_remove
    overridden. Use override = TRUE to suppress this warning`.
    *This error was consistently thrown when a ghost who's body is being
    observed re-enters their body. `observe_target_new_mind()` tries to
    re-register the some signals on the body's new client, but didn't have
    the `override` argument set.*
    
    - Stops 'hidden' actions being added to the screen of observing players.
    (e.g. the xeno tacmap action if the queen isn't ovied)
    
    - Makes any observers transfer over to the new body when a xenomorph
    evolves/de-evolves.
    *(I also added `/mob/dead/observer` to the `observers` variable's
    declaration since it wasn't particularly clear what the list held.)*
    
    - Fixes the target player's action buttons disappearing for observers if
    they reconnect or re-enter their body.
    *(The actions were being shown to the player in
    `Login()`>`show_hud()`>`update_action_buttons()` before the observer
    could re-register signals in `observe_target_login()`.)
    In order to fix this I renamed the existing `COMSIG_GLOB_MOB_LOGIN`,
    `COMSIG_CLIENT_MOB_LOGIN`, `COMSIG_MOB_LOGIN` signals, and made
    `COMSIG_MOB_LOGIN` send a bit earlier in the proc.*
    
    Bugfixes :)
    
    <details>
    <summary>Screenshots & Videos</summary>
    
    Put screenshots and videos here with an empty line between the
    screenshots and the `<details>` tags.
    
    </details>
    
    :cl:
    fix: Fixed 'hidden' action buttons being shown to observing players.
    qol: Made any observers transfer over when a Xenomorph
    evolves/de-evolves.
    /:cl:
    SabreML authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    31bc2b4 View commit details
    Browse the repository at this point in the history
  15. Adds a verb to hide action buttons (#5304)

    Adds a verb on /client to show/hide action buttons
    Makes it a new variable, as var/hidden also prevents the action from
    being used
    
    ![image](https://github.com/cmss13-devs/cmss13/assets/56142455/1d78441c-5085-4165-a2b7-f7c3e9f7e2c3)
    
    :cl:
    qol: Adds the ability to hide your action buttons
    /:cl:
    BeagleGaming1 authored and Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    4dcc684 View commit details
    Browse the repository at this point in the history
  16. Update mind.dm

    Doubleumc committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    4bddd66 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    207e27d View commit details
    Browse the repository at this point in the history