Coder Social home page Coder Social logo

Slot ghosting about pyfa HOT 2 CLOSED

blitzmann avatar blitzmann commented on May 12, 2024
Slot ghosting

from pyfa.

Comments (2)

blitzmann avatar blitzmann commented on May 12, 2024

Problem seems to be in eos.saveddata.fit.fill(), or at least partly. The real issue is that subsystems change the number of slots. In service.fit.appendModule(), pyfa compares the number of modules on fit before and after fill(). If those equate to each other, the fittingView never fires slotsChanged() which helps to refresh the GUI.

On my Loki, I have any subsystem for the other slots. For the Propulsion, all the modules have +1 to low slots, whereas the Nullifier does not. This means that if you have a fit that has one empty slot, then you might have 23 modules to 24 slots. If you switch to the Nullifier, the number of slots decrements -1, but the number of modules stay the same. Since they equate each other, it never refreshes.

This problem does not occur if you have all the slots filled and then switch to the Nullifier. There are some other subsystems that do this, when the number of mods on the ship equates to the new number of slots when switching fits out.

It seems that this used to be a way to signal that we're dealing with a t3 cruiser - if the comparison does not equate, then the slots must have changed, and so we fire off the slotsChanged. But there are edge cases where this does not work.

I will be submitting a pull request to simply call slotsChanged regardless to cover our bases. I've tested this with t3 and regular ships with no signs of regression, so from what I've noticed it's not harmful to call this with every ship (I'll also be removing it from removeModule for in-case purposes)

from pyfa.

blitzmann avatar blitzmann commented on May 12, 2024

fixed 752b1fe

from pyfa.

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.