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

Integrated rig error on CyanSea #12

Closed
Blaumeise03 opened this issue Feb 16, 2024 · 1 comment
Closed

Integrated rig error on CyanSea #12

Blaumeise03 opened this issue Feb 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Blaumeise03
Copy link
Contributor

Integrated rigs do not work properly on the CyanSea. If a rig is fitted into an integrated rig, the UI doesn't update. Also the rig will not be saved with the loadout. The attributes also do not get recalculated if a rig is being fitted, but after e.g. switching between skills the calculation does work properly.

It seems like the function FittingSimulator.fitItem is failing to fit it into the fitting loadout because the canFitModule says that the rig may not be fitted into the integrated rig.

var fittedModule = (module).copyWith(
slot: slot,
index: index,
);
if (!canFitModule(module: fittedModule, slot: slot)) return false;
_fitting[slot]![index] = fittedModule.copyWith(
state: _canActivateModule(fittedModule) ? state : ModuleState.inactive,
);
loadout.fitItem(_fitting[slot]![index]);
if (notify) {
_updateFitting();
}
return true;

The rig is being inserted into the FittingRigIntegrator, but not into the FittingSimulator. This generates an inconsistent state inside the FittingSimulator, the rig is saved inside the _fitting attribute, but not inside the loadout. The former one gets used for the UI and calculations, the later one for saving. Also because the fitItem method is failing, _updateFitting() which notifies the listeners, the UI and the calculated values won't be updated without any further action.

@Blaumeise03 Blaumeise03 added the bug Something isn't working label Feb 16, 2024
@Blaumeise03
Copy link
Contributor Author

The bug was caused by the integrationMultiplier of the integrated rigs, it got also applied to the moduleCanFitAttributeID (ID 3000), which points for example to the moduleCanFitFitherRig (ID 3045) attribute. But when the multiplier gets applied, the value changes to an ID that does not exists (and thus defaults to 0), which prevents the rig from beeing fitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant