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
Merged

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 label Mar 7, 2021
@AmProsius
Copy link
Owner Author

@AmProsius AmProsius commented Mar 7, 2021

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 type: session fix 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 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 label Mar 17, 2021
@AmProsius AmProsius self-assigned this Mar 29, 2021
@AmProsius
Copy link
Owner Author

@AmProsius AmProsius commented Apr 1, 2021

Similar to #25.

@AmProsius AmProsius requested a review from szapp Apr 8, 2021
@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

@szapp szapp Apr 11, 2021

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;
};

szapp
szapp approved these changes Apr 11, 2021
Copy link
Collaborator

@szapp szapp left a comment

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 Apr 11, 2021
@AmProsius
Copy link
Owner Author

@AmProsius AmProsius commented Apr 11, 2021

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 issue Apr 19, 2021
@szapp szapp removed the validation: required 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 impl: hook script func provided fix type: session fix
Projects
Fix templates
Add dialog conditions
v1.1.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants