Skip to content

Commit

Permalink
Applying formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiuh committed Jan 1, 2024
1 parent 4b29e03 commit cc26a16
Show file tree
Hide file tree
Showing 58 changed files with 186 additions and 177 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) + " ]"
);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using UnityEngine;

#if UNITY_EDITOR
using UnityEditor;

Expand Down
6 changes: 3 additions & 3 deletions JamGame/Assets/Scripts/Editor/InterfaceListCodegen.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Common;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Common;
using UnityCodeGen;
using UnityEngine;

Expand All @@ -12,8 +12,8 @@ public class InterfaceEditorGenerator : ICodeGenerator
{
public void Execute(GeneratorContext context)
{
IEnumerable<Type> interface_types = AppDomain.CurrentDomain
.GetAssemblies()
IEnumerable<Type> interface_types = AppDomain
.CurrentDomain.GetAssemblies()
.SelectMany(
a => a.GetTypes().Where(t => t.IsDefined(typeof(InterfaceEditorAttribute)))
);
Expand Down
2 changes: 1 addition & 1 deletion JamGame/Assets/Scripts/Employee/Buff.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.Collections.Immutable;
using Common;
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 Common;
using Location;
using System;
using System.Collections.Generic;
using System.Linq;
using Common;
using Location;
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 Common;
using System;
using System.Collections.Generic;
using Common;
using UnityEngine;

namespace Employee
Expand Down
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Generated/SerializedDayAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System;
using UnityEngine;

namespace Level.Config
namespace Level.Config
{
[Serializable]
public class SerializedDayAction
{
[SerializeField]
[SerializeField]
private string selectedType;

[SerializeField]
Expand Down
19 changes: 13 additions & 6 deletions JamGame/Assets/Scripts/Generated/SerializedDayActionEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@
using UnityEngine;
using Level.Config;

namespace SerializedInterface.Inspector
namespace SerializedInterface.Inspector
{
[CustomPropertyDrawer(typeof(SerializedDayAction))]
public class SerializedDayActionDrawer : PropertyDrawer
{
private string[] implementingTypeNames = { "Cutscene", "DayStart", "PreMeeting", "Meeting", "Working", "PreDayEnd", "DayEnd" };
private string[] implementingTypeNames =
{
"Cutscene",
"DayStart",
"PreMeeting",
"Meeting",
"Working",
"PreDayEnd",
"DayEnd"
};

public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
Expand Down Expand Up @@ -64,13 +73,11 @@ public override float GetPropertyHeight(SerializedProperty property, GUIContent
float height = 0.0f;
if (selected_type != "")
{
var typed_prop = property.FindPropertyRelative(
PascalToCamelCase(selected_type)
);
var typed_prop = property.FindPropertyRelative(PascalToCamelCase(selected_type));
height = EditorGUI.GetPropertyHeight(typed_prop);
}
return EditorGUIUtility.singleLineHeight + height;
}
}
}
#endif
#endif
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Generated/SerializedEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System;
using UnityEngine;

namespace Employee
namespace Employee
{
[Serializable]
public class SerializedEffect
{
[SerializeField]
[SerializeField]
private string selectedType;

[SerializeField]
Expand Down
15 changes: 9 additions & 6 deletions JamGame/Assets/Scripts/Generated/SerializedEffectEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
using UnityEngine;
using Employee;

namespace SerializedInterface.Inspector
namespace SerializedInterface.Inspector
{
[CustomPropertyDrawer(typeof(SerializedEffect))]
public class SerializedEffectDrawer : PropertyDrawer
{
private string[] implementingTypeNames = { "StressEffect", "NeedModifierEffect", "ControllerEffect" };
private string[] implementingTypeNames =
{
"StressEffect",
"NeedModifierEffect",
"ControllerEffect"
};

public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
Expand Down Expand Up @@ -64,13 +69,11 @@ public override float GetPropertyHeight(SerializedProperty property, GUIContent
float height = 0.0f;
if (selected_type != "")
{
var typed_prop = property.FindPropertyRelative(
PascalToCamelCase(selected_type)
);
var typed_prop = property.FindPropertyRelative(PascalToCamelCase(selected_type));
height = EditorGUI.GetPropertyHeight(typed_prop);
}
return EditorGUIUtility.singleLineHeight + height;
}
}
}
#endif
#endif
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Generated/SerializedEmployeeConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System;
using UnityEngine;

namespace Level.Config
namespace Level.Config
{
[Serializable]
public class SerializedEmployeeConfig
{
[SerializeField]
[SerializeField]
private string selectedType;

[SerializeField]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using UnityEngine;
using Level.Config;

namespace SerializedInterface.Inspector
namespace SerializedInterface.Inspector
{
[CustomPropertyDrawer(typeof(SerializedEmployeeConfig))]
public class SerializedEmployeeConfigDrawer : PropertyDrawer
Expand Down Expand Up @@ -64,13 +64,11 @@ public override float GetPropertyHeight(SerializedProperty property, GUIContent
float height = 0.0f;
if (selected_type != "")
{
var typed_prop = property.FindPropertyRelative(
PascalToCamelCase(selected_type)
);
var typed_prop = property.FindPropertyRelative(PascalToCamelCase(selected_type));
height = EditorGUI.GetPropertyHeight(typed_prop);
}
return EditorGUIUtility.singleLineHeight + height;
}
}
}
#endif
#endif
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Generated/SerializedOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System;
using UnityEngine;

namespace Overlay
namespace Overlay
{
[Serializable]
public class SerializedOverlay
{
[SerializeField]
[SerializeField]
private string selectedType;

[SerializeField]
Expand Down
8 changes: 3 additions & 5 deletions JamGame/Assets/Scripts/Generated/SerializedOverlayEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using UnityEngine;
using Overlay;

namespace SerializedInterface.Inspector
namespace SerializedInterface.Inspector
{
[CustomPropertyDrawer(typeof(SerializedOverlay))]
public class SerializedOverlayDrawer : PropertyDrawer
Expand Down Expand Up @@ -64,13 +64,11 @@ public override float GetPropertyHeight(SerializedProperty property, GUIContent
float height = 0.0f;
if (selected_type != "")
{
var typed_prop = property.FindPropertyRelative(
PascalToCamelCase(selected_type)
);
var typed_prop = property.FindPropertyRelative(PascalToCamelCase(selected_type));
height = EditorGUI.GetPropertyHeight(typed_prop);
}
return EditorGUIUtility.singleLineHeight + height;
}
}
}
#endif
#endif
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Generated/SerializedPlaceCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System;
using UnityEngine;

namespace TileUnion.PlaceCondition
namespace TileUnion.PlaceCondition
{
[Serializable]
public class SerializedPlaceCondition
{
[SerializeField]
[SerializeField]
private string selectedType;

[SerializeField]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using UnityEngine;
using TileUnion.PlaceCondition;

namespace SerializedInterface.Inspector
namespace SerializedInterface.Inspector
{
[CustomPropertyDrawer(typeof(SerializedPlaceCondition))]
public class SerializedPlaceConditionDrawer : PropertyDrawer
Expand Down Expand Up @@ -64,13 +64,11 @@ public override float GetPropertyHeight(SerializedProperty property, GUIContent
float height = 0.0f;
if (selected_type != "")
{
var typed_prop = property.FindPropertyRelative(
PascalToCamelCase(selected_type)
);
var typed_prop = property.FindPropertyRelative(PascalToCamelCase(selected_type));
height = EditorGUI.GetPropertyHeight(typed_prop);
}
return EditorGUIUtility.singleLineHeight + height;
}
}
}
#endif
#endif
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Generated/SerializedShopRoomConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System;
using UnityEngine;

namespace Level.Config
namespace Level.Config
{
[Serializable]
public class SerializedShopRoomConfig
{
[SerializeField]
[SerializeField]
private string selectedType;

[SerializeField]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using UnityEngine;
using Level.Config;

namespace SerializedInterface.Inspector
namespace SerializedInterface.Inspector
{
[CustomPropertyDrawer(typeof(SerializedShopRoomConfig))]
public class SerializedShopRoomConfigDrawer : PropertyDrawer
Expand Down Expand Up @@ -64,13 +64,11 @@ public override float GetPropertyHeight(SerializedProperty property, GUIContent
float height = 0.0f;
if (selected_type != "")
{
var typed_prop = property.FindPropertyRelative(
PascalToCamelCase(selected_type)
);
var typed_prop = property.FindPropertyRelative(PascalToCamelCase(selected_type));
height = EditorGUI.GetPropertyHeight(typed_prop);
}
return EditorGUIUtility.singleLineHeight + height;
}
}
}
#endif
#endif
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/Generated/SerializedTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System;
using UnityEngine;

namespace Level.Boss.Task
namespace Level.Boss.Task
{
[Serializable]
public class SerializedTask
{
[SerializeField]
[SerializeField]
private string selectedType;

[SerializeField]
Expand Down
Loading

0 comments on commit cc26a16

Please sign in to comment.