mirror of
https://github.com/littensy/charm.git
synced 2026-10-20 17:51:37 +00:00
docs: add missing playerReadyEvent call
This commit is contained in:
parent
fdb506dc23
commit
b05f3a9de6
1 changed files with 5 additions and 2 deletions
|
|
@ -700,7 +700,7 @@ client.addSignals({
|
||||||
status = store.setStatus,
|
status = store.setStatus,
|
||||||
timer = store.timerAtom,
|
timer = store.timerAtom,
|
||||||
-- Signals unique to a player should also have a key unique to
|
-- Signals unique to a player should also have a key unique to
|
||||||
-- that player, to avoid overwriting other synced signals
|
-- that player, to avoid name collisions
|
||||||
[`inventory-{Players.LocalPlayer.UserId}`] = setInventory,
|
[`inventory-{Players.LocalPlayer.UserId}`] = setInventory,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -709,6 +709,9 @@ syncEvent.OnClientEvent:Connect(function(updates)
|
||||||
client.patch(updates)
|
client.patch(updates)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- Notify the server that the client is ready to receive updates
|
||||||
|
playerReadyEvent:FireServer()
|
||||||
|
|
||||||
-- The signals will now update to match the server's state
|
-- The signals will now update to match the server's state
|
||||||
subscribe(getInventory, function(inventory)
|
subscribe(getInventory, function(inventory)
|
||||||
print("My inventory is", table.concat(inventory))
|
print("My inventory is", table.concat(inventory))
|
||||||
|
|
@ -844,7 +847,7 @@ client.addSignals({
|
||||||
status = store.setStatus,
|
status = store.setStatus,
|
||||||
timer = store.timerAtom,
|
timer = store.timerAtom,
|
||||||
-- Signals unique to a player should also have a key unique to
|
-- Signals unique to a player should also have a key unique to
|
||||||
-- that player, to avoid overwriting other synced signals
|
-- that player, to avoid name collisions
|
||||||
[`inventory-{Players.LocalPlayer.UserId}`] = clientStore.setInventory,
|
[`inventory-{Players.LocalPlayer.UserId}`] = clientStore.setInventory,
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue