Skip to content

Commit

Permalink
Remove station nameInput syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
starfi5h committed Dec 21, 2023
1 parent 2e11555 commit 30eff48
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 28 deletions.
1 change: 0 additions & 1 deletion NebulaModel/Packets/Logistics/StationUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public enum EUISettings
SetWarperCount,
PilerCount,
MaxMiningSpeed,
NameInput,
DroneAutoReplenish,
ShipAutoReplenish
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ protected override void ProcessPacket(ILSgStationPoolSync packet, NebulaConnecti
gStationPool[packet.stationGId[i]].shipDockRot = packet.DockRot[i].ToQuaternion();

gStationPool[packet.stationGId[i]].id = packet.stationId[i];
//todo: remove or replace
//gStationPool[packet.stationGId[i]].name =
// string.IsNullOrEmpty(packet.stationName[i]) ? null : packet.stationName[i];
gStationPool[packet.stationGId[i]].planetId = packet.planetId[i];
gStationPool[packet.stationGId[i]].workShipCount = packet.workShipCount[i];
gStationPool[packet.stationGId[i]].idleShipCount = packet.idleShipCount[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ protected override void ProcessPacket(ILSRequestgStationPoolSync packet, NebulaC
stationGId[iter] = stationComponent.gid;
stationMaxShipCount[iter] = stationComponent.workShipDatas.Length;
stationId[iter] = stationComponent.id;
//todo: remove or replace
//stationName[iter] = stationComponent.name;
DockPos[iter] = new Float3(stationComponent.shipDockPos);
DockRot[iter] = new Float4(stationComponent.shipDockRot);
planetId[iter] = stationComponent.planetId;
Expand Down
16 changes: 0 additions & 16 deletions NebulaPatcher/Patches/Dynamic/UIStationWindow_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,22 +372,6 @@ public static void OnWarperIconClick_Postfix(UIStationWindow __instance, int __s
__instance.warperIconButton.button.interactable = false;
}

[HarmonyPrefix]
[HarmonyPatch(nameof(UIStationWindow.OnNameInputSubmit))]
public static bool OnNameInputSubmit_Postfix(UIStationWindow __instance)
{
if (__instance.event_lock || !Multiplayer.IsActive || Multiplayer.Session.Ships.PatchLockILS)
{
return true;
}
var packet = new StationUI(__instance.factory.planet.id,
__instance.factory.transport.stationPool[__instance.stationId].id,
__instance.factory.transport.stationPool[__instance.stationId].gid, StationUI.EUISettings.NameInput,
__instance.nameInput.text.Trim());
Multiplayer.Session.Network.SendPacket(packet);
return Multiplayer.Session.LocalPlayer.IsHost;
}

[HarmonyPostfix]
[HarmonyPatch(nameof(UIStationWindow._OnOpen))]
[SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Original Function Name")]
Expand Down
6 changes: 0 additions & 6 deletions NebulaWorld/Logistics/StationUIManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,6 @@ private static void UpdateSettingsUI(StationComponent stationComponent, ref Stat
}
break;
}
case StationUI.EUISettings.NameInput:
{
//todo:remove or replace
//stationComponent.name = packet.SettingString;
break;
}
case StationUI.EUISettings.DroneAutoReplenish:
{
stationComponent.droneAutoReplenish = packet.SettingValue != 0;
Expand Down

0 comments on commit 30eff48

Please sign in to comment.