mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-09 04:16:30 +00:00
Massive update (#6)
* Refactor some of the code, multiple bug fixes * Fix something stupid * More bug fixes * LOTS OF STUFF * Make the sniper alot stronger and other changes * Prevent Players from respawning in the middle of a match * Fix stupid mistake * Small update * More updates * Remove minimap access.. and downgrade the sniper class
This commit is contained in:
parent
6c26978752
commit
17eeae8937
499 changed files with 616 additions and 225 deletions
21
mods/misc/xcompat/doc/player.md
Normal file
21
mods/misc/xcompat/doc/player.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Player API
|
||||
|
||||
## Usage
|
||||
|
||||
The player api can be accessed in your script through `xcompat.player`.
|
||||
|
||||
This object mimics the `player_api` from Minetest Game, and should be a drop-in
|
||||
replacement in most cases. You should be able to simply replace instances
|
||||
of `player_api` in your script with `xcompat.player`.
|
||||
|
||||
|
||||
## Note on `xcompat.player.player_attached`
|
||||
|
||||
Reading & writing to this object works, but because it's a proxy table it can't
|
||||
be looped over.
|
||||
|
||||
Looping over this object would require lua5.2 `__pairs`/`__ipairs` metamethod support.
|
||||
It would be possible to implement support for this through polyfill,
|
||||
using [this method](https://stackoverflow.com/a/77354254)
|
||||
(luajit supports this via 5.2 extensions), but it's not implemented as of now.
|
||||
Additionally see [this engine issue](https://github.com/minetest/minetest/issues/15133).
|
||||
Loading…
Add table
Add a link
Reference in a new issue