Cargo Features

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

[dependencies]
screeps-game-api = { version = "0.20.1", features = ["generate-pixel", "inter-shard-memory", "seasonal-season-1", "seasonal-season-2", "seasonal-season-5", "sim", "unsafe-return-conversion", "mmo"] }
generate-pixel mmo?

Specific features to enable conditional API endpoints
Enable the function call for pixel generation - only present on official MMO servers

Affects cpu::generate_pixel

inter-shard-memory mmo?

Enable the interface for inter-shard memory - only present on official MMO servers

Affects 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

mmo = generate-pixel, inter-shard-memory

Sets of the above features for different server environments
Official MMO server features, not present on other environments