1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-30 13:50:23 +02:00

Bones: Iterate player inventory lists dynamically (#1229)

Avoid hard-coded player inventory lists.
Expose `bones.player_inventory_lists` for mods to look up or change,
which player inventory lists are being dropped or placed into bones.
This commit is contained in:
Tim
2018-02-20 19:15:03 +01:00
committed by SmallJoker
parent 094ad004a4
commit 283636bfdb
2 changed files with 38 additions and 25 deletions

View File

@ -67,6 +67,15 @@ Beds API
}
}
Bones API
---------
An ordered list of listnames (default: "main", "craft") of the player inventory,
that will be placed into bones or dropped on player death can be looked up or changed
in `bones.player_inventory_lists`.
e.g. `table.insert(bones.player_inventory_lists, "backpack")`
Creative API
------------