Browse Source

Remove debug code

master
NorbiPeti 3 years ago
parent
commit
415012d425
Signed by: NorbiPeti <szatmari.norbert.peter@gmail.com> GPG Key ID: DBA4C4549A927E56
1 changed files with 1 additions and 20 deletions
  1. +1
    -20
      GCMC/GCMCPlugin.cs

+ 1
- 20
GCMC/GCMCPlugin.cs View File

@@ -95,7 +95,6 @@ namespace GCMC
});
Log.Output("Placing blocks...");
int i;
Block lastBlock = null;
for (i = 0; i < blocksArray.Length; i++)
{
var blocks = blocksArray[i];
@@ -110,15 +109,10 @@ namespace GCMC
var block = new Block(type.Type, (blocks.Start + blocks.End) / 10 * 3 + new float3(5000, 0, 5000))
{
Color = type.Color,
//Scale = (blocks.End - blocks.Start + 1) * 3
Scale = (blocks.End - blocks.Start + 1) * 3
};
Console.WriteLine("Placed block at " + block.Position);
lastBlock = block;
}

if (lastBlock != null)
Game.Simulate += (sender, args) => OnSimulationStarted(lastBlock).RunOn(Scheduler.extraLeanRunner);

Log.Output(i + " blocks placed.");
}
catch (Exception e)
@@ -128,19 +122,6 @@ namespace GCMC
}
}

private IEnumerator OnSimulationStarted(Block lastBlock)
{
SimBody body;
int C = 0;
while ((body = lastBlock.GetSimBody()) == null)
{
C++;
yield return null;
}

Console.WriteLine($"Body position: {body.Position} ({C})");
}

public override void OnApplicationStart()
{
TechbloxModdingAPI.Main.Init();


Loading…
Cancel
Save