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

Valid modules are removed in specific case #324

Closed
DarkFenX opened this issue Jul 9, 2015 · 3 comments
Closed

Valid modules are removed in specific case #324

DarkFenX opened this issue Jul 9, 2015 · 3 comments

Comments

@DarkFenX
Copy link
Member

DarkFenX commented Jul 9, 2015

[Confessor, Confessor fit]

[Empty Low slot]
[Empty Low slot]
[Empty Low slot]
[Empty Low slot]
[Empty Low slot]

[Empty Med slot]
[Empty Med slot]
[Empty Med slot]

Small Focused Pulse Laser II
[Empty High slot]
Small Focused Pulse Laser II
Small Focused Pulse Laser II
[Empty High slot]
Small Focused Pulse Laser II

[Empty Rig slot]
[Empty Rig slot]
[Empty Rig slot]

Import fit. Rearrange guns the way it's shown on EFT format fit. Relaunch pyfa.

2015-07-09 23:28:42,221 eos.saveddata.module     ERROR    Item (id: 0) is not a Module
2015-07-09 23:28:42,222 eos.saveddata.module     ERROR    Item (id: 0) is not a Module
2015-07-09 23:28:42,222 eos.saveddata.module     ERROR    Item (id: 0) is not a Module

3 lasers (besides 1st one) are removed.

@blitzmann
Copy link
Collaborator

It seems to remove any module which is moved. I did not consider testing that scenario, as that doesn't really have to do with the modules item ID. Will look into it

@blitzmann
Copy link
Collaborator

You know, this probably has something to do with the os x fix. In order to flag something, I just set itemID to 0. Didn't consider this, where modules are removed and readded. The itemID is probably overwritten. Hopefully it's a simple fix

blitzmann added a commit that referenced this issue Jul 9, 2015
@blitzmann
Copy link
Collaborator

Got a fix, but it's not ideal (then again, the ideal thing is not supported by our OS X lol)

def remove(self, thing):
    # We must flag it as modified, otherwise it not be removed from the database
    # @todo: flag_modified isn't in os x skel. need to rebuild to include
    #flag_modified(thing, "itemID")
    if thing.isInvalid:
        thing.itemID = 0
    list.remove(self, thing)

if thing.isInvalid is the key part. I checked, and indeed modules are removed and then inserted again when they swap positions, rather than just swapping the position. When they are removed, the itemID was reset. So we check if the item is inValid, in which case it's definitely okay to reset the itemID.

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