diff --git a/logic/Client/Model/MapPatch.cs b/logic/Client/Model/MapPatch.cs index 97c9730f..1a22f728 100644 --- a/logic/Client/Model/MapPatch.cs +++ b/logic/Client/Model/MapPatch.cs @@ -9,16 +9,16 @@ namespace Client.Model { public enum MapPatchType { - Space = 0, + Ground = 0, RedHome = 1, BlueHome = 2, Ruin = 3, - Shadow = 4, - Asteroid = 5, - Resource = 6, - Factory = 7, - Community = 8, - Fort = 9, + Grass = 4, + River = 5, + Garbage = 6, + RecycleBank = 7, + ChargeStation = 8, + SignalTower = 9, WormHole = 10, Null = 11 }; diff --git a/logic/Client/Model/Player.cs b/logic/Client/Model/Player.cs index 85f107f6..a6ac7fb5 100644 --- a/logic/Client/Model/Player.cs +++ b/logic/Client/Model/Player.cs @@ -9,8 +9,8 @@ namespace Client.Model { public class Player : BindableObject { - private bool team; - public bool Team + private long team; + public long Team { get => team; set @@ -39,12 +39,24 @@ public int Money OnPropertyChanged(); } } - private ObservableCollection ships; - public ObservableCollection Ships + + private int score; + public int Score + { + get => score; + set + { + score = value; + OnPropertyChanged(); + } + } + + private ObservableCollection ships; + public ObservableCollection Sweepers { get { - return ships ?? (ships = new ObservableCollection()); + return ships ?? (ships = new ObservableCollection()); } set { diff --git a/logic/Client/Model/Ship.cs b/logic/Client/Model/Ship.cs index 739634cc..ab208650 100644 --- a/logic/Client/Model/Ship.cs +++ b/logic/Client/Model/Ship.cs @@ -1,4 +1,6 @@ -using System; +using Client.Util; +using Protobuf; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,84 +8,86 @@ namespace Client.Model { - public enum TeamEnum - { - Red, - Blue - } + //public enum TeamEnum + //{ + // Red, + // Blue + //} - public enum TypeEnum - { - CivilShip, - WarShip, - FlagShip - } + //public enum TypeEnum + //{ + // CivilSweeper, + // WarSweeper, + // FlagSweeper + //} - public enum StateEnum - { - Idle, - Producing, - Constructing, - Recovering, - Recycling, - Attacking, - Swinging, - Deceased - } + //public enum StateEnum + //{ + // Idle, + // Producing, + // Constructing, + // Recovering, + // Recycling, + // Attacking, + // Swinging, + // Deceased + //} - public enum ProducerModuleEnum - { + //public enum ProducerModuleEnum + //{ - } + //} - public enum ConstuctorModuleEnum - { + //public enum ConstuctorModuleEnum + //{ - } + //} - public enum ArmorModuleEnum - { + //public enum ArmorModuleEnum + //{ - } + //} - public enum ShieldModuleEnum - { + //public enum ShieldModuleEnum + //{ - } + //} - public enum AttackerModuleEnum - { + //public enum AttackerModuleEnum + //{ - } + //} - public class Ship : BindableObject + public class Sweeper : BindableObject { - private TeamEnum team; - private TypeEnum type; - private StateEnum state; + private long teamID; + private SweeperType type; + private SweeperState state; private int Hp; - private ProducerModuleEnum producerModule; - private ConstuctorModuleEnum constuctorModule; - private ArmorModuleEnum armorModule; - private ShieldModuleEnum shieldModule; - private AttackerModuleEnum attackerModule; + private ProducerType producerModule; + private ConstructorType constuctorModule; + private ArmorType armorModule; + private ShieldType shieldModule; + private WeaponType weaponModule; private string type_s; private string state_s; private string producerModule_s; private string constuctorModule_s; private string armorModule_s; private string shieldModule_s; - private string attackerModule_s; - public TeamEnum Team + private string weaponModule_s; + + + public long TeamID { - get => team; + get => teamID; set { - team = value; + teamID = value; OnPropertyChanged(); } } - public TypeEnum Type + public SweeperType Type { get => type; set @@ -92,7 +96,7 @@ public TypeEnum Type OnPropertyChanged(); } } - public StateEnum State + public SweeperState State { get => state; set @@ -110,7 +114,7 @@ public int HP OnPropertyChanged(); } } - public ProducerModuleEnum ProducerModule + public ProducerType ProducerModule { get => producerModule; set @@ -119,7 +123,7 @@ public ProducerModuleEnum ProducerModule OnPropertyChanged(); } } - public ConstuctorModuleEnum ConstuctorModule + public ConstructorType ConstuctorModule { get => constuctorModule; set @@ -128,7 +132,7 @@ public ConstuctorModuleEnum ConstuctorModule OnPropertyChanged(); } } - public ArmorModuleEnum ArmorModule + public ArmorType ArmorModule { get => armorModule; set @@ -137,7 +141,7 @@ public ArmorModuleEnum ArmorModule OnPropertyChanged(); } } - public ShieldModuleEnum ShieldModule + public ShieldType ShieldModule { get => shieldModule; set @@ -146,18 +150,18 @@ public ShieldModuleEnum ShieldModule OnPropertyChanged(); } } - public AttackerModuleEnum AttackerModule + public WeaponType WeaponModule { - get => attackerModule; + get => weaponModule; set { - attackerModule = value; + weaponModule = value; OnPropertyChanged(); } } public string Type_s { - get => type_s; + get => UtilInfo.SweeperTypeNameDict[Type]; set { type_s = value; @@ -166,7 +170,7 @@ public string Type_s } public string State_s { - get => state_s; + get => UtilInfo.SweeperStateNameDict[State]; set { state_s = value; @@ -209,12 +213,12 @@ public string ShieldModule_s OnPropertyChanged(); } } - public string AttackerModule_s + public string WeaponModule_s { - get => attackerModule_s; + get => weaponModule_s; set { - attackerModule_s = value; + weaponModule_s = value; OnPropertyChanged(); } } diff --git a/logic/Client/Old/GameStatusBar.xaml.cs b/logic/Client/Old/GameStatusBar.xaml.cs index 32f24370..e3e775a0 100644 --- a/logic/Client/Old/GameStatusBar.xaml.cs +++ b/logic/Client/Old/GameStatusBar.xaml.cs @@ -1,3 +1,4 @@ +using Client.Util; using Protobuf; namespace Client; diff --git a/logic/Client/Old/PlayerStatusBar.xaml b/logic/Client/Old/PlayerStatusBar.xaml index 2bd2daa2..51d8e08e 100644 --- a/logic/Client/Old/PlayerStatusBar.xaml +++ b/logic/Client/Old/PlayerStatusBar.xaml @@ -34,7 +34,7 @@