mirror of
https://github.com/minetest-mods/player_monoids.git
synced 2025-07-15 06:10:49 +02:00
Move caveats into README
This commit is contained in:
16
API.md
16
API.md
@ -73,4 +73,18 @@ ID as long as they are all on different players.
|
||||
the given player, if it exists.
|
||||
|
||||
```monoid:value(player)``` - The current combined value of the monoid for the
|
||||
given player.
|
||||
given player.
|
||||
|
||||
Caveats
|
||||
=======
|
||||
* If the global state managed by a monoid is modified by something other than
|
||||
the monoid, you will have the same problem as when two mods both independently
|
||||
try to modify global state without going through a monoid.
|
||||
* This includes playereffects effects that affect global player state without
|
||||
going through a monoid.
|
||||
* You will also get problems if you use multiple monoids to manage the same
|
||||
global state.
|
||||
* The order that different effects get combined together is based on key order,
|
||||
which may not be predictable. So you should try to make your monoids commutative
|
||||
in addition to associative, or at least not care if the order of two changes
|
||||
is swapped.
|
Reference in New Issue
Block a user