|
|
@@ -1,11 +1,8 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Linq; |
|
|
|
using System.Reflection; |
|
|
|
using System.Text; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
using DataLoader; |
|
|
|
using TechbloxModdingAPI.App; |
|
|
|
using HarmonyLib; |
|
|
|
using IllusionInjector; |
|
|
@@ -14,12 +11,13 @@ using RobocraftX.FrontEnd; |
|
|
|
using Unity.Mathematics; |
|
|
|
using UnityEngine; |
|
|
|
using RobocraftX.Common.Input; |
|
|
|
using ServiceLayer; |
|
|
|
using Svelto.Tasks; |
|
|
|
using Svelto.Tasks.Lean; |
|
|
|
using TechbloxModdingAPI.Blocks; |
|
|
|
using TechbloxModdingAPI.Commands; |
|
|
|
using TechbloxModdingAPI.Input; |
|
|
|
using TechbloxModdingAPI.Interface.IMGUI; |
|
|
|
using TechbloxModdingAPI.Players; |
|
|
|
using TechbloxModdingAPI.Tasks; |
|
|
|
using TechbloxModdingAPI.Utility; |
|
|
|
|
|
|
|
namespace TechbloxModdingAPI.Tests |
|
|
@@ -288,6 +286,32 @@ namespace TechbloxModdingAPI.Tests |
|
|
|
{ |
|
|
|
Game.CurrentGame().EnableScreenshotTaker(); |
|
|
|
}).Build(); |
|
|
|
|
|
|
|
CommandBuilder.Builder("testPositionDefault", "Tests the Block.Position property's default value.") |
|
|
|
.Action(() => |
|
|
|
{ |
|
|
|
IEnumerator<TaskContract> Loop() |
|
|
|
{ |
|
|
|
for (int i = 0; i < 2; i++) |
|
|
|
{ |
|
|
|
Console.WriteLine("A"); |
|
|
|
var block = Block.PlaceNew(BlockIDs.Cube, 1); |
|
|
|
Console.WriteLine("B"); |
|
|
|
while (!block.Exists) |
|
|
|
yield return Yield.It; |
|
|
|
Console.WriteLine("C"); |
|
|
|
block.Remove(); |
|
|
|
Console.WriteLine("D"); |
|
|
|
while (block.Exists) |
|
|
|
yield return Yield.It; |
|
|
|
Console.WriteLine("E - Pos: " + block.Position); |
|
|
|
block.Position = 4; |
|
|
|
Console.WriteLine("F - Pos: " + block.Position); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Loop().RunOn(Scheduler.leanRunner); |
|
|
|
}).Build(); |
|
|
|
#if TEST |
|
|
|
TestRoot.RunTests(); |
|
|
|
#endif |
|
|
|