Skip to content

Commit 9179fc0

Browse files
committed
move some comments
1 parent 3f5ee17 commit 9179fc0

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/PetroglyphTools/PG.StarWarsGame.Engine/CommandBar/CommandBarGameManager_Initialization.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,17 @@ private void SetModelTransform(CommandBarShellComponent shellComponent)
8282

8383
private void LinkComponentsWithActions()
8484
{
85-
// NB: Currently we do not have "action" but we keep the original method name
8685
var nameLookup = SupportedCommandBarComponentData.GetComponentIdsForEngine(GameRepository.EngineType);
8786
foreach (var idPair in nameLookup)
8887
{
88+
// The engine does not uppercase the name here
8989
var crc = _hashingService.GetCrc32(idPair.Value, PGConstants.DefaultPGEncoding);
9090
if (NamedEntries.TryGetFirstValue(crc, out var component))
91+
{
92+
// NB: Currently we do not have "action"
93+
// but we keep the original method name 'LinkComponentsWithActions'
9194
component.Id = idPair.Key;
95+
}
9296
}
9397
}
9498

src/PetroglyphTools/PG.StarWarsGame.Engine/CommandBar/SupportedCommandBarComponentData.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ namespace PG.StarWarsGame.Engine.CommandBar;
55

66
public static class SupportedCommandBarComponentData
77
{
8+
// Unfortunately we cannot use EnumConversionDictionary, because EaW and use different enum values
9+
// for the same components, so we need to maintain separate dictionaries for each engine.
810
public static IReadOnlyDictionary<CommandBarComponentId, string> GetComponentIdsForEngine(GameEngineType engineType)
911
{
1012
return engineType switch

0 commit comments

Comments
 (0)