pub enum HealthSystem {
None = 0,
Simple = 1,
Basic = 2,
Advanced = 3,
Full = 4,
}Expand description
Complexity level of the health/survival system.
Mapped from the healthsystem= field in game.inf.
Variants§
None = 0
No health system — player cannot die.
Simple = 1
Simple health only.
Basic = 2
Health + hunger.
Advanced = 3
Health + hunger + thirst.
Full = 4
Health + hunger + thirst + exhaustion.
Implementations§
Source§impl HealthSystem
impl HealthSystem
Sourcepub fn from_inf(n: u32) -> HealthSystem
pub fn from_inf(n: u32) -> HealthSystem
Parse a health system value from .inf files.
Trait Implementations§
Source§impl Clone for HealthSystem
impl Clone for HealthSystem
Source§fn clone(&self) -> HealthSystem
fn clone(&self) -> HealthSystem
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 HealthSystem
Source§impl Debug for HealthSystem
impl Debug for HealthSystem
Source§impl Default for HealthSystem
impl Default for HealthSystem
Source§fn default() -> HealthSystem
fn default() -> HealthSystem
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HealthSystem
impl<'de> Deserialize<'de> for HealthSystem
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HealthSystem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HealthSystem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HealthSystem
Source§impl PartialEq for HealthSystem
impl PartialEq for HealthSystem
Source§impl Serialize for HealthSystem
impl Serialize for HealthSystem
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for HealthSystem
Auto Trait Implementations§
impl Forget for HealthSystem
impl Freeze for HealthSystem
impl Move for HealthSystem
impl RefUnwindSafe for HealthSystem
impl Send for HealthSystem
impl Sync for HealthSystem
impl Unpin for HealthSystem
impl UnsafeUnpin for HealthSystem
impl UnwindSafe for HealthSystem
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