classicube_helpers\events/
world.rs

1use std::os::raw::{c_float, c_int};
2
3use crate::make_event_handler;
4
5make_event_handler!(
6    /// Player begins loading a new world
7    World,
8    NewMap,
9    Void,
10    ()
11);
12
13make_event_handler!(
14    /// Portion of world is decompressed/generated (Arg is progress from 0-1)
15    World,
16    Loading,
17    Float,
18    (
19        {
20            name: progress,
21            rust_type: c_float,
22            c_type: c_float,
23            to_rust: |a| a,
24        },
25    )
26);
27
28make_event_handler!(
29    /// New world has finished loading, player can now interact with it
30    World,
31    MapLoaded,
32    Void,
33    ()
34);
35
36make_event_handler!(
37    /// World environment variable changed by player/CPE/WoM config
38    World,
39    EnvVarChanged,
40    Int,
41    (
42        {
43            name: var,
44            rust_type: c_int,
45            c_type: c_int,
46            to_rust: |a| a,
47        },
48    )
49);