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

Port loyaltycascade from Ruby to Lua #542

Merged
merged 4 commits into from Jan 24, 2023

Conversation

vallode
Copy link
Contributor

@vallode vallode commented Jan 18, 2023

Needs to be tested before merging, would be great to find a v50.05 compatible save suffering from a loyalty cascade.

Once merged should be ticked off in DFHack/dfhack#2081

@myk002 myk002 mentioned this pull request Jan 18, 2023
27 tasks
fix/loyaltycascade.lua Outdated Show resolved Hide resolved
fix/loyaltycascade.lua Outdated Show resolved Hide resolved
fix/loyaltycascade.lua Outdated Show resolved Hide resolved
fix/loyaltycascade.lua Outdated Show resolved Hide resolved
fix/loyaltycascade.lua Outdated Show resolved Hide resolved
Comment on lines +89 to +92
if cache.next_slot > status_slot then
cache.next_slot = status_slot
end
Copy link
Member

Choose a reason for hiding this comment

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

what if there were status slots taken above status_slot? does everything need to be moved down by one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly I'm unsure, this is a 1:1 from the ruby script and testing is difficult without an actual cascade happening. Let me know what your gut says here.

Copy link
Member

Choose a reason for hiding this comment

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

I'd say add a comment noting the possibility so we have a place to look if things go wonky. I can do this post merge.

fix/loyaltycascade.lua Outdated Show resolved Hide resolved
@myk002
Copy link
Member

myk002 commented Jan 18, 2023

oh, also is there a loyaltycascade.rb file to delete?

Comment on lines +89 to +92
if cache.next_slot > status_slot then
cache.next_slot = status_slot
end
Copy link
Member

Choose a reason for hiding this comment

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

I'd say add a comment noting the possibility so we have a place to look if things go wonky. I can do this post merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
2 participants