mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
added skeleton code to QuantumBuilder, added another item to validation, added shuffle as its own type
This commit is contained in:
parent
ea4009a382
commit
35b057da0e
@ -1,13 +1,46 @@
|
|||||||
|
using NewHorizons.External.Configs;
|
||||||
|
using NewHorizons.External.Modules;
|
||||||
|
using OWML.Common;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace NewHorizons.Builder.Props
|
namespace NewHorizons.Builder.Props
|
||||||
{
|
{
|
||||||
public static class QuantumBuilder
|
public static class QuantumBuilder
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public static void Make(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||||
|
{
|
||||||
|
// if a prop doesn't have a visibiilty volume, create a box volume using the prop's mesh bounds (if there are multiple mesh filters, use the min/max bounds accross all meshes)
|
||||||
|
switch(quantumGroup.type)
|
||||||
|
{
|
||||||
|
case PropModule.QuantumGroupType.Sockets: MakeSocketGroup (go, sector, config, mod, quantumGroup, propsInGroup); return;
|
||||||
|
case PropModule.QuantumGroupType.States: MakeStateGroup (go, sector, config, mod, quantumGroup, propsInGroup); return;
|
||||||
|
case PropModule.QuantumGroupType.Shuffle: MakeShuffleGroup(go, sector, config, mod, quantumGroup, propsInGroup); return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void MakeSocketGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||||
|
{
|
||||||
|
// note: for the visibility boxes on quantum sockets, if there's only one prop that's part of this group, clone its visibility volume
|
||||||
|
// otherwise, create a box according to the max and min dimensions across all props in this group (ie the box should be able to fit inside of it the visibility volume on any prop in this group)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void MakeStateGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void MakeShuffleGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||||
|
{
|
||||||
|
// if the type is shuffle, create a new game object that has a location average of all props' locations, and put a visibility volume on it that all props' visibility volumes fit inside of
|
||||||
|
// then, make all props children of it
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
NewHorizons/External/Configs/PlanetConfig.cs
vendored
3
NewHorizons/External/Configs/PlanetConfig.cs
vendored
@ -251,7 +251,8 @@ namespace NewHorizons.External.Configs
|
|||||||
// if type == sockets, group.sockets should not be null or empty
|
// if type == sockets, group.sockets should not be null or empty
|
||||||
// if type == sockets, count every prop that references this group. the number should be <= group.sockets.Count
|
// if type == sockets, count every prop that references this group. the number should be <= group.sockets.Count
|
||||||
// for each detail prop,
|
// for each detail prop,
|
||||||
// if detail.quantumGroupID != null, there exists a quantum group with that id
|
// if detail.quantumGroupID != null, there exists a quantum group with that id
|
||||||
|
// if detail.quantumGroupID != null, ensure that that group belongs to the same planet as the prop (cross planet quantum objects are not supported yet)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
2
NewHorizons/External/Modules/PropModule.cs
vendored
2
NewHorizons/External/Modules/PropModule.cs
vendored
@ -632,6 +632,8 @@ namespace NewHorizons.External.Modules
|
|||||||
[EnumMember(Value = @"sockets")] Sockets = 0,
|
[EnumMember(Value = @"sockets")] Sockets = 0,
|
||||||
|
|
||||||
[EnumMember(Value = @"states")] States = 1,
|
[EnumMember(Value = @"states")] States = 1,
|
||||||
|
|
||||||
|
[EnumMember(Value = @"shuffle")] Shuffle = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonObject]
|
[JsonObject]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user