cmss13 icon indicating copy to clipboard operation
cmss13 copied to clipboard

Refactor of record system code and migrate all record UI to TGUI

Open vero5123 opened this issue 1 year ago • 8 comments

About the pull request

This pr is part one of a two part plan I have to overhaul the medical record system and give it actual utility. The idea is to improve the medical record keeping mechanic and make it actually useful outside of strictly RP.

Here is the general idea: The new medical record system will still contain fluff data that really isn't that important but has its usefulness in RP, however, it will be significantly reduced in this domain (you can still put notes and what not). Instead, there will be a new autopsy mechanic that will take its place. The gist is that whenever a scalped marine is brought to the morgue the medical staff can optionally perform an autopsy on them and through that autopsy (it will require a little bit of brain usage since you will have to guess the cause of death) the marines can gain tech points. You are not by any means forced to do it, completely optional.

Part 1

This is the current PR.

  • In this pr I ripped out the legacy shitcode for medical laptops and replaced it with my own shitcode, the difference being it now uses TGUI UI.
  • You may now submit an autopsy report ONCE for a given target user although the functionality for tech points has yet to be implemented. (the idea being you get one shot at guessing the cause of death correctly)
  • The amount of medical record fluff has been reduced and is much simpler now. You can still modify the following medical records: General notes (the b.s. you set in your character selection), Psychiatric illnesses, Infectious Diseases, Known Disabilities. (if you want more, lmk)
  • The health status of crew can now be one of three options: Deceased, Active, Unfit (i'm gonna do something with unfit probably)
  • Now don't get angry BUT you now need the ID of the target to modify their records, the reason being if your going to get tech points in the future for doing an autopsy; it would make sense that you can only do the report if you have their ID in hand and the corpse in the morgue. Also, it's a lot harder to grief someone's medical records if you don't have their ID. I'm more than willing to change my mind on this and we can talk about it ~~respectfully~~ on discord. I know you can just right click, but the plan will be to restrict that functionality a bit if it's not for frontline use.
  • and of course existing functionality like printing medical records is still a thing.
  • my ui is not stellar and is a bit bear bones, but I wanted to get something up so I could work on part 2, as I want to get the functionality out of the way.
  • Some technical stuff for the maintainers, you will see it anyway, but I essentially ~~stole~~ modified the existing identification computer code to meet my needs and threw in some OOP for future similar computers. I also subtyped the squad changer and modified the ui to align it with the new functionality.

Part 2

This is the next planned PR. I don't have all the details, but the plan is to get a functional autopsy system working and maybe give bonuses for things like exotic species, such as the predator or whatnot (give incentive for the marines to actually kill one). Hopefully this would be the meat and potatoes of the implementation and the autopsy system would have some good mechanics.

Conclusion

If you don't like something and think there is room for improvement please message me on discord. I will be much more receptive there then if you leave hate comments on my pr. I'm open to anything and everything. For the maintainers, there is plenty of copy pasta that needs to be refactored (single letter vars, silly logic, etc), and i'm on it.

Edit: This pr has essentially turned into an overhaul of the record system in general, with multiple UI changes.

Changelog

:cl: add: Adds autopsy data to medical records ui: New TGUI UI for viewing security records ui: Squad modifier is now more intuitive to use, UI tweak. ui: New TGUI UI for medical viewing medical records. code: Refactored the record system and cleaned up legacy code. /:cl:

vero5123 avatar May 09 '24 06:05 vero5123

health status in the medical laptop should probably be linked and in line w/ the health scanner/medhud health status for consistency

ItsVyzo avatar May 11 '24 19:05 ItsVyzo

Apologies, i'm not done yet, as i'm fiddling with the record system too. Unfortunately I forgot to draft this pr, thanks for the review though Paul! I'll get on your suggestions asap.

vero5123 avatar May 12 '24 17:05 vero5123

Apologies, i'm not done as i'm fiddling with the record system as well. Forgot to draft, thanks for the review though Paul! I'll get on those asap.

No rush - ping me when it's ready!

mullenpaul avatar May 12 '24 21:05 mullenpaul

health status in the medical laptop should probably be linked and in line w/ the health scanner/medhud health status for consistency

yep

vero5123 avatar May 14 '24 22:05 vero5123

The UI is barebones and could definitely use some work in the future (i'm going to be busy soon), I did some preliminary testing and didn't see any runtimes, I wouldn't say it's ready for a full in-depth review, but rather maybe a sanity check first? See if there are any major issues or design choices that need to get sorted beforehand. Copy pasta still needs to be cleaned up a bit (early returns, single letter vars, etc)

vero5123 avatar May 15 '24 00:05 vero5123

need to refactor the skill computer as well.

vero5123 avatar May 19 '24 21:05 vero5123

This pull request has conflicts, please resolve those before we can evaluate the pull request.

cm13-github avatar May 19 '24 22:05 cm13-github

Conflicts have been resolved. A maintainer will review the pull request shortly.

cm13-github avatar May 24 '24 19:05 cm13-github

The terminal UI could probably be in another PR but I might do something with it later down the road when it comes to the record stuff so I just put it in for now.

vero5123 avatar May 31 '24 15:05 vero5123

No rush - ping me when it's ready!

It's ready 👍

vero5123 avatar Jun 03 '24 22:06 vero5123

Great, I'll try and have a look this week

mullenpaul avatar Jun 03 '24 23:06 mullenpaul

This pull request has conflicts, please resolve those before we can evaluate the pull request.

cm13-github avatar Jun 04 '24 13:06 cm13-github

Conflicts have been resolved. A maintainer will review the pull request shortly.

cm13-github avatar Jun 04 '24 17:06 cm13-github

github editor is such cancer.

vero5123 avatar Jun 04 '24 18:06 vero5123

This pull request has conflicts, please resolve those before we can evaluate the pull request.

cm13-github avatar Jun 06 '24 17:06 cm13-github

Conflicts have been resolved. A maintainer will review the pull request shortly.

cm13-github avatar Jun 06 '24 19:06 cm13-github

This pull request has conflicts, please resolve those before we can evaluate the pull request.

cm13-github avatar Jun 15 '24 14:06 cm13-github

Conflicts have been resolved. A maintainer will review the pull request shortly.

cm13-github avatar Jun 15 '24 14:06 cm13-github

I don't have time to work on this. If someone wants they can pick up this PR in the future, you have my full permission to do whatever you want with it but please credit me. Thank you.

vero5123 avatar Jun 20 '24 12:06 vero5123