Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor StationUIManager (0.9.24) #513

Merged
merged 8 commits into from
Feb 1, 2022

Conversation

starfi5h
Copy link
Collaborator

Refactor StationUIManager

  • Remove subscription system. Now update packets are broadcast to every client on that star system.
  • Remove input mimic. Now all updates are done in the background and call OnStationIdChange() to refresh UI.
  • Remove UIIsSyncedStage. Disable UpdateCooldown for now.
  • The client initial syncing flow:
    [Client] UIStationWindow._OnOpen(): Hide control panel, send StationUIInitialSyncRequest to Host
    [Host] Get requested stationComponent data, send StationUIInitialSync to Client
    [Client] Update stationComponent, call OnStationIdChange() to refresh UI.

Change sliders dragging behaviors

  • Make setting sliders only send packets when the left mouse button is released
  • Make storage max sliders only apply value when dragging stop
    Now sliders should send packets less frequently,

Change itemIcon clicking behaviors

  • Change to use original method, and on postfix update the changed item count.
  • Client will revert item count changes and wait for host approval.
  • AddOrRemoveItemFromStorage now include item inc
  • Drone & Ship count update now try to set the total count of working + idle,
    if the total count exceeds the limit or not enough idle ships, host will correct the setting value.

- Make setting sliders only send packets when mouse button release
- Make storage max sliders only apply when dragging stop
- Change to use original method, and on postfix update the changed itemCount.
- Client will revert itemCount changes and wait for host approve.
- Drone & Ship count update now try to set the total count of working + idle,
  if total count exceed limit or not enough idle ships, hot will correct the setting value.
- AddOrRemoveItemFromStorage now include ``inc``
- Add plierCount, MaxMiningSpeed(Advance miner)
@starfi5h starfi5h changed the title Refactor StationUIManager Refactor StationUIManager (0.9.24) Jan 28, 2022
@sp00ktober
Copy link
Collaborator

Looks good, gonna give it a try later when im back at my pc. Thanks for your work!

- Disable drone/ship/warper icon buttons when client sends out the request.
- Let item count changes in storage reflect immediately because they don't need to be verified by host
- Let client request for remoteOrder update every 180 ticks.
@sp00ktober sp00ktober merged commit 7af8353 into NebulaModTeam:fix-0.9 Feb 1, 2022
@starfi5h starfi5h deleted the pr-StationUI branch February 10, 2022 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants