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

fix: clean cache + Change language in options #983

Merged
merged 9 commits into from
Dec 10, 2024

Conversation

InnerCircleTFS
Copy link
Contributor

konfiguracja

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Behavior

Actual

Do this and that doesn't happens

Expected

Do this and that happens

Fixes

# (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Server Version:
  • Client:
  • Operating System:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

konfiguracja
@kokekanon
Copy link
Collaborator

kokekanon commented Dec 9, 2024

@InnerCircleTFS add the prefix improve or fix

check
change language if player is online
image

@InnerCircleTFS InnerCircleTFS changed the title Added clean cache + Change language in options fix: clean cache + Change language in options Dec 9, 2024
commit 5c5dc58
Author: InnerCircleTFS <[email protected]>
Date:   Mon Dec 9 17:04:32 2024 -0300

    improve: UIGraph with new features by oen (mehah#984)

    UIGraph widget got massive update including:

    Multiple graphs in a single widget
    Showing value of a closest point on a line when widget is hovered
    Better performance due to A LOT of caching

    author: Oen
@InnerCircleTFS
Copy link
Contributor Author

There are several errors in the project related to onInit, onTerminate, when reloading all the modules (when I am online). The biggest problem is in the game interface. I couldn't find the error, so I did this:

     @onClick: |
        if g_game.isOnline() then
          g_logger.warning("To prevent errors, change the language while offline." )
        else
          modules.client_locales.createWindow()
        end

I noticed an error in the function Controller:terminate(). I believe that self:onTerminate() should be after onGameEnd and not before.

In terminate, I clean a variable, later in onGameEnd, I could use that variable. (This only applies when reloading).

function Controller:terminate()
    if self.onTerminate then
        self:onTerminate()
    end

    if self.onGameStart then
        disconnect(g_game, { onGameStart = self.onGameStart })
    end

    if self.onGameEnd then
        if g_game.isOnline() then self:onGameEnd() end
        disconnect(g_game, { onGameEnd = self.onGameEnd })
    end

@mehah
Copy link
Owner

mehah commented Dec 10, 2024

@InnerCircleTFS
About the controller bug, thanks, but if you want, you can open a PR, I will accept it with pleasure, we don't have much bureaucracy here. :)

@mehah
Copy link
Owner

mehah commented Dec 10, 2024

@InnerCircleTFS
is done?

@InnerCircleTFS
Copy link
Contributor Author

yes

@mehah mehah merged commit ca56936 into mehah:main Dec 10, 2024
10 checks passed
@InnerCircleTFS InnerCircleTFS deleted the settings branch December 17, 2024 05:23
@kokekanon kokekanon mentioned this pull request Dec 18, 2024
5 tasks
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.

3 participants