Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up build scripts and used AssemblyResolve event instead of copying all dlls #1098

Merged
merged 39 commits into from
May 22, 2020

Conversation

Measurity
Copy link
Collaborator

@Measurity Measurity commented May 13, 2020

  • Changed NitroxModel and NitroxServer a lot to make it free of UnityEngine/UWE type references
  • Moved surrogates over from NitroxModel to NitroxModel-Subnautica to try keep NitroxModel UnityEngine.dll free.
  • Added Nitrox.Bootloader project that loads Nitrox based on where the launcher is located. The path is stored in "%AppData%\Roadming\Nitrox\launcherpath.txt" when Subnautica is started through the launcher. Nitrox.Bootloader.dll is the only DLL that is copied to Subnautica managed directory.
  • Cleaned up the csproj files massively by using Directory.Build.targets and Directory.Build.props which MSBuild automatically includes in all projects.
  • Reverted LiteNetLib to upstream/0.8 because its csproj file is automatically 'changed' by the Directory.Build.* files.
  • Building solution and projects is now much faster since there is not copying going on beyond asset files like AssetBundles and static dll references.
  • Nitrox will now only do the patches if started through the launcher. Making it easier for people to switch between SP and MP.
  • Nitrox will now not load when QModManager assembly has been loaded into Subnautica.

@ZachTaMere
Copy link

Hello how i can download your version of nitrox to run my server with your version to test if the buildings works properly ?

@dartasen
Copy link
Member

Hello how i can download your version of nitrox to run my server with your version to test if the buildings works properly ?

@ZachTaMere Can you please wait until the next nitrox release, It's a workplace here and If you have questions about Nitrox please join our Discord so our support team can answer to them.

Best regards

NitroxClient/GameLogic/Vehicles.cs Outdated Show resolved Hide resolved
NitroxClient/GameLogic/Vehicles.cs Outdated Show resolved Hide resolved
NitroxLauncher/Patching/NitroxEntryPatch.cs Outdated Show resolved Hide resolved
Comment on lines +9 to +13
public static NitroxVector3 ToDto(this Vector3 v)
{
return new NitroxVector3(v.x, v.y, v.z);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename it to ToNitrox() to correspond to ToUnity()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep this ambiguous and not Nitrox specific in case we want to extend this to external services (outside of Nitrox).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, after your message in discord I know the meaning and I am fine with it :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the justification? toNitrox() may be more intuitive to those not in the industry. Also, the method does return a NitroxVector3.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "Dto" mean?
Maybe better use .ToUnityVector() and .ToNitroxVector() ? Then it should be clear enough what this method concrete does and not be too ambigous to confound with other "ToNitrox" conversions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@acidscorch ToDto means To data transfer object which is often used for such "data conversation". ToNitroxVector is (imo) too complicated because you already use it on a type like NitroxVector. I would just wait for @Sunrunner37 s opinion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jannify Ah yes, i understand. (Sorry i'm not very familiar with extension methods.)
This Method is for converting a UnityVector to a NitroxVector, correct? And you already have a .ToUnity() Method. Maybe then use .FromUnity() for this?

NitroxModel-Subnautica/Helper/TechTypeConverter.cs Outdated Show resolved Hide resolved
NitroxModel-Subnautica/Helper/TextureScaler.cs Outdated Show resolved Hide resolved
Nitrox.Bootloader/Nitrox.Bootloader.csproj Outdated Show resolved Hide resolved
Nitrox.sln Outdated Show resolved Hide resolved
Nitrox.Bootloader/Main.cs Outdated Show resolved Hide resolved
Nitrox.sln Show resolved Hide resolved
Nitrox.Bootloader/Main.cs Show resolved Hide resolved
NitroxLauncher/Patching/NitroxEntryPatch.cs Show resolved Hide resolved
NitroxLauncher/Patching/NitroxEntryPatch.cs Outdated Show resolved Hide resolved
Comment on lines +9 to +13
public static NitroxVector3 ToDto(this Vector3 v)
{
return new NitroxVector3(v.x, v.y, v.z);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the justification? toNitrox() may be more intuitive to those not in the industry. Also, the method does return a NitroxVector3.

NitroxServer/GameLogic/Unlockables/PDAStateData.cs Outdated Show resolved Hide resolved
NitroxModel-Subnautica/Helper/VehicleModelFactory.cs Outdated Show resolved Hide resolved
NitroxServer/GameLogic/Players/PlayerData.cs Show resolved Hide resolved
@Measurity
Copy link
Collaborator Author

I went with ToDto() instead of ToNitrox() because ToNitrox sounded too ambiguous as to what the conversion is used for.

Added shared project for copying the resources to the launcher output
@Sunrunner37 Sunrunner37 merged commit 5735a04 into SubnauticaNitrox:master May 22, 2020
@Measurity Measurity deleted the build-config branch May 22, 2020 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants