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

[CODE] refactor medical_cats_condition_fulfilled #3358

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

rustykitty
Copy link
Contributor

About The Pull Request

Split conditions.medical_cats_condition_fulfilled into two functions, amount_clanmembers_covered and medicine_cats_condition_fulfilled. Updated usages accordingly.

Why This Is Good For ClanGen

IMO, it's considered bad practice for a function to be able to return two different things based on arguments it is passed, let alone be capable of returning values of two different types.
In fact, the following Java example will not even compile, because boolean is not implicitly convertible to int in Java:

class Test {
    public int test() {
        return true;
    }
}

Linked Issues

N/A

Proof of Testing

Screenshot 2025-01-12 at 6 41 26 PM

Changelog/Credits

…ts_condition_fulfilled()` and `amount_clanmembers_covered()`
commit c5a4561
Merge: 46d4c8a 130ec66
Author: J Gynn <[email protected]>
Date:   Sun Jan 12 22:54:31 2025 +0000

    Merge pull request ClanGenOfficial#3275 from larkgz/fix-injury-thoughts

    [BUGFIX] has_injuries thoughts

commit 46d4c8a
Merge: cd33086 d999622
Author: J Gynn <[email protected]>
Date:   Sun Jan 12 22:39:40 2025 +0000

    Merge pull request ClanGenOfficial#3356 from KiraDragoness/KiraDragoness-fixes

    [BUGFIX] Fixed text when bringing a litter of kits into camp

commit d999622
Author: KiraDragoness <[email protected]>
Date:   Sun Jan 12 23:36:41 2025 +0100

    Update pregnancy.en.json

commit cb56587
Author: KiraDragoness <[email protected]>
Date:   Sun Jan 12 23:32:43 2025 +0100

    Fixed text when bringing a litter of kits into camp

commit cd33086
Merge: 9c5df2a 237fb22
Author: J Gynn <[email protected]>
Date:   Sat Jan 11 17:11:45 2025 +0000

    Merge pull request ClanGenOfficial#3346 from rustykitty/pregnant-secret

    fixed secret pregnancy message

commit 9c5df2a
Merge: fdab408 4fd3787
Author: J Gynn <[email protected]>
Date:   Sat Jan 11 17:10:51 2025 +0000

    Merge pull request ClanGenOfficial#3353 from rustykitty/issue-3348

    fixed medicine den text adjusting error

commit 4fd3787
Author: Rusty <[email protected]>
Date:   Sat Jan 11 08:25:32 2025 -0800

    fixed error with adjusting empty test (ClanGenOfficial#3348)

commit 9bead09
Author: Rusty <[email protected]>
Date:   Sat Jan 11 08:19:35 2025 -0800

    lint code

commit 237fb22
Author: Rusty <[email protected]>
Date:   Thu Jan 9 06:55:53 2025 -0800

    fixed secret pregnancy message (ClanGenOfficial#3328)

commit 130ec66
Author: Lara <[email protected]>
Date:   Fri Dec 27 13:32:35 2024 -0500

    fix: has_injuries thoughts

# Conflicts:
#	scripts/conditions.py
@rustykitty rustykitty force-pushed the medicine-cat-fulfilled-cleanup branch from bdef739 to cb5059d Compare January 13, 2025 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant