Nitrox
Nitrox copied to clipboard
Last minute additions
- [x] Keypad sync fix
- [x] Fix falling through the Aurora when spawning inside
I might want to add a things or two before release which I'll put in here
// KeypadMetadata.cs [DataContract] public class KeypadMetadata { // Constructor for serialization. Has to be "protected" for json serialization. protected KeypadMetadata() { }
[DataMember(Order = 2)]
public string PathFromRoot { get; }
// Additional properties and methods as needed
}
// Terrain.cs public class Terrain : MonoBehaviour { private Entities _entities;
// Constructor or initialization method to inject dependencies
public Terrain(Entities entities)
{
_entities = entities;
}
public void WaitForEntities()
{
// In case the player is spawned in the air, we need to hold them up while all the entities load around them
if (Player.main && !Player.main.IsUnderwater() && !Player.main.groundMotor.grounded)
{
// Check if the player is inside a subroot or escape pod
if (!IsInsideSubrootOrEscapePod(Player.main))
{
// Logic to hold the player up
}
}
}
private bool IsInsideSubrootOrEscapePod(Player player)
{
// Implement logic to determine if the player is inside a subroot or escape pod
return false; // Placeholder return value
}
}
Make sure to replace the placeholder logic in IsInsideSubrootOrEscapePod with the actual implementation that checks the player's position relative to the subroot or escape pod.