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

Readd Building Patches #2069

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
bf7514d
Disable patches for legacy building
tornac1234 Dec 26, 2022
d1f57ae
Created virtual objects for every possible building (and ghosts)
tornac1234 Dec 26, 2022
138441d
Add a singleplayer tester for the alternative building system
tornac1234 Dec 26, 2022
d57e3e8
Fix transpiler pattern matching not adding instructions at the end of…
tornac1234 Dec 29, 2022
23d7f4c
Adapted all of the code to work in simple peer-2-peer
tornac1234 Dec 30, 2022
1247519
Add a first implementation (unfinished and unclean) of the server-sid…
tornac1234 Dec 30, 2022
efcde9d
Added a BuildPieceIdentifier to be able to identify objects under Bas…
tornac1234 Dec 30, 2022
229d9b4
Fix a null exception during RestoreGhost()
tornac1234 Dec 30, 2022
2e41c70
Completed the server-side managing of the build packets (still a bug …
tornac1234 Dec 30, 2022
f0d4a3c
Refactored save data in PersistedWorldData
tornac1234 Dec 30, 2022
4d1301d
Added the required ProtoBufNet attributes to the new data classes
tornac1234 Dec 30, 2022
ce1e55f
Added building restore process to initial sync
tornac1234 Dec 30, 2022
b2d1791
Fix modules not being correctly handled on server-side
tornac1234 Dec 31, 2022
d1e9246
Try improving build piece identifying.
tornac1234 Jan 2, 2023
0dda03f
On the way to deprecate client force-updating bases when it's not val…
tornac1234 Jan 2, 2023
96d7dfb
Replace every ProtoContract/ProtoMember to DataContract/DataMember
tornac1234 Jan 2, 2023
4e0489d
Fix BuildPieceIdentifier being wrongly created for destructed pieces
tornac1234 Jan 5, 2023
f10b980
Fixed cooldowns, and added cooldown cleanup for when they're finished
tornac1234 Jan 8, 2023
d653a57
Made the building queue use safely yielded coroutines
tornac1234 Feb 20, 2023
8c00dbd
Added NitroxId to interior pieces and NitroxEntity to IBaseModules ac…
tornac1234 Feb 27, 2023
1345829
Fix WaterParks NitroxEntity setting
tornac1234 Feb 28, 2023
0c5f780
Fix being able to deconstruct buildings with remote players inside
tornac1234 Mar 1, 2023
191c36e
Add NitroxEntity to VehicleDockingBay of moonpools
tornac1234 Mar 15, 2023
7162dba
First shot at moving buildings to the entity system (a lot to correct…
tornac1234 Mar 29, 2023
2319339
Removed ExistsInGlobalRoot and WaterParkId fields from WorldEntity (r…
tornac1234 Apr 2, 2023
6f324da
Moved the whole building system to the entity system (incomplete but …
tornac1234 Apr 8, 2023
f069ca0
Fix MapRooms not getting a NitroxEntity attached to their functionali…
tornac1234 Apr 10, 2023
2f1f143
Reparent player children of a removed entity to GlobalRoot
tornac1234 Apr 10, 2023
8013cb5
Add sync/persistence for base pieces (not for alien containments tho)…
tornac1234 Apr 16, 2023
6cd3cab
Fix moonpool not spawning vehicle, recursive search for players causi…
tornac1234 Apr 19, 2023
1a41cf1
Add MapRooms as children for bases, that will get their nitrox ids sa…
tornac1234 Apr 20, 2023
c804f14
Fix ghost visual glitch
tornac1234 Apr 20, 2023
532160f
Fixed several edge-cases issues for WaterParks and finished its basic…
tornac1234 May 10, 2023
0fdee30
Fixed vehicles not being correctly docked to moonpools and constructa…
tornac1234 May 10, 2023
374431d
Refactoring (for build-related entities) positions to localpositions …
tornac1234 May 10, 2023
6f99bf2
Added a resync buildings procedure (with a button in the settings) an…
tornac1234 Jun 10, 2023
8ad30d8
Add a safe building mode for both client and server. Also fix the ope…
tornac1234 Jun 15, 2023
f942989
First steps of entity batch spawning applied to item spawning, fixed …
tornac1234 Jun 26, 2023
f301477
Introduced data compression for SavedBase data (drastically reduced t…
tornac1234 Jul 4, 2023
40bf8b9
Deprecated legacy building system.
tornac1234 Jul 8, 2023
cb74608
Mass refactoring (cleaning up the project), moving classes in their o…
tornac1234 Jul 12, 2023
f4a650a
Fix an issue in batch spawning (about ignored exceptions), and vehicl…
tornac1234 Jul 13, 2023
faa9ace
Some cleaning
tornac1234 Jul 13, 2023
78e6916
Replace NitroxEntity.TryGetIdFrom by the implementation from #1908
tornac1234 Jul 13, 2023
490dbbb
Some refactoring + fix operation tracker breaking bug
tornac1234 Jul 16, 2023
852f3bd
Resolved merge conflicts, fixed an issue with metadata update spammin…
tornac1234 Jul 17, 2023
5371422
Some more mass refactoring to avoid having too many util static classes
tornac1234 Jul 19, 2023
8946a43
QOL
Jannify May 22, 2023
5763418
Sync/Mirror cinematic animation for remote player
Jannify May 21, 2023
83f688a
Added waiting for players skip and auto skip intro on DEBUG
Jannify Jun 23, 2023
06a1daa
Added source generator for NitroxPatch boilerplate
Jul 9, 2023
410c98c
Applied HarmonyRegisterPatchGenerator to all applicable patch classes
Jul 15, 2023
5557bea
Added warn log for errors returned by LogHowToConnectAsync
Jul 16, 2023
92daab8
Merge branch 'pr/2063'
Checkerb0ard Jul 30, 2023
b019865
Merge branch 'pr/2043'
Checkerb0ard Jul 30, 2023
c918669
Fix Building errors
Checkerb0ard Jul 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix Building errors
:(
  • Loading branch information
Checkerb0ard committed Jul 30, 2023
commit c9186691eea8b5b80ad0eec3cba5a1b48cdf90af
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Runtime.Serialization;
using ProtoBufNet;

namespace NitroxModel.DataStructures.GameLogic.Buildings.Metadata
{
[Serializable]
[DataContract]
[ProtoInclude(50, typeof(SignMetadata))]
public abstract class BasePieceMetadata
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System;
using System.Runtime.Serialization;
using BinaryPack.Attributes;

namespace NitroxModel.DataStructures.GameLogic.Buildings.Metadata
{
[Serializable]
[DataContract]
public class SignMetadata : BasePieceMetadata
{
[DataMember(Order = 1)]
public string Text { get; }

[DataMember(Order = 2)]
public int ColorIndex { get; }

[DataMember(Order = 3)]
public int ScaleIndex { get; }

[DataMember(Order = 4)]
public bool[] Elements { get; }

[DataMember(Order = 5)]
public bool Background { get; }

[IgnoreConstructor]
protected SignMetadata()
{
//Constructor for serialization. Has to be "protected" for json serialization.
}

public SignMetadata(string text, int colorIndex, int scaleIndex, bool[] elements, bool background)
{
Text = text;
ColorIndex = colorIndex;
ScaleIndex = scaleIndex;
Elements = elements;
Background = background;
}

public override string ToString()
{
return $"[SignMetadata - Text: {Text}, ColorIndex: {ColorIndex}, ScaleIndex: {ScaleIndex}, Elements: {Elements}, Background: {Background}]";
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;
using System.Runtime.Serialization;

namespace NitroxModel.DataStructures.GameLogic.Buildings.Rotation
{
[Serializable]
[DataContract]
public abstract class BuilderMetadata
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

using NitroxModel.DataStructures.Util;

namespace NitroxModel.DataStructures.GameLogic.Buildings.Rotation
{
public interface RotationMetadataFactory
{
Optional<BuilderMetadata> From(object o);
}
}
14 changes: 1 addition & 13 deletions NitroxModel/Helper/PirateDetection.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
using NitroxModel.Platforms.OS.Shared;

Expand Down Expand Up @@ -42,18 +42,6 @@ public static bool TriggerOnDirectory(string subnauticaRoot)

private static bool IsPirateByDirectory(string subnauticaRoot)
{
string subdirDll = Path.Combine(subnauticaRoot, "Subnautica_Data", "Plugins", "x86_64", "steam_api64.dll");
if (File.Exists(subdirDll) && !FileSystem.Instance.IsTrustedFile(subdirDll))
{
return true;
}
// Dlls might be in root if cracked game (to override DLLs in sub directories).
string rootDll = Path.Combine(subnauticaRoot, "steam_api64.dll");
if (File.Exists(rootDll) && !FileSystem.Instance.IsTrustedFile(rootDll))
{
return true;
}

return false;
}

Expand Down