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

Cor Kalom can be told that the weed was delivered multiple times #188

Merged
merged 3 commits into from Apr 11, 2021

Conversation

AmProsius
Copy link
Owner

@AmProsius AmProsius commented Apr 8, 2021

Describe the bug
The player can tell Cor Kalom that he delivered the weed multiple times.

Expected behavior
Cor Kalom can now be told that the weed was delivered only once.

Steps to reproduce the issue

  1. Tell Cor Kalom that the weed was delivered.
  2. Save the game.
  3. Load the save.
  4. Tell Cor Kalom about the weed again.

Additional context
Fix for #24 has to be applied to successfully apply this fix.

@AmProsius AmProsius added the validation: required This issue needs validation from one of the validators. label Mar 7, 2021
@AmProsius
Copy link
Owner Author

func INT Info_Kalom_KrautboteBACK_Condition()
{
if Kalom_DeliveredWeed
{
return TRUE;
};
};

changed to

func INT Info_Kalom_KrautboteBACK_Condition()
{
    if (Kalom_DeliveredWeed)
    && (Kalom_Krautbote == LOG_RUNNING);
    {
        return TRUE;
    };
};

@AmProsius AmProsius added provided fix This issue has a fix provided in the comments. type: session fix The fix for this issues is persistent across a session. labels Mar 7, 2021
@AmProsius AmProsius added this to Info condition in Fix templates Mar 7, 2021
@AmProsius AmProsius added this to the v1.1.0 milestone Mar 11, 2021
@AmProsius AmProsius added this to To Do in v1.1.0 via automation Mar 11, 2021
@szapp szapp added the impl: hook script func This issue requires hooking script functions. label Mar 16, 2021
@szapp szapp moved this from Hook Daedalus function to Unsorted in Fix templates Mar 16, 2021
@szapp szapp moved this from Unsorted to Dialog: Info condition in Fix templates Mar 17, 2021
@szapp szapp added the compatibility: easy This issue is easy to make compatible. label Mar 17, 2021
@AmProsius AmProsius self-assigned this Mar 29, 2021
@AmProsius
Copy link
Owner Author

Similar to #25.

@AmProsius AmProsius requested a review from szapp April 8, 2021 21:30
@AmProsius AmProsius removed their assignment Apr 8, 2021
@AmProsius AmProsius moved this from To Do to In Progress in v1.1.0 Apr 8, 2021
symbPtr = MEM_GetSymbol("Kalom_DrugMonopol");
};
if (symbPtr) {
if (MEM_ReadInt(symbPtr + zCParSymbol_content_offset) == LOG_SUCCESS) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest taking the inverse of

if (var == LOG_RUNNING) {
    return TRUE;
};

So instead I propose to turn this condition here into

if (var != LOG_RUNNING) {
    return TRUE;
};

Copy link
Collaborator

@szapp szapp left a comment

Choose a reason for hiding this comment

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

I did not explicitly trace back the relation to #24, but the test passes if #24 is applied and also if it's not.

@szapp szapp merged commit 4ddacfe into master Apr 11, 2021
v1.1.0 automation moved this from In Progress to Done Apr 11, 2021
@szapp szapp deleted the bug188 branch April 11, 2021 19:22
@AmProsius
Copy link
Owner Author

I did not explicitly trace back the relation to #24, but the test passes if #24 is applied and also if it's not.

Yes, I managed to not require the fix for #24 to be applied.

For example:

if (G1CP_IsFixApplied(24)) {
    symbId = G1CP_GetIntVarID("Kalom_Krautbote", 0);
} else {
    symbId = G1CP_GetIntVarID("Kalom_DrugMonopol", 0);
};

szapp added a commit that referenced this pull request Apr 19, 2021
@szapp szapp removed the validation: required This issue needs validation from one of the validators. label May 14, 2021
@szapp szapp moved this from Modify dialog conditions to Add dialog conditions in Fix templates Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility: easy This issue is easy to make compatible. impl: hook script func This issue requires hooking script functions. provided fix This issue has a fix provided in the comments. type: session fix The fix for this issues is persistent across a session.
Projects
Fix templates
Add dialog conditions
v1.1.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants