Merge branch 'dev' into no-more-CR

This commit is contained in:
Nick 2022-04-21 00:29:23 -04:00
commit 5a00065ba7
11 changed files with 52 additions and 51 deletions

View File

@ -18,12 +18,12 @@ namespace NewHorizons.Builder.Atmosphere
SC.radius = airScale; SC.radius = airScale;
SimpleFluidVolume SFV = airGO.AddComponent<SimpleFluidVolume>(); SimpleFluidVolume SFV = airGO.AddComponent<SimpleFluidVolume>();
SFV.SetValue("_layer", 5); SFV._layer = 5;
SFV.SetValue("_priority", 1); SFV._priority = 1;
SFV.SetValue("_density", 1.2f); SFV._density = 1.2f;
SFV.SetValue("_fluidType", FluidVolume.Type.AIR); SFV._fluidType = FluidVolume.Type.AIR;
SFV.SetValue("_allowShipAutoroll", true); SFV._allowShipAutoroll = true;
SFV.SetValue("_disableOnStart", false); SFV._disableOnStart = false;
if(hasOxygen) if(hasOxygen)
{ {
@ -33,9 +33,9 @@ namespace NewHorizons.Builder.Atmosphere
if (isRaining) if (isRaining)
{ {
VisorRainEffectVolume VREF = airGO.AddComponent<VisorRainEffectVolume>(); VisorRainEffectVolume VREF = airGO.AddComponent<VisorRainEffectVolume>();
VREF.SetValue("_rainDirection", VisorRainEffectVolume.RainDirection.Radial); VREF._rainDirection = VisorRainEffectVolume.RainDirection.Radial;
VREF.SetValue("_layer", 0); VREF._layer = 0;
VREF.SetValue("_priority", 0); VREF._priority = 0;
AudioSource AS = airGO.AddComponent<AudioSource>(); AudioSource AS = airGO.AddComponent<AudioSource>();
AS.mute = false; AS.mute = false;
@ -52,7 +52,7 @@ namespace NewHorizons.Builder.Atmosphere
AS.reverbZoneMix = 1f; AS.reverbZoneMix = 1f;
OWAudioSource OWAS = airGO.AddComponent<OWAudioSource>(); OWAudioSource OWAS = airGO.AddComponent<OWAudioSource>();
OWAS.SetValue("_audioLibraryClip", AudioType.GD_RainAmbient_LP); OWAS._audioLibraryClip = AudioType.GD_RainAmbient_LP;
OWAS.SetClipSelectionType(OWAudioSource.ClipSelectionOnPlay.RANDOM); OWAS.SetClipSelectionType(OWAudioSource.ClipSelectionOnPlay.RANDOM);
OWAS.SetTrack(OWAudioMixer.TrackName.Environment); OWAS.SetTrack(OWAudioMixer.TrackName.Environment);

View File

@ -15,11 +15,11 @@ namespace NewHorizons.Builder.Atmosphere
effectsGO.transform.localPosition = Vector3.zero; effectsGO.transform.localPosition = Vector3.zero;
SectorCullGroup SCG = effectsGO.AddComponent<SectorCullGroup>(); SectorCullGroup SCG = effectsGO.AddComponent<SectorCullGroup>();
SCG.SetValue("_sector", sector); SCG._sector = sector;
SCG.SetValue("_particleSystemSuspendMode", CullGroup.ParticleSystemSuspendMode.Stop); SCG._particleSystemSuspendMode = CullGroup.ParticleSystemSuspendMode.Stop;
SCG.SetValue("_occlusionCulling", false); SCG._occlusionCulling = false;
SCG.SetValue("_dynamicCullingBounds", false); SCG._dynamicCullingBounds = false;
SCG.SetValue("_waitForStreaming", false); SCG._waitForStreaming = false;
if(hasRain) if(hasRain)
{ {
@ -34,8 +34,8 @@ namespace NewHorizons.Builder.Atmosphere
new Keyframe(atmoSize, 0f) new Keyframe(atmoSize, 0f)
}); });
rainGO.GetComponent<PlanetaryVectionController>().SetValue("_activeInSector", sector); rainGO.GetComponent<PlanetaryVectionController>()._activeInSector = sector;
rainGO.GetComponent<PlanetaryVectionController>().SetValue("_exclusionSectors", new Sector[] { }); rainGO.GetComponent<PlanetaryVectionController>()._exclusionSectors = new Sector[] { };
rainGO.SetActive(true); rainGO.SetActive(true);
} }
@ -58,8 +58,8 @@ namespace NewHorizons.Builder.Atmosphere
new Keyframe(atmoSize, 0f) new Keyframe(atmoSize, 0f)
}); });
snowEmitter.GetComponent<PlanetaryVectionController>().SetValue("_activeInSector", sector); snowEmitter.GetComponent<PlanetaryVectionController>()._activeInSector = sector;
snowEmitter.GetComponent<PlanetaryVectionController>().SetValue("_exclusionSectors", new Sector[] { }); snowEmitter.GetComponent<PlanetaryVectionController>()._exclusionSectors = new Sector[] { };
snowEmitter.SetActive(true); snowEmitter.SetActive(true);
} }
} }

View File

@ -55,7 +55,7 @@ namespace NewHorizons.Builder.Atmosphere
/* /*
SectorProxy lodFogSectorProxy = lodFogGO.AddComponent<SectorProxy>(); SectorProxy lodFogSectorProxy = lodFogGO.AddComponent<SectorProxy>();
lodFogSectorProxy.SetValue("_renderers", new List<Renderer> { lodMR }); lodFogSectorProxy._renderers = new List<Renderer> { lodMR };
lodFogSectorProxy.SetSector(sector); lodFogSectorProxy.SetSector(sector);
*/ */

View File

@ -14,11 +14,11 @@ namespace NewHorizons.Builder.Atmosphere
overrideGO.transform.parent = body.transform; overrideGO.transform.parent = body.transform;
GiantsDeepSunOverrideVolume GDSOV = overrideGO.AddComponent<GiantsDeepSunOverrideVolume>(); GiantsDeepSunOverrideVolume GDSOV = overrideGO.AddComponent<GiantsDeepSunOverrideVolume>();
GDSOV.SetValue("_sector", sector); GDSOV._sector = sector;
GDSOV.SetValue("_cloudsOuterRadius", atmo.Size); GDSOV._cloudsOuterRadius = atmo.Size;
GDSOV.SetValue("_cloudsInnerRadius", atmo.Size * 0.9f); GDSOV._cloudsInnerRadius = atmo.Size * 0.9f;
GDSOV.SetValue("_waterOuterRadius", surfaceSize); GDSOV._waterOuterRadius = surfaceSize;
GDSOV.SetValue("_waterInnerRadius", 0f); GDSOV._waterInnerRadius = 0f;
overrideGO.transform.localPosition = Vector3.zero; overrideGO.transform.localPosition = Vector3.zero;
overrideGO.SetActive(true); overrideGO.SetActive(true);

View File

@ -50,7 +50,7 @@ namespace NewHorizons.Builder.Body
if (module.Tint != null) proxyLavaSphere.GetComponent<MeshRenderer>().material.SetColor("_EmissionColor", module.Tint.ToColor()); if (module.Tint != null) proxyLavaSphere.GetComponent<MeshRenderer>().material.SetColor("_EmissionColor", module.Tint.ToColor());
var sectorProxy = moltenCoreProxy.GetComponent<SectorProxy>(); var sectorProxy = moltenCoreProxy.GetComponent<SectorProxy>();
sectorProxy.SetValue("_renderers", new List<Renderer> { proxyLavaSphere.GetComponent<MeshRenderer>() }); sectorProxy._renderers = new List<Renderer> { proxyLavaSphere.GetComponent<MeshRenderer>() };
sectorProxy.SetSector(sector); sectorProxy.SetSector(sector);
var destructionVolume = GameObject.Instantiate(GameObject.Find("VolcanicMoon_Body/MoltenCore_VM/DestructionVolume"), moltenCore.transform); var destructionVolume = GameObject.Instantiate(GameObject.Find("VolcanicMoon_Body/MoltenCore_VM/DestructionVolume"), moltenCore.transform);

View File

@ -50,8 +50,8 @@ namespace NewHorizons.Builder.Body
TSR.LODRadius = 0; TSR.LODRadius = 0;
OceanEffectController OEC = waterGO.AddComponent<OceanEffectController>(); OceanEffectController OEC = waterGO.AddComponent<OceanEffectController>();
OEC.SetValue("_sector", sector); OEC._sector = sector;
OEC.SetValue("_ocean", TSR); OEC._ocean = TSR;
//Buoyancy //Buoyancy
var buoyancyObject = new GameObject("WaterVolume"); var buoyancyObject = new GameObject("WaterVolume");
@ -64,18 +64,18 @@ namespace NewHorizons.Builder.Body
sphereCollider.isTrigger = true; sphereCollider.isTrigger = true;
var owCollider = buoyancyObject.AddComponent<OWCollider>(); var owCollider = buoyancyObject.AddComponent<OWCollider>();
owCollider.SetValue("_parentBody", rb); owCollider._parentBody = rb;
owCollider.SetValue("_collider", sphereCollider); owCollider._collider = sphereCollider;
var buoyancyTriggerVolume = buoyancyObject.AddComponent<OWTriggerVolume>(); var buoyancyTriggerVolume = buoyancyObject.AddComponent<OWTriggerVolume>();
buoyancyTriggerVolume.SetValue("_owCollider", owCollider); buoyancyTriggerVolume._owCollider = owCollider;
var fluidVolume = buoyancyObject.AddComponent<RadialFluidVolume>(); var fluidVolume = buoyancyObject.AddComponent<RadialFluidVolume>();
fluidVolume.SetValue("_fluidType", FluidVolume.Type.WATER); fluidVolume._fluidType = FluidVolume.Type.WATER;
fluidVolume.SetValue("_attachedBody", rb); fluidVolume._attachedBody = rb;
fluidVolume.SetValue("_triggerVolume", buoyancyTriggerVolume); fluidVolume._triggerVolume = buoyancyTriggerVolume;
fluidVolume.SetValue("_radius", waterSize); fluidVolume._radius = waterSize;
fluidVolume.SetValue("_layer", LayerMask.NameToLayer("BassicEffectVolume")); fluidVolume._layer = LayerMask.NameToLayer("BassicEffectVolume");
var fogGO = GameObject.Instantiate(GameObject.Find("GiantsDeep_Body/Sector_GD/Sector_GDInterior/Effects_GDInterior/OceanFog"), waterGO.transform); var fogGO = GameObject.Instantiate(GameObject.Find("GiantsDeep_Body/Sector_GD/Sector_GDInterior/Effects_GDInterior/OceanFog"), waterGO.transform);
fogGO.name = "OceanFog"; fogGO.name = "OceanFog";

View File

@ -28,12 +28,12 @@ namespace NewHorizons.Builder.General
kinematicRigidBody.centerOfMass = Vector3.zero; kinematicRigidBody.centerOfMass = Vector3.zero;
OWRigidbody owRigidBody = body.AddComponent<OWRigidbody>(); OWRigidbody owRigidBody = body.AddComponent<OWRigidbody>();
owRigidBody.SetValue("_kinematicSimulation", true); owRigidBody._kinematicSimulation = true;
owRigidBody.SetValue("_autoGenerateCenterOfMass", true); owRigidBody._autoGenerateCenterOfMass = true;
owRigidBody.SetIsTargetable(true); owRigidBody.SetIsTargetable(true);
owRigidBody.SetValue("_maintainOriginalCenterOfMass", true); owRigidBody._maintainOriginalCenterOfMass = true;
owRigidBody.SetValue("_rigidbody", rigidBody); owRigidBody._rigidbody = rigidBody;
owRigidBody.SetValue("_kinematicRigidbody", kinematicRigidBody); owRigidBody._kinematicRigidbody = kinematicRigidBody;
owRigidBody._origParent = GameObject.Find("SolarSystemRoot").transform; owRigidBody._origParent = GameObject.Find("SolarSystemRoot").transform;
owRigidBody.EnableKinematicSimulation(); owRigidBody.EnableKinematicSimulation();
owRigidBody.MakeKinematic(); owRigidBody.MakeKinematic();
@ -49,10 +49,10 @@ namespace NewHorizons.Builder.General
else if (config.Base.HasCometTail) type = AstroObject.Type.Comet; else if (config.Base.HasCometTail) type = AstroObject.Type.Comet;
else if (config.Star != null) type = AstroObject.Type.Star; else if (config.Star != null) type = AstroObject.Type.Star;
else if (config.FocalPoint != null) type = AstroObject.Type.None; else if (config.FocalPoint != null) type = AstroObject.Type.None;
astroObject.SetValue("_type", type); astroObject._type = type;
astroObject.SetValue("_name", AstroObject.Name.CustomString); astroObject._name = AstroObject.Name.CustomString;
astroObject.SetValue("_customName", config.Name); astroObject._customName = config.Name;
astroObject.SetValue("_primaryBody", primaryBody); astroObject._primaryBody = primaryBody;
// Expand gravitational sphere of influence of the primary to encompass this body if needed // Expand gravitational sphere of influence of the primary to encompass this body if needed
if (primaryBody?.gameObject?.GetComponent<SphereCollider>() != null && !config.Orbit.IsStatic) if (primaryBody?.gameObject?.GetComponent<SphereCollider>() != null && !config.Orbit.IsStatic)
@ -66,7 +66,7 @@ namespace NewHorizons.Builder.General
{ {
var alignment = body.AddComponent<AlignWithTargetBody>(); var alignment = body.AddComponent<AlignWithTargetBody>();
alignment.SetTargetBody(primaryBody?.GetAttachedOWRigidbody()); alignment.SetTargetBody(primaryBody?.GetAttachedOWRigidbody());
alignment.SetValue("_usePhysicsToRotate", true); alignment._usePhysicsToRotate = true;
if(config.Orbit.AlignmentAxis == null) if(config.Orbit.AlignmentAxis == null)
{ {
alignment._localAlignmentAxis = new Vector3(0, -1, 0); alignment._localAlignmentAxis = new Vector3(0, -1, 0);

View File

@ -13,7 +13,7 @@ namespace NewHorizons.Builder.General
public static void Make(GameObject body, string name, IPlanetConfig config) public static void Make(GameObject body, string name, IPlanetConfig config)
{ {
MapMarker mapMarker = body.AddComponent<MapMarker>(); MapMarker mapMarker = body.AddComponent<MapMarker>();
mapMarker.SetValue("_labelID", (UITextType)TranslationHandler.AddUI(config.Name)); mapMarker._labelID = (UITextType)TranslationHandler.AddUI(config.Name);
var markerType = MapMarker.MarkerType.Planet; var markerType = MapMarker.MarkerType.Planet;

View File

@ -34,7 +34,7 @@ namespace NewHorizons.Builder.General
spawnGO.transform.localPosition = module.ShipSpawnPoint; spawnGO.transform.localPosition = module.ShipSpawnPoint;
var spawnPoint = spawnGO.AddComponent<SpawnPoint>(); var spawnPoint = spawnGO.AddComponent<SpawnPoint>();
spawnPoint.SetValue("_isShipSpawn", true); spawnPoint._isShipSpawn = true;
var ship = GameObject.Find("Ship_Body"); var ship = GameObject.Find("Ship_Body");
ship.transform.position = spawnPoint.transform.position; ship.transform.position = spawnPoint.transform.position;

View File

@ -49,9 +49,9 @@ namespace NewHorizons.Builder.Props
kinematicRigidBody.centerOfMass = Vector3.zero; kinematicRigidBody.centerOfMass = Vector3.zero;
var owRigidBody = raftObject.AddComponent<OWRigidbody>(); var owRigidBody = raftObject.AddComponent<OWRigidbody>();
owRigidBody.SetValue("_kinematicSimulation", true); owRigidBody._kinematicSimulation = true;
owRigidBody.SetValue("_rigidbody", rigidBody); owRigidBody._rigidbody = rigidBody;
owRigidBody.SetValue("_kinematicRigidbody", kinematicRigidBody); owRigidBody._kinematicRigidbody = kinematicRigidBody;
kinematicRigidBody._rigidbody = rigidBody; kinematicRigidBody._rigidbody = rigidBody;
kinematicRigidBody._owRigidbody = owRigidBody; kinematicRigidBody._owRigidbody = owRigidBody;

View File

@ -42,6 +42,7 @@ namespace NewHorizons.Utility
} }
Main.AssetBundles.Clear(); Main.AssetBundles.Clear();
TranslationHandler.ClearTables(); TranslationHandler.ClearTables();
TextTranslation.Get().SetLanguage(TextTranslation.Get().GetLanguage());
Logger.Log("Begin reload of config files...", Logger.LogType.Log); Logger.Log("Begin reload of config files...", Logger.LogType.Log);