-
Notifications
You must be signed in to change notification settings - Fork 85
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
Decruft citizen status #837
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The target was being defined per status, which was adding lots of useless lines to read through. Now it's only defined once at start of the methods.
No point defining a load of local variables if we're not going to use them; check we're not confused before doing that stuff.
Make referring to citizen more concise.
For consistency with other id vars.
Used to determine if citizen is caught in a flood or tornado. Incorporate IsSweptAway() and condense confused statuses Remove duplicate code
Determines if a vehicle is owned by the specified citizen. Incorporate IsVehicleOwnedByCitizen()
Checks if a building id is an outside connection. Incorporate IsOutsideConnection() method
Comment what targetIsNode means
We want to refer to vehicle and it's info within the switch, not vehicle manager.
We are interested in vehicle and its info, not vehicle manager.
It's almost always true, so set true by default then we only need to set to false where applicable.
originalfoo
added
the
code cleanup
Refactor code, remove old code, improve maintainability
label
Apr 13, 2020
kvakvs
approved these changes
Apr 13, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
krzychu124
approved these changes
Apr 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While looking at
ExtCitizenInstanceManager.cs
I noticed the methods that output localized citizen status (that gets shown on citizen world info panel) for residents and tourists was full of duplicate and extraneous code. This PR cleans it up - a lot.