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

Clarify Trader Refresh Code #54996

Merged

Conversation

bombasticSlacks
Copy link
Contributor

@bombasticSlacks bombasticSlacks commented Feb 1, 2022

Summary

None

Purpose of change

Trader code was confusing. I spent a while debugging it because the logic wasn't obvious. Since it splits the week delay to refresh over a conditional and an increment.

Describe the solution

Now it just adds 6_days to the current turn as "restock" and tests if current turn - restock is > 0 (It's been more than 6 days)

Describe alternatives you've considered

This is a bit pedantic so I could leave it alone but I think having a comment and clearer numbers would be a boon.

Testing

Additional context

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Feb 1, 2022
@Maleclypse Maleclypse added [C++] Changes (can be) made in C++. Previously named `Code` NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Feb 1, 2022
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 1, 2022
@kevingranade kevingranade merged commit f7e93ba into CleverRaven:master Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants