Skip to content

Commit

Permalink
Revert "Apply formatting"
Browse files Browse the repository at this point in the history
This reverts commit ee06a84.
  • Loading branch information
Kiuh committed Jan 1, 2024
1 parent e046fa6 commit fec177f
Show file tree
Hide file tree
Showing 22 changed files with 65 additions and 66 deletions.
4 changes: 1 addition & 3 deletions JamGame/Assets/Scripts/Common/DebugTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ public static class DebugTools
{
public static void LogCollection<T>(IEnumerable<T> collection)
{
Debug.Log(
collection.Select(x => x.ToString()).Aggregate("[ ", (x, y) => x + ", " + y) + " ]"
);
Debug.Log(collection.Select(x => x.ToString()).Aggregate("[ ", (x, y) => x + ", " + y) + " ]");
}
}
}
2 changes: 1 addition & 1 deletion JamGame/Assets/Scripts/Employee/Controller/Controller.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Collections.Generic;
using Location;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;

Expand Down
8 changes: 4 additions & 4 deletions JamGame/Assets/Scripts/Employee/ExtendedInfoView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ private void Update()
{
transform.LookAt(cam.transform.position);

string buffs = employee
.Buffs.Select(buff => buff.Name)
string buffs = employee.Buffs
.Select(buff => buff.Name)
.Aggregate("", (x, y) => x + (x.Length == 0 ? "" : ", ") + y);
string quirks = personality
.Quirks.Select(quirk => quirk.Name)
string quirks = personality.Quirks
.Select(quirk => quirk.Name)
.Aggregate("", (x, y) => x + (x.Length == 0 ? "" : ", ") + y);

text.text = $"{personality.Name}\n{buffs}\n{quirks}";
Expand Down
2 changes: 1 addition & 1 deletion JamGame/Assets/Scripts/Level/Boss/TaskListView.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Level.Boss.Task;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using Level.Boss.Task;
using UnityEngine;

namespace Level.Boss
Expand Down
16 changes: 9 additions & 7 deletions JamGame/Assets/Scripts/Level/Boss/TaskView.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using Level.Boss.Task;
using System;
using TMPro;
using UnityEngine;

Expand Down Expand Up @@ -34,12 +34,14 @@ private void UpdateFromTask()

description.text = task switch
{
TargetEmployeeAmount => $"Hire at least {progress.Overall} employees",
MaxStressBound task
=> $"Hold maximum stress of employees less than {task.MaxStressTarget} for {progress.Overall} seconds",
TargetRoomCount task => $"Build at least {progress.Overall} [{task.RoomTitle}]s",
RoomCountUpperBound task
=> $"Have at most {task.UpperBoundInclusive} [{task.RoomTitle}]s for {progress.Overall} days",
TargetEmployeeAmount =>
$"Hire at least {progress.Overall} employees",
MaxStressBound task =>
$"Hold maximum stress of employees less than {task.MaxStressTarget} for {progress.Overall} seconds",
TargetRoomCount task =>
$"Build at least {progress.Overall} [{task.RoomTitle}]s",
RoomCountUpperBound task =>
$"Have at most {task.UpperBoundInclusive} [{task.RoomTitle}]s for {progress.Overall} days",
_ => throw new NotImplementedException("This task type is not supported")
};
}
Expand Down
2 changes: 1 addition & 1 deletion JamGame/Assets/Scripts/Level/Config/InventoryRoom.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using Level.Room;
using System;

namespace Level.Config
{
Expand Down
5 changes: 4 additions & 1 deletion JamGame/Assets/Scripts/Level/DurationCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ public void DayEnds()

public DaysLived GetData()
{
return new DaysLived() { Value = daysLived };
return new DaysLived()
{
Value = daysLived
};
}
}
}
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Level/Inventory/Controller.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Linq;
using Common;
using Common;
using Level.Room;
using System.Linq;
using UnityEngine;

namespace Level.Inventory
Expand Down
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Level/Inventory/Model.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.ObjectModel;
using Level.Room;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using Level.Room;
using UnityEngine;
using UnityEngine.Events;

Expand Down
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/Level/Inventory/View.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using Common;
using Level.Room;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using Common;
using Level.Room;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
Expand Down
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/Level/Shop/Controller.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using Common;
using Common;
using Level.Config;
using Level.Room;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

namespace Level.Shop
Expand Down
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Level/Shop/Model.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Level.Room;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using Level.Room;
using UnityEngine;
using UnityEngine.Events;

Expand Down
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/Level/Shop/View.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using Common;
using Level.Room;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using Common;
using Level.Room;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.ResourceLocations;
Expand Down
13 changes: 5 additions & 8 deletions JamGame/Assets/Scripts/Location/LocationImpl.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;
using Common;
using Employee;
using Level;
using Level.Boss.Task;
using Level.Config;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

namespace Location
Expand Down Expand Up @@ -45,6 +45,7 @@ NeedType need_type
{
foreach (NeedProvider provider in needProviders)
{

if (provider.NeedType == need_type && provider.IsAvailable(employee))
{
yield return provider;
Expand Down Expand Up @@ -73,17 +74,13 @@ MaxStress IDataProvider<MaxStress>.GetData()

AllEmployeesAtMeeting IDataProvider<AllEmployeesAtMeeting>.GetData()
{
bool all_at_meeting = employees.All(
employee => employee.LatestSatisfiedNeedType == NeedType.Meeting
);
bool all_at_meeting = employees.All(employee => employee.LatestSatisfiedNeedType == NeedType.Meeting);
return new AllEmployeesAtMeeting { Value = all_at_meeting };
}

AllEmployeesAtHome IDataProvider<AllEmployeesAtHome>.GetData()
{
bool all_go_home = employees.All(
employee => employee.LatestSatisfiedNeedType == NeedType.Leave
);
bool all_go_home = employees.All(employee => employee.LatestSatisfiedNeedType == NeedType.Leave);
return new AllEmployeesAtHome { Value = all_go_home };
}
}
Expand Down
2 changes: 1 addition & 1 deletion JamGame/Assets/Scripts/Location/NeedProvider.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Employee;
using System;
using System.Collections.Generic;
using Employee;
using UnityEngine;

namespace Location
Expand Down
10 changes: 5 additions & 5 deletions JamGame/Assets/Scripts/Overlay/ExtendedInfoView.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Linq;
using Employee;
using System.Linq;
using TMPro;
using UnityEngine;

Expand Down Expand Up @@ -29,11 +29,11 @@ private void Update()
{
transform.LookAt(cam.transform.position);

string buffs = employee
.Buffs.Select(buff => buff.Name)
string buffs = employee.Buffs
.Select(buff => buff.Name)
.Aggregate("", (x, y) => x + (x.Length == 0 ? "" : ", ") + y);
string quirks = personality
.Quirks.Select(quirk => quirk.Name)
string quirks = personality.Quirks
.Select(quirk => quirk.Name)
.Aggregate("", (x, y) => x + (x.Length == 0 ? "" : ", ") + y);

text.text = $"{personality.Name}\n{buffs}\n{quirks}";
Expand Down
2 changes: 1 addition & 1 deletion JamGame/Assets/Scripts/TileBuilder/Command.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Level.Room;
using System.Collections.Generic;
using System.Collections.Immutable;
using Level.Room;
using TileUnion;
using UnityEngine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq;
using Common;
using Common;
using Level;
using Level.Room;
using System.Linq;
using TileBuilder.Command;
using TileUnion;
using UnityEngine;
Expand Down
4 changes: 1 addition & 3 deletions JamGame/Assets/Scripts/TileBuilder/Controller/Inspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,7 @@ private void ShowLocationBuildingButtons(ControllerImpl controller)
_ = EditorGUILayout.BeginHorizontal();
if (GUILayout.Button("Grow Meeting room"))
{
Common.Result result = controller.GrowMeetingRoomForEmployees(
controller.NeededEmployeeCount
);
Common.Result result = controller.GrowMeetingRoomForEmployees(controller.NeededEmployeeCount);
if (result.Failure)
{
Debug.Log(result.Error);
Expand Down
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/TileBuilder/TileBuilderImpl.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Common;
using Level.Boss.Task;
using Level.Room;
using Pickle;
using System;
using System.Collections.Generic;
using System.Linq;
using TileBuilder.Command;
using TileUnion;
using TileUnion.Tile;
Expand Down
20 changes: 10 additions & 10 deletions JamGame/Assets/Scripts/TileBuilder/Validator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Common;
using System;
using System.Collections.Generic;
using System.Linq;
using Common;
using TileBuilder.Command;
using TileUnion;
using UnityEngine;
Expand Down Expand Up @@ -92,18 +92,18 @@ public Result ValidateCommand(ICommand command)
}
if (command is ShowSelectedRoom showRoomIllusion)
{
IEnumerable<Vector2Int> newPositions = tileBuilder
.InstantiatedViews[showRoomIllusion.CoreModel.Uid]
.GetImaginePlaces(showRoomIllusion.CoreModel.TileUnionModel.PlacingProperties);
IEnumerable<Vector2Int> newPositions = tileBuilder.InstantiatedViews[
showRoomIllusion.CoreModel.Uid
].GetImaginePlaces(showRoomIllusion.CoreModel.TileUnionModel.PlacingProperties);
return newPositions.All(x => tileBuilder.GetAllInsidePositions().Contains(x))
? new SuccessResult()
: new FailResult("Can not show in outside");
}
if (command is DropRoom dropRoom)
{
IEnumerable<Vector2Int> newPositions = tileBuilder
.InstantiatedViews[dropRoom.CoreModel.Uid]
.GetImaginePlaces(dropRoom.CoreModel.TileUnionModel.PlacingProperties);
IEnumerable<Vector2Int> newPositions = tileBuilder.InstantiatedViews[
dropRoom.CoreModel.Uid
].GetImaginePlaces(dropRoom.CoreModel.TileUnionModel.PlacingProperties);
return
tileBuilder
.GetTileUnionsInPositions(newPositions)
Expand Down Expand Up @@ -177,9 +177,9 @@ public Result ValidateCommand(ICommand command)
}
if (command is DropRoom dropRoom)
{
IEnumerable<Vector2Int> newPositions = tileBuilder
.InstantiatedViews[dropRoom.CoreModel.Uid]
.GetImaginePlaces(dropRoom.CoreModel.TileUnionModel.PlacingProperties);
IEnumerable<Vector2Int> newPositions = tileBuilder.InstantiatedViews[
dropRoom.CoreModel.Uid
].GetImaginePlaces(dropRoom.CoreModel.TileUnionModel.PlacingProperties);
return
tileBuilder
.GetTileUnionsInPositions(newPositions)
Expand Down
1 change: 1 addition & 0 deletions JamGame/Assets/Scripts/Utils/AnimatorTimeScaleSetter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEngine;

#if UNITY_EDITOR

using System.IO;
Expand Down

0 comments on commit fec177f

Please sign in to comment.