Skip to content

Commit

Permalink
FIX more consistant enum naming
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Oct 16, 2024
1 parent 4067a0d commit e00e6c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ldtk/macro/TypeBuilder.hx
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ class TypeBuilder {
// Create IntGrid abstract enum from values
var intType = macro : Int;
var enumTypeDef : TypeDefinition = {
name: l.identifier+"_IntGridValues",
name: modName+"_IntGridEnum_"+l.identifier,
pack: modPack,
doc: "IntGrid values from layer "+l.identifier+" available as an Abstract Enum of Int",
kind: TDAbstract(intType, [AbEnum, AbTo(intType)], [intType], [intType]),
Expand All @@ -618,8 +618,8 @@ class TypeBuilder {
}
for(v in l.intGridValues) {
var groupInf = l.intGridValuesGroups.filter( g->g.uid==v.groupUid )[0];
var groupId = groupInf!=null ? "_"+groupInf.identifier+"_" : "_";
var enumUid = l.identifier + groupId + ( v.identifier!=null ? v.identifier : Std.string(v.value) );
var groupId = groupInf!=null ? groupInf.identifier+"_" : "";
var enumUid = l.identifier + "_" + groupId + ( v.identifier!=null ? v.identifier : Std.string(v.value) );
enumTypeDef.fields.push({
name: sanitizeIdentifier(enumUid),
pos: curPos,
Expand Down

0 comments on commit e00e6c2

Please sign in to comment.