Refactor code
This commit is contained in:
parent
39a5530dec
commit
c5d386b755
@ -14,8 +14,7 @@ use crate::{
|
||||
commands::{register_commands, unregister_commands},
|
||||
opts::{GameOption, GameOptionValue, GameOptions, PrivateGameOptions, TeamOptions},
|
||||
},
|
||||
map::Map,
|
||||
map_resource::MapResource,
|
||||
map::{Map, map_resource::MapResource, pickup::PickupKind},
|
||||
net::{
|
||||
network_manager::{
|
||||
BallSync, NetworkManager,
|
||||
@ -26,7 +25,6 @@ use crate::{
|
||||
},
|
||||
util::NetVector3,
|
||||
},
|
||||
pickup::PickupKind,
|
||||
player::{
|
||||
DamageSource, IPlayer, NetTransform,
|
||||
ball::Ball,
|
||||
|
||||
@ -8,14 +8,9 @@ pub mod cli_parser;
|
||||
pub mod credits;
|
||||
pub mod game;
|
||||
pub mod game_settings;
|
||||
pub mod goal;
|
||||
pub mod killbox;
|
||||
pub mod lobby_world;
|
||||
pub mod map;
|
||||
pub mod map_resource;
|
||||
pub mod map_static;
|
||||
pub mod net;
|
||||
pub mod pickup;
|
||||
pub mod player;
|
||||
pub mod popup_queue;
|
||||
pub mod replay;
|
||||
|
||||
@ -4,9 +4,7 @@ use godot::{classes::RandomNumberGenerator, prelude::*};
|
||||
|
||||
use crate::{
|
||||
game::{Game, GameManager},
|
||||
map::Map,
|
||||
map_resource::MapResource,
|
||||
map_static::StaticMap,
|
||||
map::map_static::StaticMap,
|
||||
player::menu_player::MenuPlayer,
|
||||
ui::lobby::LobbyPanel,
|
||||
};
|
||||
|
||||
@ -4,8 +4,8 @@ use godot::{classes::CharacterBody3D, prelude::*};
|
||||
|
||||
use crate::{
|
||||
game::{Game, GameManager},
|
||||
map::pickup::Pickup,
|
||||
net::util::NetVector3,
|
||||
pickup::Pickup,
|
||||
player::{
|
||||
IPlayer, NetTransform, ball::Ball, local_player::LocalPlayer, remote_player::RemotePlayer,
|
||||
telegrenade::Telegrenade,
|
||||
@ -13,6 +13,12 @@ use crate::{
|
||||
replay::{ReplayPlayer, ReplayPlayerState, StandaloneReplayManager},
|
||||
};
|
||||
|
||||
pub mod goal;
|
||||
pub mod killbox;
|
||||
pub mod map_resource;
|
||||
pub mod map_static;
|
||||
pub mod pickup;
|
||||
|
||||
#[derive(GodotClass)]
|
||||
#[class(base=Node3D, init)]
|
||||
pub struct Map {
|
||||
@ -12,7 +12,7 @@ use godot::{
|
||||
use crate::{
|
||||
game::{Game, GameManager, opts::GameOption},
|
||||
game_settings::{GameSettings, GameSettingsManager},
|
||||
killbox::KillboxKind,
|
||||
map::{killbox::KillboxKind, pickup::PickupKind},
|
||||
net::{
|
||||
network_manager::{
|
||||
NetworkManager,
|
||||
@ -21,7 +21,6 @@ use crate::{
|
||||
},
|
||||
util::cast_ray,
|
||||
},
|
||||
pickup::PickupKind,
|
||||
player::{
|
||||
DamageSource, DamageSourceSignal, IPlayer, NetTransform, PlayerCommon,
|
||||
buffs::{Buff, Buffs},
|
||||
|
||||
@ -9,12 +9,11 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
game::{Game, opts::GameOption},
|
||||
killbox::KillboxKind,
|
||||
map::{killbox::KillboxKind, pickup::PickupKind},
|
||||
net::{
|
||||
network_manager::NetworkManager,
|
||||
util::{NetVector3, shotgun_ray},
|
||||
},
|
||||
pickup::PickupKind,
|
||||
player::{
|
||||
buffs::{Buff, Buffs},
|
||||
shootable::Shootable,
|
||||
|
||||
@ -9,8 +9,7 @@ use godot::{
|
||||
|
||||
use crate::{
|
||||
game::{Game, opts::GameOption},
|
||||
killbox::KillboxKind,
|
||||
pickup::PickupKind,
|
||||
map::{killbox::KillboxKind, pickup::PickupKind},
|
||||
player::{
|
||||
DamageSource, DamageSourceSignal, IPlayer, NetTransform, PlayerCommon,
|
||||
buffs::{Buff, Buffs},
|
||||
|
||||
@ -8,15 +8,17 @@ use std::{
|
||||
};
|
||||
|
||||
use flate2::{Compression, bufread::GzDecoder, write::GzEncoder};
|
||||
use godot::{ prelude::*, tools::get_autoload_by_name};
|
||||
use godot::{prelude::*, tools::get_autoload_by_name};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
game::{Game, GameManager, Player, PlayerStats},
|
||||
game_settings::GameSettingsManager,
|
||||
map::Map,
|
||||
map::{
|
||||
Map,
|
||||
pickup::{PickupKind, ReplayVisibility},
|
||||
},
|
||||
net::{network_manager::BallSync, util::NetVector3},
|
||||
pickup::{PickupKind, ReplayVisibility},
|
||||
player::{
|
||||
DamageSource, IPlayer, NetTransform, ball::Ball, buffs::Buffs, remote_player::RemotePlayer,
|
||||
telegrenade::Telegrenade, weapon::WeaponType,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user