boolio
This commit is contained in:
parent
7a03b079d8
commit
17a7e7b738
@ -3,22 +3,19 @@ use super::integer::{Time,Planar64,Planar64Vec3};
|
||||
#[binrw::binrw]
|
||||
#[brw(little)]
|
||||
pub struct ContactingLadder{
|
||||
pub sticky:Option<()>,
|
||||
pub sticky:super::common::Boolio,
|
||||
}
|
||||
impl Into<strafesnet_common::gameplay_attributes::ContactingLadder> for ContactingLadder{
|
||||
fn into(self)->strafesnet_common::gameplay_attributes::ContactingLadder{
|
||||
strafesnet_common::gameplay_attributes::ContactingLadder{
|
||||
sticky:self.sticky.is_some(),
|
||||
sticky:self.sticky.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<strafesnet_common::gameplay_attributes::ContactingLadder> for ContactingLadder{
|
||||
fn from(value:strafesnet_common::gameplay_attributes::ContactingLadder)->Self{
|
||||
Self{
|
||||
sticky:match value.sticky{
|
||||
true=>Some(()),
|
||||
false=>None,
|
||||
}
|
||||
sticky:value.sticky.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,13 +41,13 @@ pub struct StageElement{
|
||||
pub stage_id:u32,//which stage spawn to send to
|
||||
pub behaviour:StageElementBehaviour,
|
||||
pub jump_limit:Option<u8>,
|
||||
pub force:Option<()>,//allow setting to lower spawn id i.e. 7->3
|
||||
pub force:super::common::Boolio,//allow setting to lower spawn id i.e. 7->3
|
||||
}
|
||||
impl Into<strafesnet_common::gameplay_modes::StageElement> for StageElement{
|
||||
fn into(self)->strafesnet_common::gameplay_modes::StageElement{
|
||||
strafesnet_common::gameplay_modes::StageElement::new(
|
||||
strafesnet_common::gameplay_modes::StageId::new(self.stage_id),
|
||||
self.force.is_some(),
|
||||
self.force.into(),
|
||||
self.behaviour.into(),
|
||||
self.jump_limit,
|
||||
)
|
||||
@ -59,7 +59,7 @@ impl From<strafesnet_common::gameplay_modes::StageElement> for StageElement{
|
||||
stage_id:value.stage_id().get(),
|
||||
behaviour:value.behaviour().into(),
|
||||
jump_limit:value.jump_limit(),
|
||||
force:match value.force(){true=>Some(()),false=>None},
|
||||
force:value.force().into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user