Skip to content

Commit

Permalink
Fix issue of some armor components not being counted
Browse files Browse the repository at this point in the history
Closes #11
  • Loading branch information
skjiisa committed Dec 16, 2020
1 parent 5d57e16 commit 7c8ebc1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Edit Scripts/Armor Stats and Requirements.pas
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function Finalize: integer;
armorRating: double;
armorTypeSet: bool;
armorType, armorName, moduleID, modName, modID: string;
cnam, arma, flags: IInterface;
cnam, flags: IInterface;
slIngredients, slIngredientNames, slOutput, slCTIngredients, slFlags, slots: TStringList;
module, modJSON, json, outputJSON: TJsonObject;
begin
Expand All @@ -175,21 +175,20 @@ function Finalize: integer;
ShellExecute(0, nil, 'powershell', '[guid]::NewGuid().ToString() > Armor` Export\Ingredients.txt; [guid]::NewGuid().ToString() >> Armor` Export\Ingredients.txt', nil, 0);

InputQuery('Armor Stats and Requirements', 'Armor Name', armorName);
InputQuery('Create mod?', 'Mod name or empty for no mod', modName);
InputQuery('Character Tracker mod', 'Mod name or empty for no mod', modName);

// Go through every armor piece
for i := 0 to slCobj.Count - 1 do begin
cnam := ObjectToElement(slCobj.Objects[i]);
AddMessage(' Equipping '+slCobj[i]);

// Get the Armor Addon to check its armor slots
arma := LinksTo(ElementByPath(cnam, 'Armature\MODL'));
flags := ElementByPath(arma, 'BOD2\First Person Flags');
flags := ElementByPath(cnam, 'BOD2\First Person Flags');
slFlags := TStringList.Create;
slFlags.text := FlagValues(flags);

if slots.Count = 0 then
slots.text := FlagValues(ElementByPath(arma, 'BOD2\First Person Flags'));
slots.text := FlagValues(ElementByPath(cnam, 'BOD2\First Person Flags'));

for i := 0 to Pred(slFlags.Count) do begin
slFlags.Objects[i] := TObject(geev(flags, slFlags[i]));
Expand Down

0 comments on commit 7c8ebc1

Please sign in to comment.