mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-22 21:40:39 +00:00
start
This commit is contained in:
parent
a44e563001
commit
13b8632dcd
11
QSB/GeyserSync/GeyserPatches.cs
Normal file
11
QSB/GeyserSync/GeyserPatches.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace QSB.GeyserSync
|
||||
{
|
||||
class GeyserPatches
|
||||
{
|
||||
}
|
||||
}
|
@ -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()
|
||||
|
@ -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" />
|
||||
|
@ -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>
|
||||
|
@ -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
31
QSB/WorldRegistry.cs
Normal 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;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user