diff options
Diffstat (limited to 'dsa/DSALib/Models/Database')
-rw-r--r-- | dsa/DSALib/Models/Database/DataObject.cs | 14 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Dsa/Advantage.cs | 9 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Dsa/CharSpell.cs | 9 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Dsa/DatabaseChar.cs | 15 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Dsa/Field.cs | 9 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Dsa/GeneralSpell.cs | 15 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Dsa/GroupChar.cs | 6 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Dsa/Inventory.cs | 6 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Dsa/Talent.cs | 15 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Dsa/Weapon.cs | 24 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Dsa/WeaponTalent.cs | 9 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Groups/DSAGroup.cs | 6 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/Groups/Group.cs | 6 | ||||
-rw-r--r-- | dsa/DSALib/Models/Database/IDataObject.cs | 6 |
14 files changed, 50 insertions, 99 deletions
diff --git a/dsa/DSALib/Models/Database/DataObject.cs b/dsa/DSALib/Models/Database/DataObject.cs index 59cfdf2..ca6d6b2 100644 --- a/dsa/DSALib/Models/Database/DataObject.cs +++ b/dsa/DSALib/Models/Database/DataObject.cs @@ -1,13 +1,9 @@ -namespace DSALib.Models.Database -{ - public class DataObject : IDataObject - { +namespace DSALib.Models.Database { + public class DataObject : IDataObject { + public string Name { get; set; } - public override string ToString() - { + public override string ToString() { return Name; } - - public string Name { get; set; } } -} +}
\ No newline at end of file diff --git a/dsa/DSALib/Models/Database/Dsa/Advantage.cs b/dsa/DSALib/Models/Database/Dsa/Advantage.cs index 2ed0bf9..1a3d40b 100644 --- a/dsa/DSALib/Models/Database/Dsa/Advantage.cs +++ b/dsa/DSALib/Models/Database/Dsa/Advantage.cs @@ -1,11 +1,8 @@ using System; -namespace DSALib.Models.Database.Dsa -{ - public class Advantage - { - public Advantage(string name, string value = "") - { +namespace DSALib.Models.Database.Dsa { + public class Advantage { + public Advantage(string name, string value = "") { Name = name ?? throw new ArgumentNullException(nameof(name)); Value = value ?? throw new ArgumentNullException(nameof(value)); } diff --git a/dsa/DSALib/Models/Database/Dsa/CharSpell.cs b/dsa/DSALib/Models/Database/Dsa/CharSpell.cs index d08bc74..4486004 100644 --- a/dsa/DSALib/Models/Database/Dsa/CharSpell.cs +++ b/dsa/DSALib/Models/Database/Dsa/CharSpell.cs @@ -1,11 +1,8 @@ using System; -namespace DSALib.Models.Database.Dsa -{ - public class CharSpell - { - public CharSpell(string representation, int value) - { +namespace DSALib.Models.Database.Dsa { + public class CharSpell { + public CharSpell(string representation, int value) { this.representation = representation ?? throw new ArgumentNullException(nameof(representation)); this.value = value; } diff --git a/dsa/DSALib/Models/Database/Dsa/DatabaseChar.cs b/dsa/DSALib/Models/Database/Dsa/DatabaseChar.cs index 1312f95..2b163a4 100644 --- a/dsa/DSALib/Models/Database/Dsa/DatabaseChar.cs +++ b/dsa/DSALib/Models/Database/Dsa/DatabaseChar.cs @@ -3,17 +3,13 @@ using System.Collections.Generic; using System.Linq; using DSALib.DSA_Game.Characters; -namespace DSALib.Models.Database.Dsa -{ - public class DatabaseChar - { - public DatabaseChar() - { +namespace DSALib.Models.Database.Dsa { + public class DatabaseChar { + public DatabaseChar() { } public DatabaseChar(int id, string name, string rasse, List<Field> skills, List<Field> talents, - List<Advantage> advantages, List<CharSpell> spells, List<WeaponTalent> weaponTalents) - { + List<Advantage> advantages, List<CharSpell> spells, List<WeaponTalent> weaponTalents) { Id = id; Name = name ?? throw new ArgumentNullException(nameof(name)); Race = rasse ?? throw new ArgumentNullException(nameof(rasse)); @@ -41,8 +37,7 @@ namespace DSALib.Models.Database.Dsa public List<WeaponTalent> WeaponTalents { get; set; } = new List<WeaponTalent>(); - public static void LoadChar(Character file, out GroupChar group, out DatabaseChar data) - { + public static void LoadChar(Character file, out GroupChar group, out DatabaseChar data) { group = new GroupChar(); data = new DatabaseChar(); diff --git a/dsa/DSALib/Models/Database/Dsa/Field.cs b/dsa/DSALib/Models/Database/Dsa/Field.cs index 6d1b82e..f720318 100644 --- a/dsa/DSALib/Models/Database/Dsa/Field.cs +++ b/dsa/DSALib/Models/Database/Dsa/Field.cs @@ -1,11 +1,8 @@ using System; -namespace DSALib.Models.Database.Dsa -{ - public class Field - { - public Field(string name, int value = 0) - { +namespace DSALib.Models.Database.Dsa { + public class Field { + public Field(string name, int value = 0) { Name = name ?? throw new ArgumentNullException(nameof(name)); Value = value; } diff --git a/dsa/DSALib/Models/Database/Dsa/GeneralSpell.cs b/dsa/DSALib/Models/Database/Dsa/GeneralSpell.cs index 964c38e..6e1ecf1 100644 --- a/dsa/DSALib/Models/Database/Dsa/GeneralSpell.cs +++ b/dsa/DSALib/Models/Database/Dsa/GeneralSpell.cs @@ -1,20 +1,15 @@ -namespace DSALib.Models.Database.Dsa -{ - public class GeneralSpell : Talent - { +namespace DSALib.Models.Database.Dsa { + public class GeneralSpell : Talent { public char Comlexity = 'A'; - public GeneralSpell(string name, string roll, char comlexity = 'A') : base(name, roll) - { + public GeneralSpell(string name, string roll, char comlexity = 'A') : base(name, roll) { Comlexity = comlexity; } - public GeneralSpell(string name, string roll) : base(name, roll) - { + public GeneralSpell(string name, string roll) : base(name, roll) { } - public GeneralSpell() - { + public GeneralSpell() { } } }
\ No newline at end of file diff --git a/dsa/DSALib/Models/Database/Dsa/GroupChar.cs b/dsa/DSALib/Models/Database/Dsa/GroupChar.cs index a0115cd..446bfcc 100644 --- a/dsa/DSALib/Models/Database/Dsa/GroupChar.cs +++ b/dsa/DSALib/Models/Database/Dsa/GroupChar.cs @@ -1,7 +1,5 @@ -namespace DSALib.Models.Database.Dsa -{ - public class GroupChar - { +namespace DSALib.Models.Database.Dsa { + public class GroupChar { public string Name { get; set; } public int Id { get; set; } public int Lp { get; set; } diff --git a/dsa/DSALib/Models/Database/Dsa/Inventory.cs b/dsa/DSALib/Models/Database/Dsa/Inventory.cs index f3f5d7a..5dc5c62 100644 --- a/dsa/DSALib/Models/Database/Dsa/Inventory.cs +++ b/dsa/DSALib/Models/Database/Dsa/Inventory.cs @@ -1,9 +1,7 @@ using System.Collections.Generic; -namespace DSALib.Models.Database.Dsa -{ - public class Inventory - { +namespace DSALib.Models.Database.Dsa { + public class Inventory { public int Id { get; set; } public Dictionary<string, bool> Items { get; set; } = new Dictionary<string, bool>(); public Dictionary<string, bool> Food { get; set; } = new Dictionary<string, bool>(); diff --git a/dsa/DSALib/Models/Database/Dsa/Talent.cs b/dsa/DSALib/Models/Database/Dsa/Talent.cs index 214aecc..18f18ff 100644 --- a/dsa/DSALib/Models/Database/Dsa/Talent.cs +++ b/dsa/DSALib/Models/Database/Dsa/Talent.cs @@ -1,20 +1,15 @@ using System; -namespace DSALib.Models.Database.Dsa -{ - public class Talent : DSALib.Models.Database.DataObject - { - public Talent() - { +namespace DSALib.Models.Database.Dsa { + public class Talent : DataObject { + public Talent() { } - public Talent(string name) - { + public Talent(string name) { Name = name ?? throw new ArgumentNullException(nameof(name)); } - public Talent(string name, string roll) - { + public Talent(string name, string roll) { Name = name ?? throw new ArgumentNullException(nameof(name)); Roll = roll.Split('/'); } diff --git a/dsa/DSALib/Models/Database/Dsa/Weapon.cs b/dsa/DSALib/Models/Database/Dsa/Weapon.cs index 308c6c5..7f9b36e 100644 --- a/dsa/DSALib/Models/Database/Dsa/Weapon.cs +++ b/dsa/DSALib/Models/Database/Dsa/Weapon.cs @@ -1,15 +1,11 @@ using System; -namespace DSALib.Models.Database.Dsa -{ - public class Weapon - { - public Weapon() - { +namespace DSALib.Models.Database.Dsa { + public class Weapon { + public Weapon() { } - public Weapon(string name, string damage, int weight, string weaponTalent, string price) - { + public Weapon(string name, string damage, int weight, string weaponTalent, string price) { Name = name ?? throw new ArgumentNullException(nameof(name)); Damage = damage ?? throw new ArgumentNullException(nameof(damage)); Weight = weight; @@ -24,11 +20,9 @@ namespace DSALib.Models.Database.Dsa public string Price { get; set; } } - public class MeleeWeapon : Weapon - { + public class MeleeWeapon : Weapon { public MeleeWeapon(string name, string damage, int weight, string weaponTalent, string price) : base(name, - damage, weight, weaponTalent, price) - { + damage, weight, weaponTalent, price) { } public string TpKK { get; set; } @@ -36,11 +30,9 @@ namespace DSALib.Models.Database.Dsa public string MW { get; set; } } - public class RangedWeapon : Weapon - { + public class RangedWeapon : Weapon { public RangedWeapon(string name, string damage, int weight, string weaponTalent, string price) : base(name, - damage, weight, weaponTalent, price) - { + damage, weight, weaponTalent, price) { } public int AtMod { get; set; } diff --git a/dsa/DSALib/Models/Database/Dsa/WeaponTalent.cs b/dsa/DSALib/Models/Database/Dsa/WeaponTalent.cs index 2ab921b..2deecce 100644 --- a/dsa/DSALib/Models/Database/Dsa/WeaponTalent.cs +++ b/dsa/DSALib/Models/Database/Dsa/WeaponTalent.cs @@ -1,11 +1,8 @@ using System; -namespace DSALib.Models.Database.Dsa -{ - public class WeaponTalent - { - public WeaponTalent(string name, int at, int pa) - { +namespace DSALib.Models.Database.Dsa { + public class WeaponTalent { + public WeaponTalent(string name, int at, int pa) { Name = name ?? throw new ArgumentNullException(nameof(name)); At = at; Pa = pa; diff --git a/dsa/DSALib/Models/Database/Groups/DSAGroup.cs b/dsa/DSALib/Models/Database/Groups/DSAGroup.cs index adbd0ac..574d6a5 100644 --- a/dsa/DSALib/Models/Database/Groups/DSAGroup.cs +++ b/dsa/DSALib/Models/Database/Groups/DSAGroup.cs @@ -1,10 +1,8 @@ using System.Collections.Generic; using DSALib.Models.Database.Dsa; -namespace DSALib.Models.Database.Groups -{ - public class DsaGroup : Group - { +namespace DSALib.Models.Database.Groups { + public class DsaGroup : Group { public List<GroupChar> Chars { get; set; } = new List<GroupChar>(); } }
\ No newline at end of file diff --git a/dsa/DSALib/Models/Database/Groups/Group.cs b/dsa/DSALib/Models/Database/Groups/Group.cs index 096f2be..eaf10c5 100644 --- a/dsa/DSALib/Models/Database/Groups/Group.cs +++ b/dsa/DSALib/Models/Database/Groups/Group.cs @@ -1,7 +1,5 @@ -namespace DSALib.Models.Database.Groups -{ - public class Group - { +namespace DSALib.Models.Database.Groups { + public class Group { public string Name { get; set; } public string Password { get; set; } public int Id { get; set; } diff --git a/dsa/DSALib/Models/Database/IDataObject.cs b/dsa/DSALib/Models/Database/IDataObject.cs index bdc88b7..41a0882 100644 --- a/dsa/DSALib/Models/Database/IDataObject.cs +++ b/dsa/DSALib/Models/Database/IDataObject.cs @@ -1,7 +1,5 @@ -namespace DSALib.Models.Database -{ - public interface IDataObject - { +namespace DSALib.Models.Database { + public interface IDataObject { string Name { get; set; } } }
\ No newline at end of file |