Crate game_features[][src]

Expand description

A crate providing advanced and general features for games. It can be used just as much for simple ascii games than for full distributed mmorpg games.

Structs

EffectorDefinition

The definition of a stat effector. This modifies temporarily the value of a stat.

EffectorDefinitions

Holds the definitions of the stat effectors.

EffectorInstance

An active instance of an effector.

EffectorSet

A collection of currently active effectors.

Faction

A team with the ability to claim ownership over terrain. WIP

FactionFlags

Fags that modify how a faction behaves and how the claimed terrain behaves.

FactionSettings

Settings of the faction module.

Inventory

Generics

InventoryBuilder

Builder for Inventory.

ItemDefinition

An ItemDefinition stores the different properties of a type of item. It is a schema that contains the data which isn’t changing between different item instances.

ItemDefinitionBuilder

Builder for ItemDefinition.

ItemDefinitions

A simple repository mapping the key K to the corresponding ItemDefinition.

ItemInstance

An ItemInstance is a stack of item. It refers to the ItemDefinition’s key. The associated ItemDefinition contains the data describing that object type. An item stack can be composed of one or many of the same item. It can also have a durability, which decreases when the item is used using Inventory::use_item.

ItemInstanceBuilder

Builder for ItemInstance.

ItemTransitionBatch

A transition in progress.

ItemTransitionDefinition

A transition from one or more items into one or more different items. Can be used for all sorts of crafting.

ItemTransitionDefinitionBuilder

Builder for ItemTransitionDefinition.

ItemTransitionDefinitions

The definitions of all known stats.

LandClaimSettings

The settings related to terrain claiming and how the world is divided into claimable chunks.

Leveled

A levelable element. It can be anything: an item, a player, a monster, a skill.

LootTree

A loot tree based on the lower partial function construct. Each loot tree node has a chance associated with it.

LootTreeBuilder

A builder for the LootTree.

LootTreeNode

A weighted node of a loot tree with the corresponding result.

SkillDefinition

The definition of an usable skill.

SkillDefinitionBuilder

Builder for SkillDefinition.

SkillDefinitions

Holds the definitions of all known skills.

SkillInstance

An instance of a skill. There is one per skill per entity that can use it. Holds the cooldown for each skill.

SkillSet

The set of skill that can be used by an entity.

StatCondition

Condition based on a stat to activate something.

StatDefinition

The definition of a stat. A stat is a named float value optionally constrained between two other values and with a default value. It is used to create effects, conditions and in general to hold state for each entity. For example, it can be used to contain the health or mana of an entity just as well as it can be used to keep track of the number of enemies positioned around an entity.

StatDefinitionBuilder

Builder for StatDefinition.

StatDefinitions

The definitions of all known stats.

StatInstance

An instance of a stat. Contains a base value as well as a value after applying the stat effectors.

StatInstanceBuilder

Builder for StatInstance.

StatSet

Holds the instances of all the stats an entity has.

Tiered

Tiered element. Simply adds a numerical value to any element.

Unlockable

An unlockable element. It can be unlocked to access the inner value if all conditions are met:

UnlockableBuilder

Builder for Unlockable.

Unlockables

A structure holding all unlockables.

User

Base struct for the user of a game.

UserGroup

A clan. This is a group of multiple users.

UserGroupSettings

The settings of user groups.

Enums

ConditionLostReaction

What happens when the transition is stopped or conditions aren’t met anymore for it to continue.

EffectorType

The way this effector modifies the stat.

FactionError

Errors that can occur while using factions.

InventorySizingMode

The way the inventory size is handled.

ItemError

The different errors that can happen when interacting with the Inventory.

MoveToFrontMode

The way items are removed from the inventory. Indicates if empty spots are left, and if not, how to fill them.

StatConditionType

A condition based on a stat’s value.

UseMode

The way items are used in a transition.

Traits

LevelFor

A trait that can calculate the level for something that can accumulate experience. We suggest using PartialFunction when implementing this trait.

SlotType

A trait defining which items can be inserted into each inventory slot type.

Type Definitions

FactionRepository

Alias type. List of all known factions.

FactionResult

Alias type. Result of faction methods that can fail.

UserRepository

The list of all known users.