Crate rustorio_engine

Crate rustorio_engine 

Source
Expand description

The core engine for Rustorio. Only relevant if you are writing a mod for Rustorio. A save file depending on this crate has access to some APIs that make it trivial to cheat, which can be great for testing and debugging, but removes the challenge. To play the game, depend on the rustorio crate instead.

For more information, see the repo.

Re-exports§

pub use crate::resources::ResourceType;
pub use crate::resources::bundle;
pub use crate::resources::resource;

Modules§

gamemodes
A game mode defines the starting resources and victory conditions for a game.
machine
Basic machine that can process recipes. Mods are encouraged to not export this, and instead define their own wrappers like
mod_reexports
These are the items that a player should have direct access to. Should be glob reexported at the top level of mods.
recipe
Recipes define all item transformations in the game via input items, output items, and time.
research
Technologies can be unlocked by consuming science packs. They usually unlock new recipes or further technologies.
resources
Resources are the fundamental units of value in Rustorio. Resources are held in either Resource or Bundle objects. Bundle objects are used to hold a fixed amount of a resource, while Resource objects can hold any amount.

Macros§

resource_type
Macro to define a new resource type.

Traits§

Sealed
A trait to prevent players from implementing certain traits. Should not be reexported in mods.

Functions§

play
Runs your play. If it is run multiple times, it will panic. This is to prevent using multiple threads to cheat.