Move common components to shared lib

This commit is contained in:
NGnius (Graham) committed 2025-03-30 16:22:25 -04:00
1 parent 610f54e236
commit 0e048a17b1
76 files changed
+284 -1110

No files matched your search

+804
View File
@@ -0,0 +1,804 @@
pub mod config;
pub mod user;
mod cube_data;
pub use cube_data::{Cube, ItemTier, ItemCategory};
//pub use cube_data::{VisibilityMode, ItemType};
mod garage;
pub use garage::{GarageSlot, GarageControls, ControlType};
mod movement;
pub use movement::{MovementCategoryData, MovementData};
mod weapon;
pub use weapon::{WeaponData, WeaponUpgradeInfo};
mod tech_tree;
pub use tech_tree::TechTreeData;
mod combat;
pub use combat::BattleConfig;
mod singleplayer;
pub use singleplayer::{Campaigns, Campaign, CampaignDifficulty, CampaignCompletion, CampaignType, Wave, WaveRobot};
// TODO put this in core lib
pub(self) const VALID_ROBOT: &[u8] = &[64,
0,
0,
0,
38,
190,
25,
77,
24,
6,
29,
0,
80,
135,
103,
211,
27,
4,
27,
6,
80,
135,
103,
211,
21,
4,
27,
12,
198,
224,
138,
13,
24,
4,
26,
0,
198,
224,
138,
13,
24,
4,
27,
22,
198,
224,
138,
13,
24,
4,
28,
22,
198,
224,
138,
13,
24,
4,
25,
0,
198,
224,
138,
13,
24,
4,
29,
0,
198,
224,
138,
13,
23,
4,
29,
0,
198,
224,
138,
13,
23,
4,
28,
0,
198,
224,
138,
13,
23,
4,
27,
0,
198,
224,
138,
13,
23,
4,
26,
22,
198,
224,
138,
13,
23,
4,
25,
22,
198,
224,
138,
13,
25,
4,
29,
0,
198,
224,
138,
13,
25,
4,
27,
22,
198,
224,
138,
13,
25,
4,
28,
22,
198,
224,
138,
13,
25,
4,
26,
22,
198,
224,
138,
13,
25,
4,
25,
22,
198,
224,
138,
13,
26,
4,
29,
0,
198,
224,
138,
13,
26,
4,
28,
22,
198,
224,
138,
13,
26,
4,
27,
22,
198,
224,
138,
13,
26,
4,
26,
22,
198,
224,
138,
13,
26,
4,
25,
22,
198,
224,
138,
13,
22,
4,
25,
0,
198,
224,
138,
13,
22,
4,
26,
0,
198,
224,
138,
13,
22,
4,
27,
23,
198,
224,
138,
13,
22,
4,
28,
23,
198,
224,
138,
13,
22,
4,
29,
0,
198,
224,
138,
13,
25,
5,
29,
0,
198,
224,
138,
13,
23,
5,
29,
0,
198,
224,
138,
13,
24,
5,
29,
0,
198,
224,
138,
13,
22,
5,
28,
0,
198,
224,
138,
13,
26,
5,
28,
0,
198,
224,
138,
13,
25,
5,
26,
0,
198,
224,
138,
13,
23,
5,
26,
0,
198,
224,
138,
13,
24,
4,
24,
22,
198,
224,
138,
13,
24,
4,
23,
22,
198,
224,
138,
13,
24,
4,
22,
22,
198,
224,
138,
13,
24,
4,
21,
22,
198,
224,
138,
13,
24,
4,
20,
22,
198,
224,
138,
13,
24,
4,
19,
22,
198,
224,
138,
13,
24,
4,
18,
22,
198,
224,
138,
13,
24,
4,
17,
22,
198,
224,
138,
13,
24,
4,
16,
22,
198,
224,
138,
13,
24,
4,
15,
22,
198,
224,
138,
13,
24,
4,
14,
22,
198,
224,
138,
13,
23,
4,
17,
12,
198,
224,
138,
13,
25,
4,
17,
6,
198,
224,
138,
13,
23,
4,
16,
12,
198,
224,
138,
13,
25,
4,
16,
6,
198,
224,
138,
13,
23,
4,
15,
12,
198,
224,
138,
13,
25,
4,
15,
6,
198,
224,
138,
13,
23,
4,
14,
12,
198,
224,
138,
13,
25,
4,
14,
6,
198,
224,
138,
13,
22,
4,
17,
12,
198,
224,
138,
13,
26,
4,
17,
6,
198,
224,
138,
13,
22,
4,
16,
12,
198,
224,
138,
13,
26,
4,
16,
6,
198,
224,
138,
13,
22,
4,
15,
12,
198,
224,
138,
13,
26,
4,
15,
6,
198,
224,
138,
13,
22,
4,
14,
12,
198,
224,
138,
13,
26,
4,
14,
6,
240,
75,
110,
137,
21,
4,
15,
12,
240,
75,
110,
137,
27,
4,
15,
6];
pub(self) const VALID_COLOUR: &[u8] = &[64,
0,
0,
0,
0,
24,
6,
29,
0,
27,
4,
27,
0,
21,
4,
27,
0,
24,
4,
26,
0,
24,
4,
27,
0,
24,
4,
28,
0,
24,
4,
25,
0,
24,
4,
29,
0,
23,
4,
29,
0,
23,
4,
28,
0,
23,
4,
27,
0,
23,
4,
26,
0,
23,
4,
25,
0,
25,
4,
29,
0,
25,
4,
27,
0,
25,
4,
28,
0,
25,
4,
26,
0,
25,
4,
25,
0,
26,
4,
29,
0,
26,
4,
28,
0,
26,
4,
27,
0,
26,
4,
26,
0,
26,
4,
25,
0,
22,
4,
25,
0,
22,
4,
26,
0,
22,
4,
27,
0,
22,
4,
28,
0,
22,
4,
29,
1,
25,
5,
29,
1,
23,
5,
29,
1,
24,
5,
29,
1,
22,
5,
28,
1,
26,
5,
28,
1,
25,
5,
26,
1,
23,
5,
26,
0,
24,
4,
24,
0,
24,
4,
23,
0,
24,
4,
22,
0,
24,
4,
21,
0,
24,
4,
20,
0,
24,
4,
19,
0,
24,
4,
18,
0,
24,
4,
17,
0,
24,
4,
16,
0,
24,
4,
15,
0,
24,
4,
14,
0,
23,
4,
17,
0,
25,
4,
17,
0,
23,
4,
16,
0,
25,
4,
16,
0,
23,
4,
15,
0,
25,
4,
15,
0,
23,
4,
14,
0,
25,
4,
14,
0,
22,
4,
17,
0,
26,
4,
17,
0,
22,
4,
16,
0,
26,
4,
16,
0,
22,
4,
15,
0,
26,
4,
15,
0,
22,
4,
14,
0,
26,
4,
14,
0,
21,
4,
15,
0,
27,
4,
15];