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
use crate::{prelude::*, CanFrom};
use crate::{Structure, StructureID};
use js_sys::Object;
use std::convert::TryFrom;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(extends = StructureID, typescript_type = "StarID")]
#[derive(Clone, Debug, PartialEq, Eq)]
pub type StarID;
#[wasm_bindgen(extends = Structure, typescript_type = "Star")]
#[derive(Clone, Debug, PartialEq, Eq)]
pub type Star;
#[wasm_bindgen(method, getter)]
pub fn id(this: &Star) -> StarID;
#[wasm_bindgen(method, getter)]
pub fn active_in(this: &Star) -> u32;
#[wasm_bindgen(method, getter)]
pub fn active_at(this: &Star) -> u32;
}
impl CanFrom<Structure> for Star {
#[inline]
fn can_from(value: &Structure) -> bool {
value.structure_type().to_str() == "star"
}
}
try_can_from!(impl TryFrom<Structure>, Error = Structure for Star);
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(extends = Object, typescript_type = "(typeof stars)")]
#[derive(Clone, Debug)]
pub type Stars;
#[wasm_bindgen]
pub static stars: Stars;
}
impl TryGetByID<EntityID, Star> for Stars {}
impl TryGetByID<StructureID, Star> for Stars {}
impl EnumerateByID<StarID, Star> for Stars {}
impl GetByID<StarID, Star> for Stars {}
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen]
pub static star_zxq: Star;
}
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen]
pub static star_a1c: Star;
}
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen]
pub static star_p89: Star;
}