Skip to content

Commit

Permalink
Apply csharpier format
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiuh committed Jan 1, 2024
1 parent fec177f commit 7af285f
Show file tree
Hide file tree
Showing 47 changed files with 133 additions and 131 deletions.
4 changes: 3 additions & 1 deletion JamGame/Assets/Scripts/Common/DebugTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ 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) + " ]"
);
}
}
}
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Employee/Buff.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using UnityEngine;

namespace Employee
Expand Down
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 Location;
using System.Collections.Generic;
using Location;
using UnityEngine;
using UnityEngine.AI;

Expand Down
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Employee/EmployeeImpl.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Location;
using Sirenix.OdinInspector;
using System;
using System.Collections.Generic;
using System.Linq;
using Location;
using Sirenix.OdinInspector;
using UnityEngine;

namespace Employee
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/Employee/StressMeter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Sirenix.OdinInspector;
using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;

namespace Employee
Expand Down
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/Level/Boss/Model.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Level.Boss.Task;
using Level.GlobalTime;
using Sirenix.OdinInspector;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using Level.Boss.Task;
using Level.GlobalTime;
using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.Events;

Expand Down
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Level/Boss/Task.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
using Common;
using Level.GlobalTime;
using Level.Room;
using Pickle;
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using System;
using System.Collections.Generic;
using UnityEngine;

namespace Level.Boss.Task
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: 7 additions & 9 deletions JamGame/Assets/Scripts/Level/Boss/TaskView.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Level.Boss.Task;
using System;
using Level.Boss.Task;
using TMPro;
using UnityEngine;

Expand Down Expand Up @@ -34,14 +34,12 @@ 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
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/Level/Config/DayAction.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Level.GlobalTime;
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using Level.GlobalTime;
using Sirenix.OdinInspector;
using Sirenix.Serialization;

namespace Level.Config
{
Expand Down
10 changes: 5 additions & 5 deletions JamGame/Assets/Scripts/Level/Config/Employee.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Common;
using Sirenix.OdinInspector;
using System;
using System.Collections.Generic;
using System.Linq;
using Common;
using Sirenix.OdinInspector;
using UnityEngine;

namespace Level.Config
Expand Down Expand Up @@ -73,9 +73,9 @@ public class RandomEmployeeConfig : IEmployeeConfig
public EmployeeConfig GetEmployeeConfig()
{
List<float> list = weightList.EmployeeWeights.Select(x => x.Weight).ToList();
GameObject result = weightList.EmployeeWeights.ToList()[
RandomTools.RandomlyChooseWithWeights(list)
].Prototype;
GameObject result = weightList
.EmployeeWeights.ToList()[RandomTools.RandomlyChooseWithWeights(list)]
.Prototype;

string first_name = nameList.FirstNames.OrderBy(x => UnityEngine.Random.value).First();
string last_name = nameList.LastNames.OrderBy(x => UnityEngine.Random.value).First();
Expand Down
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/Level/Config/EmployeeNameList.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using System;
using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using UnityEngine;

namespace Level.Config
Expand Down
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/Level/Config/EmployeeWeightList.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using System;
using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using UnityEngine;

namespace Level.Config
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 Level.Room;
using System;
using Level.Room;

namespace Level.Config
{
Expand Down
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Level/Config/Level.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using Sirenix.Serialization;

namespace Level.Config
{
Expand Down
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/Level/Config/LevelConfig.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using System;
using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using UnityEngine;

namespace Level.Config
Expand Down
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/Level/Config/ShopRoom.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.Room;
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

namespace Level.Config
Expand Down
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Level/DragAndDropManager.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Common;
using System.Linq;
using Common;
using Level.Room;
using Pickle;
using Sirenix.OdinInspector;
using System.Linq;
using UnityEngine;

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

public DaysLived GetData()
{
return new DaysLived()
{
Value = daysLived
};
return new DaysLived() { Value = daysLived };
}
}
}
8 changes: 4 additions & 4 deletions JamGame/Assets/Scripts/Level/Executor.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Common;
using System;
using System.Collections;
using System.Collections.Generic;
using Common;
using Level.Config;
using Level.GlobalTime;
using Location;
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

Expand Down
2 changes: 1 addition & 1 deletion JamGame/Assets/Scripts/Level/GlobalTime/Model.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Common;
using Sirenix.OdinInspector;
using System;
using UnityEngine;

namespace Level.GlobalTime
Expand Down
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 Common;
using System.Linq;
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 Level.Room;
using System.Collections.ObjectModel;
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 Common;
using Level.Room;
using System;
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/Room/CoreModel.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Common;
using Sirenix.OdinInspector;
using System;
using System;
using System.Collections.Generic;
using Common;
using Sirenix.OdinInspector;
using TileBuilder;
using UnityEngine;
using UnityEngine.ResourceManagement.ResourceLocations;
Expand Down
2 changes: 1 addition & 1 deletion JamGame/Assets/Scripts/Level/Scheduler.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Level.Config;
using System.Collections.Generic;
using System.Linq;
using Level.Config;
using UnityEngine;

namespace Level
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 Common;
using System.Collections.Generic;
using System.Linq;
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 Level.Room;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using Level.Room;
using UnityEngine;
using UnityEngine.Events;

Expand Down
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Level/Shop/Room/Model.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Sirenix.OdinInspector;
using System;
using System;
using Sirenix.OdinInspector;
using UnityEngine;

namespace Level.Shop.Room
Expand Down
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Level/Shop/Room/View.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Common;
using System;
using Common;
using Level.Room;
using Pickle;
using Sirenix.OdinInspector;
using System;
using TMPro;
using UnityEngine;

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 Common;
using Level.Room;
using System.Collections.Generic;
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
Loading

0 comments on commit 7af285f

Please sign in to comment.