Skip to content

Commit

Permalink
Remove lots
Browse files Browse the repository at this point in the history
They don't affect gameplay right now and need to be remade into new undo system.
Will bring it back to life later.
  • Loading branch information
Shatur committed Dec 12, 2024
1 parent d1b13d2 commit fd2a5f0
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 745 deletions.
47 changes: 20 additions & 27 deletions base/src/game_world/actor/task.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod buy_lot;
mod friendly;
mod linked_task;
mod move_here;
Expand Down Expand Up @@ -27,7 +26,6 @@ use crate::{
picking::Clicked,
},
};
use buy_lot::BuyLotPlugin;
use friendly::FriendlyPlugins;
use linked_task::LinkedTaskPlugin;
use move_here::MoveHerePlugin;
Expand All @@ -36,31 +34,26 @@ pub(super) struct TaskPlugin;

impl Plugin for TaskPlugin {
fn build(&self, app: &mut App) {
app.add_plugins((
BuyLotPlugin,
FriendlyPlugins,
LinkedTaskPlugin,
MoveHerePlugin,
))
.register_type::<TaskState>()
.replicate::<TaskState>()
.observe(Self::list)
.add_client_event::<TaskCancel>(ChannelKind::Unordered)
.add_client_event_with(
ChannelKind::Unordered,
serialize_task_request,
deserialize_task_request,
)
.add_systems(
PreUpdate,
(Self::request, Self::cancel)
.after(ClientSet::Receive)
.run_if(server_or_singleplayer),
)
.add_systems(
PostUpdate,
(Self::despawn_cancelled, Self::activate_queued).run_if(server_or_singleplayer),
);
app.add_plugins((FriendlyPlugins, LinkedTaskPlugin, MoveHerePlugin))
.register_type::<TaskState>()
.replicate::<TaskState>()
.observe(Self::list)
.add_client_event::<TaskCancel>(ChannelKind::Unordered)
.add_client_event_with(
ChannelKind::Unordered,
serialize_task_request,
deserialize_task_request,
)
.add_systems(
PreUpdate,
(Self::request, Self::cancel)
.after(ClientSet::Receive)
.run_if(server_or_singleplayer),
)
.add_systems(
PostUpdate,
(Self::despawn_cancelled, Self::activate_queued).run_if(server_or_singleplayer),
);
}
}

Expand Down
90 changes: 0 additions & 90 deletions base/src/game_world/actor/task/buy_lot.rs

This file was deleted.

6 changes: 1 addition & 5 deletions base/src/game_world/city.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod lot;
pub mod road;

use std::f32::consts::FRAC_PI_2;
Expand All @@ -21,14 +20,13 @@ use crate::{
core::GameState,
game_world::{actor::ACTOR_RADIUS, Layer},
};
use lot::LotPlugin;
use road::RoadPlugin;

pub(super) struct CityPlugin;

impl Plugin for CityPlugin {
fn build(&self, app: &mut App) {
app.add_plugins((LotPlugin, RoadPlugin))
app.add_plugins(RoadPlugin)
.add_sub_state::<CityMode>()
.enable_state_scoped_entities::<CityMode>()
.register_type::<City>()
Expand Down Expand Up @@ -202,15 +200,13 @@ impl FromWorld for GroundMesh {
pub enum CityMode {
#[default]
Objects,
Lots,
Roads,
}

impl CityMode {
pub fn glyph(self) -> &'static str {
match self {
Self::Objects => "🌳",
Self::Lots => "⬛",
Self::Roads => "🚧",
}
}
Expand Down
196 changes: 0 additions & 196 deletions base/src/game_world/city/lot.rs

This file was deleted.

Loading

0 comments on commit fd2a5f0

Please sign in to comment.