mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fmt
This commit is contained in:
parent
798e9d7cd7
commit
0c0f150140
@ -7,11 +7,7 @@ pub enum DayPeriod {
|
||||
}
|
||||
|
||||
impl DayPeriod {
|
||||
pub fn is_dark(&self) -> bool {
|
||||
*self == DayPeriod::Night
|
||||
}
|
||||
pub fn is_dark(&self) -> bool { *self == DayPeriod::Night }
|
||||
|
||||
pub fn is_light(&self) -> bool {
|
||||
!self.is_dark()
|
||||
}
|
||||
pub fn is_light(&self) -> bool { !self.is_dark() }
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
use crate::{sys, Server, StateExt};
|
||||
use common::{
|
||||
comp::{
|
||||
self, Agent, Alignment, Body, Gravity, Item, ItemDrop, LightEmitter,
|
||||
Loadout, Pos, Projectile, Scale, Stats, Vel, WaypointArea,
|
||||
self, Agent, Alignment, Body, Gravity, Item, ItemDrop, LightEmitter, Loadout, Pos,
|
||||
Projectile, Scale, Stats, Vel, WaypointArea,
|
||||
},
|
||||
outcome::Outcome,
|
||||
util::Dir,
|
||||
|
@ -364,15 +364,13 @@ impl FigureMgr {
|
||||
// TODO: Pending review in #587
|
||||
pub fn update_lighting(&mut self, scene_data: &SceneData) {
|
||||
let ecs = scene_data.state.ecs();
|
||||
for (
|
||||
entity,
|
||||
body,
|
||||
light_emitter,
|
||||
) in (
|
||||
for (entity, body, light_emitter) in (
|
||||
&ecs.entities(),
|
||||
ecs.read_storage::<common::comp::Body>().maybe(),
|
||||
&ecs.read_storage::<LightEmitter>(),
|
||||
).join() {
|
||||
)
|
||||
.join()
|
||||
{
|
||||
// Add LightAnimation for objects with a LightEmitter
|
||||
let mut anim_storage = ecs.write_storage::<LightAnimation>();
|
||||
if let None = anim_storage.get_mut(entity) {
|
||||
|
Loading…
Reference in New Issue
Block a user