-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat(achievement): credit users for logic, art, writing, and testing #2683
base: master
Are you sure you want to change the base?
feat(achievement): credit users for logic, art, writing, and testing #2683
Conversation
app/Filament/Resources/GameResource/RelationManagers/AchievementsRelationManager.php
Show resolved
Hide resolved
$expectedPhraseTwo = "logic"; | ||
if (str_contains($payload, $expectedPhraseOne) && str_contains($payload, $expectedPhraseTwo)) { | ||
if (str_contains($remainingPayload, $expectedPhraseOne) && str_contains($remainingPayload, $expectedPhraseTwo)) { |
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.
Wouldn't it be easier to just check the $words collection for the expected phrases? Is there some benefit to reconstructing the input string?
if (in_array($expectedPhraseOne, $words) && in_array($expectedPhraseTwo, $words)) {
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.
Yep. Updated in latest.
Are achievement authors going to be given credit for each of the categories by default or is the intent only to give credit to people other than the author? |
When someone uploads an achievement to the server, they are by default given Logic credit. Credit for other tasks is implied. Subsequent logic credit is automatically given if a different developer comes in and updates logic for the achievement. Other forms of credit, such as art, must be manually granted. This is to err on the side of caution, as oftentimes the uploader for a new badge is not the artist of the badge, but doing it on a non-developer's behalf. |
Would there be a way to ensure that things like art can be done in a whole batch? It's rare for one artist to do just a few badges and would get annoying fast to have to do credits for a whole set when we have plenty of sets with 100+ achievements. A way to edit multiple at once would be a godsend. Maybe something like an option to apply the same art/writing/testing credit to all achievements or to select achievements it applies to? |
Yes, but not in this PR. The scope of this PR is already quite large; let's build that in a follow-up. |
Would it be possible to include a category for Design credit? While I think this would normally line up with the current authorship/creator field, that's not always the case - I've seen some games where a user/player has put together an entire set plan, challenges and all, and posted it in the comments on the game page - and sometimes the developer who picks it up uses that as a guideline. I don't remember the specific games at the moment, though it might be easy to find by looking for game wall comments containing Google Sheets links. |
This PR makes it so that developers and team accounts can credit users for logic, art, writing, and testing on achievements. There are no player-facing UI elements added as part of this PR.
Achievement credit works by leveraging the
achievement_authors
table. Note that only achievement-related tasks are credited as part of this PR. For game-related tasks, a separate PR will be required which will need to leverage a different table.A sync script, only for logic credit, has been provided and can be executed via:
Art credit is not synced as part of this script, as it's impossible to determine when a badge change occurs if the person making the change was actually the artist.
I think what may be preferable is if there's no art credit on an achievement, assume the achievement's
user_id
is the artist.New functionality has been added to the management app for manually doing CRUD operations on achievement credit:
/manage/games/1
), when rows are checked, a new bulk action appears for adding credit./manage/achievements/9
), a credits table now appears, allowing authorized users to add, edit, and delete credit.