Giter Site home page Giter Site logo

Equilibrium Feat issue about evolve HOT 5 OPEN

mrcaboom avatar mrcaboom commented on September 26, 2024
Equilibrium Feat issue

from evolve.

Comments (5)

StoneCypher avatar StoneCypher commented on September 26, 2024

What locale do you use? Which browser and version?

from evolve.

xilexio avatar xilexio commented on September 26, 2024

I had the same bug in Chrome, but not in Firefox. I analyzed the problem and it is indeed in the linked line. On a fresh start, custom race is just an empty object. Internally sort performs a number of comparisons between elements of the array (here Object.keys(races)) and it happens that the function inside did not work when the custom race happened to be on the left side of the comparison (trying to get localeCompare from undefined races[a].name), but worked fine when it was on the right (races[b].name being correctly undefined). When I reversed the direction of the check, it stopped working in Firefox too, as expected. A simple workaround here is to use coalescing operator ?? here on races[a].name, though it is not used elsewhere in the project, so I'll just use || to maintain maximum compatibility with old EcmaScript. I'll make a pull request with a quick fix.

from evolve.

StoneCypher avatar StoneCypher commented on September 26, 2024

This patch makes sense.

Equilibrium might be further in the game than I am. Why would there be no race name?

from evolve.

xilexio avatar xilexio commented on September 26, 2024

Specifically the custom race did not have the name. Custom race had races[a] equal to {}. My guess is that before it is set the first time or maybe even in the runs where it is not the active one, it is not set. However, I haven't actually seen where it is set.

from evolve.

xilexio avatar xilexio commented on September 26, 2024

The issue was already fixed in 1.3.10.

from evolve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.