Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions CommunityBugFixCollection/BugFixOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,27 @@ namespace CommunityBugFixCollection
{
internal sealed class BugFixOptions : SingletonConfigSection<BugFixOptions>
{
private static readonly DefiningConfigKey<bool> _forceAprilFools = new("ForceAprilFools", "Whether to force April Fools content to be active.", () => false);

private static readonly DefiningConfigKey<bool> _useIecByteFormat = new("UseIecByteFormat", "Whether to format bytes using IEC as opposed to decimal format when <i>LocalizedByteFormatting</i> is enabled.", () => true);

/// <inheritdoc/>
public override string Description => "Contains the settings for the few fixes that offer them.";

/// <summary>
/// Gets whether to force April Fools content to be active.
/// </summary>
public bool ForceAprilFools => _forceAprilFools;

/// <inheritdoc/>
public override string Id => "Options";

/// <summary>
/// Gets whether <see cref="LocalizedByteFormatting"/> should format bytes using IEC or decimal format.
/// </summary>
public bool UseIecByteFormat => _useIecByteFormat.GetValue();
public bool UseIecByteFormat => _useIecByteFormat;

/// <inheritdoc/>
public override Version Version { get; } = new(1, 0, 0);
public override Version Version { get; } = new(1, 1, 0);
}
}
3 changes: 3 additions & 0 deletions CommunityBugFixCollection/Locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"CommunityBugFixCollection.NoLossOfColorProfile.Description": "Verhindert, dass Farbprofile nicht bei allen Berechnungen erhalten bleiben.",
"CommunityBugFixCollection.NoZeroScaleToolRaycast.Description": "Verhinder einen Crash wenn (Multi-)Werkzeuge auf null skaliert werden.",
"CommunityBugFixCollection.NodeNameAdjustments.Description": "Verbessert die verwirrenden Namen der Remap [-1; 1] zu [0; 1] ProtoFlux Nodes.",
"CommunityBugFixCollection.NoFunForCorporate.Description": "Verhindert, dass Aprilscherz-Inhalte ausgelöst werden, wenn der Nutzer in einem Universe ist.<br/>Dies wird durch die <i>Erzwinge Aprilscherze</i> Einstellung überschrieben, welche erzwingt, dass diese Inhalte aktiv sind.",
"CommunityBugFixCollection.NonHDRColorClamping.Description": "Korrigiert, dass die nicht-HDR Varianten der Color(X) Kanal-Additionen die Werte nicht limitieren.",
"CommunityBugFixCollection.NonLinearColorXFromHexCode.Description": "Zwingt colorX From HexCode das sRGB statt dem Linearen Farbprofil zu nutzen.",
"CommunityBugFixCollection.NoParentUnderSelfAudioClipPlayer.Description": "Verhindert, dass die ChildParentAudioClipPlayer-Komponente das Spiel crasht, wenn ihr <i>ParentUnder</i>-Feld auf den Slot, auf dem sie ist, gesetzt ist. Fügt außerdem eine Erklärung des Problems im Header hinzu.",
Expand All @@ -51,6 +52,8 @@

"CommunityBugFixCollection.Config.Options.Name": "Optionen",
"CommunityBugFixCollection.Config.Options.Description": "Enthällt die Einstellungen für die wenigen Fixes die diese anbieten.",
"CommunityBugFixCollection.Config.Options.ForceAprilFools.Name": "Erzwinge Aprilscherze",
"CommunityBugFixCollection.Config.Options.ForceAprilFools.Description": "Ob Aprilscherz-Inhalte erzwungenermaßen aktiv sein sollen.",
"CommunityBugFixCollection.Config.Options.UseIecByteFormat.Name": "IEC Byte-Format Benutzen",
"CommunityBugFixCollection.Config.Options.UseIecByteFormat.Description": "Ob Bytes nach IEC (Faktor 1024) statt dezimal (Faktor 1000) formatiert werden sollen, wenn <i>LocalizedByteFormatting</i> aktiviert ist.",

Expand Down
3 changes: 3 additions & 0 deletions CommunityBugFixCollection/Locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"CommunityBugFixCollection.NoLossOfColorProfile.Description": "Fixes Color Profile not being preserved on all operations.",
"CommunityBugFixCollection.NoZeroScaleToolRaycast.Description": "Fixes a crash when a (multi)tool is scaled to zero.",
"CommunityBugFixCollection.NodeNameAdjustments.Description": "Fixes the confusing names of the Remap [-1; 1] to [0; 1] ProtoFlux nodes.",
"CommunityBugFixCollection.NoFunForCorporate.Description": "Prevents April Fools related content from triggering when the user is in a Universe.<br/>This is overridden by the <i>Force April Fools</i> setting, which forces this content to be active.",
"CommunityBugFixCollection.NonHDRColorClamping.Description": "Fixes non-HDR variants of Color(X) channel addition not clamping.",
"CommunityBugFixCollection.NonLinearColorXFromHexCode.Description": "Forces colorX From HexCode to use the sRGB rather than Linear profile.",
"CommunityBugFixCollection.NoParentUnderSelfAudioClipPlayer.Description": "Prevents the ChildParentAudioClipPlayer components from crashing the game if their <i>ParentUnder</i> field is set to the slot that it's on. Also adds a header text explaining the problem.",
Expand All @@ -57,6 +58,8 @@

"CommunityBugFixCollection.Config.Options.Name": "Options",
"CommunityBugFixCollection.Config.Options.Description": "Contains the settings for the few fixes that offer them.",
"CommunityBugFixCollection.Config.Options.ForceAprilFools.Name": "Force April Fools",
"CommunityBugFixCollection.Config.Options.ForceAprilFools.Description": "Whether to force April Fools content to be active.",
"CommunityBugFixCollection.Config.Options.UseIecByteFormat.Name": "Use IEC Byte Format",
"CommunityBugFixCollection.Config.Options.UseIecByteFormat.Description": "Whether to format bytes using IEC (factor 1024) as opposed to decimal format (factor 1000) when <i>LocalizedByteFormatting</i> is enabled.",

Expand Down
39 changes: 39 additions & 0 deletions CommunityBugFixCollection/NoFunForCorporate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using FrooxEngine;
using HarmonyLib;

namespace CommunityBugFixCollection
{
[HarmonyPatch]
[HarmonyPatchCategory(nameof(NoFunForCorporate))]
internal sealed class NoFunForCorporate : ResoniteBugFixMonkey<NoFunForCorporate>
{
public override IEnumerable<string> Authors => Contributors.Banane9;

[HarmonyPrefix]
[HarmonyPatch(typeof(Engine), nameof(Engine.IsAprilFools), MethodType.Getter)]
private static bool EngineIsAprilFoolsPrefix(ref bool __result)
{
if (!Enabled)
return true;

if (ConfigSection.ForceAprilFools)
{
__result = true;
return false;
}

if (Engine.Current.InUniverse)
{
__result = false;
return false;
}

return true;
}

[HarmonyPrefix]
[HarmonyPatch(typeof(ViolentAprilFoolsExplosion), nameof(ViolentAprilFoolsExplosion.OnDestroying))]
private static bool ViolentAprilFoolsExplosionOnDestroyingPrefix()
=> !Enabled || ConfigSection.ForceAprilFools || !Engine.Current.InUniverse;
}
}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ just disable them in the settings in the meantime.
* Animators updating all associated fields every frame while enabled but not playing (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/3480)
* Grid World floor shaking on AMD and Intel GPUs (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/3829)
* DuplicateSlot ProtoFlux node crashes game when if OverrideParent is identical to Template (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/3950)
* April Fools content is active for users in Universes (commercial usage) (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/4016)
* Instantly removing an AudioOutput component crashes the session (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/4286)

Fixes with no issue (that could be found).
Expand Down Expand Up @@ -91,7 +92,8 @@ just disable them in the settings in the meantime.

## Closed Issues

The issues that were first closed in this mod but have officially been closed now will be linked in the following list.
The issues that were first covered by this mod,
but have officially been implemented now, will be linked in the following list.
If they appear here, their implementation has been removed from the mod,
unless it is marked with `(Legacy)`.
In that case, the original fix is left in but disabled by default.
Expand Down
Loading