colinator27 / DogScepter

A work-in-progress modding tool geared toward UNDERTALE/DELTARUNE
MIT License
45 stars 14 forks source link

Broken ternary logic #45

Open Miepee opened 2 years ago

Miepee commented 2 years ago

There are quite a few instances of broken ternary logic:

Failed to decompile code for "gml_Object_system_Draw_64": System.Exception: Ternary logic broke
  at DogScepterLib.Project.GML.Decompiler.ASTIfStatement.Write(DecompileContext ctx, StringBuilder sb) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\ASTNode.cs:line 1285
   at DogScepterLib.Project.GML.Decompiler.ASTBlock.Write(DecompileContext ctx, StringBuilder sb) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\ASTNode.cs:line 164
   at DogScepterLib.Project.GML.Decompiler.ASTIfStatement.Write(DecompileContext ctx, StringBuilder sb) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\ASTNode.cs:line 1319
   at DogScepterLib.Project.GML.Decompiler.ASTNode.WriteFromContext(DecompileContext ctx, StringBuilder sb) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\ASTNode.cs:line 112
   at DogScepterLib.Project.GML.Decompiler.ASTNode.WriteFromContext(DecompileContext ctx) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\ASTNode.cs:line 87
   at DogScepterLib.Project.GML.Decompiler.DecompileContext.DecompileWholeEntryString(GMCode codeEntry) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\DecompileContext.cs:line 187
   at DogScepterCLI.Commands.DumpCommand.<>c__DisplayClass36_1.<ExecuteAsync>b__0(GMCode elem) in C:\Users\narr\gitrepos\dog-scepter\DogScepterCLI\Commands\DumpCommand.cs:line 199

Games affected: White glove, my sick little world, habitat, narcoschleptic, adrift, nuclear crab, butterflies, keep yourself alive, rupert the robot