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

Fix refugee's teamster dialogue which doesn't roll directions anymore #72437

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

andrewhr
Copy link
Contributor

Summary

Bugfixes "Refugee's teamster dialogue which doesn't roll directions anymore"

Purpose of change

Fix dialogue to actually roll directions.

Describe the solution

The time_since math function (?) returns -1 for undefined variables, as described in docs[1]. This creates a scenario which the second clause of '< 2 d' to always match, and directions are never actually rolled.

This patch fixes that by merging both rolling direction cases in a single conditional cause, and the fallback is the do-nothing case.

Describe alternatives you've considered

Using a timer EOC similar to how Hub 01 uses to roll bar visitors.

Testing

I ran the game with this patch + extra annotation to each dialogue to know which one was picked by the engine. Dialogue works as expected.

Additional context

The `time_since` math function (?) returns -1 for undefined variables,
as described in docs[1]. This creates a scenario which the second clause
of '< 2 d' to always match, and directions are never actually rolled.

This patch fixes that by merging both rolling direction cases in a
single conditional cause, and the fallback is the do-nothing case.
@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON <Bugfix> This is a fix for a bug (or closes open issue) <Enhancement / Feature> New features, or enhancements on existing Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Info / User Interface Game - player communication, menus, etc. astyled astyled PR, label is assigned by github actions labels Mar 16, 2024
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Mar 18, 2024
@Maleclypse Maleclypse merged commit 088cddf into CleverRaven:master Mar 19, 2024
16 of 24 checks passed
@andrewhr andrewhr deleted the fix-teamster-directions branch March 19, 2024 04:51
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 <Bugfix> This is a fix for a bug (or closes open issue) Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Enhancement / Feature> New features, or enhancements on existing 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 NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants