using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using Microsoft.CodeAnalysis;
using MonoMod;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace Ostranauts.UI.MegaToolTip.DataModules
{
public class patch_StatusbarModule : StatusbarModule
{
public override void OnUpdateUI()
{
//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
//IL_029d: Unknown result type (might be due to invalid IL or missing references)
//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)base._co == (Object)null)
{
return;
}
((StatusbarModule)this).UpdateDamageBar();
if (base._co.HasCond("IsPowerObservable"))
{
double num = 0.0;
double num2 = 0.0;
double num3 = 0.0;
num2 += base._co.GetCondAmount("StatPowerMax") * base._co.GetDamageState();
num += base._co.GetCondAmount("StatPower");
List<CondOwner> list = (((Object)(object)base._co.Pwr != (Object)null && base._co.Pwr.ctPowerSource != null) ? base._co.GetCOs(true, base._co.Pwr.ctPowerSource) : (((Object)(object)base._co.objContainer != (Object)null) ? base._co.objContainer.GetCOs(true, (CondTrigger)null) : new List<CondOwner>()));
if (list != null && list.Count > 0)
{
foreach (CondOwner item in list)
{
if ((Object)(object)item != (Object)null)
{
num2 += item.GetCondAmount("StatPowerMax") * item.GetDamageState();
num += item.GetCondAmount("StatPower");
}
}
}
if (num2 != 0.0)
{
num3 = num / num2;
}
if (num3 > 1.0)
{
num3 = 1.0;
}
string value = "-";
if (base._co.mapInfo.TryGetValue("PowerRemainingTime", out value))
{
base._txtPower.text = value;
}
else
{
base._txtPower.text = string.Empty;
}
string value2 = string.Empty;
if (base._co.mapInfo.TryGetValue("PowerCurrentLoad", out value2))
{
base._txtPowerRate.text = value2;
}
else
{
base._txtPowerRate.text = string.Empty;
}
base._sliderStatPower.value = Mathf.Clamp01((float)num3);
bool active = !string.IsNullOrEmpty(value2) && value2[0] == '+';
((Component)base._arrowContainer).gameObject.SetActive(active);
base._arrowContainer.anchoredPosition = ((!(base._sliderStatPower.value < 0.3f)) ? new Vector2(0f, base._arrowContainer.anchoredPosition.y) : new Vector2(14f, base._arrowContainer.anchoredPosition.y));
}
else if ((Object)(object)base._poweredCO != (Object)null)
{
base._sliderStatPower.value = Mathf.Clamp01((float)base._poweredCO.PowerStoredPercent);
}
}
}
}
namespace FFU_Beyond_Reach
{
[MonoModIgnore]
public class FFU_BR_Defs
{
public enum SyncLogs
{
None,
ModChanges,
DeepCopy,
ModdedDump,
ExtendedDump,
ContentDump,
SourceDump
}
public enum ActLogs
{
None,
Interactions,
Runtime
}
public static SyncLogs SyncLogging;
public static ActLogs ActLogging;
public static bool DynamicRandomRange;
public static int MaxLogTextSize;
public static bool ModSyncLoading;
public static bool EnableCodeFixes;
public static bool ModifyUpperLimit;
public static float BonusUpperLimit;
public static float SuitOxygenNotify;
public static float SuitPowerNotify;
public static bool ShowEachO2Battery;
public static bool StrictInvSorting;
public static bool AltTempEnabled;
public static string AltTempSymbol;
public static float AltTempMult;
public static float AltTempShift;
public static bool TowBraceAllowsKeep;
public static bool OrgInventoryMode;
public static float[] OrgInventoryTweaks;
public static bool BetterInvTransfer;
public static bool QuickBarPinning;
public static float[] QuickBarTweaks;
public static bool NoSkillTraitCost;
public static bool AllowSuperChars;
public static float SuperCharMultiplier;
public static string[] SuperCharacters;
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}