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

Add brigmedic handheld #103

Merged

Conversation

fqqf
Copy link

@fqqf fqqf commented Nov 30, 2024

Short description

Dumbed version of cmo handheld that shows only security department.
image


Why? I want to change how people play as brigmedic. Instead of occasionally helping security revive prisoners, the brigmedic's main responsibility will now be ensuring the entire security department stays alive.

This is one of upcoming prs:

  • brigmedic guidebook
  • brigmedic locker and office (small chem lab (so they can stop stealing stuff from med)) on all maps
  • brigmedic dumbed handheld (shows only sec)
  • brigmedic defib
  • brigmedic dumbed hypo (only 5u)

Checks

  • I do not require assistance to complete the PR.
  • Before posting/requesting review of a PR, I have verified that the changes work.
  • I have added screenshots/videos of the changes, or this PR does not change in-game mechanics.
  • I affirm that my changes are licensed under the Starlight Fork License and grant permission for use in this repository under its conditions.

Changelog

🆑 Miracula

  • add: Added brigmedic dumbed handheld

@fqqf fqqf marked this pull request as ready for review December 1, 2024 06:58
@fqqf fqqf requested a review from ss14-Starlight as a code owner December 1, 2024 06:58
@fqqf
Copy link
Author

fqqf commented Dec 1, 2024

ready to review

@github-actions github-actions bot added the size/L label Dec 1, 2024
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
switch (state)
Copy link

@ss14-Starlight ss14-Starlight Dec 1, 2024

Choose a reason for hiding this comment

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

if(state is not CrewMonitoringState st) return; ?

Copy link
Author

Choose a reason for hiding this comment

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

no need for that, original CMO handheld code also doesnt have this check
image

Choose a reason for hiding this comment

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

Well, it's better not to change the original code to avoid conflicts, but it could have been simplified in a separate version.
The switch doesn't really make sense here; you could have made it a one-liner if instead of all this.

Copy link
Author

Choose a reason for hiding this comment

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

true

Copy link
Author

Choose a reason for hiding this comment

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

Well, it's better not to change the original code to avoid conflicts, but it could have been simplified in a separate version. The switch doesn't really make sense here; you could have made it a one-liner if instead of all this.

maybe will change that in the future cuz i am going to keep messing with this code for one of upcoming prs

Choose a reason for hiding this comment

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

In a good implementation, the old state should have been made virtual, inheriting from the brigmed version to avoid duplication, and only transmitting the necessary lists on the server.
Then, on the client side, nothing would need to be changed in the interface, and you could use the same one.

Copy link
Author

Choose a reason for hiding this comment

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

In a good implementation, the old state should have been made virtual, inheriting from the brigmed version to avoid duplication, and only transmitting the necessary lists on the server.
Then, on the client side, nothing would need to be changed in the interface, and you could use the same one.

thx, will think about that

Copy link

@ss14-Starlight ss14-Starlight Dec 1, 2024

Choose a reason for hiding this comment

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

Some logic on the client side just to avoid overloading the server with it.

But this solution actually creates unnecessary calculations on the server that could have been avoided,
and would slightly reduce the traffic.
Yes, it's a negligible difference that doesn't have a major impact, but technically, it's a more correct solution from this side of the issue.

Copy link
Author

Choose a reason for hiding this comment

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

But this solution actually creates unnecessary calculations on the server that could have been avoided,
and would slightly reduce the traffic.
Yes, it's a negligible difference that doesn't have a major impact, but technically, it's a more correct solution from this side of the issue.

alright, alright, i ll fix that someday

Choose a reason for hiding this comment

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

It's not necessary to fix it, I'm saying it's not important, I'm just pointing it out for the future.

@ss14-Starlight ss14-Starlight merged commit b05fe39 into ss14Starlight:Starlight Dec 1, 2024
10 checks passed
github-actions bot added a commit that referenced this pull request Dec 1, 2024
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.

2 participants