Skip to content

Commit 8bc0ab1

Browse files
committed
style: split every attribute onto its own line
Enforce the new .editorconfig rule (resharper_place_attribute_on_same_line=never) across runtime, demos and hub source: 208 attribute splits in 32 files (e.g. [Tooltip(...)] [SerializeField] and [SerializeField] private T x; now each on separate lines). Deterministic transform, attributes only.
1 parent c7f7b66 commit 8bc0ab1

32 files changed

Lines changed: 425 additions & 217 deletions

File tree

Assets/CoreAI.Demos/DirectorAi/Scripts/DirectorAiDemoController.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,28 @@ public sealed class DirectorAiDemoController : MonoBehaviour
3030
private const string PassDirective = "PASS";
3131
private const float ActionWindowSeconds = 60f;
3232

33-
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")] [SerializeField]
33+
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")]
34+
[SerializeField]
3435
private CoreAILifetimeScope coreAiScope;
3536

36-
[Tooltip("Seconds between world observations sent to the director.")] [SerializeField]
37+
[Tooltip("Seconds between world observations sent to the director.")]
38+
[SerializeField]
3739
private float observationIntervalSeconds = 20f;
3840

39-
[Tooltip("Agent role id registered for the director in CoreAIAgent.Policy.")] [SerializeField]
41+
[Tooltip("Agent role id registered for the director in CoreAIAgent.Policy.")]
42+
[SerializeField]
4043
private string directorRoleId = "Director";
4144

42-
[Tooltip("Per-reply output token budget for the director. 0 = unlimited.")] [SerializeField]
45+
[Tooltip("Per-reply output token budget for the director. 0 = unlimited.")]
46+
[SerializeField]
4347
private int maxOutputTokens = 256;
4448

45-
[Tooltip("Master switch: when off, no observations are sent (component stays alive).")] [SerializeField]
49+
[Tooltip("Master switch: when off, no observations are sent (component stays alive).")]
50+
[SerializeField]
4651
private bool directorEnabled = true;
4752

48-
[Tooltip("Hard cap on director requests within any rolling 60s window. 0 = uncapped.")] [SerializeField]
53+
[Tooltip("Hard cap on director requests within any rolling 60s window. 0 = uncapped.")]
54+
[SerializeField]
4955
private int maxActionsPerMinute = 3;
5056

5157
[Tooltip(
@@ -341,4 +347,4 @@ private void Start()
341347
}
342348
#endif
343349
}
344-
}
350+
}

Assets/CoreAI.Demos/FullAccess/Scripts/FullAccessDemoController.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ public sealed class FullAccessDemoController : MonoBehaviour
1414
[SerializeField]
1515
private Transform targetCube;
1616

17-
[Tooltip("Show or hide the instructions panel.")] [SerializeField]
17+
[Tooltip("Show or hide the instructions panel.")]
18+
[SerializeField]
1819
private bool _showPanel = true;
1920

20-
[Tooltip("Hotkey that toggles the panel at runtime. Set to None to disable the hotkey.")] [SerializeField]
21+
[Tooltip("Hotkey that toggles the panel at runtime. Set to None to disable the hotkey.")]
22+
[SerializeField]
2123
private KeyCode _toggleKey = KeyCode.F7;
2224

2325
private const float PanelWidth = 440f;
@@ -124,4 +126,4 @@ private void Start()
124126
}
125127
}
126128
}
127-
#endif
129+
#endif

Assets/CoreAI.Demos/FullAccess/Scripts/FullModeModDemoController.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ public sealed class FullModeModDemoController : MonoBehaviour
5959
"end)\n" +
6060
"report(\"[full_mode_cube] loaded - emit 'tweak_cube' (move) or 'list_members' (discover) [needs Full Lua]\")\n";
6161

62-
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")] [SerializeField]
62+
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")]
63+
[SerializeField]
6364
private CoreAILifetimeScope coreAiScope;
6465

65-
[Tooltip("Object the mod moves via unity_* APIs. Auto-created as 'TargetCube' when empty.")] [SerializeField]
66+
[Tooltip("Object the mod moves via unity_* APIs. Auto-created as 'TargetCube' when empty.")]
67+
[SerializeField]
6668
private Transform targetCube;
6769

6870
[Tooltip("Optional Lua source override. When unset, the embedded full_mode_cube source is used.")]
@@ -284,4 +286,4 @@ private void Start()
284286
}
285287
#endif
286288
}
287-
}
289+
}

Assets/CoreAI.Demos/FullAccess/Scripts/LuaPlatformExampleController.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,19 @@ public sealed class LuaPlatformExampleController : MonoBehaviour
2424
private const string TetrisId = "tetris3d";
2525
private const int WindowId = 0x10D_0002;
2626

27-
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")] [SerializeField]
27+
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")]
28+
[SerializeField]
2829
private CoreAILifetimeScope coreAiScope;
2930

30-
[Tooltip("Hotkey that toggles the panel. Set to None to disable keyboard toggling.")] [SerializeField]
31+
[Tooltip("Hotkey that toggles the panel. Set to None to disable keyboard toggling.")]
32+
[SerializeField]
3133
private KeyCode toggleKey = KeyCode.F6;
3234

33-
[SerializeField] private Rect panelRect = new(470, 92, 400, 330);
35+
[SerializeField]
36+
private Rect panelRect = new(470, 92, 400, 330);
3437

35-
[Tooltip("Panel visibility on start; toggle at runtime via the hotkey or PanelVisible.")] [SerializeField]
38+
[Tooltip("Panel visibility on start; toggle at runtime via the hotkey or PanelVisible.")]
39+
[SerializeField]
3640
private bool showPanel = true;
3741

3842
/// <summary>Programmatic open/close of the panel (same effect as the hotkey).</summary>
@@ -765,4 +769,4 @@ private void Start()
765769
}
766770
}
767771
}
768-
#endif
772+
#endif

Assets/CoreAI.Demos/LiveMechanics/Scripts/LiveMechanicsDemoController.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public sealed class LiveMechanicsDemoController : MonoBehaviour
3636
private const int MaxLogLines = 12;
3737
private const string PersistedRulesKey = "demo.live_mechanics.rules";
3838

39-
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")] [SerializeField]
39+
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")]
40+
[SerializeField]
4041
private CoreAILifetimeScope coreAiScope;
4142

4243
private LuaCsLogicSlots _slots;
@@ -269,4 +270,4 @@ private void Start()
269270
}
270271
#endif
271272
}
272-
}
273+
}

Assets/CoreAI.Demos/LiveMechanicsMods/Scripts/ChatPromptButtonsController.cs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,34 @@ public sealed class PromptButton
1717
{
1818
public string Label = "Prompt";
1919

20-
[TextArea(3, 12)] public string Prompt = "";
20+
[TextArea(3, 12)]
21+
public string Prompt = "";
2122
}
2223

23-
[SerializeField] private string title = "Prompt templates";
24+
[SerializeField]
25+
private string title = "Prompt templates";
2426

2527
[Tooltip("Width/height of the panel. It is auto-anchored to the bottom of the screen, " +
2628
"just left of the chat, so it does not overlap the usage / mod panels.")]
2729
[SerializeField]
2830
private Rect panelRect = new(12, 420, 520, 180);
2931

30-
[Tooltip("Horizontal space (px) reserved on the right for the chat panel.")] [SerializeField]
32+
[Tooltip("Horizontal space (px) reserved on the right for the chat panel.")]
33+
[SerializeField]
3134
private float chatReserveWidth = 700f;
3235

33-
[SerializeField] private PromptButton[] prompts = System.Array.Empty<PromptButton>();
36+
[SerializeField]
37+
private PromptButton[] prompts = System.Array.Empty<PromptButton>();
3438

35-
[SerializeField] private bool submitWhenInputUnavailable;
39+
[SerializeField]
40+
private bool submitWhenInputUnavailable;
3641

37-
[Tooltip("Show or hide the prompt buttons panel.")] [SerializeField]
42+
[Tooltip("Show or hide the prompt buttons panel.")]
43+
[SerializeField]
3844
private bool _showPanel = true;
3945

40-
[Tooltip("Hotkey that toggles the panel at runtime. Set to None to disable the hotkey.")] [SerializeField]
46+
[Tooltip("Hotkey that toggles the panel at runtime. Set to None to disable the hotkey.")]
47+
[SerializeField]
4148
private KeyCode _toggleKey = KeyCode.F8;
4249

4350
private CoreAiChatPanel _chatPanel;
@@ -157,4 +164,4 @@ private static GUIStyle RichLabel()
157164
return new GUIStyle(GUI.skin.label) { richText = true, wordWrap = true };
158165
}
159166
}
160-
}
167+
}

Assets/CoreAI.Demos/LiveMechanicsMods/Scripts/LiveMechanicsModsChatPersistenceController.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,26 @@ public sealed class LiveMechanicsModsChatPersistenceController : MonoBehaviour
2121
private const string DefaultModKeyPrefix = "demo.live_mechanics.mods_chat.mod.";
2222
private const string ActiveFlagSegment = "__active__.";
2323

24-
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")] [SerializeField]
24+
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")]
25+
[SerializeField]
2526
private CoreAILifetimeScope coreAiScope;
2627

27-
[SerializeField] private string modKeyPrefix = DefaultModKeyPrefix;
28+
[SerializeField]
29+
private string modKeyPrefix = DefaultModKeyPrefix;
2830

29-
[SerializeField] private string panelTitle = "Lua Mod Manager";
31+
[SerializeField]
32+
private string panelTitle = "Lua Mod Manager";
3033

3134
// F9 toggles the mod manager; F10 is reserved for the Token Budget / usage overlay.
32-
[Tooltip("Hotkey that toggles the mod manager. Set to None to disable keyboard toggling.")] [SerializeField]
35+
[Tooltip("Hotkey that toggles the mod manager. Set to None to disable keyboard toggling.")]
36+
[SerializeField]
3337
private KeyCode toggleKey = KeyCode.F9;
3438

35-
[SerializeField] private Rect panelRect = new(24, 92, 430, 460);
39+
[SerializeField]
40+
private Rect panelRect = new(24, 92, 430, 460);
3641

37-
[SerializeField] private bool showPanel = true;
42+
[SerializeField]
43+
private bool showPanel = true;
3844

3945
[Tooltip("Saved ids that are validation artifacts and must not autoload in the playable demo.")]
4046
[SerializeField]
@@ -708,4 +714,4 @@ private void Start()
708714
}
709715
#endif
710716
}
711-
}
717+
}

Assets/CoreAI.Demos/LiveMechanicsMods/Scripts/WaveAutoBattlerModsDemoController.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ public sealed class WaveAutoBattlerModsDemoController : MonoBehaviour
2929
private static readonly int BaseColorProperty = Shader.PropertyToID("_BaseColor");
3030
private static readonly int LegacyColorProperty = Shader.PropertyToID("_Color");
3131

32-
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")] [SerializeField]
32+
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")]
33+
[SerializeField]
3334
private CoreAILifetimeScope coreAiScope;
3435

35-
[SerializeField] private Transform heroAnchor;
36+
[SerializeField]
37+
private Transform heroAnchor;
3638

37-
[SerializeField] private Transform enemyRoot;
39+
[SerializeField]
40+
private Transform enemyRoot;
3841

3942
private readonly List<EnemyState> _enemies = new();
4043
private readonly List<string> _log = new();
@@ -474,4 +477,4 @@ private void Start()
474477
}
475478
#endif
476479
}
477-
}
480+
}

Assets/CoreAI.Demos/LuaMods/Scripts/LuaModsDemoController.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ public sealed class LuaModsDemoController : MonoBehaviour
2323
private const string DamageTunerModId = "damage_tuner";
2424
private const string DamageSlot = "damage_formula";
2525

26-
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")] [SerializeField]
26+
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")]
27+
[SerializeField]
2728
private CoreAILifetimeScope coreAiScope;
2829

29-
[Tooltip("Mod that spawns enemy waves (Read | WorldEdit).")] [SerializeField]
30+
[Tooltip("Mod that spawns enemy waves (Read | WorldEdit).")]
31+
[SerializeField]
3032
private TextAsset waveDirectorMod;
3133

32-
[Tooltip("Mod that overrides the damage formula (Read | LogicOverride).")] [SerializeField]
34+
[Tooltip("Mod that overrides the damage formula (Read | LogicOverride).")]
35+
[SerializeField]
3336
private TextAsset damageTunerMod;
3437

3538
private ILuaModRuntime _mods;
@@ -217,4 +220,4 @@ private void Start()
217220
}
218221
#endif
219222
}
220-
}
223+
}

Assets/CoreAI.Demos/ModdableUnits/Scripts/ModdableUnitsDemoController.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ public sealed class ModdableUnitsDemoController : MonoBehaviour
2727
private const float ArenaHalfWidth = 7f;
2828
private const float ArenaHalfDepth = 4.5f;
2929

30-
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")] [SerializeField]
30+
[Tooltip("Scene CoreAI scope. Auto-found when left empty.")]
31+
[SerializeField]
3132
private CoreAILifetimeScope coreAiScope;
3233

33-
[Tooltip("Parent for spawned unit visuals. Created automatically when empty.")] [SerializeField]
34+
[Tooltip("Parent for spawned unit visuals. Created automatically when empty.")]
35+
[SerializeField]
3436
private Transform unitRoot;
3537

3638
private sealed class Archetype
@@ -448,4 +450,4 @@ private void Start()
448450
}
449451
#endif
450452
}
451-
}
453+
}

0 commit comments

Comments
 (0)