This commit is contained in:
Mister_Nebula 2020-08-13 10:16:56 +01:00
parent a44e563001
commit 13b8632dcd
6 changed files with 64 additions and 2 deletions

View File

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace QSB.GeyserSync
{
class GeyserPatches
{
}
}

View File

@ -39,6 +39,11 @@ namespace QSB
{
WokenUp = true;
GlobalMessenger.FireEvent(EventNames.QSBPlayerStatesRequest);
foreach (var geyser in GameObject.FindObjectsOfType<GeyserController>())
{
DebugLog.ToConsole(geyser.name + " : " + geyser.GetInstanceID());
}
}
private void OnLoopStart()

View File

@ -134,6 +134,7 @@
<Compile Include="Events\PlayerStatesRequestEvent.cs" />
<Compile Include="Events\PlayerSuitEvent.cs" />
<Compile Include="Events\ServerTimeEvent.cs" />
<Compile Include="GeyserSync\GeyserPatches.cs" />
<Compile Include="Messaging\AnimTriggerMessage.cs" />
<Compile Include="Messaging\PlayerDeathMessage.cs" />
<Compile Include="Messaging\PlayerLeaveMessage.cs" />
@ -181,6 +182,7 @@
<Compile Include="TransformSync\PlayerTransformSync.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utility\UnityHelper.cs" />
<Compile Include="WorldRegistry.cs" />
</ItemGroup>
<ItemGroup>
<None Include="default-config.json" />

View File

@ -2,6 +2,6 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<GameDir>D:\EpicGames\OuterWilds</GameDir>
<OwmlDir>C:\Users\Henry\Downloads\OWModManager\OWML</OwmlDir>
<OwmlDir>C:\Users\Henry\AppData\Roaming\OuterWildsModManager\OWML</OwmlDir>
</PropertyGroup>
</Project>

View File

@ -1,4 +1,6 @@
namespace QSB.Utility
using UnityEngine;
namespace QSB.Utility
{
public static class QSBExtensions
{
@ -13,5 +15,16 @@
tool.UnequipTool();
}
}
public static string GetHierarchy(this GameObject go)
{
var name = go.name;
while (go.transform.parent != null)
{
go = go.transform.parent.gameObject;
name = go.name + "/" + name;
}
return name;
}
}
}

31
QSB/WorldRegistry.cs Normal file
View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace QSB
{
public static class WorldRegistry
{
private static List<QSBWorldComponent> ComponentList = new List<QSBWorldComponent>();
public static Dictionary<int, object> GetInstanceIds(Type typeToFind)
{
var components = GameObject.FindObjectsOfType(typeToFind);
var dict = new Dictionary<int, object>();
foreach (var component in components)
{
dict.Add(component.GetInstanceID(), component);
}
return dict;
}
}
class QSBWorldComponent
{
public int InstanceID;
public string Hierarchy;
public object Instance;
}
}