Skip to content

Commit

Permalink
Sync atmospheric heater "reset" gizmo
Browse files Browse the repository at this point in the history
`Comp_AtmosphericHeater` is a subtype of `CompTempControl`, but has the `CompGetGizmosExtra` method rewritten. The +/- 1/10 degrees change was working fine, as it called the synced method `InterfaceChangeTargetTemperature_NewTemp`. However, this was not the case for the reset gizmo, as it set the temperature directly. I've synced the reset gizmo for the atmospheric heater itself, so it should work fine now.

Also moved the `CompTempControl` gizmo from `SyncDelegates` to `SyncMethods`, right next to where the other sync method for it was registered. I believe it should have been there to begin with, and I must have made a mistake while working through all the new and changed gizmos in 1.5.
  • Loading branch information
SokyranTheDragon committed Aug 18, 2024
1 parent f0221d0 commit 23ebe2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion Source/Client/Syncing/Game/SyncDelegates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public static void Init()
SyncMethod.Lambda(typeof(Building_TurretGun), nameof(Building_TurretGun.GetGizmos), 1); // Reset forced target
SyncMethod.Lambda(typeof(UnfinishedThing), nameof(UnfinishedThing.GetGizmos), 0); // Cancel unfinished thing
SyncMethod.Lambda(typeof(UnfinishedThing), nameof(UnfinishedThing.GetGizmos), 1).SetDebugOnly(); // Dev complete
SyncMethod.Lambda(typeof(CompTempControl), nameof(CompTempControl.CompGetGizmosExtra), 2); // Reset temperature

SyncDelegate.LambdaInGetter(typeof(Designator), nameof(Designator.RightClickFloatMenuOptions), 0) // Designate all
.TransformField("things", Serializer.SimpleReader(() => Find.CurrentMap.listerThings.AllThings)).SetContext(SyncContext.CurrentMap);
Expand Down
2 changes: 2 additions & 0 deletions Source/Client/Syncing/Game/SyncMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ public static void Init()
SyncMethod.Register(typeof(Building_ShipComputerCore), nameof(Building_ShipComputerCore.TryLaunch));
SyncMethod.Register(typeof(CompPower), nameof(CompPower.TryManualReconnect));
SyncMethod.Register(typeof(CompTempControl), nameof(CompTempControl.InterfaceChangeTargetTemperature_NewTemp));
SyncMethod.Lambda(typeof(CompTempControl), nameof(CompTempControl.CompGetGizmosExtra), 2); // Reset temperature
SyncMethod.Lambda(typeof(Comp_AtmosphericHeater), nameof(Comp_AtmosphericHeater.CompGetGizmosExtra), 0); // Reset temperature
SyncMethod.Register(typeof(CompTransporter), nameof(CompTransporter.CancelLoad), Array.Empty<SyncType>());
SyncMethod.Register(typeof(MapPortal), nameof(MapPortal.CancelLoad));
SyncMethod.Register(typeof(StorageSettings), nameof(StorageSettings.CopyFrom)).ExposeParameter(0);
Expand Down

0 comments on commit 23ebe2f

Please sign in to comment.