first commit

This commit is contained in:
Beyhan Oğur
2026-09-03 04:45:36 +03:00
commit d5f52cc3d3
1038 changed files with 169579 additions and 0 deletions
@@ -0,0 +1,51 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace ClassicAssist.Data.Scavenger
{
public class ScavengerEntry : INotifyPropertyChanged
{
private bool _enabled;
private int _graphic;
private int _hue;
private string _name;
public bool Enabled
{
get => _enabled;
set => SetProperty( ref _enabled, value );
}
public int Graphic
{
get => _graphic;
set => SetProperty( ref _graphic, value );
}
public int Hue
{
get => _hue;
set => SetProperty( ref _hue, value );
}
public string Name
{
get => _name;
set => SetProperty( ref _name, value );
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged( [CallerMemberName] string propertyName = null )
{
PropertyChanged?.Invoke( this, new PropertyChangedEventArgs( propertyName ) );
}
// ReSharper disable once RedundantAssignment
public void SetProperty<T>( ref T field, T value, [CallerMemberName] string propertyName = null )
{
field = value;
OnPropertyChanged( propertyName );
}
}
}
@@ -0,0 +1,36 @@
using System;
using System.Collections.ObjectModel;
namespace ClassicAssist.Data.Scavenger
{
public class ScavengerManager
{
private static ScavengerManager _instance;
private static readonly object _instanceLock = new object();
private ScavengerManager()
{
}
public Action CheckArea { get; set; }
public ObservableCollection<ScavengerEntry> Items { get; set; }
public static ScavengerManager GetInstance()
{
// ReSharper disable once InvertIf
if ( _instance == null )
{
lock ( _instanceLock )
{
if ( _instance == null )
{
_instance = new ScavengerManager();
}
}
}
return _instance;
}
}
}