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
//! Screeps object wrappers.
//!
//! Objects types that inherit [`RoomObject`] represent game objects with are
//! valid to be used only during the current tick; reading or writing a 'stale'
//! game object from a past tick will result in undefined behavior.
mod impls;

pub use event::*;
pub use game_types::*;
pub use input::*;
pub use output::*;
pub use room_objects::*;
pub use visual::*;

/// Object wrappers representing data retrieved from room event logs.
pub mod event {
    pub use super::impls::{
        AttackEvent, AttackType, BuildEvent, Event, EventType, ExitEvent, HarvestEvent, HealEvent,
        HealType, ObjectDestroyedEvent, PowerEvent, RepairEvent, ReserveControllerEvent,
        TransferEvent, UpgradeControllerEvent,
    };
}

/// Object wrappers for game types that are not room objects (are safe to use
/// in future ticks).
mod game_types {
    pub use super::impls::{CostMatrix, RoomPosition, RoomTerrain};
}

/// Object wrappers for simple javascript objects with known properties sent to
/// game functions.
pub mod input {
    pub use super::impls::{FindPathOptions, JsFindPathOptions, MoveToOptions};
}

/// Object wrappers for simple javascript objects with known properties returned
/// by game functions.
pub mod output {
    pub use super::impls::{
        AccountPowerCreep, BodyPart, Effect, InterShardPortalDestination, Owner, Path,
        PortalDestination, PowerInfo, Reservation, Sign, SpawnOptions, Step,
    };
}

/// Object wrappers for room objects.
mod room_objects {
    pub use super::impls::{
        ConstructionSite, Creep, Deposit, Flag, Mineral, Nuke, OwnedStructure, PowerCreep,
        Resource, Room, RoomObject, Ruin, Source, Spawning, Store, Structure, StructureContainer,
        StructureController, StructureExtension, StructureExtractor, StructureFactory,
        StructureInvaderCore, StructureKeeperLair, StructureLab, StructureLink, StructureNuker,
        StructureObserver, StructurePortal, StructurePowerBank, StructurePowerSpawn,
        StructureRampart, StructureRoad, StructureSpawn, StructureStorage, StructureTerminal,
        StructureTower, StructureWall, Tombstone,
    };

    #[cfg(feature = "seasonal-season-1")]
    pub use super::impls::{ScoreCollector, ScoreContainer};

    #[cfg(feature = "seasonal-season-2")]
    pub use super::impls::{SymbolContainer, SymbolDecoder};

    #[cfg(feature = "seasonal-season-5")]
    pub use super::impls::Reactor;
}

/// Object wrappers allowing drawing of shapes in rooms or on the map in the
/// game world.
pub mod visual {
    pub use super::impls::{
        CircleStyle, FontStyle, LineDrawStyle, LineStyle, MapFontStyle, MapFontVariant,
        MapTextStyle, MapVisual, MapVisualShape, PolyStyle, RectStyle, RoomVisual, TextAlign,
        TextStyle, Visual,
    };
}