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 Makeown-ing an enemy of civilization constantly producing vengeful thoughts #1212

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Crystalwarrior
Copy link
Contributor

@Crystalwarrior Crystalwarrior commented Jun 28, 2024

Fixes spam of vengeful thoughts when makeown()ing an enemy of your civilization/group.

makeown.lua Outdated Show resolved Hide resolved
makeown.lua Outdated Show resolved Hide resolved
makeown.lua Outdated Show resolved Hide resolved
makeown.lua Outdated Show resolved Hide resolved
makeown.lua Outdated Show resolved Hide resolved
@myk002
Copy link
Member

myk002 commented Jun 28, 2024

also needs changelog entry

@Crystalwarrior Crystalwarrior requested a review from myk002 July 2, 2024 22:22
@myk002
Copy link
Member

myk002 commented Jul 2, 2024

you can set vscode to remove trailing spaces on save. That might help you pass the pre-commit.ci check with more consistency.

makeown.lua Outdated Show resolved Hide resolved
makeown.lua Outdated Show resolved Hide resolved
@Crystalwarrior Crystalwarrior requested a review from myk002 July 16, 2024 10:50
Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

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

LGTM other than the changelog

edit: also please fix pre-commit.ci warnings

changelog.txt Outdated Show resolved Hide resolved
@Crystalwarrior Crystalwarrior changed the title Makeown-plus Fix Makeown-ing an enemy of civilization constantly producing vengeful thoughts Jan 27, 2025
@Crystalwarrior Crystalwarrior requested a review from myk002 January 27, 2025 15:17
makeown.lua Outdated Show resolved Hide resolved
@@ -280,7 +280,7 @@ local function fix_histfig(unit)
::continue::
end
-- If you're makeown-ing an enemy of your civilization or group, people will feel vengeful without this
if df.histfig_entity_link_enemyst:is_instance(el) then
if el and df.histfig_entity_link_enemyst:is_instance(el) then
Copy link
Member

@myk002 myk002 Jan 30, 2025

Choose a reason for hiding this comment

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

This does not fix the problem. el can be a stale reference. the call to entity_link above can delete the memory that el points to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants