-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added randomizer. Fixed bug with loading some levels with negative wall light levels. Added code to return Streams for files from GOBs/LFDs, in addition to directly loading into DfFile objects. Fixed rounding errors with palette loading. Minor bug fixes to Databound library. Fix selecting files inside GOBs in FileBrowser. Added ICloneable support to many of the file and randomizer classes. Small loading/saving fixes to some of the DF file classes. Rewrote parts of DfFont to be easier to use. Fix reading of Steam libraryfolders.vdf for most recent Steam Deck updates.
- Loading branch information
1 parent
fa5d37c
commit dfc1a94
Showing
127 changed files
with
119,635 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
Assets/Dark Forces Showcase/Randomizer/DataboundRandomRange.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using MZZT.DataBinding; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
namespace MZZT.DarkForces.Showcase { | ||
public class DataboundRandomRange : Databound<RandomRange> { | ||
[SerializeField] | ||
private string memberName; | ||
|
||
private void Start() { | ||
IDataboundObject databound = this.GetComponentsInParent<IDataboundObject>(true).First(x => (object)x != this); | ||
databound.ValueChanged += this.Databound_ValueChanged; | ||
this.OnValueChanged(); | ||
} | ||
|
||
private void Databound_ValueChanged(object sender, EventArgs e) { | ||
this.OnValueChanged(); | ||
} | ||
|
||
private void OnValueChanged() { | ||
IDataboundObject databound = this.GetComponentsInParent<IDataboundObject>(true).First(x => (object)x != this); | ||
object value = databound.Value; | ||
if (value == null) { | ||
return; | ||
} | ||
|
||
MemberInfo member = value.GetType().GetMember(this.memberName).First(); | ||
|
||
this.Value = (RandomRange)(member switch { | ||
FieldInfo field => field.GetValue(value), | ||
PropertyInfo property => property.GetValue(value), | ||
MethodInfo method => method.Invoke(value, Array.Empty<object>()), | ||
_ => throw new NotImplementedException() | ||
}); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/Dark Forces Showcase/Randomizer/DataboundRandomRange.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
Assets/Dark Forces Showcase/Randomizer/DataboundRandomizerColormapSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using MZZT.DataBinding; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace MZZT.DarkForces.Showcase { | ||
public class DataboundRandomizerColormapSettings : Databound<RandomizerColormapSettings> { | ||
private void OnEnable() { | ||
this.Value = Randomizer.Instance.Settings.Colormap; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/Dark Forces Showcase/Randomizer/DataboundRandomizerColormapSettings.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.