protected override bool Filter(CoreEntity entity) { if (!entity.hasCurrentRoom || !entity.hasOpinion || !entity.hasOpinionModifier) { return(false); } var room = coreContext.GetEntityWithRoomId(entity.currentRoom.roomId); if (room == null || !room.hasLastCleanup) { return(false); } return(room.hasDirtLevel); }
protected override void Execute(List <ViewEntity> entities) { foreach (var e in entities) { var flat = e.view.value as FlatView; if (flat == null) { continue; } flat.livingRoom.Link(coreContext.GetEntityWithRoomId(flat.livingRoom.roomId)); flat.bathroom.Link(coreContext.GetEntityWithRoomId(flat.bathroom.roomId)); flat.kitchen.Link(coreContext.GetEntityWithRoomId(flat.kitchen.roomId)); } }