Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0.0 rewriting & speed up! #79

Merged
merged 48 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ad7fc1d
Initial rewriting
Manu098vm Feb 17, 2024
f81ab0c
Misc tweaks
Manu098vm Feb 23, 2024
19c07d6
Update for PKHeX Nuget
Manu098vm Feb 23, 2024
61ee28d
Update PKHeX.Core To 24.03.10 (#75)
foohyfooh Mar 12, 2024
a4c431d
Use Parallel and ConcurrentBag; Force Stars filter; Merge with contri…
Manu098vm Mar 13, 2024
edc2ae5
Account For PK9.Obedience_Level Name Change
foohyfooh Mar 13, 2024
05658fe
Merge remote-tracking branch 'upstream/rewriting' into pk9_obedience_…
foohyfooh Mar 13, 2024
5ef5681
Update Stars selections; Force GridView refresh; Improve event handling
Manu098vm Mar 13, 2024
4f6d53e
Better handle index searches; Init stars & species filters in Reward …
Manu098vm Mar 14, 2024
3a0ad85
Use subsequnt seeds for Shinify All
Manu098vm Mar 14, 2024
ad2982a
Fix randomize all & return to Xoroshiro for better randomization
Manu098vm Mar 14, 2024
81c33b4
Init tests for EncounterTeraTF9 entity generation
Manu098vm Mar 14, 2024
6beb0b9
Add tests; Use initial seed for calculators; Misc fixes
Manu098vm Mar 15, 2024
3401dfe
Inline tests
Manu098vm Mar 15, 2024
6956ac9
Fix text to seed
Manu098vm Mar 15, 2024
352d473
Add tests for Filtered encounters; add MaxTests constant
Manu098vm Mar 15, 2024
8f6be75
Complete GenerateEntities tests; Misc fixes
Manu098vm Mar 17, 2024
f1bf8a3
Properly check for EC equals PID
Manu098vm Mar 18, 2024
f032b8d
Add Time label
Manu098vm Mar 18, 2024
8badd31
Auto select stars based on current encounter
Manu098vm Mar 18, 2024
785ff2a
Proper encounter selection in Reward Calculator
Manu098vm Mar 18, 2024
f8c28e9
Show Raid Infos as second column
Manu098vm Mar 18, 2024
836b8b0
Remove !null check
Manu098vm Mar 18, 2024
6f9f03f
Reverse Stars <-> Species order
Manu098vm Mar 18, 2024
4f9bba1
Warning for no encounter match
Manu098vm Mar 18, 2024
8f98b62
Only proceed with calcs if the encounter array effectively contains e…
Manu098vm Mar 18, 2024
b51fb54
Fix Compare Item
Manu098vm Mar 18, 2024
f019828
Remove NeedAccurate
Manu098vm Mar 18, 2024
e25b3f7
Set tests to 0xFFFF
Manu098vm Mar 18, 2024
9b888e7
Add Tera Type to reward info
Manu098vm Mar 18, 2024
91d6e15
Rework Reward filter
Manu098vm Mar 18, 2024
47a6ac3
Init rewards tests
Manu098vm Mar 18, 2024
0da81b8
Remove unused imports; Inline namespace
Manu098vm Mar 18, 2024
f1a4c1f
Fix index detection for events with both mighty and event encounters
Manu098vm Mar 18, 2024
f960dea
Reorder methods
Manu098vm Mar 18, 2024
90b1cd2
Update resources
Manu098vm Mar 18, 2024
8d441f2
Add splashcreen to launcher
Manu098vm Mar 19, 2024
da047e8
Add Raid Calculator and Reward Calculator to ToolStripMenu
Manu098vm Mar 19, 2024
aaa7288
Fix event raids seed checker
Manu098vm Mar 19, 2024
0f45549
Inline tests
Manu098vm Mar 19, 2024
95ca597
Re-add invalid text
Manu098vm Mar 19, 2024
ef5efa0
Remove unused import
Manu098vm Mar 19, 2024
097ec9f
Merge PR #78
Manu098vm Mar 19, 2024
954feb4
Move csproj constant
Manu098vm Mar 19, 2024
a384a02
Remove duplicated resource
Manu098vm Mar 19, 2024
9641ae8
Update version
Manu098vm Mar 19, 2024
8cf0eb0
merge with main
Manu098vm Mar 19, 2024
8f3c84a
Fix merge
Manu098vm Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Alternatively, feel free to contact me on my [Discord Server](https://discord.gg
## License
![gplv3-with-text-136x68](https://user-images.githubusercontent.com/52102823/199572700-4e02ed70-74ef-4d67-991e-3168d93aac0d.png)

Copyright © 2023 Manu098vm
Copyright © 2024 Manu098vm

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
127 changes: 127 additions & 0 deletions TeraFinder.Core/Classes/ConcurrentList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Immutable;
using System.ComponentModel;

namespace TeraFinder.Core;

public class ConcurrentList<T> : ConcurrentBag<T>, IBindingList
{
public bool IsFinalized { get; private set; } = false;

private ImmutableArray<T> _binding;

public void FinalizeElements()
{
_binding = [.. this];
IsFinalized = true;
}

public new void Clear()
{
base.Clear();
_binding = _binding.Clear();
IsFinalized = false;
}

object? IList.this[int index]
{
get => GetElement(index);
set => throw new AccessViolationException("The List can not be edited.");
}

private T GetElement(int index)
{
if (IsFinalized)
return _binding[index];

throw new AccessViolationException("The List has not been finalized.");
}

bool IBindingList.AllowEdit => IsFinalized;
bool IBindingList.AllowNew => !IsFinalized;
bool IBindingList.AllowRemove => false;
bool IBindingList.IsSorted => false;

ListSortDirection IBindingList.SortDirection => throw new NotImplementedException();
PropertyDescriptor? IBindingList.SortProperty => throw new NotImplementedException();
bool IBindingList.SupportsChangeNotification => false;
bool IBindingList.SupportsSearching => IsFinalized;
bool IBindingList.SupportsSorting => false;

bool IList.IsFixedSize => false;
bool IList.IsReadOnly => false;

event ListChangedEventHandler IBindingList.ListChanged
{
add => throw new NotImplementedException();
remove => throw new NotImplementedException();
}

int IList.Add(object? value)
{
#pragma warning disable CS8600
#pragma warning disable CS8604
Add((T)value);
#pragma warning restore CS8600
#pragma warning restore CS8604
return 0;
}

void IBindingList.AddIndex(PropertyDescriptor property)
{
throw new NotImplementedException();
}

object? IBindingList.AddNew()
{
throw new NotImplementedException();
}

void IBindingList.ApplySort(PropertyDescriptor property, ListSortDirection direction)
{
throw new NotImplementedException();
}

void IList.Clear() => Clear();

bool IList.Contains(object? value)
{
throw new NotImplementedException();
}

int IBindingList.Find(PropertyDescriptor property, object key)
{
throw new NotImplementedException();
}

int IList.IndexOf(object? value)
{
throw new NotImplementedException();
}

void IList.Insert(int index, object? value)
{
throw new NotImplementedException();
}

void IList.Remove(object? value)
{
throw new NotImplementedException();
}

void IList.RemoveAt(int index)
{
throw new NotImplementedException();
}

void IBindingList.RemoveIndex(PropertyDescriptor property)
{
throw new NotImplementedException();
}

void IBindingList.RemoveSort()
{
throw new NotImplementedException();
}
}
Loading
Loading