-
Notifications
You must be signed in to change notification settings - Fork 173
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
R2: Refit Refit #5178
base: master
Are you sure you want to change the base?
R2: Refit Refit #5178
Conversation
Node wn2 = nl.item(x); | ||
|
||
if (wn2.getNodeName().equalsIgnoreCase("type")) { | ||
type = Integer.parseInt(wn2.getTextContent()); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
TestEntity testEntity; | ||
|
||
if (getEntity() instanceof Tank) { | ||
testEntity = new TestTank((Tank) getEntity(), verifier.tankOption, null); |
Check warning
Code scanning / CodeQL
Expression always evaluates to the same value Warning
return toReturn; | ||
|
||
} else if (getEntity() instanceof ConvFighter) { | ||
testEntity = new TestAero((Aero) getEntity(), verifier.aeroOption, null); |
Check warning
Code scanning / CodeQL
Expression always evaluates to the same value Warning
return; | ||
} | ||
|
||
isFixedEquipmentChange = !(oldPart.isOmniPodded() && newPart.isOmniPodded()); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
oldPart
this
Variable
oldPart
this
Variable
oldPart
this
Variable
oldPart
this
Variable
oldPart
this
Variable
oldPart
this
|
||
} else if ((oldPart instanceof Part) || (newPart instanceof MissingPart)) { | ||
|
||
returnsPart = !(oldPart instanceof MissingPart) ? oldPart.clone() : null; |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
oldPart
this
Variable
oldPart
this
Variable
oldPart
this
Variable
oldPart
this
Variable
oldPart
this
Variable
Rebuild the entire refit system from the ground up to use a list of RefitStep objects that represent the, well, steps that you have to go through to make the refit happen. This makes it (i think) easier to analyze the units involved in the refit and then carry out the refit when the time comes.
Work completed so far includes:
Things left to do:
At this stage it should be possible to examine any possible refit and see if the steps are what they should be, but actually attempting to carry out a refit will probably set something on fire.
Here are some screenshots that show how it works, to some degree.