Skip to content

Commit

Permalink
Fix format error on build
Browse files Browse the repository at this point in the history
  • Loading branch information
qhdwight committed Oct 5, 2021
1 parent 53ba118 commit 142753a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions Assets/Scripts/Voxelfield/Interface/LoadingInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ private void Update()
MapProgressInfo progressInfo = session.GetChunkManager().ProgressInfo;
m_Text.SetText(progressInfo.stage switch
{
MapLoadingStage.Waiting => "Waiting...",
MapLoadingStage.CleaningUp => "Cleaning up...",
MapLoadingStage.SettingUp => "Setting up...",
MapLoadingStage.Generating => "Generating terrain from save...",
Expand Down
22 changes: 11 additions & 11 deletions Assets/Scripts/Voxelfield/Session/SessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class SessionManager : SingletonBehavior<SessionManager>
private static IPAddress DefaultAddress => IPAddress.Loopback;
public static int DefaultPort => 27015;
private static readonly IPEndPoint DefaultEndPoint = new(DefaultAddress, DefaultPort);
private static readonly string[] IpSeparator = {":"};
private static readonly string[] IpSeparator = { ":" };

public static bool WantsApplicationQuit { get; set; }

Expand Down Expand Up @@ -73,7 +73,7 @@ private void Start()
{
// OrderedVoxelChangesProperty c = MapManager.Singleton.Map.voxelChanges, clone = c.Clone();
// c.Clear();

// foreach (VoxelChange change in clone.List)
// {
// VoxelChange v = change;
Expand All @@ -93,11 +93,11 @@ private void Start()
OrderedVoxelChangesProperty c = mapManager.Map.voxelChanges, clone = c.Clone();
c.Clear();

foreach (VoxelChange voxel in clone.List)
foreach (VoxelChange voxel in clone.List)
if (voxel.form != VoxelVolumeForm.Single)
c.Append(voxel);
});

SetCommand("serve", arguments =>
{
Server server = StartServer(GetEndPoint(arguments));
Expand Down Expand Up @@ -368,7 +368,7 @@ public static void SaveCustomMap()
{
name = new StringProperty("Fort"),
terrainHeight = new IntProperty(9),
dimension = new DimensionComponent {lowerBound = new Position3IntProperty(-2, 0, -2), upperBound = new Position3IntProperty(2, 1, 2)},
dimension = new DimensionComponent { lowerBound = new Position3IntProperty(-2, 0, -2), upperBound = new Position3IntProperty(2, 1, 2) },
terrainGeneration = new TerrainGenerationComponent
{
seed = new IntProperty(1337),
Expand All @@ -377,8 +377,8 @@ public static void SaveCustomMap()
verticalScale = new FloatProperty(1.5f),
persistence = new FloatProperty(0.5f),
lacunarity = new FloatProperty(0.5f),
grassVoxel = new VoxelChangeProperty(new VoxelChange {texture = VoxelTexture.Solid, color = new Color32(255, 172, 7, 255)}),
stoneVoxel = new VoxelChangeProperty(new VoxelChange {texture = VoxelTexture.Checkered, color = new Color32(28, 28, 28, 255)}),
grassVoxel = new VoxelChangeProperty(new VoxelChange { texture = VoxelTexture.Solid, color = new Color32(255, 172, 7, 255) }),
stoneVoxel = new VoxelChangeProperty(new VoxelChange { texture = VoxelTexture.Checkered, color = new Color32(28, 28, 28, 255) }),
},
models = models,
breakableEdges = new BoolProperty(false)
Expand Down Expand Up @@ -449,18 +449,18 @@ private static void Build(ScriptingImplementation scripting, BuildTarget target,
scripting == ScriptingImplementation.Mono2x ? ManagedStrippingLevel.Disabled : ManagedStrippingLevel.Low);
var buildPlayerOptions = new BuildPlayerOptions
{
scenes = new[] {"Assets/Scenes/Base.unity"},
scenes = new[] { "Assets/Scenes/Base.unity" },
locationPathName = executablePath,
target = target,
options = isServer ? BuildOptions.EnableHeadlessMode : BuildOptions.AutoRunPlayer
target = target
};
EditorUserBuildSettings.standaloneBuildSubtarget = isServer ? StandaloneBuildSubtarget.Server : StandaloneBuildSubtarget.Player;
if (defines != null) buildPlayerOptions.extraScriptingDefines = defines;
BuildReport report = BuildPipeline.BuildPlayer(buildPlayerOptions);
BuildSummary summary = report.summary;
switch (summary.result)
{
case BuildResult.Succeeded:
Debug.Log($"{name} build succeeded: {summary.totalSize / 1_000_000:F1} mb in {summary.totalTime:mm:ss}");
Debug.Log($"{name} build succeeded: {summary.totalSize / 1_000_000} mb in {summary.totalTime:mm\\:ss}");
break;
case BuildResult.Unknown:
case BuildResult.Failed:
Expand Down

0 comments on commit 142753a

Please sign in to comment.