Skip to content

Commit e1b8699

Browse files
General code cleanup
1 parent 6683ce4 commit e1b8699

152 files changed

Lines changed: 1759 additions & 1576 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Buoyancy/BuoyancyVoxelDataGizmoSettings.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Buoyancy/Buoyant.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace Appalachia.Simulation.Buoyancy
4343
[ExecuteAlways]
4444
[RequireComponent(typeof(Rigidbody))]
4545
[RequireComponent(typeof(RigidbodyDensityManager))]
46-
[ExecutionOrder(-90)]
46+
[ExecutionOrder(ExecutionOrders.Buoyant)]
4747
public class Buoyant : InstancedAppalachiaBehaviour
4848
{
4949
private const string _PRF_PFX = nameof(Buoyant) + ".";
@@ -384,7 +384,7 @@ public void EnterWater(Water w)
384384
enabled = true;
385385
}
386386

387-
public override void Initialize()
387+
protected override void Initialize()
388388
{
389389
using (_PRF_Initialize.Auto())
390390
{
@@ -410,14 +410,14 @@ public override void Initialize()
410410

411411
buoyancyData.mesh = mesh;
412412

413-
UnityEditor.EditorUtility.SetDirty(buoyancyData);
413+
buoyancyData.MarkAsModified();
414414
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(gameObject.scene);
415415
}
416416
else if (buoyancyData.mesh == null)
417417
{
418418
buoyancyData.mesh = MeshObjectManager.GetCheapestMesh(gameObject);
419419

420-
UnityEditor.EditorUtility.SetDirty(buoyancyData);
420+
buoyancyData.MarkAsModified();
421421
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(gameObject.scene);
422422
}
423423
#endif
@@ -441,7 +441,7 @@ public override void Initialize()
441441
densityManager = RigidbodyDensityManager.CreateNow(gameObject);
442442
}
443443

444-
densityManager.Initialize();
444+
densityManager.InitializeExternal();
445445

446446
if (voxels != null)
447447
{
@@ -1036,7 +1036,7 @@ private void OnDrawGizmosSelected()
10361036

10371037
if (_voxelGizmoSettings == null)
10381038
{
1039-
var lookup = VoxelDataGizmoSettingsLookup.instance;
1039+
var lookup = VoxelDataGizmoSettingsCollection.instance;
10401040

10411041
_voxelGizmoSettings = lookup.GetOrLoadOrCreateNew(
10421042
VoxelDataGizmoStyle.Buoyancy,

src/Buoyancy/Buoyant.cs.meta

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Buoyancy/Data/BuoyancyData.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Buoyancy/Data/BuoyancyDataCollection.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
namespace Appalachia.Simulation.Buoyancy.Data
77
{
88
[Serializable]
9-
public class BuoyancyDataCollection : AppalachiaObjectLookupCollection<BuoyancyDataCollection,
10-
BuoyancyDataLookup, string, BuoyancyData, AppaList_string, AppaList_BuoyancyData>
9+
public class BuoyancyDataCollection : AppalachiaObjectLookupCollection<string, BuoyancyData,
10+
AppaList_string, AppaList_BuoyancyData, BuoyancyDataLookup, BuoyancyDataCollection>
1111
{
12+
public override bool HasDefault => false;
13+
1214
protected override string GetUniqueKeyFromValue(BuoyancyData value)
1315
{
1416
return value.meshGUID;

src/Buoyancy/Data/BuoyancyDataCollection.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Buoyancy/Data/BuoyancyDataDefaults.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Buoyancy/Data/WaterPhysicsCoefficients.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Buoyancy/Voxels/BuoyancyVoxelsDataStore.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Buoyancy/Voxels/BuoyancyVoxelsDataStoreLookup.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)