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

[BUG] Game crashed on timeskip, age comparison when age is None #3078

Closed
bakermor opened this issue Dec 1, 2024 · 4 comments · Fixed by #3079
Closed

[BUG] Game crashed on timeskip, age comparison when age is None #3078

bakermor opened this issue Dec 1, 2024 · 4 comments · Fixed by #3079
Assignees

Comments

@bakermor
Copy link
Contributor

bakermor commented Dec 1, 2024

Type: (only select one)

  • Code - general bugs related to how the game runs and responds to you.

Describe the bug
Game crashed when I timeskipped due to age being None in create_new_cat_block when creating a cat for an event

Grade: (only select one)

  • Important - The bug has a large effect on the gameplay but is not urgent

Reproduce
Steps to reproduce the behavior:

  1. Timeskip one moon
  2. Roll the gen_injury_clawwound_any1 event

Commit # or Game Version Number:
Commit: 6486cb4

Additional context
This is new code, I'm guessing it just needs a check that age exists before it runs

Screenshots
File "C:\Users\mbake\Documents B\ClanGen\ClanGen\clangen\scripts\events.py", line 137, in one_moon
self.one_moon_cat(cat)
File "C:\Users\mbake\Documents B\ClanGen\ClanGen\clangen\scripts\events.py", line 1211, in one_moon_cat
triggered_death = self.handle_injuries_or_general_death(cat)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mbake\Documents B\ClanGen\ClanGen\clangen\scripts\events.py", line 2158, in handle_injuries_or_general_death
triggered_death = Condition_Events.handle_injuries(cat, random_cat)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mbake\Documents B\ClanGen\ClanGen\clangen\scripts\events_module\condition_events.py", line 397, in handle_injuries
handle_short_events.handle_event(
File "C:\Users\mbake\Documents B\ClanGen\ClanGen\clangen\scripts\events_module\handle_short_events.py", line 192, in handle_event
self.handle_new_cats()
File "C:\Users\mbake\Documents B\ClanGen\ClanGen\clangen\scripts\events_module\handle_short_events.py", line 322, in handle_new_cats
create_new_cat_block(
File "C:\Users\mbake\Documents B\ClanGen\ClanGen\clangen\scripts\utility.py", line 522, in create_new_cat_block
if age <= 6 and not bs_override:
^^^^^^^^
TypeError: '<=' not supported between instances of 'NoneType' and 'int'

image
image

@bakermor
Copy link
Contributor Author

bakermor commented Dec 1, 2024

Looks like this happens for multiple events, I've gotten the exception for a couple different ones

@j-gynn
Copy link
Contributor

j-gynn commented Dec 1, 2024

/assign-me

Copy link

github-actions bot commented Dec 1, 2024

👋 Hey @j-gynn, thanks for your interest in this issue! 🎉

⚠ Note that this issue will become unassigned if it isn't closed within 7 days.

🔧 A maintainer can also add the 📌 Pinned label to prevent it from being unassigned automatically.

@scribblecrumb
Copy link
Collaborator

goddammit i broke it, thanks for cleaning up my mess j-gynn

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

Successfully merging a pull request may close this issue.

3 participants