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

fixes some backend shipjoin stuff #2535

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

tmtmtl30
Copy link
Contributor

About The Pull Request

admin + DB flag exemptions weren't respected by the ship joining UI, but all players were assumed to have the requisite playtime to spawn / join a ship by the code that actually handled joining. this fixes both, technically fixing an href exploit i suppose

Why It's Good For The Game

bugs bad + consistency good. i am bad at web dev

Changelog

🆑
fix: Small playtime-based ship join restriction edge cases fixed.
/:cl:

@github-actions github-actions bot added TGUI Code change Watch something violently break. labels Nov 28, 2023
Copy link
Member

@MarkSuckerberg MarkSuckerberg left a comment

Choose a reason for hiding this comment

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

is the playtime restriction limits even checked at all during the actual purchase?

@tmtmtl30
Copy link
Contributor Author

tmtmtl30 commented Nov 29, 2023

i believe so; the chain is something like attemptlatejoin -> isjobeligible (or isjobavailable? or something?) -> has_job_playtime. dunno if those are the exact names since i can't search the codebase easily right now

really, i should probably move the relevant calculations into ui_static_data() and just send them to the UI so that it's all centralized. but

@tmtmtl30
Copy link
Contributor Author

tmtmtl30 commented Nov 30, 2023

turns out that shipowners can infinitely open slots on their ships, because joining a ship decrements the slot counter. this is bad. need to fix it

Copy link
Member

@MarkSuckerberg MarkSuckerberg left a comment

Choose a reason for hiding this comment

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

I'll let you get that in a different PR, this is pretty important to have

@MarkSuckerberg MarkSuckerberg added this pull request to the merge queue Dec 6, 2023
Merged via the queue into shiptest-ss13:master with commit 6274f6a Dec 6, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code change Watch something violently break. TGUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants