pub struct WorldRules {
pub survival: bool,
pub gathering: bool,
pub combat: bool,
}Expand description
Opt-in game mechanics a world enforces. Default all off — the browser ships these as capabilities; a place turns on only what it needs (like a page opting into pointer lock). Interact/inspect are always available and are NOT gated here — only the game-y mechanics are.
Fields§
§survival: boolSurvival meters (hunger/…) decay and can harm the visitor.
gathering: boolHarvestable resource nodes can be gathered.
combat: boolOffensive combat is allowed.
Trait Implementations§
Source§impl Clone for WorldRules
impl Clone for WorldRules
Source§fn clone(&self) -> WorldRules
fn clone(&self) -> WorldRules
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WorldRules
Source§impl Debug for WorldRules
impl Debug for WorldRules
Source§impl Default for WorldRules
impl Default for WorldRules
Source§fn default() -> WorldRules
fn default() -> WorldRules
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WorldRules
impl<'de> Deserialize<'de> for WorldRules
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for WorldRules
Source§impl PartialEq for WorldRules
impl PartialEq for WorldRules
Source§impl Serialize for WorldRules
impl Serialize for WorldRules
impl StructuralPartialEq for WorldRules
Auto Trait Implementations§
impl Freeze for WorldRules
impl RefUnwindSafe for WorldRules
impl Send for WorldRules
impl Sync for WorldRules
impl Unpin for WorldRules
impl UnsafeUnpin for WorldRules
impl UnwindSafe for WorldRules
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more