Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/electron.renderer/data/Project.hx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ class Project {
return iid;
}

public function generateUniqueId_int() return nextUid++;
public function generateUniqueId_int(): Int {
var oldDate = new Date(2020, 1, 1, 0, 0, 0); // 2020 date
return nextUid++ + Std.int(Date.now().getTime() - oldDate.getTime());
}

public function fixUniqueIdStr(baseId:String, ?styleOverride:ldtk.Json.IdentifierStyle, isUnique:String->Bool) : String {
baseId = cleanupIdentifier(baseId, styleOverride==null ? identifierStyle : styleOverride);
Expand Down