Address issues #102-#104 + P7P breeding compat floor - #105
Conversation
Mating pair search (#102, #103): - "Hide in-love cats" filters now hide any lover, not just mutual. Once a cat has fallen in love it can't fall in love again, so any lover is disqualifying for the sidebar filter semantics. - Split into two toggles: hide in-love cats on the left list, and hide in-love matches on the right. - Heart icon and age now render next to every cat in both the left list and the matches table. CSV/XLSX export: - Added Class, Passive Abilities, Disorders, Defects, Tags, Lovers, Haters columns. Donation/Exceptional thresholds driven by Detailed Scoring (#104): - New "Score source" combo in the thresholds dialog: Base stat sum (default) or Detailed Scoring total. - In Detailed mode, two float thresholds replace the int spinboxes. Sidebar filter and tooltips adapt. - Detailed Scoring view now caches {id(cat): adjusted_total} after each recompute and emits detailed_scores_updated so the sidebar refreshes. Cache clears on save reload so stale id(cat) keys can't leak. - Falls back to base-sum silently when the cache isn't populated. Perfect 7 Planner — min breeding compatibility floor: - New "Min breed %" spinbox (default 15%) on the planner controls bar, persisted in session state. - Filters candidate pairs and rotation candidates using the wiki's compat formula (0.15 * CHA * libido * lover_mult * sexuality_mult), taking the worst-direction compat so same-sex pairs with asymmetric sexuality can't slip past the floor. - Foundation pairs (user-picked) bypass the filter. - can_breed docstring updated to cite the wiki formula directly. Splash / startup: - MainWindow now exposes a startup_save_load_finished signal and emits it from both the success and failure paths, replacing the fragile QTimer-probe-for-worker hook in app.main.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44cc6e23d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| from mewgenics.utils.thresholds import _set_detailed_scores | ||
| _set_detailed_scores(_detailed_scores_out) |
There was a problem hiding this comment.
Keep detailed-score cache complete across hidden-cat filters
This writes the global detailed-score cache from _detailed_scores_out, but that dict is populated only for the currently computed alive rows in _recompute (which can exclude cats when Hide Kittens or Hide Out-of-Scope is enabled). With Score source = detailed, cats omitted from this cache silently fall back to base-sum logic in _get_detailed_score callers, so donation/exceptional classification becomes a mixed mode depending on view filters rather than the selected score source.
Useful? React with 👍 / 👎.
| if label == "gay": | ||
| return 1.0 | ||
| if label == "bi": | ||
| return 0.5 | ||
| return 0.05 |
There was a problem hiding this comment.
Use non-extreme gay fallback when sexuality_raw is missing
When sexuality_raw is unavailable (older saves/override paths), mapping "gay" to 1.0 makes opposite-sex sexuality_mult equal cos(π/2)=0, so pair_breeding_compatibility can become zero and the new Min breed % filter rejects those pairs for any threshold above 0. The existing compatibility helper in this module uses a softer fallback (0.95) for label-only data, which preserves low-but-nonzero compatibility and avoids over-filtering label-only cats.
Useful? React with 👍 / 👎.
Summary
can_breeddocstring rewritten to cite the wiki formula verbatim. Same-sex pairs remain legitimate per the game's math (see issue #101 comment).0.15 × CHA × libido × lover_mult × sexuality_mult, taking the worst-direction compat so asymmetric same-sex pairs can't slip past the floor. Foundation (user-picked) pairs bypass.MainWindow.startup_save_load_finishedsignal replaces the fragile QTimer-probe splash hook.Why the compat floor uses worst-direction
A bi + straight same-sex pair has very different per-direction compat because
sexuality_multis partner-anchored. Best-direction (max) let those pairs slip past a 15% floor even though half of initiations fall below the game's own 5% gate. Worst-direction (min) matches "this pair reliably produces kittens regardless of who initiates."Sanity check at the 15% default:
Files touched
src/save_parser.py—can_breeddocstring onlysrc/breeding.py—estimate_breeding_compatibility+pair_breeding_compatibilitysrc/mewgenics/views/perfect_planner.py— Min breed % UI + filtersrc/mewgenics/views/safe_breeding.py— filter semantics + ♥/age on list itemssrc/mewgenics/main_window.py— startup signal, CSV columns, detailed-score wiring, adaptive tooltips, save-load cache clearsrc/mewgenics/app.py— splash listens on the new signalsrc/mewgenics/dialogs.py— score-source combo + Detailed threshold spinboxessrc/mewgenics/utils/thresholds.py— new prefs +_DETAILED_SCOREScache +_set_detailed_scores/_get_detailed_score/_detailed_scores_readysrc/mewgenics/utils/cat_analysis.py—_is_exceptional_breeder/_donation_candidate_base_reasonbranch on score sourcesrc/mewgenics/models/cat_table_model.py— tooltip copy adapts to score sourcesrc/breed_priority/__init__.py—detailed_scores_updatedSignal + cache push after each recomputeTest plan
Pre-existing failing tests (unrelated to this PR):
test_mutation_planner_trait_table_*intests/test_perfect_planner_ui.py.