remove the thingies that dont work lol

This commit is contained in:
JohnCorby 2022-07-09 21:04:29 -07:00
parent 6ef22d12a1
commit f4543eca55

View File

@ -112,10 +112,12 @@ namespace NewHorizons.Builder.Props
foreach (var component in prop.GetComponentsInChildren<Component>(true)) foreach (var component in prop.GetComponentsInChildren<Component>(true))
{ {
/*
// Enable all children or something // Enable all children or something
// BUG doesnt work because enabled is a property, not a field // BUG doesnt work because enabled is a property, not a field
var enabledField = component?.GetType()?.GetField("enabled"); var enabledField = component?.GetType()?.GetField("enabled");
if (enabledField != null && enabledField.FieldType == typeof(bool)) Main.Instance.ModHelper.Events.Unity.FireOnNextUpdate(() => enabledField.SetValue(component, true)); if (enabledField != null && enabledField.FieldType == typeof(bool)) Main.Instance.ModHelper.Events.Unity.FireOnNextUpdate(() => enabledField.SetValue(component, true));
*/
// Fix a bunch of sector stuff // Fix a bunch of sector stuff
if (sector != null) if (sector != null)
@ -150,6 +152,7 @@ namespace NewHorizons.Builder.Props
{ {
behaviour.SetSector(sector); behaviour.SetSector(sector);
} }
/*
else else
{ {
// BUG: this doesnt find the field cuz _sector is private // BUG: this doesnt find the field cuz _sector is private
@ -159,6 +162,7 @@ namespace NewHorizons.Builder.Props
Main.Instance.ModHelper.Events.Unity.FireOnNextUpdate(() => sectorField.SetValue(component, sector)); Main.Instance.ModHelper.Events.Unity.FireOnNextUpdate(() => sectorField.SetValue(component, sector));
} }
} }
*/
if (component is AnglerfishController angler) if (component is AnglerfishController angler)
{ {