Update doc/lua_api.txt and doc/mapformat.txt even more
This commit is contained in:
parent
424b36d469
commit
fbc22f91d5
|
@ -145,13 +145,13 @@ Currently the API does not provide any helper functions for addition,
|
||||||
subtraction and whatever; you can define those that you need yourself.
|
subtraction and whatever; you can define those that you need yourself.
|
||||||
|
|
||||||
stackstring/itemstring: A stack of items in serialized format.
|
stackstring/itemstring: A stack of items in serialized format.
|
||||||
eg. 'node "default:dirt" 5'
|
eg. 'default:dirt 5'
|
||||||
eg. 'tool "default:pick_wood" 21323'
|
eg. 'default:pick_wood 21323'
|
||||||
eg. 'craft "default:apple" 2'
|
eg. 'default:apple'
|
||||||
|
|
||||||
item: A stack of items in Lua table format.
|
item: A stack of items in Lua table format.
|
||||||
eg. {name="default:dirt", count=1, wear=0, metadata=""}
|
eg. {name="default:dirt", count=5, wear=0, metadata=""}
|
||||||
^ a single dirt node
|
^ 5 dirt nodes
|
||||||
eg. {name="default:pick_wood", count=1, wear=21323, metadata=""}
|
eg. {name="default:pick_wood", count=1, wear=21323, metadata=""}
|
||||||
^ a wooden pick about 1/3 weared out
|
^ a wooden pick about 1/3 weared out
|
||||||
eg. {name="default:apple", count=1, wear=0, metadata=""}
|
eg. {name="default:apple", count=1, wear=0, metadata=""}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
===============================================
|
=================================================
|
||||||
Minetest World Format used as of 0.4.dev-120322
|
Minetest World Format used as of 0.4.dev-20120322
|
||||||
===============================================
|
=================================================
|
||||||
|
|
||||||
This applies to a world format carrying the block serialization version 22
|
This applies to a world format carrying the block serialization version 22
|
||||||
which is used at least in version 0.4.dev-120322.
|
which is used at least in version 0.4.dev-20120322.
|
||||||
|
|
||||||
The map data serialization version used is 22. It does not fully specify every
|
The block serialization version used is 22. It does not fully specify every
|
||||||
aspect of this format; if compliance with this format is to be checked, it
|
aspect of this format; if compliance with this format is to be checked, it
|
||||||
needs to be done by detecting if the files and data indeed follows it.
|
needs to be done by detecting if the files and data indeed follows it.
|
||||||
|
|
||||||
|
@ -371,6 +371,50 @@ Node metadata format
|
||||||
u8[len] owner
|
u8[len] owner
|
||||||
serialized inventory
|
serialized inventory
|
||||||
|
|
||||||
|
Static objects
|
||||||
|
---------------
|
||||||
|
Static objects are persistent freely moving objects in the world.
|
||||||
|
|
||||||
|
Object types:
|
||||||
|
1: Test object
|
||||||
|
2: Item
|
||||||
|
3: Rat (deprecated)
|
||||||
|
4: Oerkki (deprecated)
|
||||||
|
5: Firefly (deprecated)
|
||||||
|
6: MobV2 (deprecated)
|
||||||
|
7: LuaEntity
|
||||||
|
|
||||||
|
1: Item:
|
||||||
|
u8 version
|
||||||
|
version 0:
|
||||||
|
u16 len
|
||||||
|
u8[len] itemstring
|
||||||
|
|
||||||
|
7: LuaEntity:
|
||||||
|
u8 version
|
||||||
|
version 1:
|
||||||
|
u16 len
|
||||||
|
u8[len] entity name
|
||||||
|
u32 len
|
||||||
|
u8[len] static data
|
||||||
|
s16 hp
|
||||||
|
s32 velocity.x * 10000
|
||||||
|
s32 velocity.y * 10000
|
||||||
|
s32 velocity.z * 10000
|
||||||
|
s32 yaw * 1000
|
||||||
|
|
||||||
|
Itemstring format
|
||||||
|
------------------
|
||||||
|
eg. 'default:dirt 5'
|
||||||
|
eg. 'default:pick_wood 21323'
|
||||||
|
eg. '"default:apple" 2'
|
||||||
|
eg. 'default:apple'
|
||||||
|
- The wear value in tools is 0...65535
|
||||||
|
- There are also a number of older formats that you might stumble upon:
|
||||||
|
eg. 'node "default:dirt" 5'
|
||||||
|
eg. 'NodeItem default:dirt 5'
|
||||||
|
eg. 'ToolItem WPick 21323'
|
||||||
|
|
||||||
Inventory serialization format
|
Inventory serialization format
|
||||||
-------------------------------
|
-------------------------------
|
||||||
- The inventory serialization format is line-based
|
- The inventory serialization format is line-based
|
||||||
|
|
Loading…
Reference in New Issue