aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2017-01-25 21:55:40 +0100
committerorwell96 <mono96.mml@gmail.com>2017-01-25 21:55:40 +0100
commite322e00e3d3dd7c034c88209b50e685c947f968d (patch)
tree2adbebaf2b5ca67ed67f7820dfd9eb03644cbd4d /advtrains
parent54b566e7a7c3446e8f41d06d322f085f4c156852 (diff)
downloadadvtrains-e322e00e3d3dd7c034c88209b50e685c947f968d.tar.gz
advtrains-e322e00e3d3dd7c034c88209b50e685c947f968d.tar.bz2
advtrains-e322e00e3d3dd7c034c88209b50e685c947f968d.zip
Document door animation parameters
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/advtrains/api_doc.txt18
1 files changed, 16 insertions, 2 deletions
diff --git a/advtrains/advtrains/api_doc.txt b/advtrains/advtrains/api_doc.txt
index da0bd8c..af9c071 100644
--- a/advtrains/advtrains/api_doc.txt
+++ b/advtrains/advtrains/api_doc.txt
@@ -45,9 +45,22 @@ advtrains.register_wagon(name, prototype, description, inventory_image)
^- Only allow getting on and off if doors are open.
}
}
- assign_to_seat_group = {"default"}
+ assign_to_seat_group = {"default"},
^- optional, like seat_groups. When player right_clicks the wagon, player will be assigned to the first free seat group in the list.
+ doors={
+ ^- optional. If defined, defines door animation frames. Opposite door has to be closed during animation period.
+ ^- Remember, advtrains can't handle doors on both sides opened simultaneously.
+ open={
+ [-1]={frames={x=0, y=20}, time=1}, -- open left doors
+ [1]={frames={x=40, y=60}, time=1} -- open right doors
+ },
+ close={
+ [-1]={frames={x=20, y=40}, time=1}, -- close left doors
+ [1]={frames={x=60, y=80}, time=1} -- close right doors
+ }
+ },
+
wagon_span=2,
^- How far this wagon extends from its base position. Is the half of the wagon length.
^- Used to determine in which distance the other wagons have to be positioned. Will require tweaking.
@@ -97,7 +110,8 @@ On a train, right-clicking the wagon will make you get off the train unless:
In case there's no possibility, does nothing.
In case there are multiple possibilities, will show a form.
-If you can't enter or get off a train because the doors are closed, use shift-rightclick
+If you can't enter a train because the doors are closed, any of the train's wagon owners or people authorized by them can open the doors(on the side they are standing) with shift-click.
+
### Tracks
Most modders will be satisfied with the built-in tracks. If cog railways, maglev trains and mine trains are added, it is necessary to understand the definition of tracks. Although the tracks API is there, explaining it would require more effort than me creating the wanted definitions myself. Contact me if you need to register your own rails using my registration functions.