Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
5434ba8
Minor Renaming
herbertmilhomme Dec 24, 2022
05fa952
Forgot to Commit in Last Push
herbertmilhomme Dec 24, 2022
d9577a3
Merge branch 'Dev_Feature_CoroutineIE' into alpha
herbertmilhomme Dec 24, 2022
28e4465
Update Attack.cs
herbertmilhomme Dec 24, 2022
8af5f68
Merge branch 'Dev_Feature_CoroutineIE' into alpha
herbertmilhomme Dec 25, 2022
e04c31c
WIP Pending IEnum Changes
herbertmilhomme Jan 13, 2023
6cb1ebd
Delete UnityItemHandlers.cs
herbertmilhomme Jan 18, 2023
5fd8fe8
Update UnityBattle.cs
herbertmilhomme Jan 18, 2023
81883b1
More Refactors to Framework IEnumerators
herbertmilhomme Jan 20, 2023
7b82396
Update UnityInterfaces.cs
herbertmilhomme Jan 20, 2023
d41e7f7
Create UnityBattleTest.cs
herbertmilhomme Jan 20, 2023
58e5943
Update UnityInterfaces.cs
herbertmilhomme Jan 20, 2023
a4eeece
Update PokemonDataBox.cs
herbertmilhomme Jan 21, 2023
60287cd
Update IBattle.cs
herbertmilhomme Jan 21, 2023
82b84bf
Update .gitignore
herbertmilhomme Jan 21, 2023
d7347d4
Update .gitignore
herbertmilhomme Jan 21, 2023
3705ffa
Updates to Unity Battle Scene Interface
herbertmilhomme Jan 22, 2023
cd00e25
Update UnityInterfaces.cs
herbertmilhomme Jan 22, 2023
9d785dc
Update Battle.cs
herbertmilhomme Jan 22, 2023
27bf847
Update UnityBattle.cs
herbertmilhomme Jan 22, 2023
5e0baa7
Update Pokemon.cs
herbertmilhomme Jan 22, 2023
4959838
Pending WIP IEnum Battle Scene Refactor
herbertmilhomme Jan 22, 2023
af85b55
Name Convention Uniformity
herbertmilhomme Jan 23, 2023
0f5134f
Pending IEnum Battle Scene Refactor
herbertmilhomme Jan 23, 2023
0c40108
Attempt at running coroutine in Unity
herbertmilhomme Jan 23, 2023
a66e5c3
Cleared Temporary Errors from Unity Scene
herbertmilhomme Jan 23, 2023
03ba4c9
Update BattleScene.cs
herbertmilhomme Jan 23, 2023
9053394
Minor Updates, Fixes, and Cleanups
herbertmilhomme Jan 26, 2023
f282819
Merge branch 'alpha' into Dev_Feature_CoroutineIE
herbertmilhomme Jan 27, 2023
8ae6990
Update .gitignore
herbertmilhomme Jan 27, 2023
f1e8751
Tweak to Battle.Priority var
herbertmilhomme Jan 28, 2023
6c2597b
Tweak to Battle.Battlers var
herbertmilhomme Jan 28, 2023
5b71d05
Update BattleScene.cs
herbertmilhomme Jan 28, 2023
1392cc0
Merge branch 'Dev_Feature_Battle-Inheritance-with-New' into Dev_Featu…
herbertmilhomme Jan 28, 2023
e1b8ac4
Fixed null `new` Battle.Priority reference
herbertmilhomme Jan 28, 2023
c01dd7d
Update UnityBattleTest.cs
herbertmilhomme Jan 28, 2023
ef2397b
Update Pokemon.cs
herbertmilhomme Jan 28, 2023
0d48017
Update Assembly-CSharp.csproj
herbertmilhomme Jan 28, 2023
10ef377
Fixed null `new` Battle.Battlers reference
herbertmilhomme Jan 28, 2023
fcf938a
Minor Oversights and Corrections...
herbertmilhomme Jan 29, 2023
340fc90
Merge branch 'alpha' into Dev_Feature_CoroutineIE
herbertmilhomme Jan 29, 2023
e85c82a
Minor Fixes to Framework
herbertmilhomme Feb 1, 2023
ab9796a
Merge branch 'alpha' into Dev_Feature_CoroutineIE
herbertmilhomme Feb 1, 2023
202fd14
Fixes to UI to Match IEnum Corrections
herbertmilhomme Feb 1, 2023
a71047d
Update SpriteComponent.cs
herbertmilhomme Feb 1, 2023
9287c63
Merge remote-tracking branch 'unity-upstream/alpha'
herbertmilhomme Feb 1, 2023
0465c87
Update .gitignore
herbertmilhomme Mar 16, 2023
a4a7462
Merge pull request #130 from herbertmilhomme/Dev_Feature_CoroutineIE
herbertmilhomme Apr 20, 2023
08baa2b
Merge remote-tracking branch 'unity-upstream/alpha'
herbertmilhomme Apr 30, 2023
bc58ca8
Customize Wild/Event Battle Encounters
herbertmilhomme May 12, 2023
3a12969
Create OrgBattleGenerator.cs
herbertmilhomme May 15, 2023
073d28b
Create OrgBattle.cs
herbertmilhomme May 15, 2023
002c8ad
Refactor Interface for Missing Classes
herbertmilhomme May 15, 2023
1025090
Minor Refactor and Code Cleanup
herbertmilhomme May 16, 2023
91cb54b
Reviving Unit Testing in Solution
herbertmilhomme May 16, 2023
86f31ec
Added/Duplicated Warning Config to App Proj
herbertmilhomme May 16, 2023
6d2cefb
Update PokemonUnity.Application.csproj
herbertmilhomme May 16, 2023
64c394b
Update PokemonUnity.Application.csproj
herbertmilhomme May 16, 2023
c0179ed
Revisit/Refactor Old PC Class Entity
herbertmilhomme May 17, 2023
aec86c3
Revisit/Refactor Item PC and Bag Storage
herbertmilhomme May 17, 2023
7e19439
Revisit/Refactor Event Publish-Subscribers
herbertmilhomme May 17, 2023
bf10c2c
Minor Refactor and Corrections
herbertmilhomme May 31, 2023
efe96c1
Whitespaces Tabify and Trim
herbertmilhomme May 31, 2023
42797ac
Merge branch 'master' into dev_feature_web-docs
herbertmilhomme May 31, 2023
80f3fe8
Removed PB Text in Source
herbertmilhomme Jun 1, 2023
bc5fa8b
Merge branch 'master' into dev_feature_web-docs
herbertmilhomme Jun 1, 2023
6163a18
Export Latest Changes & Updates
herbertmilhomme Jun 2, 2023
6d597ee
Fix: Html Triggered Razor Accidentally
herbertmilhomme Jun 2, 2023
c3ba8c6
Split Html between Content and Layout WIP
herbertmilhomme Jun 2, 2023
065adea
Split Html between Content and Layout WIP
herbertmilhomme Jun 2, 2023
75d8014
Split Html between Content and Layout
herbertmilhomme Jun 2, 2023
3d701db
Split Html between Content and Layout
herbertmilhomme Jun 8, 2023
996504f
`é` to `é`
herbertmilhomme Jun 8, 2023
c890498
Page Title Correction
herbertmilhomme Jun 8, 2023
8983bcf
Used Directory Setting for Layout
herbertmilhomme Jun 8, 2023
f903e9f
Whitespace Adjustments
herbertmilhomme Jun 8, 2023
9f69de5
Create searchdata.xml & sql
herbertmilhomme Jun 8, 2023
628f43d
Addressed Minor Tag Warnings
herbertmilhomme Aug 6, 2023
e7ccada
Update PokemonUnity.Web.Public.csproj
herbertmilhomme Aug 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,7 @@ git-journal.fish
/Set-AssemblyVersion.ps1
/packages
*.DoxyFile
*.meta
* - Copy.cs
* - Copy.cs.meta
/PokemonUnity.WinForm/Resources
1 change: 1 addition & 0 deletions PokemonLibrary.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1909DF4C-3567-4A1F-8BB6-C2DE6584088D}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
PokemonUnity.Application\.editorconfig = PokemonUnity.Application\.editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
.gitmodules = .gitmodules
Expand Down
13 changes: 13 additions & 0 deletions PokemonUnity.Application/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[*.cs]

# CS0162: Unreachable code detected
dotnet_diagnostic.CS0162.severity = silent
# CS0219: The variable is assigned but its value is never used
dotnet_diagnostic.CS0219.severity = silent
dotnet_diagnostic.CS0414.severity = silent
dotnet_diagnostic.CS0067.severity = silent
# CS0472: The result of the expression is always 'true'
dotnet_diagnostic.CS0472.severity = silent
# CS0618: Entity used is obsolete
#dotnet_diagnostic.CS0618.severity = silent
#dotnet_diagnostic.CS0612.severity = silent
102 changes: 51 additions & 51 deletions PokemonUnity.Application/Character/Bag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
using PokemonUnity.Character;

namespace PokemonUnity.Character
{
{
/// <summary>
/// Collection of KeyValuePairs grouped by Items.
/// Used in combination with quantity[],
/// one holds the itemId (Key) and the other
/// Used in combination with quantity[],
/// one holds the itemId (Key) and the other
/// has amount (value).
/// </summary>
/// I'd feel more comfortable if instead of {get;set;}
/// it was a {get;} only, that returned an iqueryable
/// ToDo: remove static <see cref="GameVariables.Bag_Items"/>
/// so trainerbag can load multiple players (for netplay)
/*[System.Obsolete("Something i plan to transistion to; not yet ready for full integration")]
public class Bag_Refactor
/*[System.Obsolete("Something i plan to transition to; not yet ready for full integration")]
public class Bag : PokemonEssentials.Interface.Screen.IBag
{
#region Variables
private List<Items> items { get; set; }
Expand Down Expand Up @@ -246,7 +246,7 @@ public KeyValuePair<Items, byte>[] Sort(Order by)
}
return items.ToArray();
}

/// <summary>
/// If the player has the <see cref="Items.MEGA_BRACELET"/> in their inventory.
/// </summary>
Expand All @@ -269,7 +269,7 @@ public bool HasMegaBracelet()
/// newer gens automatically give at start, so default is true...
public bool HasRunningShoes()
{
//if (!items.Contains(Items.RUNNING_SHOES))
//if (!items.Contains(Items.RUNNING_SHOES))
// return false;

return true;
Expand Down Expand Up @@ -340,7 +340,7 @@ public bool CanStore(Items item)
//Check if item has storage limit
//Check if storage limit is met
//ToDo: If pocket is full, cannot hold any more items.
//ToDo: if individual item capicity is reached, reject add
//ToDo: if individual item capacity is reached, reject add
if (Kernal.ItemData[item].Pocket == ItemPockets.MISC)
{
if (Core.MAXPOCKETSIZE[(int)ItemPockets.MISC] == -1) return true;
Expand Down Expand Up @@ -368,13 +368,13 @@ public void GetMessageReceive(Items item, IScene scene, int quantity = 1)
Message = Game.GameData.Player.Name + " stored it in the~" + Kernal.ItemData[item].Pocket.ToString() + " pocket.";
else
Message = Game.GameData.Player.Name + " stored them~in the " + Kernal.ItemData[item].Pocket.ToString() + " pocket.";
//scene.pbDisplayMessage(Message);
//scene.DisplayMessage(Message);
}

public enum Order
{
Alphabet,
Quantity,
Quantity,
Category,
Price
}
Expand All @@ -393,7 +393,7 @@ public partial class PokemonBag : PokemonEssentials.Interface.Screen.IBag {
private Dictionary<ItemPockets, int> choices;

public string[] pocketNames { get {
return null; //Game.GameData.pbPocketNames();
return null; //Game.GameData.PocketNames();
} }
//public ItemPockets pockets { get {
// rearrange();
Expand Down Expand Up @@ -429,7 +429,7 @@ public void rearrange() {
int nump=numPockets;
for (int i = 0; i < @pockets.Length; i++) {
foreach (Items item in @pockets[i]) {
//ItemPockets p=pbGetPocket(item[0]);
//ItemPockets p=GetPocket(item[0]);
ItemPockets p=Kernal.ItemData[item].Pocket??ItemPockets.MISC;
if ((int)p<=nump) newpockets[(int)p].Add(item);
}
Expand Down Expand Up @@ -484,9 +484,9 @@ public void setChoice(ItemPockets pocket,int value) {
/// Can be retrieved with <see cref="Game.GameData.Bag.registeredItem"/>
/// </summary>
/// <param name="item"></param>
public void pbRegisterKeyItem(Items item) {
public void RegisterKeyItem(Items item) {
//if (item is String || item is Symbol) {
// item=getID(PBItems,item);
// item=getID(Items,item);
//}
//if (item == null || item<1) {
// //throw new Exception(Game._INTL("The item number is invalid."));
Expand All @@ -501,105 +501,105 @@ public int maxPocketSize(int pocket) {
return maxsize.Value;
}

public int pbQuantity(Items item) {
public int Quantity(Items item) {
//if (item is String || item is Symbol) {
// item=getID(PBItems,item);
// item=getID(Items,item);
//}
//if (item == null || item<1) {
// //throw new Exception(Game._INTL("The item number is invalid."));
// return 0;
//}
//ItemPockets pocket=pbGetPocket(item);
//ItemPockets pocket=GetPocket(item);
int pocket=(int)(Kernal.ItemData[item].Pocket??ItemPockets.MISC);
int maxsize=maxPocketSize(pocket);
if (maxsize<0) maxsize=@pockets[(int)pocket].Length;
return ItemStorageHelper.pbQuantity(@pockets[pocket],maxsize,item);
return ItemStorageHelper.Quantity(@pockets[pocket],maxsize,item);
}

public bool pbHasItem (Items item) {
return pbQuantity(item)>0;
public bool HasItem (Items item) {
return Quantity(item)>0;
}

public bool pbDeleteItem(Items item,int qty=1) {
public bool DeleteItem(Items item,int qty=1) {
//if (item is String || item is Symbol) {
// item=getID(PBItems,item);
// item=getID(Items,item);
//}
//if (item == null || item<1) {
// //throw new Exception(Game._INTL("The item number is invalid."));
// return false;
//}
//ItemPockets pocket=pbGetPocket(item);
//ItemPockets pocket=GetPocket(item);
int pocket=(int)(Kernal.ItemData[item].Pocket??ItemPockets.MISC);
int maxsize=maxPocketSize(pocket);
if (maxsize<0) maxsize=@pockets[pocket].Length;
bool ret=ItemStorageHelper.pbDeleteItem(ref @pockets[pocket],maxsize,item,qty);
bool ret=ItemStorageHelper.DeleteItem(ref @pockets[pocket],maxsize,item,qty);
if (ret) {
if (@registeredItem==item && !pbHasItem(item)) @registeredItem=0;
if (@registeredItem==item && !HasItem(item)) @registeredItem=0;
}
return ret;
}

public bool pbCanStore (Items item,int qty=1) {
public bool CanStore (Items item,int qty=1) {
//if (item is String || item is Symbol) {
// item=getID(PBItems,item);
// item=getID(Items,item);
//}
//if (!item || item<1) {
// //throw new Exception(Game._INTL("The item number is invalid."));
// return false;
//}
//ItemPockets pocket=pbGetPocket(item);
//ItemPockets pocket=GetPocket(item);
int pocket=(int)(Kernal.ItemData[item].Pocket??ItemPockets.MISC);
int maxsize=maxPocketSize(pocket);
if (maxsize<0) maxsize=@pockets[pocket].Length+1;
return ItemStorageHelper.pbCanStore(
return ItemStorageHelper.CanStore(
@pockets[pocket],maxsize,Core.BAGMAXPERSLOT,item,qty);
}

public bool pbStoreAllOrNone(Items item,int qty=1) {
//if (item is String || item is Symbol) {
// item=getID(PBItems,item);
//}
//if (item == null || item<1) {
// //throw new Exception(Game._INTL("The item number is invalid."));
// return false;
//}
//ItemPockets pocket=pbGetPocket(item);
int pocket=(int)(Kernal.ItemData[item].Pocket??ItemPockets.MISC);
int maxsize=maxPocketSize(pocket);
if (maxsize<0) maxsize=@pockets[pocket].Length+1;
return ItemStorageHelper.pbStoreItem(ref
@pockets[pocket],maxsize,Core.BAGMAXPERSLOT,item,qty);
public bool StoreAllOrNone(Items item,int qty=1) {
//if (item is String || item is Symbol) {
// item=getID(Items,item);
//}
//if (item == null || item<1) {
// //throw new Exception(Game._INTL("The item number is invalid."));
// return false;
//}
//ItemPockets pocket=GetPocket(item);
int pocket=(int)(Kernal.ItemData[item].Pocket??ItemPockets.MISC);
int maxsize=maxPocketSize(pocket);
if (maxsize<0) maxsize=@pockets[pocket].Length+1;
return ItemStorageHelper.StoreItem(ref
@pockets[pocket],maxsize,Core.BAGMAXPERSLOT,item,qty);
}

public bool pbStoreItem(Items item,int qty=1) {
public bool StoreItem(Items item,int qty=1) {
//if (item is String || item is Symbol) {
// item=getID(PBItems,item);
// item=getID(Items,item);
//}
//if (item == null || item<1) {
// //throw new Exception(Game._INTL("The item number is invalid."));
// return false;
//}
//ItemPockets pocket=pbGetPocket(item);
//ItemPockets pocket=GetPocket(item);
int pocket=(int)(Kernal.ItemData[item].Pocket??ItemPockets.MISC);
int maxsize=maxPocketSize(pocket);
if (maxsize<0) maxsize=@pockets[pocket].Length+1;
return ItemStorageHelper.pbStoreItem(ref
return ItemStorageHelper.StoreItem(ref
@pockets[pocket],maxsize,Core.BAGMAXPERSLOT,item,qty,true);
}

public bool pbChangeItem(Items olditem,Items newitem) {
public bool ChangeItem(Items olditem,Items newitem) {
//if (olditem is String || olditem is Symbol) {
// olditem=getID(PBItems,olditem);
// olditem=getID(Items,olditem);
//}
//if (newitem is String || newitem is Symbol) {
// newitem=getID(PBItems,newitem);
// newitem=getID(Items,newitem);
//}
//if (olditem == null || olditem<1 || newitem == null || newitem<1) {
if ((int)olditem<1 || (int)newitem<1) {
//throw new Exception(Game._INTL("The item number is invalid."));
return false;
}
//ItemPockets pocket=pbGetPocket(olditem);
//ItemPockets pocket=GetPocket(olditem);
int pocket=(int)(Kernal.ItemData[olditem].Pocket??ItemPockets.MISC);
int maxsize=maxPocketSize(pocket);
if (maxsize<0) maxsize=@pockets[pocket].Length;
Expand Down
Loading