Compare commits
4 Commits
6284c49bb9
...
f45f15b3bf
| Author | SHA1 | Date | |
|---|---|---|---|
| f45f15b3bf | |||
| eb6ea6caf3 | |||
| 215c88cb49 | |||
| 897a1dbef6 |
@ -4,7 +4,7 @@ use godot::{
|
||||
tools::get_autoload_by_name,
|
||||
};
|
||||
|
||||
use crate::game_manager::GameManager;
|
||||
use crate::game::GameManager;
|
||||
|
||||
pub const MUSIC_MANAGER_GLOBAL: &str = "MusicManagerGlobal";
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ use godot::{classes::RichTextLabel, prelude::*};
|
||||
|
||||
use crate::{
|
||||
announcer::Announcement,
|
||||
game_manager::{Game, Player},
|
||||
game::{Game, Player},
|
||||
player::DamageSource,
|
||||
};
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ use std::net::SocketAddr;
|
||||
use godot::{classes::Os, prelude::*};
|
||||
|
||||
use crate::{
|
||||
game_manager::{Game, GameManager},
|
||||
game::{Game, GameManager},
|
||||
net::network_manager::NetworkManager,
|
||||
};
|
||||
|
||||
|
||||
74
rust/src/game/commands.rs
Normal file
74
rust/src/game/commands.rs
Normal file
@ -0,0 +1,74 @@
|
||||
use godot::classes::class_macros::private::virtuals::Xrvrs::Gd;
|
||||
|
||||
use crate::{
|
||||
game::Game,
|
||||
ui::cli::{CliColor, Command, CommandLinePanel},
|
||||
};
|
||||
|
||||
pub fn register_commands(cli: &mut Gd<CommandLinePanel>) {
|
||||
cli.bind_mut()
|
||||
.register_command("respawn_ball".to_string(), Box::new(RespawnBallCommand));
|
||||
cli.bind_mut()
|
||||
.register_command("players".to_string(), Box::new(ListPlayersCommand));
|
||||
cli.bind_mut()
|
||||
.register_command("kill".to_string(), Box::new(KillCommand));
|
||||
}
|
||||
|
||||
pub fn unregister_commands(cli: &mut Gd<CommandLinePanel>) {
|
||||
cli.bind_mut()
|
||||
.unregister_command("respawn_ball".to_string());
|
||||
cli.bind_mut().unregister_command("players".to_string());
|
||||
cli.bind_mut().unregister_command("kill".to_string());
|
||||
}
|
||||
|
||||
pub struct RespawnBallCommand;
|
||||
impl Command for RespawnBallCommand {
|
||||
fn execute(&self, _: &mut CommandLinePanel, _: &[&str]) {
|
||||
if let Some(game) = &mut Game::singleton() {
|
||||
game.bind_mut().respawn_ball();
|
||||
}
|
||||
}
|
||||
|
||||
fn help(&self) -> &str {
|
||||
"respawns the ball"
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ListPlayersCommand;
|
||||
impl Command for ListPlayersCommand {
|
||||
fn execute(&self, cli: &mut CommandLinePanel, _: &[&str]) {
|
||||
if let Some(game) = &mut Game::singleton() {
|
||||
for player in &game.bind().players {
|
||||
cli.publish_message(
|
||||
format!(" - {} ({})", player.data.name, player.id()),
|
||||
CliColor::Info,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn help(&self) -> &str {
|
||||
"lists all players"
|
||||
}
|
||||
}
|
||||
|
||||
pub struct KillCommand;
|
||||
impl Command for KillCommand {
|
||||
fn execute(&self, cli: &mut CommandLinePanel, args: &[&str]) {
|
||||
if let Some(player_str) = args.first() {
|
||||
if let Ok(player_id) = player_str.parse() {
|
||||
if let Some(game) = &mut Game::singleton() {
|
||||
game.bind_mut().kill_player(player_id);
|
||||
}
|
||||
} else {
|
||||
cli.publish_message("Invalid player id".to_string(), CliColor::Error);
|
||||
}
|
||||
} else {
|
||||
cli.publish_message("Usage: kill [player_id]".to_string(), CliColor::Error);
|
||||
}
|
||||
}
|
||||
|
||||
fn help(&self) -> &str {
|
||||
"kills given player"
|
||||
}
|
||||
}
|
||||
@ -10,6 +10,10 @@ use crate::{
|
||||
},
|
||||
bgm::{Music, MusicManager},
|
||||
chat::{Chat, ChatMessage},
|
||||
game::{
|
||||
commands::{register_commands, unregister_commands},
|
||||
opts::{GameOption, GameOptionValue, GameOptions},
|
||||
},
|
||||
map::Map,
|
||||
map_resource::MapResource,
|
||||
net::{
|
||||
@ -29,9 +33,12 @@ use crate::{
|
||||
},
|
||||
replay::{ReplayEvent, ReplayPlayback, ReplayRecorder},
|
||||
team_resource::TeamResource,
|
||||
ui::cli::{CliColor, Command, CommandLinePanel},
|
||||
ui::cli::CommandLinePanel,
|
||||
};
|
||||
|
||||
pub mod commands;
|
||||
pub mod opts;
|
||||
|
||||
pub const GAME_MANAGER_GLOBAL: &str = "GameManagerGlobal";
|
||||
|
||||
#[derive(GodotClass)]
|
||||
@ -152,141 +159,6 @@ impl GameManager {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct GameOptions {
|
||||
pub values: HashMap<GameOption, GameOptionValue>,
|
||||
}
|
||||
|
||||
impl Default for GameOptions {
|
||||
fn default() -> Self {
|
||||
let mut opts = HashMap::new();
|
||||
opts.insert(GameOption::AllowAnyMap, GameOptionValue::Boolean(false));
|
||||
opts.insert(GameOption::AllowAnyTeam, GameOptionValue::Boolean(false));
|
||||
opts.insert(GameOption::FriendlyFire, GameOptionValue::Boolean(true));
|
||||
opts.insert(GameOption::GoalsNeededToWin, GameOptionValue::Number(5.));
|
||||
opts.insert(GameOption::RespawnTimer, GameOptionValue::Number(5.));
|
||||
opts.insert(
|
||||
GameOption::TelegrenadesAllowed,
|
||||
GameOptionValue::Boolean(true),
|
||||
);
|
||||
Self { values: opts }
|
||||
}
|
||||
}
|
||||
|
||||
impl GameOptions {
|
||||
pub fn is_true(&self, opt: GameOption) -> bool {
|
||||
let opt = self
|
||||
.values
|
||||
.get(&opt)
|
||||
.copied()
|
||||
.unwrap_or(GameOptionValue::Boolean(false));
|
||||
match opt {
|
||||
GameOptionValue::Boolean(value) => value,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_float(&self, opt: GameOption) -> f64 {
|
||||
let opt = self
|
||||
.values
|
||||
.get(&opt)
|
||||
.copied()
|
||||
.unwrap_or(GameOptionValue::Number(0.));
|
||||
match opt {
|
||||
GameOptionValue::Number(value) => value,
|
||||
_ => 0.,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Hash, Copy, Clone, Serialize, Deserialize)]
|
||||
pub enum GameOption {
|
||||
/// Allow anyone to select a map, not just the host
|
||||
AllowAnyMap,
|
||||
/// Allow anyone to select anyone's team, not just themselves and the host
|
||||
AllowAnyTeam,
|
||||
/// Allow anyone to shoot anyone, not just other team's members
|
||||
FriendlyFire,
|
||||
/// The number of goals needed to win a match
|
||||
GoalsNeededToWin,
|
||||
/// Whether telegrenades are allowed or not.
|
||||
TelegrenadesAllowed,
|
||||
/// How long in seconds does it take for a player to respawn
|
||||
RespawnTimer,
|
||||
}
|
||||
|
||||
impl ToString for GameOption {
|
||||
fn to_string(&self) -> String {
|
||||
match self {
|
||||
GameOption::AllowAnyMap => "Allow anyone to select the map",
|
||||
GameOption::AllowAnyTeam => "Allow anyone to select any teams",
|
||||
GameOption::FriendlyFire => "Friendly fire",
|
||||
GameOption::GoalsNeededToWin => "Goals needed to win",
|
||||
GameOption::TelegrenadesAllowed => "Telegrenades allowed",
|
||||
GameOption::RespawnTimer => "Respawn Time (seconds)",
|
||||
}
|
||||
.to_owned()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
|
||||
pub enum GameOptionValue {
|
||||
Boolean(bool),
|
||||
Number(f64),
|
||||
}
|
||||
|
||||
pub struct RespawnBallCommand;
|
||||
impl Command for RespawnBallCommand {
|
||||
fn execute(&self, _: &mut CommandLinePanel, _: &[&str]) {
|
||||
if let Some(game) = &mut Game::singleton() {
|
||||
game.bind_mut().respawn_ball();
|
||||
}
|
||||
}
|
||||
|
||||
fn help(&self) -> &str {
|
||||
"respawns the ball"
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ListPlayersCommand;
|
||||
impl Command for ListPlayersCommand {
|
||||
fn execute(&self, cli: &mut CommandLinePanel, _: &[&str]) {
|
||||
if let Some(game) = &mut Game::singleton() {
|
||||
for player in &game.bind().players {
|
||||
cli.publish_message(
|
||||
format!(" - {} ({})", player.data.name, player.id()),
|
||||
CliColor::Info,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn help(&self) -> &str {
|
||||
"lists all players"
|
||||
}
|
||||
}
|
||||
|
||||
pub struct KillCommand;
|
||||
impl Command for KillCommand {
|
||||
fn execute(&self, cli: &mut CommandLinePanel, args: &[&str]) {
|
||||
if let Some(player_str) = args.first() {
|
||||
if let Ok(player_id) = player_str.parse() {
|
||||
if let Some(game) = &mut Game::singleton() {
|
||||
game.bind_mut().kill_player(player_id);
|
||||
}
|
||||
} else {
|
||||
cli.publish_message("Invalid player id".to_string(), CliColor::Error);
|
||||
}
|
||||
} else {
|
||||
cli.publish_message("Usage: kill [player_id]".to_string(), CliColor::Error);
|
||||
}
|
||||
}
|
||||
|
||||
fn help(&self) -> &str {
|
||||
"kills given player"
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(GodotClass)]
|
||||
#[class(base=Node, init)]
|
||||
pub struct Game {
|
||||
@ -520,12 +392,7 @@ impl Game {
|
||||
peer.set_accepting_connections(false);
|
||||
|
||||
let mut cli = CommandLinePanel::singleton();
|
||||
cli.bind_mut()
|
||||
.register_command("respawn_ball".to_string(), Box::new(RespawnBallCommand));
|
||||
cli.bind_mut()
|
||||
.register_command("players".to_string(), Box::new(ListPlayersCommand));
|
||||
cli.bind_mut()
|
||||
.register_command("kill".to_string(), Box::new(KillCommand));
|
||||
register_commands(&mut cli);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -594,10 +461,7 @@ impl Game {
|
||||
});
|
||||
|
||||
let mut cli = CommandLinePanel::singleton();
|
||||
cli.bind_mut()
|
||||
.unregister_command("respawn_ball".to_string());
|
||||
cli.bind_mut().unregister_command("players".to_string());
|
||||
cli.bind_mut().unregister_command("kill".to_string());
|
||||
unregister_commands(&mut cli);
|
||||
}
|
||||
|
||||
pub fn change_option(&mut self, opt: GameOption, value: GameOptionValue) {
|
||||
86
rust/src/game/opts.rs
Normal file
86
rust/src/game/opts.rs
Normal file
@ -0,0 +1,86 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct GameOptions {
|
||||
pub values: HashMap<GameOption, GameOptionValue>,
|
||||
}
|
||||
|
||||
impl Default for GameOptions {
|
||||
fn default() -> Self {
|
||||
let mut opts = HashMap::new();
|
||||
opts.insert(GameOption::AllowAnyMap, GameOptionValue::Boolean(false));
|
||||
opts.insert(GameOption::AllowAnyTeam, GameOptionValue::Boolean(false));
|
||||
opts.insert(GameOption::FriendlyFire, GameOptionValue::Boolean(true));
|
||||
opts.insert(GameOption::GoalsNeededToWin, GameOptionValue::Number(5.));
|
||||
opts.insert(GameOption::RespawnTimer, GameOptionValue::Number(5.));
|
||||
opts.insert(
|
||||
GameOption::TelegrenadesAllowed,
|
||||
GameOptionValue::Boolean(true),
|
||||
);
|
||||
Self { values: opts }
|
||||
}
|
||||
}
|
||||
|
||||
impl GameOptions {
|
||||
pub fn is_true(&self, opt: GameOption) -> bool {
|
||||
let opt = self
|
||||
.values
|
||||
.get(&opt)
|
||||
.copied()
|
||||
.unwrap_or(GameOptionValue::Boolean(false));
|
||||
match opt {
|
||||
GameOptionValue::Boolean(value) => value,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_float(&self, opt: GameOption) -> f64 {
|
||||
let opt = self
|
||||
.values
|
||||
.get(&opt)
|
||||
.copied()
|
||||
.unwrap_or(GameOptionValue::Number(0.));
|
||||
match opt {
|
||||
GameOptionValue::Number(value) => value,
|
||||
_ => 0.,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Hash, Copy, Clone, Serialize, Deserialize)]
|
||||
pub enum GameOption {
|
||||
/// Allow anyone to select a map, not just the host
|
||||
AllowAnyMap,
|
||||
/// Allow anyone to select anyone's team, not just themselves and the host
|
||||
AllowAnyTeam,
|
||||
/// Allow anyone to shoot anyone, not just other team's members
|
||||
FriendlyFire,
|
||||
/// The number of goals needed to win a match
|
||||
GoalsNeededToWin,
|
||||
/// Whether telegrenades are allowed or not.
|
||||
TelegrenadesAllowed,
|
||||
/// How long in seconds does it take for a player to respawn
|
||||
RespawnTimer,
|
||||
}
|
||||
|
||||
impl ToString for GameOption {
|
||||
fn to_string(&self) -> String {
|
||||
match self {
|
||||
GameOption::AllowAnyMap => "Allow anyone to select the map",
|
||||
GameOption::AllowAnyTeam => "Allow anyone to select any teams",
|
||||
GameOption::FriendlyFire => "Friendly fire",
|
||||
GameOption::GoalsNeededToWin => "Goals needed to win",
|
||||
GameOption::TelegrenadesAllowed => "Telegrenades allowed",
|
||||
GameOption::RespawnTimer => "Respawn Time (seconds)",
|
||||
}
|
||||
.to_owned()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
|
||||
pub enum GameOptionValue {
|
||||
Boolean(bool),
|
||||
Number(f64),
|
||||
}
|
||||
@ -1,12 +1,9 @@
|
||||
use std::{
|
||||
net::SocketAddr,
|
||||
time::{Duration, SystemTime, UNIX_EPOCH},
|
||||
};
|
||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||
|
||||
use godot::{
|
||||
classes::{
|
||||
AudioServer, DisplayServer, FileAccess, InputEvent, InputEventKey, InputEventMouseButton,
|
||||
InputMap, display_server::WindowMode, file_access::ModeFlags, window::Mode,
|
||||
InputMap, display_server::WindowMode, file_access::ModeFlags,
|
||||
},
|
||||
global::{Key, MouseButton},
|
||||
prelude::*,
|
||||
|
||||
@ -3,7 +3,7 @@ use godot::{
|
||||
prelude::*,
|
||||
};
|
||||
|
||||
use crate::{game_manager::Game, net::network_manager::NetworkManager, player::ball::Ball};
|
||||
use crate::{game::Game, net::network_manager::NetworkManager, player::ball::Ball};
|
||||
|
||||
#[derive(GodotClass)]
|
||||
#[class(base=Area3D, init)]
|
||||
|
||||
@ -5,7 +5,7 @@ use godot::{
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
game_manager::Game,
|
||||
game::Game,
|
||||
net::network_manager::NetworkManager,
|
||||
player::{DamageSource, IPlayer, ball::Ball},
|
||||
};
|
||||
|
||||
@ -5,7 +5,7 @@ pub mod bgm;
|
||||
pub mod chat;
|
||||
pub mod cli_parser;
|
||||
pub mod credits;
|
||||
pub mod game_manager;
|
||||
pub mod game;
|
||||
pub mod game_settings;
|
||||
pub mod goal;
|
||||
pub mod killbox;
|
||||
|
||||
@ -2,7 +2,7 @@ use std::{collections::HashMap, f32::consts::PI};
|
||||
|
||||
use godot::{classes::RandomNumberGenerator, prelude::*};
|
||||
|
||||
use crate::{game_manager::Game, ui::menu_player::MenuPlayer};
|
||||
use crate::{game::Game, ui::menu_player::MenuPlayer};
|
||||
|
||||
#[derive(GodotClass)]
|
||||
#[class(base=Node3D, init)]
|
||||
|
||||
@ -3,7 +3,7 @@ use std::collections::HashMap;
|
||||
use godot::{classes::CharacterBody3D, prelude::*};
|
||||
|
||||
use crate::{
|
||||
game_manager::{Game, GameManager},
|
||||
game::{Game, GameManager},
|
||||
net::util::NetVector3,
|
||||
pickup::Pickup,
|
||||
player::{
|
||||
|
||||
@ -10,7 +10,10 @@ use teanet::{Peer, PeerConfig, PeerMessage};
|
||||
|
||||
use crate::{
|
||||
announcer::Announcement,
|
||||
game_manager::{Game, GameManager, GameOption, GameOptionValue, NetPlayer},
|
||||
game::{
|
||||
Game, GameManager, NetPlayer,
|
||||
opts::{GameOption, GameOptionValue},
|
||||
},
|
||||
game_settings::GameSettingsManager,
|
||||
net::{net_stats::Stats, util::NetVector3},
|
||||
player::{DamageSource, NetTransform, weapon::WeaponType},
|
||||
|
||||
@ -4,7 +4,7 @@ use godot::obj::Singleton;
|
||||
use teanet::PeerMessage;
|
||||
|
||||
use crate::{
|
||||
game_manager::{Game, GameManager, GameOption},
|
||||
game::{Game, GameManager, opts::GameOption},
|
||||
game_settings::GameSettingsManager,
|
||||
net::network_manager::{NetworkManager, Package, PeerKind},
|
||||
popup_queue::{Popup, PopupQueue},
|
||||
@ -17,7 +17,7 @@ impl NetworkManager {
|
||||
|
||||
if let Some(peer) = &mut self.peer {
|
||||
match peer {
|
||||
PeerKind::Client(peer, addr) => match message {
|
||||
PeerKind::Client(peer, _) => match message {
|
||||
teanet::PeerMessage::NewConnection(connection) => {
|
||||
cli.bind_mut().publish_message(
|
||||
format!("Connected to: {}", connection.address),
|
||||
|
||||
@ -2,7 +2,7 @@ use godot::{classes::Area3D, prelude::*};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
game_manager::Game, map::Map, net::network_manager::NetworkManager, player::IPlayer,
|
||||
game::Game, map::Map, net::network_manager::NetworkManager, player::IPlayer,
|
||||
replay::StandaloneReplayManager,
|
||||
};
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ use godot::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
game_manager::{Game, GameManager, GameOption},
|
||||
game::{Game, GameManager, opts::GameOption},
|
||||
game_settings::{GameSettings, GameSettingsManager},
|
||||
killbox::KillboxKind,
|
||||
net::{
|
||||
|
||||
@ -8,7 +8,7 @@ use godot::{
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
game_manager::{Game, GameOption},
|
||||
game::{Game, opts::GameOption},
|
||||
killbox::KillboxKind,
|
||||
net::{
|
||||
network_manager::NetworkManager,
|
||||
|
||||
@ -8,7 +8,7 @@ use godot::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
game_manager::{Game, GameOption},
|
||||
game::{Game, opts::GameOption},
|
||||
killbox::KillboxKind,
|
||||
pickup::PickupKind,
|
||||
player::{
|
||||
|
||||
@ -7,7 +7,7 @@ use godot::{
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
game_manager::Game,
|
||||
game::Game,
|
||||
net::util::{cast_ray, shotgun_ray},
|
||||
player::{DamageSource, shootable::Shootable},
|
||||
replay::StandaloneReplayManager,
|
||||
|
||||
@ -9,7 +9,7 @@ use godot::{
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
game_manager::{Game, GameManager, Player},
|
||||
game::{Game, GameManager, Player},
|
||||
game_settings::GameSettingsManager,
|
||||
map::Map,
|
||||
net::{network_manager::BallSync, util::NetVector3},
|
||||
@ -362,9 +362,7 @@ impl INode for ReplayPlayback {
|
||||
}
|
||||
self.telegrenades.remove(player_id);
|
||||
|
||||
if let Some(map) = &mut self.current_map
|
||||
&& let Some(player) = self.replay.players.get(player_id)
|
||||
{
|
||||
if let Some(map) = &mut self.current_map {
|
||||
if let Some(telegrenade) = map.bind_mut().spawn_replay_telegrenade(
|
||||
(*location).into(),
|
||||
(*velocity).into(),
|
||||
|
||||
@ -10,7 +10,7 @@ use godot::{
|
||||
|
||||
use crate::{
|
||||
chat::Chat,
|
||||
game_manager::Game,
|
||||
game::Game,
|
||||
net::network_manager::{NetworkManager, Package, PeerKind},
|
||||
ui::cli::CommandLinePanel,
|
||||
};
|
||||
|
||||
@ -4,7 +4,7 @@ use godot::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
game_manager::{Game, GameManager},
|
||||
game::{Game, GameManager},
|
||||
ui::player_listings::PlayerListings,
|
||||
};
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ use godot::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
game_manager::Game,
|
||||
game::Game,
|
||||
net::network_manager::NetworkManager,
|
||||
ui::{chatbox::ChatBox, cli::CommandLinePanel, settings::SettingsPanel},
|
||||
};
|
||||
|
||||
@ -10,7 +10,10 @@ use godot::{
|
||||
|
||||
use crate::{
|
||||
bgm::{Music, MusicManager},
|
||||
game_manager::{Game, GameManager, GameOption, GameOptionValue, GameOptions},
|
||||
game::{
|
||||
Game, GameManager,
|
||||
opts::{GameOption, GameOptionValue, GameOptions},
|
||||
},
|
||||
net::network_manager::{NetworkManager, Package, PeerKind},
|
||||
ui::lobby_player_listing::LobbyPlayerListing,
|
||||
};
|
||||
|
||||
@ -4,7 +4,10 @@ use godot::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
game_manager::{Game, GameOption, GameOptions},
|
||||
game::{
|
||||
Game,
|
||||
opts::{GameOption, GameOptions},
|
||||
},
|
||||
net::network_manager::NetworkManager,
|
||||
team_resource::TeamResource,
|
||||
};
|
||||
|
||||
@ -3,7 +3,7 @@ use godot::{
|
||||
prelude::*,
|
||||
};
|
||||
|
||||
use crate::{game_manager::Game, player::soldier_mesh::SoldierMesh};
|
||||
use crate::{game::Game, player::soldier_mesh::SoldierMesh};
|
||||
|
||||
#[derive(GodotClass)]
|
||||
#[class(base=CharacterBody3D, init)]
|
||||
|
||||
@ -3,7 +3,7 @@ use godot::{
|
||||
prelude::*,
|
||||
};
|
||||
|
||||
use crate::{game_manager::Game, replay::StandaloneReplayManager};
|
||||
use crate::{game::Game, replay::StandaloneReplayManager};
|
||||
|
||||
#[derive(GodotClass)]
|
||||
#[class(base=HBoxContainer, init)]
|
||||
|
||||
@ -4,9 +4,7 @@ use godot::{
|
||||
prelude::*,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
game_manager::Game, replay::StandaloneReplayManager, ui::player_listing::PlayerListing,
|
||||
};
|
||||
use crate::{game::Game, replay::StandaloneReplayManager, ui::player_listing::PlayerListing};
|
||||
|
||||
#[derive(GodotClass)]
|
||||
#[class(base=HBoxContainer, init)]
|
||||
|
||||
@ -4,7 +4,7 @@ use godot::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
game_manager::{Game, GameManager},
|
||||
game::{Game, GameManager},
|
||||
replay::StandaloneReplayManager,
|
||||
ui::player_listings::PlayerListings,
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use godot::{
|
||||
classes::{Control, IControl, InputEvent, Label, Slider},
|
||||
classes::{Control, IControl, Label, Slider},
|
||||
prelude::*,
|
||||
};
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ use godot::{
|
||||
prelude::*,
|
||||
};
|
||||
|
||||
use crate::{game_manager::Game, replay::StandaloneReplayManager};
|
||||
use crate::{game::Game, replay::StandaloneReplayManager};
|
||||
|
||||
#[derive(GodotClass)]
|
||||
#[class(base=HBoxContainer, init)]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user