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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
//! High-Level-API für LOTUS-Simulator-Scripts (WebAssembly).
//!
//! High-level API for LOTUS simulator scripts (WebAssembly).
//!
//! # Einstieg / Getting started
//!
//! Als Script-Autor reicht die Abhängigkeit `lotussim-script`. Im Rust-Code heißt das Crate
//! `lotus_script`.
//!
//! As a script author, depend only on `lotussim-script`. In Rust code the crate is named
//! `lotus_script`.
//!
//! ```toml
//! [dependencies]
//! lotussim-script = "0.8"
//! ```
//!
//! Scripts werden nach `wasm32-unknown-unknown` gebaut und laufen in der LOTUS-Scriptengine.
//! Der mit [`script!`] registrierte Typ muss [`Default`] implementieren.
//!
//! Scripts are compiled for `wasm32-unknown-unknown` and run inside the LOTUS script engine.
//! The type registered with [`script!`] must implement [`Default`].
//!
//! ```no_run
//! # #[cfg(target_arch = "wasm32")]
//! # {
//! use lotus_script::prelude::*;
//!
//! #[derive(Default)]
//! struct MyScript;
//!
//! impl Script for MyScript {
//! fn tick(&mut self) {}
//! }
//!
//! script!(MyScript);
//! # }
//! ```
//!
//! # Hilfe / Help
//!
//! - Offline-Hilfe im LOTUS-Simulator / in-game offline help of the LOTUS simulator
//! - [LOTUS-Forum](https://www.lotus-simulator.de/forum/)
//! - Repository-README / repository README
//!
//! # Features
//!
//! - `time`: zusätzliche Zeitumrechnungen über die `time`-Crate / extra time conversions via the `time` crate
//! - `internal`: Schnittstellen für die Simulator-Engine, nicht für Addon-Scripts / APIs for the simulator engine, not for addon scripts
pub use lotus_bindgen;
use Message;
/// PIS-Daten und Abfragefunktionen.
///
/// PIS data and query functions.
/// Häufig genutzte Typen und Makros für Script-Implementierungen.
///
/// Commonly used types and macros for script implementations.
pub use *;
/// Haupt-Trait für LOTUS-Script-Implementierungen.
///
/// Main trait for LOTUS script implementations.
/// Gibt `true` zurück, wenn das scriptbehaftete Objekt ferngesteuert ist.
///
/// Returns `true` if the object the script is attached to is remote controlled.