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

TGUI / Bugfixes / Improvements: Security Cleanup #4558

Closed
wants to merge 7 commits into from

Conversation

Crowbar764
Copy link
Contributor

@Crowbar764 Crowbar764 commented Sep 30, 2023

About the pull request

  • Converts Security Records console to TGUI (inspired by /TG/'s design).
  • Fixed printed fingerprint reports run-timing when read.
  • Fixed newly created records having incorrect gender casing.
  • Fixed the player's wanted status being set to NULL if the SecHud dropdown was cancelled.
  • Fixed zombies from being able to modify security records (fixes: Zombies can modify Sec Records #4309).
  • Cleaned up the SecHud chat text.
  • Cleaned up printed-out data (records, fingerprints, round-start reports).
  • Refactors some things for standards and performance.
  • Fixed some other bugs I can't remember.

For optimisation, some data is not always accurate when modified from an outside source. I do not want to refresh the data of 100+ players every tick.

Screenshots supplied in the dropdown.

Explain why it's good for the game

Modern UI. Fixes some broken features. Easier to read SecHud

Testing Photographs and Procedure

Screenshots & Videos

Main UI:
image

Comments tab:
image

Forensics scanner with prints added (bottom left):
image

SecHud:
image

Printed record:
image

Changelog

🆑 Casper
fix: fixed record-related bugs
ui: added security records TGUI
refactor: cleaned-up SecHud text
/:cl:

@github-actions github-actions bot added UI deletes nanoui/html Fix Fix one bug, make ten more Refactor Make the code harder to read labels Sep 30, 2023
@ghost

This comment was marked as off-topic.

code/game/machinery/computer/sentencing.dm Outdated Show resolved Hide resolved
code/modules/mob/living/carbon/human/human.dm Outdated Show resolved Hide resolved
code/modules/paperwork/filingcabinet.dm Outdated Show resolved Hide resolved
code/game/machinery/computer/security.dm Outdated Show resolved Hide resolved
code/game/machinery/computer/security.dm Outdated Show resolved Hide resolved
code/game/machinery/computer/security.dm Outdated Show resolved Hide resolved
@mullenpaul mullenpaul self-assigned this Oct 8, 2023
Copy link
Contributor

@mullenpaul mullenpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good - a few small things I feel that should be touched up. I don't know MP well enough to test it all out myself but we can try it on a TM. If you can address the minor issues at some point

code/game/machinery/computer/security.dm Show resolved Hide resolved
code/game/machinery/computer/security.dm Show resolved Hide resolved
code/game/machinery/computer/security.dm Show resolved Hide resolved
code/game/machinery/computer/security.dm Show resolved Hide resolved
code/game/machinery/computer/security.dm Show resolved Hide resolved
code/modules/paperwork/filingcabinet.dm Outdated Show resolved Hide resolved
@@ -0,0 +1,8 @@
export const CRIMESTATUS2COLOR = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be possible to use scss rather than hard coded strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find anywhere in the code an example of where this has been done before. Are you sure it's possible / better than just using the string like all other components?

if (!search) return true;
const { name, rank } = record;

switch (true) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure a switch case statement is really the way to do this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to if statements.

tgui/packages/tgui/interfaces/SecurityRecords/index.tsx Outdated Show resolved Hide resolved
@mullenpaul mullenpaul added the Testmerge Candidate we'll test this while you're asleep and the server has 10 players label Oct 8, 2023
@mullenpaul mullenpaul marked this pull request as draft October 8, 2023 11:46
@ghost
Copy link

ghost commented Oct 13, 2023

fix this issue while you're at it, very simple fix. #4309

if(iszombie(user))
    return

Copy link
Contributor

github-actions bot commented Nov 2, 2023

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@github-actions github-actions bot added the Stale beg a maintainer to review your PR label Nov 2, 2023
@github-actions github-actions bot closed this Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Fix one bug, make ten more Refactor Make the code harder to read Stale beg a maintainer to review your PR Testmerge Candidate we'll test this while you're asleep and the server has 10 players UI deletes nanoui/html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zombies can modify Sec Records
2 participants