aboutsummaryrefslogtreecommitdiff
path: root/advtrains/api_doc.txt
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2017-11-22 22:16:08 +0100
committerorwell96 <orwell@bleipb.de>2017-11-22 22:16:08 +0100
commit2d4833b5a8d3555c257cbeb5928c32eb36caa473 (patch)
treeaa132f846740281892e063cb35782549cdc356ab /advtrains/api_doc.txt
parent409e2125c9d6ee72090c92dc94c54d0560a80c5d (diff)
downloadadvtrains-2d4833b5a8d3555c257cbeb5928c32eb36caa473.tar.gz
advtrains-2d4833b5a8d3555c257cbeb5928c32eb36caa473.tar.bz2
advtrains-2d4833b5a8d3555c257cbeb5928c32eb36caa473.zip
do not register wagons in the advtrains namespace automatically
One step towards advcarts compatibility
Diffstat (limited to 'advtrains/api_doc.txt')
-rw-r--r--advtrains/api_doc.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/advtrains/api_doc.txt b/advtrains/api_doc.txt
index 20f285f..b02ff83 100644
--- a/advtrains/api_doc.txt
+++ b/advtrains/api_doc.txt
@@ -6,8 +6,11 @@ All boolean values in definition tables default to 'false' and can be omitted.
Wagons are registered using the function
advtrains.register_wagon(name, prototype, description, inventory_image)
-- 'name' is the internal name of the wagon. It is registered inside the 'advtrains:' namespace.
+- 'name' is the internal name of the wagon. It should follow the mod naming convention, however, this is not enforced.
+ For compatibility reasons, if a mod name is omitted, the wagon will be registered in the advtrains: namespace.
Example: A wagon with name="engine_tgv" will be registered as "advtrains:engine_tgv".
+ !IMPORTANT! You must not append a ":" at the start of the name, even if you want to bypass the mod naming convention check. This is because internally the register_wagon function
+ appends a ":" automatically.
- 'prototype' is the lua entity prototype. The regular definition keys for luaentites apply. Additional required and optional properties see below. DO NOT define 'on_step', 'on_activate', 'on_punch', 'on_rightclick' and 'get_staticdata' since these will be overridden. Use 'custom_*' instead.
- 'description' is the description of the inventory item that is used to place the wagon.
- 'inventory_image' is the inventory image of said item.