mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
add ptt, mute_in/out
This commit is contained in:
parent
f109eb83cd
commit
42d35a47ea
6 changed files with 69 additions and 24 deletions
|
@ -1,7 +1,7 @@
|
|||
use std::num::NonZero;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::{GameEffectData, PeerId, SpawnOnce, WorldPos};
|
||||
use crate::{GameEffectData, GameEffectEnum, PeerId, SpawnOnce, WorldPos};
|
||||
use bitcode::{Decode, Encode};
|
||||
|
||||
pub const REQUEST_AUTHORITY_RADIUS: i32 = 400;
|
||||
|
@ -118,6 +118,19 @@ pub struct EntityInfo {
|
|||
pub counter: u8, //for mom orbs/dragon has death script/etc
|
||||
pub synced_var: Vec<(String, String, i32, f32, bool)>,
|
||||
}
|
||||
|
||||
impl EntityInfo {
|
||||
pub fn is_charmed(&self, is_cent: bool) -> bool {
|
||||
if is_cent {
|
||||
self.is_enabled
|
||||
} else {
|
||||
self.game_effects
|
||||
.iter()
|
||||
.any(|e| e == &GameEffectData::Normal(GameEffectEnum::Charm))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO authority transfers should serialize entities probably
|
||||
#[derive(Encode, Decode, Clone)]
|
||||
pub enum EntityUpdate {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue