Skip to content

Commit

Permalink
Changes from dev:
Browse files Browse the repository at this point in the history
Added MGEF.SpellEffectFlag Unknown_X as in tesEdit.
Changed SpellEffectFlags to match the TES5Edit ones
Changed byte[] unkown to int counterEffectCount, since that was missing
Changed SNDD.Sound to a public class Sound, to be able to get and set Sounds and other useful methods
Added missing Language values Czech, Polish, Japanese
Removed need for a - before the  Language name when passed as an argument
Fix for parsing keywordset with incorrect KSIZ; fixed SubFormArray.isValid()
MajorRecord.getRecordHistory()
Added MajorRecord.getModImportedFrom()
Fixed ScriptPackage.getScript() for non-existent scripts
  • Loading branch information
Dienes committed Aug 4, 2015
1 parent af3a159 commit df11604
Show file tree
Hide file tree
Showing 8 changed files with 1,046 additions and 791 deletions.
10 changes: 5 additions & 5 deletions src/skyproc/KeywordSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ SubRecord getNew(String type) {

@Override
boolean isValid() {
return counter.isValid()
&& keywords.isValid();
return keywords.isValid();
}

@Override
Expand All @@ -52,6 +51,7 @@ int getContentLength(ModExporter out) {
@Override
void export(ModExporter out) throws IOException {
if (isValid()) {
counter.setData(keywords.size(), 4);
counter.export(out);
keywords.export(out);
}
Expand All @@ -62,7 +62,7 @@ void parseData(LImport in, Mod srcMod) throws BadRecord, DataFormatException, Ba
switch (getNextType(in)) {
case "KSIZ":
counter.parseData(in, srcMod);
keywords = new SubFormArray("KWDA", counter.toInt());
// keywords = new SubFormArray("KWDA", counter.toInt());
break;
case "KWDA":
keywords.parseData(in, srcMod);
Expand Down Expand Up @@ -92,7 +92,7 @@ public ArrayList<FormID> getKeywordRefs() {
public void addKeywordRef(FormID keywordRef) {
if (!keywords.contains(keywordRef)) {
keywords.add(keywordRef);
counter.modValue(1);
//counter.modValue(1);
}
}

Expand All @@ -103,7 +103,7 @@ public void addKeywordRef(FormID keywordRef) {
*/
public void removeKeywordRef(FormID keywordRef) {
if (keywords.remove(keywordRef)) {
counter.modValue(-1);
//counter.modValue(-1);
}
}

Expand Down
Loading

0 comments on commit df11604

Please sign in to comment.