aboutsummaryrefslogtreecommitdiffstats
path: root/libs/zora-rs/src/enums.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libs/zora-rs/src/enums.rs')
-rw-r--r--libs/zora-rs/src/enums.rs89
1 files changed, 70 insertions, 19 deletions
diff --git a/libs/zora-rs/src/enums.rs b/libs/zora-rs/src/enums.rs
index a16718b..62cb8ac 100644
--- a/libs/zora-rs/src/enums.rs
+++ b/libs/zora-rs/src/enums.rs
@@ -1,33 +1,84 @@
-use serde::{Serialize, Deserialize};
-use specta::Type;
-mod utils;
+use serde::{Deserialize, Serialize};
+#[cfg(target_family = "wasm")]
+use wasm_bindgen::prelude::*;
/// The region of the game.
-#[derive(Debug, Clone, Type, Serialize, Deserialize)]
+///
+/// Currently only the US version is supported, though the EU version will probably work too.
+#[cfg_attr(target_family = "wasm", wasm_bindgen)]
+#[repr(C)]
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub enum Region {
- US,
- EU,
- JP,
+ US,
+ // EU,
+ // JP,
}
/// Which game
-#[derive(Debug, Clone, Type, Serialize, Deserialize)]
+#[cfg_attr(target_family = "wasm", wasm_bindgen)]
+#[repr(C)]
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub enum Game {
- Ages,
- Seasons,
+ Ages,
+ Seasons,
}
-#[derive(Debug, Clone, Type, Serialize, Deserialize)]
+/// The choice of animal companion
+#[cfg_attr(target_family = "wasm", wasm_bindgen)]
+#[repr(C)]
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub enum Animal {
- Ricky = 0x0b,
- Dimitri = 0x0c,
- Moosh = 0x0d,
+ Ricky = 0x0b,
+ Dimitri = 0x0c,
+ Moosh = 0x0d,
}
-#[derive(Debug, Clone, Type, Serialize, Deserialize)]
+#[cfg_attr(target_family = "wasm", wasm_bindgen)]
+#[repr(C)]
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+pub enum RupeesGiven {
+ /// One Rupee
+ One = 0,
+ /// Ten Rupees
+ Ten = 2,
+ /// Fifty Rupees
+ Fifty = 5,
+ // 150 Rupees
+ OneFifty = 8,
+}
+
+#[cfg_attr(target_family = "wasm", wasm_bindgen)]
+#[repr(C)]
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+pub enum SleepMethod {
+ Sing = 0,
+ Play = 10,
+}
+
+#[cfg_attr(target_family = "wasm", wasm_bindgen)]
+#[repr(C)]
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub enum Child {
- None,
- Curious,
- Shy,
- Hyperactive
+ None,
+ Curious,
+ Shy,
+ Hyperactive,
+}
+
+#[cfg_attr(target_family = "wasm", wasm_bindgen)]
+#[repr(C)]
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+pub enum AnimalChoice {
+ None = 0,
+ Ricky = 0x0b,
+ Dimitri = 0x0c,
+ Moosh = 0x0d,
+}
+
+#[cfg_attr(target_family = "wasm", wasm_bindgen)]
+#[repr(C)]
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+pub enum ChildQuestion {
+ NoEgg = 0,
+ YesChicken = 4,
} \ No newline at end of file