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

eoc/math_parser: port time handling to math #70996

Merged
merged 13 commits into from
Jan 24, 2024

Conversation

andrei8l
Copy link
Contributor

@andrei8l andrei8l commented Jan 16, 2024

Summary

None

Purpose of change

Port all EOC time handling to math

Describe the solution

Go hard until it's done

Describe alternatives you've considered

N/A

Testing

Updated test units

Additional context

This should be reviewed by commit. There is no rush.

I'll wait for #70808 (merged), #70898 (not conflicting anymore), and 71109 (merged) before undrafting

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON Missions Quests and missions Map / Mapgen Overmap, Mapgen, Map extras, Map display Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs Mods: Aftershock Anything to do with the Aftershock mod Mechanics: Enchantments / Spells Enchantments and spells EOC: Effects On Condition Anything concerning Effects On Condition Mods: Innawood 🌲 Anything to do with Innawood mod Mods: Xedra Evolved Anything to do with Xedra Evolved Mods: Mind Over Matter Mods: Sky Island Anything about the Sky Island mod json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Jan 16, 2024
@andrei8l andrei8l force-pushed the math_parser-time branch 2 times, most recently from f924477 to 7f76e8b Compare January 16, 2024 23:06
@github-actions github-actions bot added the Info / User Interface Game - player communication, menus, etc. label Jan 16, 2024
@GuardianDll
Copy link
Member

Is there a way to check absolute time, one that is not depending on cataclysm date? Like "today is day between day 240 and day 270"?

@andrei8l
Copy link
Contributor Author

andrei8l commented Jan 19, 2024

Is there a way to check absolute time, one that is not depending on cataclysm date? Like "today is day between day 240 and day 270"?

Yeah, with time('now', 'unit': 'days'). Unless you meant day in year, which should be time('now', 'unit': 'days') % (game_option('SEASON_LENGTH') * 4) (since we don't have year units), but game_option() appears to be broken

@andrei8l andrei8l force-pushed the math_parser-time branch 2 times, most recently from 390c8dc to fee2c7e Compare January 23, 2024 06:52
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 23, 2024
@andrei8l andrei8l marked this pull request as ready for review January 24, 2024 01:25
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Auto-requesting reviews from non-collaborators: @GuardianDll @Standing-Storm @Light-Wave

@Maleclypse Maleclypse merged commit 212f9d8 into CleverRaven:master Jan 24, 2024
23 of 35 checks passed
@andrei8l andrei8l deleted the math_parser-time branch January 24, 2024 05:29
@andrei8l
Copy link
Contributor Author

Thanks for merging!

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` Code: Tests Measurement, self-control, statistics, balancing. <Documentation> Design documents, internal info, guides and help. EOC: Effects On Condition Anything concerning Effects On Condition Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display [Markdown] Markdown issues and PRs Mechanics: Enchantments / Spells Enchantments and spells Missions Quests and missions Mods: Aftershock Anything to do with the Aftershock mod Mods: Innawood 🌲 Anything to do with Innawood mod Mods: Mind Over Matter Mods: Sky Island Anything about the Sky Island mod Mods: Xedra Evolved Anything to do with Xedra Evolved Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants