Skip to content

Commit

Permalink
Fixed bug with boolean type of object's field in tmx file
Browse files Browse the repository at this point in the history
  • Loading branch information
werton authored Oct 12, 2024
1 parent 8126020 commit b5d7e0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/rescomp/src/sgdk/rescomp/type/TMX.java
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,10 @@ else if (StringUtil.isEmpty(type))
else
addField(objectName, tFields, new TField(name, TiledObjectType.STRING, value));
}
// bool type ?
else if (TiledObjectType.fromString(type) == TiledObjectType.BOOL)
// replace value "true" by "1" or "false" by "0" and add field
addField(objectName, tFields, new TField(name, TiledObjectType.fromString(type), StringUtil.equals(value.toLowerCase(), "true") ? "1":"0"));
else
addField(objectName, tFields, new TField(name, TiledObjectType.fromString(type), value));
}
Expand Down

0 comments on commit b5d7e0d

Please sign in to comment.