Cargo Features

screeps-game-api has no features set by default.

[dependencies]
screeps-game-api = { version = "0.22.0", features = ["mmo", "seasonal-season-1", "seasonal-season-2", "seasonal-season-5", "sim", "unsafe-return-conversion"] }
mmo

Specific features to enable conditional API endpoints
Official MMO server features, not present on other environments

Affects cpu::shard_limits, cpu::unlocked, cpu::unlocked_time, cpu::set_shard_limits, cpu::unlock, cpu::generate_pixel, screeps-game-api::inter_shard_memory

seasonal-season-1

Seasonal server, season 1 - enable score container, collector, and resource

Affects seasonal::season_1

seasonal-season-2

Seasonal server, season 2 - enable symbol container, decoder, and resources

Affects seasonal::season_2, game::score, game::symbols

seasonal-season-5

Seasonal server, season 5 - enable thorium resource and reactor structure

Affects seasonal::season_5

sim

enable compatibility with the sim environment for positions

unsafe-return-conversion

Enable unsafe conversions of return codes with undefined behavior when values aren't in the expected range