public void AddBlock(BlockBase block) { int position; if (vm.CurrentBlockIndex == -1) { position = vm.Stack.Count; } else { position = vm.Stack.Count > 0 ? vm.CurrentBlockIndex + 1 : 0; } OB.Logger.LogInfo(Components.Stacker, $"Added a block of type {block.GetType()} in position {position}"); vm.AddBlock(block, position); }
public void AddBlock(BlockBase block) { Globals.LogInfo(Components.Stacker, $"Added a block of type {block.GetType()} in position {vm.Stack.Count}"); vm.AddBlock(block, -1); }