Skip to content

Commit

Permalink
updated readme for LobbyData key requirement changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RugbugRedfern committed Apr 9, 2024
1 parent 560c8c0 commit f2a793a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
19 changes: 11 additions & 8 deletions MyceliumNetworkingForCW/ts-assets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,32 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.7]
## 1.0.8
- Registering LobbyData and PlayerData keys before accessing them is now optional. This makes dynamic keys easier to use, but you should always register your keys when you know, or the LobbyDataUpdated and PlayerDataUpdated callbacks will not fire for them.

## 1.0.7
- Added LobbyData and PlayerData functionality, which allows you to define synced variables associated with the lobby (perfect for config syncing) or individual players
- The LobbyLeft callback should now properly fire
- General code cleanup

## [1.0.6]
## 1.0.6
- Automated Thunderstore release

## [1.0.5]
## 1.0.5
- Automated Nuget release

## [1.0.4]
## 1.0.4
- Preparing GitHub actions for automatic update deployment

## [1.0.3]
## 1.0.3
- Exceptions thrown inside RPCs will now be logged
- Improved log style consistency

## [1.0.2]
## 1.0.2
- Increased maximum payload size to 524288 bytes

## [1.0.1]
## 1.0.1
- Updated README

## [1.0.0]
## 1.0.0
- Initial Release
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MyceliumNetwork.RPCTarget(modId, nameof(ChatMessage), targetSteamId, ReliableTyp
LobbyData and PlayerData are Steam features that allow you to define synced variables associated with the lobby (perfect for config syncing) or individual players. Mycelium provides an easy way to interface with them.

### Lobby Data
To use lobby data, you first need to register the key. This should happen when your mod starts for the first time.
To use lobby data, you first need to register the key. This should happen when your **mod starts for the first time**. This step is optional but strongly recommended. It's required if you want the LobbyDataUpdated to fire when that key's value is change.
```cs
void Awake()
{
Expand Down Expand Up @@ -108,7 +108,7 @@ Debug.Log(data); // 123
### Player Data
Player data is the same as lobby data, but associated with specific players.

To use player data, you first need to register the key. This should happen when your mod starts for the first time.
To use player data, you first need to register the key. This should happen when your **mod starts for the first time**. This step is optional but strongly recommended. It's required if you want the PlayerDataUpdated to fire when that key's value is change.
```cs
void Awake()
{
Expand Down

0 comments on commit f2a793a

Please sign in to comment.