Browse Source

Add wings, rudders & rotors, temporary text block support

tags/v1.1.0
NorbiPeti 3 years ago
parent
commit
a0ab2ec9e7
5 changed files with 50 additions and 7 deletions
  1. +11
    -2
      Pixi/Common/CommandRoot.cs
  2. +1
    -1
      Pixi/Common/VoxelObjectNotationUtility.cs
  3. +4
    -3
      Pixi/Robots/RobotInternetImporter.cs
  4. +33
    -0
      Pixi/blueprints.json
  5. +1
    -1
      Pixi/cubes-id.json

+ 11
- 2
Pixi/Common/CommandRoot.cs View File

@@ -160,12 +160,21 @@ namespace Pixi.Common
for (int i = 0; i < optVONsArr.Length; i++)
{
ProcessedVoxelObjectNotation desc = optVONsArr[i];
Block b;
if (desc.block != BlockIDs.Invalid)
{
Block b = Block.PlaceNew(desc.block, desc.position, desc.rotation, desc.color.Color,
b = Block.PlaceNew(desc.block, desc.position, desc.rotation, desc.color.Color,
desc.color.Darkness, 1, desc.scale);
blocks[i] = b;
}
else
{
TextBlock tb = Block.PlaceNew<TextBlock>(BlockIDs.TextBlock, desc.position, desc.rotation,
desc.color.Color, desc.color.Darkness, 1, desc.scale);
tb.Text = desc.metadata;
b = tb;
}

blocks[i] = b;
}
magicImporter.PostProcess(name, ref blocks);
if (magicImporter.Optimisable && blockCountPreOptimisation > blocks.Length)


+ 1
- 1
Pixi/Common/VoxelObjectNotationUtility.cs View File

@@ -44,7 +44,7 @@ namespace Pixi.Common
if (origin == null) origin = origin_base;
return new BlockJsonInfo
{
name = block.Type.ToString(),
name = block.Type == BlockIDs.TextBlock ? block.Label : block.Type.ToString(),
position = new float[3] { block.Position.x - origin[0], block.Position.y - origin[1], block.Position.z - origin[2]},
rotation = new float[3] { block.Rotation.x, block.Rotation.y, block.Rotation.z },
color = ColorSpaceUtility.UnquantizeToArray(block.Color),


+ 4
- 3
Pixi/Robots/RobotInternetImporter.cs View File

@@ -134,10 +134,11 @@ namespace Pixi.Robots
{
Block block = blocks[c];
// the goal is for this to never evaluate to true (ie all cubes are translated correctly)
if (block.Type == BlockIDs.TextBlock)
if (block.Type == BlockIDs.TextBlock &&
(string.IsNullOrEmpty(block.Label) || block.Label == "Text Block"))
{
block.Specialise<TextBlock>().Text = textBlockInfo[name][textBlockInfoIndex];
textBlockInfoIndex++;
block.Specialise<TextBlock>().Text = textBlockInfo[name][textBlockInfoIndex];
textBlockInfoIndex++;
}
}



+ 33
- 0
Pixi/blueprints.json
File diff suppressed because it is too large
View File


+ 1
- 1
Pixi/cubes-id.json
File diff suppressed because it is too large
View File