Module veloren_common_net::synced_components

source ·
Expand description

Contains an “x macro” for all synced components as well as NetSync implementations for those components.

An x macro accepts another macro as input and calls it with a list of inputs. This allows adding components to the list in the x macro declaration and then writing macros that will accept this list and generate code that handles every synced component without further repitition of the component set.

This module also re-exports all the component types that are synced.

A glob import from this can be used so that the component types are in scope when using the x macro defined here which requires this.

Modules§

Macros§

Structs§

  • Component holding all auras emitted by an entity.
  • Component holding all de/buffs that gets resolved each tick. On each tick, remaining time of buffs get lowered and buff effect of each buff is applied or not, depending on the BuffEffect (specs system will decide based on BuffEffect, to simplify implementation). TODO: Something like once flag for Buff to remove the dependence on BuffEffect enum?
  • Contains information about the visual activity of a character.
  • The average density (specific mass) of an entity. Units used for reference is kg/m³
  • Energy is represented by u32s within the module, but treated as a float by the rest of the game.
  • Health is represented by u32s within the module, but treated as a float by the rest of the game.
  • NOTE: Do not add a PartialEq instance for Inventory; that’s broken!
  • Poise is represented by u32s within the module, but treated as a float by the rest of the game.
  • Contains all of a player’s skill groups and skills. Provides methods for manipulating assigned skills and skill groups including unlocking skills, refunding skills etc.

Enums§

Type Aliases§