celeste_rs 0.5.1

Library for working with files related to Celeste and it's modding scene.
Documentation
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
use celeste_rs_macros::Entity;

use crate::maps::{
    elements::Node,
    encoder::MapEncoder,
    parser::{MapElementParsingError, MapParser},
    var_types::{Character, Float, Integer},
    MapElement,
    MapManager,
    ResolvableString,
};

use std::{any::Any, fmt::Debug};

#[derive(Debug)]
/// The full struct of an [Entity] implementaiton
///
/// These fields are on every entity element and are
/// useful even when we cannot resolve the entity itself
pub struct MapEntity<T: Entity> {
    pub id: Integer,
    pub x: Float,
    pub y: Float,
    pub width: Option<Integer>,
    pub height: Option<Integer>,
    pub origin_x: Float,
    pub origin_y: Float,
    pub entity: T,
}

impl<T: Entity> MapElement for MapEntity<T> {
    const NAME: &'static str = T::NAME;

    fn from_raw(parser: MapParser) -> Result<Self, MapElementParsingError>
    where Self: Sized {
        Ok(Self {
            id: parser.get_attribute("id")?,
            x: parser.get_attribute("x")?,
            y: parser.get_attribute("y")?,
            width: parser.get_optional_attribute("width"),
            height: parser.get_optional_attribute("height"),
            origin_x: parser.get_attribute("originX")?,
            origin_y: parser.get_attribute("originY")?,
            entity: T::from_raw(parser)?,
        })
    }

    fn to_raw(&self, encoder: &mut MapEncoder) {
        encoder.attribute("id", self.id);
        encoder.attribute("x", self.x);
        encoder.attribute("y", self.y);
        encoder.optional_attribute("width", &self.width);
        encoder.optional_attribute("height", &self.height);
        encoder.attribute("originX", self.origin_x);
        encoder.attribute("originY", self.origin_y);
        self.entity.to_raw(encoder);
    }
}

/// Represents an entity, anything that can be stored in [Entities](super::Entities).
pub trait Entity: Debug + Any {
    /// The name of the entity in the binary file
    const NAME: &'static str;

    fn from_raw(parser: MapParser) -> Result<Self, MapElementParsingError>
    where Self: Sized;
    fn to_raw(&self, encoder: &mut MapEncoder);
}


macro_rules! unit_entities {
    ($($struct_name: ident, $name: literal),*) => {
        pub(super) fn add_unit_entity_parsers(mm: &mut MapManager) {
            $(
                mm.add_entity_parser::<$struct_name>();
            )*
        }

        $(
            #[derive(Debug, Clone, Copy, Default)]
            pub struct $struct_name;

            impl Entity for $struct_name {
                const NAME: &'static str = $name;

                fn from_raw(_parser: MapParser) -> Result<Self, MapElementParsingError>
                where Self: Sized {
                    Ok(Self::default())
                }

                fn to_raw(&self, _encoder: &mut MapEncoder) {}
            }
        )*
    };
}

/// Adds parsers for all the vanilla entities to the [MapManager]
pub fn add_entity_parsers(mm: &mut MapManager) {
    mm.add_entity_parser::<SpikesUp>();
    mm.add_entity_parser::<SpikesDown>();
    mm.add_entity_parser::<SpikesLeft>();
    mm.add_entity_parser::<SpikesRight>();
    mm.add_entity_parser::<JumpThru>();
    mm.add_entity_parser::<Wire>();
    mm.add_entity_parser::<Strawberry>();
    mm.add_entity_parser::<Lightbeam>();
    mm.add_entity_parser::<Cassette>();
    mm.add_entity_parser::<CassetteBlock>();
    mm.add_entity_parser::<DashBlock>();
    mm.add_entity_parser::<Bonfire>();
    mm.add_entity_parser::<NPC>();
    mm.add_entity_parser::<CoverupWall>();
    mm.add_entity_parser::<Memorial>();
    mm.add_entity_parser::<BirdForsakenCityGem>();
    mm.add_entity_parser::<FallingBlock>();
    mm.add_entity_parser::<ZipMover>();
    mm.add_entity_parser::<FakeWall>();
    mm.add_entity_parser::<Spring>();
    mm.add_entity_parser::<Refill>();
    mm.add_entity_parser::<Tentacles>();
    mm.add_entity_parser::<Glider>();
    mm.add_entity_parser::<FlingBirdIntro>();
    mm.add_entity_parser::<ExitBlock>();
    mm.add_entity_parser::<TempleCrackedBlock>();
    mm.add_entity_parser::<Clothesline>();
    mm.add_entity_parser::<RedBlocks>();
    mm.add_entity_parser::<Door>();
    mm.add_entity_parser::<DashSwitchV>();
    mm.add_entity_parser::<Spinner>();
    mm.add_entity_parser::<ConditionBlock>();
    mm.add_entity_parser::<FloatySpaceBlock>();
    mm.add_entity_parser::<SoundSource>();
    mm.add_entity_parser::<LockBlock>();
    mm.add_entity_parser::<Seeker>();
    mm.add_entity_parser::<DashSwitchH>();
    mm.add_entity_parser::<SummitCheckpoint>();
    mm.add_entity_parser::<SummitGem>();
    mm.add_entity_parser::<SummitGemManager>();
    mm.add_entity_parser::<FireBall>();
    mm.add_entity_parser::<FlingBird>();
    mm.add_entity_parser::<CoreModeToggle>();
    mm.add_entity_parser::<HeartGemDoor>();
    mm.add_entity_parser::<Eyebomb>();
    mm.add_entity_parser::<TempleGate>();
    mm.add_entity_parser::<PlaybackTutorial>();
    mm.add_entity_parser::<StarJumpBlock>();
    mm.add_entity_parser::<SeekerStatue>();
    mm.add_entity_parser::<FinalBoss>();
    mm.add_entity_parser::<Cloud>();
    mm.add_entity_parser::<BigWaterfall>();
    mm.add_entity_parser::<WallSpringLeft>();
    mm.add_entity_parser::<CoreMessage>();
    mm.add_entity_parser::<IntroCrusher>();
    mm.add_entity_parser::<Key>();
    mm.add_entity_parser::<HaHaHa>();
    mm.add_entity_parser::<BadelineBoost>();
    mm.add_entity_parser::<WallSpringRight>();
    mm.add_entity_parser::<CrumbleWallOnRumble>();
    mm.add_entity_parser::<RisingLava>();
    mm.add_entity_parser::<GreenBlocks>();
    mm.add_entity_parser::<LightningBlock>();
    mm.add_entity_parser::<BirdPath>();
    mm.add_entity_parser::<CutsceneNode>();
    mm.add_entity_parser::<ClutterDoor>();
    mm.add_entity_parser::<BigSpinner>();
    mm.add_entity_parser::<CliffsideFlag>();
    mm.add_entity_parser::<RidgeGate>();
    mm.add_entity_parser::<SwapBlock>();
    mm.add_entity_parser::<MovingPlatform>();
    mm.add_entity_parser::<SwitchGate>();
    mm.add_entity_parser::<BlackGem>();
    mm.add_entity_parser::<SummitBackgroundManager>();
    mm.add_entity_parser::<TempleMirror>();
    mm.add_entity_parser::<MoveBlock>();
    mm.add_entity_parser::<DreamBlock>();
    mm.add_entity_parser::<WallBooster>();
    mm.add_entity_parser::<Water>();
    mm.add_entity_parser::<Lightning>();
    mm.add_entity_parser::<MoonCreature>();
    mm.add_entity_parser::<FinalBossMovingBlock>();
    mm.add_entity_parser::<RotateSpinner>();
    mm.add_entity_parser::<Booster>();
    mm.add_entity_parser::<Bird>();
    mm.add_entity_parser::<ReflectionHeartStatue>();
    mm.add_entity_parser::<YellowBlocks>();
    mm.add_entity_parser::<TowerViewer>();
    mm.add_entity_parser::<Cobweb>();
    mm.add_entity_parser::<InfiniteStar>();
    mm.add_entity_parser::<Torch>();
    mm.add_entity_parser::<ColorSwitch>();
    mm.add_entity_parser::<CliffFlag>();
    mm.add_entity_parser::<Lamp>();
    mm.add_entity_parser::<PowerSourceNumber>();
    mm.add_entity_parser::<Bridge>();
    mm.add_entity_parser::<CrushBlock>();
    mm.add_entity_parser::<TrackSpinner>();
    mm.add_entity_parser::<Gondola>();

    add_unit_entity_parsers(mm);
}

use vanilla_entities::*;

#[allow(missing_docs)]
pub mod vanilla_entities {
    use super::*;


    #[derive(Debug, Entity)]
    #[name = "spikesUp"]
    pub struct SpikesUp {
        #[name = "type"]
        pub kind: Option<ResolvableString>,
    }
    #[derive(Debug, Entity)]
    #[name = "spikesDown"]
    pub struct SpikesDown {
        #[name = "type"]
        pub kind: Option<ResolvableString>,
    }

    #[derive(Debug, Entity)]
    #[name = "spikesLeft"]
    pub struct SpikesLeft {
        #[name = "type"]
        pub kind: Option<ResolvableString>,
    }

    #[derive(Debug, Entity)]
    #[name = "spikesRight"]
    pub struct SpikesRight {
        #[name = "type"]
        pub kind: Option<ResolvableString>,
    }


    #[derive(Debug, Entity)]
    #[name = "jumpThru"]
    pub struct JumpThru {
        #[name = "texture"]
        pub texture: Option<ResolvableString>,
    }

    #[derive(Debug, Entity)]
    #[name = "wire"]
    pub struct Wire {
        #[name = "above"]
        pub above: bool,
        pub to: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "strawberry"]
    pub struct Strawberry {
        #[name = "winged"]
        pub winged: bool,
        #[name = "checkpointID"]
        pub checkpoint_id: Integer,
        #[name = "order"]
        pub order: Option<Integer>,
    }

    #[derive(Debug, Entity)]
    #[name = "lightbeam"]
    pub struct Lightbeam {
        #[name = "rotation"]
        pub rotation: Integer,
        #[name = "flag"]
        pub flag: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "cassette"]
    pub struct Cassette {
        #[node]
        pub bubble_points: Vec<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "cassetteBlock"]
    pub struct CassetteBlock {
        #[name = "index"]
        pub index: Integer,
        #[name = "finishedState"]
        pub finished_state: Option<bool>,
    }

    #[derive(Debug, Entity)]
    #[name = "dashBlock"]
    pub struct DashBlock {
        #[name = "permanent"]
        pub permanent: bool,
        #[name = "tiletype"]
        pub tile_type: Character,
        #[name = "blendin"]
        pub blend_in: bool,
        #[name = "canDash"]
        pub can_dash: bool,
    }
    #[derive(Debug, Entity)]
    #[name = "bonfire"]
    pub struct Bonfire {
        #[name = "mode"]
        pub mode: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "npc"]
    pub struct NPC {
        #[name = "npc"]
        pub npc: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "coverupWall"]
    pub struct CoverupWall {
        #[name = "tiletype"]
        pub tile_type: Character,
    }

    #[derive(Debug, Entity)]
    #[name = "memorial"]
    pub struct Memorial {
        #[name = "dreaming"]
        pub dreaming: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "birdForsakenCityGem"]
    pub struct BirdForsakenCityGem {
        #[node]
        pub nodes: Vec<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "fallingBlock"]
    pub struct FallingBlock {
        #[name = "tiletype"]
        pub tile_type: Character,
        #[name = "behind"]
        pub behind: Option<bool>,
        #[name = "climbFall"]
        pub climb_fall: Option<bool>,
    }

    #[derive(Debug, Entity)]
    #[name = "fakeWall"]
    pub struct FakeWall {
        #[name = "tiletype"]
        pub tile_type: Character,
        #[name = "playTransitionReveal"]
        pub play_transition_reveal: Option<bool>,
    }

    #[derive(Debug, Entity)]
    #[name = "spring"]
    pub struct Spring {
        #[name = "playerCanUse"]
        pub player_can_use: Option<bool>,
    }

    #[derive(Debug, Entity)]
    #[name = "zipMover"]
    pub struct ZipMover {
        #[name = "theme"]
        pub theme: Option<ResolvableString>,
        pub to: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "refill"]
    pub struct Refill {
        #[name = "twoDash"]
        pub two_dash: Option<bool>,
        #[name = "oneUse"]
        pub one_use: Option<bool>,
    }

    unit_entities! {
        Player, "player",
        GoldenBerry, "goldenBerry",
        CrumbleBlock, "crumbleBlock",
        Checkpoint, "checkpoint",
        WingedGoldenStrawberry, "memorialTextController",
        FlutterBird, "flutterbird",
        Plateau, "plateau",
        Payphone, "payphone",
        WavedashMachine, "wavedashmachine",
        PlaybackBillboard, "playbackBillboard",
        SinkingPlatform, "sinkingPlatform",
        PlayerSeeker, "playerSeeker",
        PICOConsole, "picoconsole",
        DarkChaser, "darkChaser",
        ResortRoofEnding, "resortRoofEnding",
        FireBarrier, "fireBarrier",
        TriggerSpikesUp, "triggerSpikesUp",
        TriggerSpikesDown, "triggerSpikesDown",
        IceBlock, "iceBlock",
        Waterfall, "waterfall",
        BounceBlock, "bounceBlock",
        ResortLantern, "resortLantern",
        KillBox, "killbox",
        TouchSwitch, "touchSwitch",
        ClutterCabinet, "clutterCabinet",
        TheoCrystal, "theoCrystal",
        BlockField, "blockField",
        InvisibleBarrier, "invisibleBarrier",
        TempleMirrorPortal, "templeMirrorPortal",
        TriggerSpikesRight, "triggerSpikesRight",
        BridgeFixed, "bridgeFixed",
        IntroCar, "introCar",
        ForegroundDebris, "foregroundDebris",
        OshiroDoor, "oshirodoor",
        TheoCrystalHoldingBarrier, "theoCrystalHoldingBarrier",
        TempleEye, "templeEye",
        TheoCrystalPedestal, "theoCrystalPedestal",
        FloatingDebris, "floatingDebris",
        TriggerSpikesLeft, "triggerSpikesLeft",
        KevinsPC, "kevins_pc",
        SandwichLava, "sandwichLava",
        Trapdoor, "trapdoor",
        SummitCloud, "summitcloud",
        FriendlyGhost, "friendlyGhost",
        FinalBossFallingBlock, "finalBossFallingBlock",
        DreamMirror, "dreammirror",
        SeekerBarrier, "seekerBarrier",
        TempleBigEyeball, "templeBigEyeball",
        ResortMirror, "resortmirror",
        WhiteBlock, "whiteblock",
        HangingLamp, "hanginglamp"
    }

    #[derive(Debug, Entity)]
    #[name = "tentacles"]
    pub struct Tentacles {
        #[name = "fear_distance"]
        pub fear_distance: ResolvableString,
        #[name = "slide_until"]
        pub slide_until: u8,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "glider"]
    pub struct Glider {
        #[name = "bubble"]
        pub bubble: bool,
        #[name = "tutorial"]
        pub tutorial: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "flingBirdIntro"]
    pub struct FlingBirdIntro {
        #[name = "crashes"]
        pub crashes: bool,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "exitBlock"]
    pub struct ExitBlock {
        #[name = "tileType"]
        pub tiletype: Character,
    }

    #[derive(Debug, Entity)]
    #[name = "templeCrackedBlock"]
    pub struct TempleCrackedBlock {
        #[name = "persistent"]
        pub persistent: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "clothesline"]
    pub struct Clothesline {
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "redBlocks"]
    pub struct RedBlocks {
        #[name = "inverted"]
        pub inverted: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "door"]
    pub struct Door {
        #[name = "type"]
        pub kind: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "dashSwitchV"]
    pub struct DashSwitchV {
        #[name = "ceiling"]
        pub ceiling: bool,
        #[name = "persistent"]
        pub persistent: bool,
        #[name = "sprite"]
        pub sprite: ResolvableString,
        #[name = "allGates"]
        pub allgates: Option<bool>,
    }

    #[derive(Debug, Entity)]
    #[name = "spinner"]
    pub struct Spinner {
        #[name = "attachToSolid"]
        pub attachtosolid: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "conditionBlock"]
    pub struct ConditionBlock {
        #[name = "tileType"]
        pub tiletype: ResolvableString,
        #[name = "condition"]
        pub condition: ResolvableString,
        #[name = "conditionID"]
        pub conditionid: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "floatySpaceBlock"]
    pub struct FloatySpaceBlock {
        #[name = "tiletype"]
        pub tiletype: Character,
        #[name = "disableSpawnOffset"]
        pub disablespawnoffset: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "soundSource"]
    pub struct SoundSource {
        #[name = "sound"]
        pub sound: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "lockBlock"]
    pub struct LockBlock {
        #[name = "stepMusicProgress"]
        pub stepmusicprogress: bool,
        #[name = "sprite"]
        pub sprite: ResolvableString,
        #[name = "unlock_sfx"]
        pub unlock_sfx: Option<ResolvableString>,
    }

    #[derive(Debug, Entity)]
    #[name = "seeker"]
    pub struct Seeker {
        #[node]
        pub node: Option<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "dashSwitchH"]
    pub struct DashSwitchH {
        #[name = "leftSide"]
        pub leftside: bool,
        #[name = "persistent"]
        pub persistent: bool,
        #[name = "sprite"]
        pub sprite: ResolvableString,
        #[name = "allGates"]
        pub allgates: Option<bool>,
    }

    #[derive(Debug, Entity)]
    #[name = "summitcheckpoint"]
    pub struct SummitCheckpoint {
        #[name = "number"]
        pub number: u8,
    }


    #[derive(Debug, Entity)]
    #[name = "summitgem"]
    pub struct SummitGem {
        #[name = "gem"]
        pub gem: u8,
    }

    #[derive(Debug, Entity)]
    #[name = "summitGemManager"]
    pub struct SummitGemManager {
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "fireBall"]
    pub struct FireBall {
        #[name = "amount"]
        pub amount: u8,
        #[name = "offset"]
        pub offset: Float,
        #[name = "speed"]
        pub speed: Float,
        #[name = "notCoreMode"]
        pub notcoremode: Option<bool>,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "flingBird"]
    pub struct FlingBird {
        #[name = "waiting"]
        pub waiting: bool,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "coreModeToggle"]
    pub struct CoreModeToggle {
        #[name = "onlyFire"]
        pub onlyfire: bool,
        #[name = "onlyIce"]
        pub onlyice: bool,
        #[name = "persistent"]
        pub persistent: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "heartGemDoor"]
    pub struct HeartGemDoor {
        #[name = "requires"]
        pub requires: u8,
        #[name = "startHidden"]
        pub starthidden: Option<bool>,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "eyebomb"]
    pub struct Eyebomb {
        #[name = "right"]
        pub right: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "templeGate"]
    pub struct TempleGate {
        #[name = "type"]
        pub kind: ResolvableString,
        #[name = "sprite"]
        pub sprite: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "playbackTutorial"]
    pub struct PlaybackTutorial {
        #[name = "tutorial"]
        pub tutorial: ResolvableString,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "starJumpBlock"]
    pub struct StarJumpBlock {
        #[name = "sinks"]
        pub sinks: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "seekerStatue"]
    pub struct SeekerStatue {
        #[name = "hatch"]
        pub hatch: ResolvableString,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "finalBoss"]
    pub struct FinalBoss {
        #[name = "patternIndex"]
        pub patternindex: u8,
        #[name = "cameraPastY"]
        pub camerapasty: u8,
        #[name = "dialog"]
        pub dialog: bool,
        #[name = "startHit"]
        pub starthit: bool,
        #[name = "cameraLockY"]
        pub cameralocky: bool,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "cloud"]
    pub struct Cloud {
        #[name = "fragile"]
        pub fragile: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "bigWaterfall"]
    pub struct BigWaterfall {
        #[name = "layer"]
        pub layer: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "wallSpringLeft"]
    pub struct WallSpringLeft {
        #[name = "playerCanUse"]
        pub playercanuse: Option<bool>,
    }


    #[derive(Debug, Entity)]
    #[name = "coreMessage"]
    pub struct CoreMessage {
        #[name = "line"]
        pub line: u8,
    }

    #[derive(Debug, Entity)]
    #[name = "introCrusher"]
    pub struct IntroCrusher {
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "key"]
    pub struct Key {
        #[node]
        pub node: Option<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "hahaha"]
    pub struct HaHaHa {
        #[name = "ifset"]
        pub ifset: ResolvableString,
        #[name = "triggerLaughSfx"]
        pub triggerlaughsfx: bool,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "badelineBoost"]
    pub struct BadelineBoost {
        #[name = "lockCamera"]
        pub lockcamera: bool,
        #[name = "canSkip"]
        pub canskip: Option<bool>,
        #[name = "finalCh9Boost"]
        pub finalch9boost: Option<bool>,
        #[name = "finalCh9GoldenBoost"]
        pub finalch9goldenboost: Option<bool>,
        #[name = "finalCh9Dialog"]
        pub finalch9dialog: Option<bool>,
        #[node]
        pub node: Option<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "wallSpringRight"]
    pub struct WallSpringRight {
        #[name = "playerCanUse"]
        pub playercanuse: Option<bool>,
    }

    #[derive(Debug, Entity)]
    #[name = "crumbleWallOnRumble"]
    pub struct CrumbleWallOnRumble {
        #[name = "blendin"]
        pub blendin: bool,
        #[name = "persistent"]
        pub persistent: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "risingLava"]
    pub struct RisingLava {
        #[name = "intro"]
        pub intro: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "greenBlocks"]
    pub struct GreenBlocks {
        #[name = "inverted"]
        pub inverted: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "lightningBlock"]
    pub struct LightningBlock {
        #[name = "flag"]
        pub flag: bool,
        #[name = "music"]
        pub music: ResolvableString,
        #[name = "music_progress"]
        pub music_progress: Integer,
        #[name = "music_session"]
        pub music_session: Option<bool>,
        #[name = "flipX"]
        pub flipx: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "birdPath"]
    pub struct BirdPath {
        #[name = "only_once"]
        pub only_once: bool,
        #[name = "onlyIfLeft"]
        pub onlyifleft: bool,
        #[name = "speedMult"]
        pub speedmult: Option<Float>,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "cutsceneNode"]
    pub struct CutsceneNode {
        #[name = "nodeName"]
        pub nodename: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "clutterDoor"]
    pub struct ClutterDoor {
        #[name = "type"]
        pub kind: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "bigSpinner"]
    pub struct BigSpinner {
        #[node]
        pub node: Option<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "cliffside_flag"]
    pub struct CliffsideFlag {
        #[name = "index"]
        pub index: u8,
    }

    #[derive(Debug, Entity)]
    #[name = "ridgeGate"]
    pub struct RidgeGate {
        #[name = "strawberries"]
        pub strawberries: ResolvableString,
        #[name = "keys"]
        pub keys: ResolvableString,
        #[node]
        pub node: Option<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "swapBlock"]
    pub struct SwapBlock {
        #[name = "theme"]
        pub theme: Option<ResolvableString>,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "movingPlatform"]
    pub struct MovingPlatform {
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "switchGate"]
    pub struct SwitchGate {
        #[name = "persistent"]
        pub persistent: bool,
        #[name = "sprite"]
        pub sprite: Option<ResolvableString>,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "blackGem"]
    pub struct BlackGem {
        #[name = "removeCameraTriggers"]
        pub removecameratriggers: Option<bool>,
        #[name = "fake"]
        pub fake: Option<bool>,
    }

    #[derive(Debug, Entity)]
    #[name = "SummitBackgroundManager"]
    pub struct SummitBackgroundManager {
        #[name = "index"]
        pub index: Integer,
        #[name = "intro_launch"]
        pub intro_launch: bool,
        #[name = "cutscene"]
        pub cutscene: Option<ResolvableString>,
        #[name = "dark"]
        pub dark: Option<bool>,
        #[name = "ambience"]
        pub ambience: Option<ResolvableString>,
    }

    #[derive(Debug, Entity)]
    #[name = "templeMirror"]
    pub struct TempleMirror {
        #[name = "reflectX"]
        pub reflectx: Integer,
        #[name = "reflectY"]
        pub reflecty: u8,
    }

    #[derive(Debug, Entity)]
    #[name = "moveBlock"]
    pub struct MoveBlock {
        #[name = "direction"]
        pub direction: ResolvableString,
        #[name = "canSteer"]
        pub cansteer: bool,
        #[name = "fast"]
        pub fast: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "dreamBlock"]
    pub struct DreamBlock {
        #[name = "fastMoving"]
        pub fastmoving: Option<bool>,
        #[name = "oneUse"]
        pub oneuse: Option<bool>,
        #[name = "below"]
        pub below: Option<bool>,
        #[node]
        pub node: Option<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "wallBooster"]
    pub struct WallBooster {
        #[name = "left"]
        pub left: bool,
        #[name = "notCoreMode"]
        pub notcoremode: Option<bool>,
    }

    #[derive(Debug, Entity)]
    #[name = "water"]
    pub struct Water {
        #[name = "steamy"]
        pub steamy: bool,
        #[name = "hasBottom"]
        pub hasbottom: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "lightning"]
    pub struct Lightning {
        #[name = "perLevel"]
        pub perlevel: bool,
        #[name = "moveTime"]
        pub movetime: Float,
        #[node]
        pub node: Option<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "moonCreature"]
    pub struct MoonCreature {
        #[name = "number"]
        pub number: u8,
    }

    #[derive(Debug, Entity)]
    #[name = "finalBossMovingBlock"]
    pub struct FinalBossMovingBlock {
        #[name = "nodeIndex"]
        pub nodeindex: u8,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "rotateSpinner"]
    pub struct RotateSpinner {
        #[name = "clockwise"]
        pub clockwise: bool,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "booster"]
    pub struct Booster {
        #[name = "red"]
        pub red: bool,
        #[name = "ch9_hub_booster"]
        pub ch9_hub_booster: Option<bool>,
    }

    #[derive(Debug, Entity)]
    #[name = "bird"]
    pub struct Bird {
        #[name = "mode"]
        pub mode: ResolvableString,
        #[name = "onlyOnce"]
        pub onlyonce: Option<bool>,
        #[name = "onlyIfPlayerLeft"]
        pub onlyifplayerleft: Option<bool>,
        #[node]
        pub node: Option<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "reflectionHeartStatue"]
    pub struct ReflectionHeartStatue {
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "yellowBlocks"]
    pub struct YellowBlocks {
        #[name = "inverted"]
        pub inverted: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "towerviewer"]
    pub struct TowerViewer {
        #[name = "summit"]
        pub summit: Option<bool>,
        #[name = "onlyY"]
        pub onlyy: Option<bool>,
        #[node]
        pub node: Option<Node>,
    }

    #[derive(Debug, Entity)]
    #[name = "cobweb"]
    pub struct Cobweb {
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "infiniteStar"]
    pub struct InfiniteStar {
        #[name = "shielded"]
        pub shielded: bool,
        #[name = "singleUse"]
        pub singleuse: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "torch"]
    pub struct Torch {
        #[name = "startLit"]
        pub startlit: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "colorSwitch"]
    pub struct ColorSwitch {
        #[name = "type"]
        pub kind: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "cliffflag"]
    pub struct CliffFlag {
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "lamp"]
    pub struct Lamp {
        #[name = "broken"]
        pub broken: bool,
    }

    #[derive(Debug, Entity)]
    #[name = "powerSourceNumber"]
    pub struct PowerSourceNumber {
        #[name = "number"]
        pub number: u8,
        #[name = "strawberries"]
        pub strawberries: ResolvableString,
        #[name = "keys"]
        pub keys: ResolvableString,
    }

    #[derive(Debug, Entity)]
    #[name = "bridge"]
    pub struct Bridge {
        #[node]
        pub node: Node,
    }


    #[derive(Debug, Entity)]
    #[name = "crushBlock"]
    pub struct CrushBlock {
        #[name = "axes"]
        pub axes: ResolvableString,
        #[name = "chillout"]
        pub chillout: bool,
    }


    #[derive(Debug, Entity)]
    #[name = "trackSpinner"]
    pub struct TrackSpinner {
        #[name = "startCenter"]
        pub startcenter: bool,
        #[name = "speed"]
        pub speed: ResolvableString,
        #[node]
        pub node: Node,
    }

    #[derive(Debug, Entity)]
    #[name = "gondola"]
    pub struct Gondola {
        #[name = "active"]
        pub active: bool,
        #[node]
        pub node: Node,
    }
}