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

When you lose a battle, the game doesn't wait until you've exited the battle to continue events #2289

Open
Qiangong2 opened this issue Mar 3, 2024 · 1 comment

Comments

@Qiangong2
Copy link
Collaborator

Qiangong2 commented Mar 3, 2024

When you lose a battle, the events will immediately start after the "defeated" screen pops up. Due to this, you can have text boxes overlapping. This issue is not present when you win a battle. When you win a battle, events wait to continue until you're back on the map.

EDIT: The game also tends to crash when that happens with the following error:

Traceback (most recent call last):
  File "C:\Users\Kurt\Downloads\Tuxemon\run_tuxemon.py", line 49, in <module>
    main.main(load_slot=args.slot)
  File "C:\Users\Kurt\Downloads\Tuxemon\tuxemon\main.py", line 90, in main
    client.main()
  File "C:\Users\Kurt\Downloads\Tuxemon\tuxemon\client.py", line 301, in main
    update(clock_tick)
  File "C:\Users\Kurt\Downloads\Tuxemon\tuxemon\client.py", line 346, in update
    self.event_engine.update(time_delta)
  File "C:\Users\Kurt\Downloads\Tuxemon\tuxemon\event\eventengine.py", line 359, in update
    self.update_running_events(dt)
  File "C:\Users\Kurt\Downloads\Tuxemon\tuxemon\event\eventengine.py", line 450, in update_running_events
    action.start()
  File "C:\Users\Kurt\Downloads\Tuxemon\tuxemon\event\actions\unlock_controls.py", line 30, in start
    sink_state = self.session.client.get_state_by_name(SinkState)
  File "C:\Users\Kurt\Downloads\Tuxemon\tuxemon\client.py", line 539, in get_state_by_name
    return self.state_manager.get_state_by_name(state_name)
  File "C:\Users\Kurt\Downloads\Tuxemon\tuxemon\state.py", line 668, in get_state_by_name
    raise ValueError(f"Missing state {state_name}")
ValueError: Missing state <class 'tuxemon.states.sink.SinkState'>
@JaskRendix
Copy link
Collaborator

JaskRendix commented Mar 4, 2024

EDIT: The game also tends to crash when that happens with the following error:

@Qiangong2 I have no idea where you experimented this. Ah yeah, so I was forced to test the #2290 before it was merged.

after testing it, I reproduced it after losing against mystikapi as well as the overlapping boxes, it's an issue with the chain of events (specifically variables), I'm trying to fix it. It crashes because it triggers another event with unlock, so when the second tries to unlock again > crash

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

No branches or pull requests

2 participants