Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/doc/lua/vehicle.md
blob: c0c91cc472f1a7c13f048f6ccc2c73a3bb15d2aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
The vehicle table contains bindings specific to vehicles which are available in addition to their common tables.

---

#### `bool` vehicle.controlHeld(`String` loungeName, `String` controlName)

Returns `true` if the specified control is currently being held by an occupant of the specified lounge position and `false` otherwise.

---

#### `Vec2F` vehicle.aimPosition(`String` loungeName)

Returns the world aim position for the specified lounge position.

---

#### `EntityId` vehicle.entityLoungingIn(`String` loungeName)

Returns the entity id of the entity currently occupying the specified lounge position, or `nil` if the lounge position is unoccupied.

---

#### `void` vehicle.setLoungeEnabled(`String` loungeName, `bool` enabled)

Enables or disables the specified lounge position.

---

#### `void` vehicle.setLoungeOrientation(`String` loungeName, `String` orientation)

Sets the lounge orientation for the specified lounge position. Valid orientations are "sit", "stand" or "lay".

---

#### `void` vehicle.setLoungeEmote(`String` loungeName, [`String` emote])

Sets the emote to be performed by entities occupying the specified lounge position, or clears it if no emote is specified.

---

#### `void` vehicle.setLoungeDance(`String` loungeName, [`String` dance])

Sets the dance to be performed by entities occupying the specified lounge position, or clears it if no dance is specified.

---

#### `void` vehicle.setLoungeStatusEffects(`String` loungeName, `JsonArray` statusEffects)

Sets the list of status effects to be applied to entities occupying the specified lounge position. To clear the effects, set an empty list.

---

#### `void` vehicle.setPersistent(`bool` persistent)

Sets whether the vehicle is persistent, i.e. whether it will be stored when the world is unloaded and reloaded.

---

#### `void` vehicle.setInteractive(`bool` interactive)

Sets whether the vehicle is currently interactive.

---

#### `void` vehicle.setDamageTeam(`DamageTeam` team)

Sets the vehicle's current damage team type and number.

---

#### `void` vehicle.setMovingCollisionEnabled(`String` collisionName, `bool` enabled)

Enables or disables the specified collision region.

---

#### `void` vehicle.setForceRegionEnabled(`String` regionName, `bool` enabled)

Enables or disables the specified force region.

---

#### `void` vehicle.setDamageSourceEnabled(`String` damageSourceName, `bool` enabled)

Enables or disables the specified damage source.

---

#### `void` vehicle.destroy()

Destroys the vehicle.