aboutsummaryrefslogtreecommitdiff
path: root/assets/blender/mbb/signal.blend
diff options
context:
space:
mode:
Diffstat (limited to 'assets/blender/mbb/signal.blend')
0 files changed, 0 insertions, 0 deletions
113'>113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
Advanced Trains [advtrains] API documentation
--------
To use the API, mods must depend on 'advtrains'.
All boolean values in definition tables default to 'false' and can be omitted.
### Wagons
Wagons are registered using the function

advtrains.register_wagon(name, prototype, description, inventory_image)
- '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.

# Wagon prototype properties
{
	... all regular luaentity properties (mesh, textures, collisionbox a.s.o)...
	drives_on = {default=true},
	^- used to define the tracktypes (see below) that wagon can drive on. The tracktype identifiers are given as keys, similar to privileges)
	max_speed = 10,
	^- optional, default 10: defines the maximum speed this wagon can drive. The maximum speed of a train is determined by the wagon with the lowest max_speed value.
	seats = {
	^- contains zero or more seat definitions. A seat is a place where a player can be attached when getting on a wagon.
		{
			name="Left front window",
			^- display name of this seat
			attach_offset={x=0, y=10, z=0},
			^- this value is passed to 'set_attach'
			view_offset={x=0, y=6, z=0},
			^- player:set_eye_offset is called with this parameter.
			group="default"
			^- optional. Defines the seat group. See 'seat_groups' below
			-!- Note: driving_ctrl_access field has moved to seat group definition,
			-!- but is still partwise supported here. If you don't use seat groups yet,
			-!- you really should change NOW!
		},
	},
	seat_groups = {
	^- If defined, activates advanced seating behavior. See "seating behavior".
		default = {
			name = "Seats"
			^- name of this seat group, to be shown in get-on menu.
			access_to = {"foo", "bar"}
			^- List of seat groups you can access from this seat using the menu when sitting inside the train.
			require_doors_open = true
			^- Only allow getting on and off if doors are open.
			driving_ctrl_access=false,
			^- If the seat is a driver stand, and players sitting here should get access to the train's driving control.
		}
	}
	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
			sound = <simpleSoundSpec>
			^- The sound file of the doors opening. If none is specified, nothing is played.
		},
		close={
			[-1]={frames={x=20, y=40}, time=1}, -- close left doors
			[1]={frames={x=60, y=80}, time=1} -- close right doors
			sound = <simpleSoundSpec>
			^- The sound file of the doors closing. If none is specified, nothing is played.
		}
	},
	door_entry={ 1.5, -1.5 }
	^- optional. If defined, defines the locations of the doors on the model as distance from the object center on the path.
	^- Getting on by walking in then takes effect.
	^- Positive values mean front, negative ones back. Resulting position is automatically shifted to the right side.

	coupler_types_front = {scharfenberg=true},
	coupler_types_back = {chain=true},
	^- Defines the available coupler types on this wagon on the front and back side. Wagon will only couple to wagons that have a matching coupler. (this property does not have any visual impact)
	^- Default: not given (nil) - causes the wagon to couple to any other wagon regardless of coupler type.
	^- Empty table ({}): This wagon does not couple to any other wagon (e.g. for Linetrack vehicles)
	^- Register coupler types using ''advtrains.register_coupler_type(type, name)''. advtrains defines the default types "chain" (Buffer and Chain) and "scharfenberg" (Scharfenberg coupler).

	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.
	wheel_positions = {1.5, -1.5},
	^- Optional: if defined, the wagon will be placed so that these 2 wheel positions are on the track
	^- This parameter is recommended for long wagons (wagon_span >= 2).
	^- The position is a distance relative to the center of the wagon.
	^- Must have exactly 2 entries, corresponding to the front (1) and rear (2) wheel of the wagon object. 1st must be greater than 2nd.
	^- If not provided, the simple 1-position positioning logic will be used (wagon is positioned with the center on the track)

	extent_h = 1,
	^- Determines the collision box extent in x/z direction. Defaults to 1 (=3x3)
	^- The actual bounding box size is (extent_h*2)+1, so 0 means 1x1, 1 means 3x3 and 2 means 5x5
	extent_v = 2,
	^- Determines the collision box extent in y direction. Defaults to 2 (=3).
	^- The actual bounding box size is extent_v+1, so 0 means 1, 1 means 2, 2 means 3 a.s.o.
	horn_sound = <simpleSoundSpec>,
	^- The sound file of the horn. If none is specified, this wagon can't sound a horn. The specified sound file will be looped.
	
	drops = {"default:steelblock 3"}
	^- List of itemstrings what to drop when the wagon is destroyed
	
	has_inventory = false
	^- If this wagon has an inventory. The inventory is saved with the wagon.
	^- the following settings are ignored if not.
	inventory_list_sizes = {
		box=8*6,
	},