Action Bar Persistence

This commit is contained in:
Reinier Vens 2021-04-30 14:24:01 +01:00
commit 68ab14dc42
21 changed files with 183 additions and 46 deletions

Binary file not shown.

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6d9878ed7c777432ab83c30096d0e91c
guid: be78731818b28674faf771113b02f82e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0

View file

@ -9,7 +9,7 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: Watchful Eye
m_Shader: {fileID: 4800000, guid: ebd63f199114146ddacca96d32c18d9e, type: 3}
m_ShaderKeywords:
m_ShaderKeywords: _USEEJECTA_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
@ -64,7 +64,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapSteep:
m_Texture: {fileID: 2800000, guid: c6335a766e3764fac8a632a38635cb2b, type: 3}
m_Texture: {fileID: 2800000, guid: fb5f32830e2c84487ababc395fd75b0e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
@ -84,9 +84,9 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BiomeBlendStrength: 3.01
- _BiomeBlendStrength: 7.07
- _BiomeDistortStrength: 0.33
- _BiomeWarpStrength: -3.05
- _BiomeWarpStrength: -3.86
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
@ -99,9 +99,9 @@ Material:
- _GlossMapScale: 1
- _Glossiness: 0.6
- _GlossyReflections: 1
- _MainTexScale: 10
- _Metallic: 0
- _MetallicA: 0.603
- _MainTexScale: 2
- _Metallic: 0.0163126
- _MetallicA: 0
- _MetallicB: 0.736
- _Mode: 0
- _NormalMapFlatScale: -30
@ -112,8 +112,8 @@ Material:
- _Parallax: 0.02
- _PolesStartLongitude: 0.8486198
- _PolesVisibility: 1
- _SmoothnessA: 0
- _SmoothnessB: 0.198
- _SmoothnessA: 0.018220196
- _SmoothnessB: 0.18875508
- _SmoothnessEjecta: 0.321
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
@ -133,13 +133,14 @@ Material:
- _FresnelCol: {r: 1, g: 0.7104638, b: 0.5707547, a: 1}
- _NormalMapScales: {r: 10, g: 10, b: 0, a: 0}
- _Params: {r: 0.23, g: -1.27, b: 0.26, a: 0.52}
- _PrimaryColA: {r: 0.10012459, g: 0.13390097, b: 0.16981131, a: 0}
- _PrimaryColB: {r: 0.18867922, g: 0.036489844, b: 0.061920755, a: 1}
- _RandomBiomeValues: {r: 0.8334919, g: 0.16424023, b: 0.22132967, a: -5.49}
- _PrimaryColA: {r: 0.9528302, g: 0.8333935, b: 0.7685564, a: 0}
- _PrimaryColB: {r: 1, g: 0.85001475, b: 0.740566, a: 1}
- _RandomBiomeValues: {r: -0.65843725, g: -0.16582446, b: -0.25609165, a: 0.08866141}
- _RandomPoleValues: {r: -0.14810935, g: -0.00710578, b: 0.08569491, a: 2.2706196}
- _RandomValues: {r: -1, g: 0.19, b: 0.4, a: -0.28}
- _SecondaryColA: {r: 0.28635636, g: 0.41927588, b: 0.6132076, a: 0}
- _SecondaryColB: {r: 0.6981132, g: 0.55138284, b: 0.5433428, a: 0}
- _SecondaryColA: {r: 0.26415092, g: 0.21048307, b: 0.08597365, a: 0}
- _SecondaryColB: {r: 0.3773585, g: 0.15275991, b: 0.14061944, a: 0}
- _TestParams: {r: 0, g: 1.15, b: 1.5, a: 13.36}
- _TextureMask: {r: 0, g: 0, b: 1, a: 0}
- _TextureWeights: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

Binary file not shown.

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 030136414da1842e3897b2260f1dc552
guid: 5085f07719ffa8e499913c911bbf3e40
folderAsset: yes
DefaultImporter:
externalObjects: {}

BIN
Assets/Resources/Locations/ReconStationAlpha.asset (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5328687999adc484c8ee0dde5397fc45
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,97 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &2706203649983037678
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -7153121627769399805, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: body
value:
objectReference: {fileID: 11400000, guid: 2a1cb691b0ffc49b4b8ca5edf4fb2044,
type: 2}
- target: {fileID: -7153121627769399805, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: -7153121627769399805, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: previewMode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162791, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_Name
value: Planet
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079004937162792, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8859079005270853338, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 9d4176e24d3764c798792cdbed1a224c, type: 2}
- target: {fileID: 8859079005270853339, guid: 88ace6073e3db1a46bd3aaf4f971acb9,
type: 3}
propertyPath: m_Mesh
value:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 88ace6073e3db1a46bd3aaf4f971acb9, type: 3}

View file

@ -1,7 +1,6 @@
fileFormatVersion: 2
guid: 3915d53cef497468a9af5565bd7300f6
folderAsset: yes
DefaultImporter:
guid: b8a807875a0bdc84aac8980e66a12189
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:

View file

@ -802,8 +802,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 741153267}
m_LocalRotation: {x: 0.015506903, y: 0.9502416, z: -0.30741313, w: 0.04793323}
m_LocalPosition: {x: -117.51999, y: -77.08743, z: 149.09026}
m_LocalRotation: {x: 0.0155069325, y: 0.9502416, z: -0.30741316, w: 0.047933314}
m_LocalPosition: {x: -117.520035, y: -77.087425, z: 149.09027}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 412917866}
@ -1301,8 +1301,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 965376321}
m_LocalRotation: {x: 0.015506903, y: 0.9502416, z: -0.30741313, w: 0.04793323}
m_LocalPosition: {x: -117.51999, y: -77.08743, z: 149.09026}
m_LocalRotation: {x: 0.0155069325, y: 0.9502416, z: -0.30741316, w: 0.047933314}
m_LocalPosition: {x: -117.520035, y: -77.087425, z: 149.09027}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
@ -2373,12 +2373,12 @@ PrefabInstance:
- target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
@ -2388,22 +2388,22 @@ PrefabInstance:
- target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 60.98
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -16
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
@ -2413,12 +2413,12 @@ PrefabInstance:
- target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 55.675
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -16
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4533226043449861658, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
@ -2623,12 +2623,12 @@ PrefabInstance:
- target: {fileID: 7329274283166941234, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7329274283166941234, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7329274283166941234, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
@ -2638,7 +2638,7 @@ PrefabInstance:
- target: {fileID: 7329274283166941234, guid: 3d8d9cbf10b12214e98891c1f03c1e99,
type: 3}
propertyPath: m_SizeDelta.y
value: 144.0148
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3d8d9cbf10b12214e98891c1f03c1e99, type: 3}

View file

@ -250,6 +250,7 @@ public class ActionGameManager : MonoBehaviour
if(PlayerSettings.SavedRun != null)
{
PlayerSettings.SavedRun.IsTutorial = IsTutorial;
PlayerSettings.SavedRun.ActionBarBindings = _actionBarSlots.Select(slot => slot.Save()).ToArray();
}
SavePlayerSettings();
}
@ -284,8 +285,6 @@ public class ActionGameManager : MonoBehaviour
ItemManager = new ItemManager(CultCache, Settings.GameplaySettings, Debug.Log);
ZoneRenderer.ItemManager = ItemManager;
var narrativePath = GameDataDirectory.CreateSubdirectory("Narrative");
// TODO: Process Stories
// _loadoutPath = GameDataDirectory.CreateSubdirectory("Loadouts");
@ -478,6 +477,14 @@ public class ActionGameManager : MonoBehaviour
num.InputLabel.text = i.ToString();
}
if(PlayerSettings.SavedRun!=null)
{
for (var i = 0; i < _actionBarSlots.Count; i++)
{
_actionBarSlots[i].Restore(PlayerSettings.SavedRun.ActionBarBindings[i]);
}
}
#endregion
#endregion

View file

@ -44,9 +44,15 @@ public class StoryProcessor : IZoneResolver, IFactionResolver
_inkFileHandler = new AetheriaInkFileHandler(narrativeDirectory);
_locationsPath = narrativeDirectory.CreateSubdirectory("Locations");
}
public Dictionary<Story, SectorZone> PlaceStories()
{
var locationFiles = _locationsPath.EnumerateFiles("*.ink");
foreach(var inkFile in locationFiles) PlaceStory(GetStory(inkFile));
return _placedStories;
}
public SectorZone ResolveZone(string path)
{
// Handle special cases: "start" and "end"

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@ -117,6 +118,8 @@ public class Sector
SectorBackgroundSettings background,
NameGeneratorSettings nameGeneratorSettings,
CultCache cache,
PlayerSettings playerSettings,
DirectoryInfo narrativeDirectory,
Action<string> progressCallback = null,
uint seed = 0)
{
@ -196,6 +199,14 @@ public class Sector
CalculateFactionInfluence(progressCallback);
GenerateNames(cache, nameGeneratorSettings, ref random, progressCallback);
progressCallback?.Invoke("Weaving Narrative");
// var processor = new StoryProcessor(playerSettings, narrativeDirectory, this, ref random);
// var storyPlacement = processor.PlaceStories();
// foreach (var story in storyPlacement.Keys)
// {
// storyPlacement[story]
// }
progressCallback?.Invoke("Done!");
if(progressCallback!=null) Thread.Sleep(500); // Inserting Delay to make it seem like it's doing more work lmao

View file

@ -156,6 +156,8 @@ public class MainMenu : MonoBehaviour
Settings.TutorialBackgroundSettings,
Settings.NameGeneratorSettings,
ActionGameManager.CultCache,
ActionGameManager.PlayerSettings,
ActionGameManager.GameDataDirectory.CreateSubdirectory("Narrative"),
setState);
Observable.NextFrame().Subscribe(_ =>
{

Binary file not shown.

View file

@ -1,3 +1,6 @@
#planet: ReconStationAlpha
#constraint: DistanceFrom start < 1
#trade: disabled
INCLUDE TheActualFactualFactory.ink
INCLUDE QuestTexts.ink

BIN
GameData/PlayerSettings.msgpack (Stored with Git LFS)

Binary file not shown.