classicube_helpers\events/
world.rs1use std::os::raw::{c_float, c_int};
2
3use classicube_sys::{cc_bool, cc_uint8};
4
5use crate::make_event_handler;
6
7make_event_handler!(
8 World,
10 NewMap,
11 Void,
12 ()
13);
14
15make_event_handler!(
16 World,
18 Loading,
19 Float,
20 (
21 {
22 name: progress,
23 rust_type: c_float,
24 c_type: c_float,
25 to_rust: |a| a,
26 },
27 )
28);
29
30make_event_handler!(
31 World,
33 MapLoaded,
34 Void,
35 ()
36);
37
38make_event_handler!(
39 World,
41 EnvVarChanged,
42 Int,
43 (
44 {
45 name: var,
46 rust_type: c_int,
47 c_type: c_int,
48 to_rust: |a| a,
49 },
50 )
51);
52
53make_event_handler!(
54 World,
56 LightingModeChanged,
57 LightingMode,
58 (
59 {
60 name: old_mode,
61 rust_type: cc_uint8,
62 c_type: cc_uint8,
63 to_rust: |a| a,
64 },
65 {
66 name: from_server,
67 rust_type: cc_bool,
68 c_type: cc_bool,
69 to_rust: |a| a,
70 },
71 )
72);