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

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

Draft
wants to merge 80 commits into
base: master
Choose a base branch
from

Conversation

vero5123
Copy link
Contributor

@vero5123 vero5123 commented May 9, 2024

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

🆑
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 viewing medical records.
code: Refactored the record system and cleaned up legacy code.
/:cl:

@vero5123 vero5123 requested a review from Nanu308 as a code owner May 9, 2024 06:22
@github-actions github-actions bot added Mapping did you remember to save in tgm format? UI deletes nanoui/html Feature Feature coder badge labels May 9, 2024
@vero5123
Copy link
Contributor Author

need to refactor the skill computer as well.

@cm13-github
Copy link
Contributor

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

@cm13-github cm13-github added the Merge Conflict PR can't be merged because it touched too much code label May 19, 2024
@cm13-github cm13-github removed the Merge Conflict PR can't be merged because it touched too much code label May 24, 2024
@cm13-github
Copy link
Contributor

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

code/modules/mob/living/carbon/human/human.dm Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

If you intend to have this return, and for it to still be its own computer; then don't simply comment it out entirely. You can allow it to stay in maps just have no interaction with it at a minimum. But ideally just keep it in a state where it has its old functionality even if its not TGUI.

@@ -75,9 +75,11 @@
name = "Circuit board (Security Records)"
build_path = /obj/structure/machinery/computer/secure_data

/*
Copy link
Contributor

Choose a reason for hiding this comment

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

Really no point to comment it out if you intend for it to be returning.


var/insub = "[icon2html(src, usr)] [SPAN_BOLDNOTICE("[wanted_marine] has been reported for insubordination. Logging to enlistment file.")]"
if(isRemoteControlling(usr))
usr << insub
Copy link
Contributor

Choose a reason for hiding this comment

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

to_chat

Comment on lines +358 to +360
qdel(GLOB.data_core.medical[cryo_pod.record_id_ref])
qdel(GLOB.data_core.general[cryo_pod.record_id_ref])
qdel(GLOB.data_core.security[cryo_pod.record_id_ref])
Copy link
Contributor

Choose a reason for hiding this comment

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

You should remove it from the list and delete it.

code/modules/cm_marines/marines_consoles.dm Outdated Show resolved Hide resolved
code/modules/cm_marines/marines_consoles.dm Outdated Show resolved Hide resolved
code/modules/cm_marines/marines_consoles.dm Outdated Show resolved Hide resolved
code/modules/cm_marines/marines_consoles.dm Outdated Show resolved Hide resolved
code/modules/cm_marines/marines_consoles.dm Outdated Show resolved Hide resolved
@Drulikar Drulikar marked this pull request as draft May 24, 2024 21:59
DOOM and others added 10 commits May 24, 2024 15:07
Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com>
Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com>
Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com>
Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com>
Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com>
Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com>
Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com>
@vero5123 vero5123 closed this May 29, 2024
@vero5123 vero5123 reopened this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Improvement Make the code longer Feature Feature coder badge Mapping did you remember to save in tgm format? UI deletes nanoui/html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants