Demote runtime player settings projection
This commit is contained in:
parent
ade6845e1d
commit
3f2614cec0
17 changed files with 104 additions and 94 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
@ -139,30 +139,30 @@ public class SchematicDisplay : MonoBehaviour
|
|||
OverrideIcon.SetActive(_entity.OverrideShutdown && cos(Time.time * OverrideIconBlinkSpeed) > 0);
|
||||
ShieldIcon.SetActive(_entity.Shield!=null && _entity.Shield.Item.Active.Value);
|
||||
if (_radiators.Length == 1)
|
||||
RadiatorTemperatureLabel.text = $"{((int)(_radiators[0].RadiatorTemperature - 273.15f)).ToString()}°C";
|
||||
RadiatorTemperatureLabel.text = $"{((int)(_radiators[0].RadiatorTemperature - 273.15f)).ToString()}°C";
|
||||
else if (_radiators.Length > 1)
|
||||
RadiatorTemperatureLabel.text =
|
||||
$"{((int)(_radiators.Min(r => r.RadiatorTemperature) - 273.15f)).ToString()}-" +
|
||||
$"{((int)(_radiators.Max(r => r.RadiatorTemperature) - 273.15f)).ToString()}°C";
|
||||
$"{((int)(_radiators.Max(r => r.RadiatorTemperature) - 273.15f)).ToString()}°C";
|
||||
HeatsinkBackground.color = _entity.HeatsinksEnabled ? HeaderElementEnabledColor : HeaderElementDisabledColor;
|
||||
|
||||
if (_heatStorages.Length == 1)
|
||||
HeatStorageTemperatureLabel.text = $"{((int)(_heatStorages[0].Item.Temperature - 273.15f)).ToString()}°C";
|
||||
HeatStorageTemperatureLabel.text = $"{((int)(_heatStorages[0].Item.Temperature - 273.15f)).ToString()}°C";
|
||||
else if (_heatStorages.Length > 1)
|
||||
HeatStorageTemperatureLabel.text =
|
||||
$"{((int)(_heatStorages.Min(r => r.Item.Temperature) - 273.15f)).ToString()}-" +
|
||||
$"{((int)(_heatStorages.Max(r => r.Item.Temperature) - 273.15f)).ToString()}°C";
|
||||
$"{((int)(_heatStorages.Max(r => r.Item.Temperature) - 273.15f)).ToString()}°C";
|
||||
|
||||
if (_cargoBays.Length == 1)
|
||||
CargoTemperatureLabel.text = $"{((int)(_cargoBays[0].Temperature - 273.15f)).ToString()}°C";
|
||||
CargoTemperatureLabel.text = $"{((int)(_cargoBays[0].Temperature - 273.15f)).ToString()}°C";
|
||||
else if (_cargoBays.Length > 1)
|
||||
CargoTemperatureLabel.text =
|
||||
$"{((int)(_cargoBays.Min(r => r.Temperature) - 273.15f)).ToString()}-" +
|
||||
$"{((int)(_cargoBays.Max(r => r.Temperature) - 273.15f)).ToString()}°C";
|
||||
$"{((int)(_cargoBays.Max(r => r.Temperature) - 273.15f)).ToString()}°C";
|
||||
|
||||
if(_cockpit != null)
|
||||
{
|
||||
CockpitTemperatureLabel.text = $"{((int) (_cockpit.Item.Temperature - 273.15f)).ToString()}°C";
|
||||
CockpitTemperatureLabel.text = $"{((int) (_cockpit.Item.Temperature - 273.15f)).ToString()}°C";
|
||||
|
||||
HeatstrokeMeterFill.anchorMax = new Vector2(_entity.Heatstroke, 1);
|
||||
HypothermiaMeterFill.anchorMax = new Vector2(_entity.Hypothermia, 1);
|
||||
|
|
@ -174,7 +174,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
if (_capacitors.Length == 0)
|
||||
{
|
||||
EnergyFill.anchorMax = Vector2.up;
|
||||
EnergyLabel.text = ActionGameManager.PlayerSettings.Format(_reactor.Draw);
|
||||
EnergyLabel.text = ActionGameManager.RuntimePlayerSettings.Format(_reactor.Draw);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -186,13 +186,13 @@ public class SchematicDisplay : MonoBehaviour
|
|||
|
||||
if (_aetherDrive != null)
|
||||
{
|
||||
ForwardRPMLabel.text = ActionGameManager.PlayerSettings.Format(_aetherDrive.Rpm.x);
|
||||
ForwardRPMLabel.text = ActionGameManager.RuntimePlayerSettings.Format(_aetherDrive.Rpm.x);
|
||||
ForwardRPMFill.anchorMax = new Vector2(_aetherDrive.Rpm.x / _aetherDrive.MaximumRpm, 1);
|
||||
|
||||
StrafeRPMLabel.text = ActionGameManager.PlayerSettings.Format(_aetherDrive.Rpm.y);
|
||||
StrafeRPMLabel.text = ActionGameManager.RuntimePlayerSettings.Format(_aetherDrive.Rpm.y);
|
||||
StrafeRPMFill.anchorMax = new Vector2(_aetherDrive.Rpm.y / _aetherDrive.MaximumRpm, 1);
|
||||
|
||||
TurnRPMLabel.text = ActionGameManager.PlayerSettings.Format(_aetherDrive.Rpm.z);
|
||||
TurnRPMLabel.text = ActionGameManager.RuntimePlayerSettings.Format(_aetherDrive.Rpm.z);
|
||||
TurnRPMFill.anchorMax = new Vector2(_aetherDrive.Rpm.z / _aetherDrive.MaximumRpm, 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -210,7 +210,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
var hullData = _entity.ItemManager.GetData(_hull);
|
||||
var dur = _hull.Durability / hullData.Durability;
|
||||
HullDurabilityFill.anchorMax = new Vector2(dur, 1);
|
||||
HullDurabilityLabel.text = $"{ActionGameManager.PlayerSettings.Format(dur * 100)}%";
|
||||
HullDurabilityLabel.text = $"{ActionGameManager.RuntimePlayerSettings.Format(dur * 100)}%";
|
||||
}
|
||||
|
||||
foreach (var x in _schematicItems)
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public class InputDisplayLayout : MonoBehaviour
|
|||
buttonMapping.TestAction.Enable();
|
||||
}
|
||||
|
||||
foreach(var actionBarInput in ActionGameManager.PlayerSettings.InputSettings.ActionBarInputs)
|
||||
foreach(var actionBarInput in ActionGameManager.RuntimePlayerSettings.InputSettings.ActionBarInputs)
|
||||
{
|
||||
if (!_bindButtons.ContainsKey(actionBarInput)) Debug.LogError($"Unable to find input button for \"{actionBarInput}\"");
|
||||
else
|
||||
|
|
@ -527,7 +527,7 @@ public class InputDisplayLayout : MonoBehaviour
|
|||
{
|
||||
_dragAction.Binding.overridePath = _previewButton.Button.InputSystemPath;
|
||||
_dragAction.Action.ApplyBindingOverride(_dragAction.Binding);
|
||||
ActionGameManager.PlayerSettings.InputSettings.InputActionMap[(_dragAction.Action.name,
|
||||
ActionGameManager.RuntimePlayerSettings.InputSettings.InputActionMap[(_dragAction.Action.name,
|
||||
_dragAction.Action.GetBindingIndex(_dragAction.Binding))] = _previewButton.Button.InputSystemPath;
|
||||
// TODO: Assign New Binding
|
||||
}
|
||||
|
|
@ -550,13 +550,13 @@ public class InputDisplayLayout : MonoBehaviour
|
|||
buttonMapping.IsActionBarButton = !buttonMapping.IsActionBarButton;
|
||||
if (buttonMapping.IsActionBarButton)
|
||||
{
|
||||
ActionGameManager.PlayerSettings.InputSettings.ActionBarInputs.Add(buttonMapping.Button.InputSystemPath);
|
||||
ActionGameManager.RuntimePlayerSettings.InputSettings.ActionBarInputs.Add(buttonMapping.Button.InputSystemPath);
|
||||
foreach(var overlap in OverlappingLabels(buttonMapping.ButtonRect))
|
||||
PlaceLabel(overlap);
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionGameManager.PlayerSettings.InputSettings.ActionBarInputs.Remove(buttonMapping.Button.InputSystemPath);
|
||||
ActionGameManager.RuntimePlayerSettings.InputSettings.ActionBarInputs.Remove(buttonMapping.Button.InputSystemPath);
|
||||
}
|
||||
AssignColor(buttonMapping);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public class MainMenu : MonoBehaviour
|
|||
Dialog.AddProperty(() => generatorState);
|
||||
Dialog.Show();
|
||||
|
||||
if (ActionGameManager.PlayerSettings.TutorialPassed)
|
||||
if (ActionGameManager.RuntimePlayerSettings.TutorialPassed)
|
||||
{
|
||||
Settings.SectorBackgroundSettings.NoisePosition = Random.value * 1000;
|
||||
ActionGameManager.IsTutorial = false;
|
||||
|
|
@ -144,7 +144,7 @@ public class MainMenu : MonoBehaviour
|
|||
Settings.TutorialBackgroundSettings,
|
||||
Settings.NameGeneratorSettings,
|
||||
ActionGameManager.RuntimeCatalog,
|
||||
ActionGameManager.PlayerSettings,
|
||||
ActionGameManager.RuntimePlayerSettings,
|
||||
ActionGameManager.GameDataDirectory.CreateSubdirectory("Narrative"),
|
||||
Debug.Log,
|
||||
setState);
|
||||
|
|
@ -206,19 +206,19 @@ public class MainMenu : MonoBehaviour
|
|||
_nextMenu.panel.Clear();
|
||||
_nextMenu.panel.Title.text = TitleSubtitle("gameplay", "settings");
|
||||
_nextMenu.panel.AddField("Name",
|
||||
() => ActionGameManager.PlayerSettings.Name,
|
||||
s => ActionGameManager.PlayerSettings.Name = s);
|
||||
() => ActionGameManager.RuntimePlayerSettings.Name,
|
||||
s => ActionGameManager.RuntimePlayerSettings.Name = s);
|
||||
_nextMenu.panel.AddField("Temperature Unit",
|
||||
() => (int) ActionGameManager.PlayerSettings.GameplaySettings.TemperatureUnit,
|
||||
i => ActionGameManager.PlayerSettings.GameplaySettings.TemperatureUnit = (TemperatureUnit) i,
|
||||
() => (int) ActionGameManager.RuntimePlayerSettings.GameplaySettings.TemperatureUnit,
|
||||
i => ActionGameManager.RuntimePlayerSettings.GameplaySettings.TemperatureUnit = (TemperatureUnit) i,
|
||||
Enum.GetNames(typeof(TemperatureUnit)));
|
||||
_nextMenu.panel.AddField("Significant Digits",
|
||||
() => ActionGameManager.PlayerSettings.GameplaySettings.SignificantDigits,
|
||||
i => ActionGameManager.PlayerSettings.GameplaySettings.SignificantDigits = i);
|
||||
() => ActionGameManager.RuntimePlayerSettings.GameplaySettings.SignificantDigits,
|
||||
i => ActionGameManager.RuntimePlayerSettings.GameplaySettings.SignificantDigits = i);
|
||||
_nextMenu.panel.AddButton("Back",
|
||||
() =>
|
||||
{
|
||||
ActionGameManager.SavePlayerSettings();
|
||||
ActionGameManager.QueueRuntimePlayerSettingsCommit();
|
||||
ShowSettings();
|
||||
Fade(false);
|
||||
});
|
||||
|
|
@ -229,16 +229,16 @@ public class MainMenu : MonoBehaviour
|
|||
_nextMenu.panel.Clear();
|
||||
_nextMenu.panel.Title.text = TitleSubtitle("graphics", "settings");
|
||||
_nextMenu.panel.AddField("Nebula Quality",
|
||||
() => (int)ActionGameManager.PlayerSettings.GraphicsSettings.NebulaQuality,
|
||||
() => (int)ActionGameManager.RuntimePlayerSettings.GraphicsSettings.NebulaQuality,
|
||||
i =>
|
||||
{
|
||||
ActionGameManager.PlayerSettings.GraphicsSettings.NebulaQuality = (Quality)i;
|
||||
CloudRenderer.quality = ActionGameManager.PlayerSettings.GraphicsSettings.NebulaQuality;
|
||||
ActionGameManager.RuntimePlayerSettings.GraphicsSettings.NebulaQuality = (Quality)i;
|
||||
CloudRenderer.quality = ActionGameManager.RuntimePlayerSettings.GraphicsSettings.NebulaQuality;
|
||||
},
|
||||
Enum.GetNames(typeof(Quality)));
|
||||
_nextMenu.panel.AddField("Show Asteroids in Minimap",
|
||||
() => ActionGameManager.PlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap,
|
||||
b => ActionGameManager.PlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap = b);
|
||||
() => ActionGameManager.RuntimePlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap,
|
||||
b => ActionGameManager.RuntimePlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap = b);
|
||||
_nextMenu.panel.AddButton("Back",
|
||||
() =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -207,8 +207,8 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
|
|||
var opacity = smoothstep(0, MinTempRange, tempRange);
|
||||
if(MinTempLabel)
|
||||
{
|
||||
MinTempLabel.text = ActionGameManager.PlayerSettings.FormatTemperature(_displayedEntity.MinTemp);
|
||||
MaxTempLabel.text = ActionGameManager.PlayerSettings.FormatTemperature(_displayedEntity.MaxTemp);
|
||||
MinTempLabel.text = ActionGameManager.RuntimePlayerSettings.FormatTemperature(_displayedEntity.MinTemp);
|
||||
MaxTempLabel.text = ActionGameManager.RuntimePlayerSettings.FormatTemperature(_displayedEntity.MaxTemp);
|
||||
}
|
||||
var hullData = GameManager.ItemManager.GetData(_displayedEntity.Hull) as HullData;
|
||||
for(var x = 0; x < _temperatureTexture.width; x++)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ public class MapRenderer : MonoBehaviour
|
|||
Title.text = $"Zone: {GameManager.Zone.GalaxyZone.Name}";
|
||||
|
||||
// If hiding minimap asteroids, turn them back on for the map screen
|
||||
if (!ActionGameManager.PlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap)
|
||||
if (!ActionGameManager.RuntimePlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap)
|
||||
ZoneRenderer.ShowAsteroidUI = true;
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ public class MapRenderer : MonoBehaviour
|
|||
InfluenceCamera.gameObject.SetActive(false);
|
||||
|
||||
// If hiding minimap asteroids, turn them back off when leaving the map screen
|
||||
if (!ActionGameManager.PlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap)
|
||||
if (!ActionGameManager.RuntimePlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap)
|
||||
ZoneRenderer.ShowAsteroidUI = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
var density = saturate(ActionGameManager.CurrentGalaxy.Background.CloudDensity(zone.Position)/2);
|
||||
var radius = GameManager.Settings.ZoneSettings.ZoneRadius.Evaluate(density);
|
||||
var mass = GameManager.Settings.ZoneSettings.ZoneMass.Evaluate(density);
|
||||
Properties.AddProperty("Mass", () => ActionGameManager.PlayerSettings.Format(mass));
|
||||
Properties.AddProperty("Radius", () => ActionGameManager.PlayerSettings.Format(radius));
|
||||
Properties.AddProperty("Mass", () => ActionGameManager.RuntimePlayerSettings.Format(mass));
|
||||
Properties.AddProperty("Radius", () => ActionGameManager.RuntimePlayerSettings.Format(radius));
|
||||
if (zone.RuntimeBlueprint == null)
|
||||
{
|
||||
Properties.AddProperty(() => "Has not been visited");
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ public class TradeMenu : MonoBehaviour
|
|||
return 0;
|
||||
}));
|
||||
columns.Add(("Mass", 1,
|
||||
x => () => ActionGameManager.PlayerSettings.Format(x.data.Mass),
|
||||
x => () => ActionGameManager.RuntimePlayerSettings.Format(x.data.Mass),
|
||||
data => data.Mass));
|
||||
columns.Add(("Price", 1,
|
||||
x => () => (x.item is CraftedItemInstance craftedItemInstance ? GameManager.ItemManager.GetPrice(craftedItemInstance) : x.data.Price).ToString("N0"),
|
||||
|
|
@ -254,7 +254,7 @@ public class TradeMenu : MonoBehaviour
|
|||
columns.Add((field.Name, 1, x =>
|
||||
{
|
||||
var behavior = ((EquippableItemData) x.data).Behaviors.FirstOrDefault(b => type.IsInstanceOfType(b));
|
||||
return () => ActionGameManager.PlayerSettings.Format((float) field.GetValue(behavior));
|
||||
return () => ActionGameManager.RuntimePlayerSettings.Format((float) field.GetValue(behavior));
|
||||
}, data =>
|
||||
{
|
||||
var behavior = ((EquippableItemData) data).Behaviors.FirstOrDefault(b => type.IsInstanceOfType(b));
|
||||
|
|
@ -275,7 +275,7 @@ public class TradeMenu : MonoBehaviour
|
|||
columns.Add((field.Name, 1, x =>
|
||||
{
|
||||
var behavior = ((EquippableItemData) x.data).Behaviors.FirstOrDefault(b => type.IsInstanceOfType(b));
|
||||
return () => ActionGameManager.PlayerSettings.Format(((PerformanceStat) field.GetValue(behavior)).Max);
|
||||
return () => ActionGameManager.RuntimePlayerSettings.Format(((PerformanceStat) field.GetValue(behavior)).Max);
|
||||
}, data =>
|
||||
{
|
||||
var behavior = ((EquippableItemData) data).Behaviors.FirstOrDefault(b => type.IsInstanceOfType(b));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
|
@ -392,7 +392,7 @@ public class PropertiesPanel : MonoBehaviour
|
|||
var sheet = AddStatSheet();
|
||||
var manufacturer = ActionGameManager.RuntimeCatalog?.FindCorporationByLegacyId(data.Manufacturer.ToString());
|
||||
sheet.AddStat("Manufacturer", () => manufacturer?.Name ?? "GameCult");
|
||||
sheet.AddStat("Mass", () => ActionGameManager.PlayerSettings.Format(GameManager.ItemManager.GetMass(item)));
|
||||
sheet.AddStat("Mass", () => ActionGameManager.RuntimePlayerSettings.Format(GameManager.ItemManager.GetMass(item)));
|
||||
|
||||
//AddProperty("Thermal Mass", () => Context.GetThermalMass(item).SignificantDigits(Context.GameplaySettings.SignificantDigits));
|
||||
}
|
||||
|
|
@ -411,7 +411,7 @@ public class PropertiesPanel : MonoBehaviour
|
|||
{
|
||||
if (behavior is StatModifierData statMod)
|
||||
{
|
||||
sheet.AddStat($"{statMod.Stat.Target.SplitCamelCase()}:{statMod.Stat.Stat.SplitCamelCase()}", () => $"{(statMod.Type == StatModifierType.Constant ? "+" : "x")}{ActionGameManager.PlayerSettings.Format(statValueFunction(statMod.Modifier))}");
|
||||
sheet.AddStat($"{statMod.Stat.Target.SplitCamelCase()}:{statMod.Stat.Stat.SplitCamelCase()}", () => $"{(statMod.Type == StatModifierType.Constant ? "+" : "x")}{ActionGameManager.RuntimePlayerSettings.Format(statValueFunction(statMod.Modifier))}");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -421,13 +421,13 @@ public class PropertiesPanel : MonoBehaviour
|
|||
{
|
||||
var fieldType = field.FieldType;
|
||||
if (fieldType == typeof(float))
|
||||
sheet.AddStat(field.Name.SplitCamelCase(), () => $"{ActionGameManager.PlayerSettings.Format((float) field.GetValue(behavior))}");
|
||||
sheet.AddStat(field.Name.SplitCamelCase(), () => $"{ActionGameManager.RuntimePlayerSettings.Format((float) field.GetValue(behavior))}");
|
||||
else if (fieldType == typeof(int))
|
||||
sheet.AddStat(field.Name.SplitCamelCase(), () => $"{(int) field.GetValue(behavior)}");
|
||||
else if (fieldType == typeof(PerformanceStat))
|
||||
{
|
||||
var stat = (PerformanceStat) field.GetValue(behavior);
|
||||
sheet.AddStat(field.Name.SplitCamelCase(), () => $"{ActionGameManager.PlayerSettings.Format(statValueFunction(stat))}");
|
||||
sheet.AddStat(field.Name.SplitCamelCase(), () => $"{ActionGameManager.RuntimePlayerSettings.Format(statValueFunction(stat))}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -436,7 +436,7 @@ public class PropertiesPanel : MonoBehaviour
|
|||
if (gearData.Behaviors.FirstOrDefault(b => b is WeaponData) is WeaponData weapon)
|
||||
{
|
||||
var range = AddCurveField();
|
||||
range.Show("Damage Range", weapon.DamageCurve, t => ActionGameManager.PlayerSettings.Format(lerp(statValueFunction(weapon.MinRange), statValueFunction(weapon.Range), t)));
|
||||
range.Show("Damage Range", weapon.DamageCurve, t => ActionGameManager.RuntimePlayerSettings.Format(lerp(statValueFunction(weapon.MinRange), statValueFunction(weapon.Range), t)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -490,13 +490,13 @@ public class PropertiesPanel : MonoBehaviour
|
|||
if (item.EquippableItem.Durability < .01f)
|
||||
statusSheet.AddStat("Durability", () => "Item Destroyed!");
|
||||
else statusSheet.AddStat("Durability", () => $"{(int)(item.EquippableItem.Durability / gearData.Durability * 100)}%");
|
||||
statusSheet.AddStat("Temperature", () => ActionGameManager.PlayerSettings.FormatTemperature(item.Temperature));
|
||||
statusSheet.AddStat("Temperature", () => ActionGameManager.RuntimePlayerSettings.FormatTemperature(item.Temperature));
|
||||
|
||||
var heatCurve = AddCurveField();
|
||||
heatCurve.Show(
|
||||
"Thermal Performance",
|
||||
gearData.HeatPerformanceCurve,
|
||||
t => ActionGameManager.PlayerSettings.FormatTemperature(lerp(gearData.MinimumTemperature, gearData.MaximumTemperature, t)),
|
||||
t => ActionGameManager.RuntimePlayerSettings.FormatTemperature(lerp(gearData.MinimumTemperature, gearData.MaximumTemperature, t)),
|
||||
true);
|
||||
RefreshPropertyValues += () => heatCurve.SetCurrent(unlerp(gearData.MinimumTemperature, gearData.MaximumTemperature, item.Temperature));
|
||||
AddEquippableItemProperties(item.EquippableItem, item.Evaluate);
|
||||
|
|
@ -536,7 +536,7 @@ public class PropertiesPanel : MonoBehaviour
|
|||
heatCurve.Show(
|
||||
"Thermal Performance",
|
||||
gearData.HeatPerformanceCurve,
|
||||
t => ActionGameManager.PlayerSettings.FormatTemperature(lerp(gearData.MinimumTemperature, gearData.MaximumTemperature, t)),
|
||||
t => ActionGameManager.RuntimePlayerSettings.FormatTemperature(lerp(gearData.MinimumTemperature, gearData.MaximumTemperature, t)),
|
||||
true);
|
||||
AddEquippableItemProperties(gear, stat => GameManager.ItemManager.Evaluate(stat, gear));
|
||||
}
|
||||
|
|
@ -550,16 +550,16 @@ public class PropertiesPanel : MonoBehaviour
|
|||
AddProperty(data.Description).Label.fontStyle = FontStyles.Normal;
|
||||
if (data is EquippableItemData gearData)
|
||||
{
|
||||
AddProperty("Durability", () => ActionGameManager.PlayerSettings.Format(gearData.Durability));
|
||||
AddProperty("Durability", () => ActionGameManager.RuntimePlayerSettings.Format(gearData.Durability));
|
||||
var sheet = AddStatSheet();
|
||||
foreach (var behavior in gearData.Behaviors)
|
||||
{
|
||||
if (behavior is StatModifierData statMod)
|
||||
{
|
||||
if(Math.Abs(statMod.Modifier.Min - statMod.Modifier.Max) < .001f)
|
||||
sheet.AddStat($"{statMod.Stat.Target}:{statMod.Stat.Stat}", () => $"{(statMod.Type == StatModifierType.Constant ? "+" : "x")}{ActionGameManager.PlayerSettings.Format(statMod.Modifier.Min)}");
|
||||
sheet.AddStat($"{statMod.Stat.Target}:{statMod.Stat.Stat}", () => $"{(statMod.Type == StatModifierType.Constant ? "+" : "x")}{ActionGameManager.RuntimePlayerSettings.Format(statMod.Modifier.Min)}");
|
||||
else
|
||||
sheet.AddStat($"{statMod.Stat.Target}:{statMod.Stat.Stat}", () => $"{(statMod.Type == StatModifierType.Constant ? "+" : "x")}{ActionGameManager.PlayerSettings.Format(statMod.Modifier.Min)}-{ActionGameManager.PlayerSettings.Format(statMod.Modifier.Max)}");
|
||||
sheet.AddStat($"{statMod.Stat.Target}:{statMod.Stat.Stat}", () => $"{(statMod.Type == StatModifierType.Constant ? "+" : "x")}{ActionGameManager.RuntimePlayerSettings.Format(statMod.Modifier.Min)}-{ActionGameManager.RuntimePlayerSettings.Format(statMod.Modifier.Max)}");
|
||||
}
|
||||
var type = behavior.GetType();
|
||||
if (type.GetCustomAttribute(typeof(RuntimeInspectable)) != null)
|
||||
|
|
@ -568,16 +568,16 @@ public class PropertiesPanel : MonoBehaviour
|
|||
{
|
||||
var fieldType = field.FieldType;
|
||||
if (fieldType == typeof(float))
|
||||
sheet.AddStat(field.Name, () => $"{ActionGameManager.PlayerSettings.Format((float) field.GetValue(behavior))}");
|
||||
sheet.AddStat(field.Name, () => $"{ActionGameManager.RuntimePlayerSettings.Format((float) field.GetValue(behavior))}");
|
||||
else if (fieldType == typeof(int))
|
||||
sheet.AddStat(field.Name, () => $"{(int) field.GetValue(behavior)}");
|
||||
else if (fieldType == typeof(PerformanceStat))
|
||||
{
|
||||
var stat = (PerformanceStat) field.GetValue(behavior);
|
||||
if(Math.Abs(stat.Min - stat.Max) < .001f)
|
||||
sheet.AddStat(field.Name, () => $"{ActionGameManager.PlayerSettings.Format(stat.Min)}");
|
||||
sheet.AddStat(field.Name, () => $"{ActionGameManager.RuntimePlayerSettings.Format(stat.Min)}");
|
||||
else
|
||||
sheet.AddStat(field.Name, () => $"{ActionGameManager.PlayerSettings.Format(stat.Min)}-{ActionGameManager.PlayerSettings.Format(stat.Max)}");
|
||||
sheet.AddStat(field.Name, () => $"{ActionGameManager.RuntimePlayerSettings.Format(stat.Min)}-{ActionGameManager.RuntimePlayerSettings.Format(stat.Max)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue