diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-22 17:02:40 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-22 17:02:40 +0200 |
commit | fbc22f91d511b961b4fbf605b7d8e1b07a7c0e06 (patch) | |
tree | 7cdf4197dc91e2c4893340a2a3e3793332bbc5a5 | |
parent | 424b36d469e99d5d1bd9bb136477d0dc442376dd (diff) | |
download | minetest-fbc22f91d511b961b4fbf605b7d8e1b07a7c0e06.tar.gz minetest-fbc22f91d511b961b4fbf605b7d8e1b07a7c0e06.tar.bz2 minetest-fbc22f91d511b961b4fbf605b7d8e1b07a7c0e06.zip |
Update doc/lua_api.txt and doc/mapformat.txt even more
-rw-r--r-- | doc/lua_api.txt | 10 | ||||
-rw-r--r-- | doc/mapformat.txt | 54 |
2 files changed, 54 insertions, 10 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 1fbf7320d..60bc49304 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -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. stackstring/itemstring: A stack of items in serialized format. -eg. 'node "default:dirt" 5' -eg. 'tool "default:pick_wood" 21323' -eg. 'craft "default:apple" 2' +eg. 'default:dirt 5' +eg. 'default:pick_wood 21323' +eg. 'default:apple' item: A stack of items in Lua table format. -eg. {name="default:dirt", count=1, wear=0, metadata=""} - ^ a single dirt node +eg. {name="default:dirt", count=5, wear=0, metadata=""} + ^ 5 dirt nodes eg. {name="default:pick_wood", count=1, wear=21323, metadata=""} ^ a wooden pick about 1/3 weared out eg. {name="default:apple", count=1, wear=0, metadata=""} diff --git a/doc/mapformat.txt b/doc/mapformat.txt index db1619865..a7380b35e 100644 --- a/doc/mapformat.txt +++ b/doc/mapformat.txt @@ -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 -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 needs to be done by detecting if the files and data indeed follows it. @@ -371,6 +371,50 @@ Node metadata format u8[len] owner 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 ------------------------------- - The inventory serialization format is line-based |