Skip to content

Commit

Permalink
Update to new version. Remove src folder. Add colors, neons, wheel ch…
Browse files Browse the repository at this point in the history
…anges
  • Loading branch information
TheDutchDev committed Nov 29, 2023
1 parent 82ccd3b commit a28d19b
Show file tree
Hide file tree
Showing 20 changed files with 83 additions and 443 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/setup-dotnet@v3

# Create the NuGet package in the folder from the environment variable NuGetDirectory
- run: dotnet pack src/*.csproj --configuration Release --output ${{ env.NuGetDirectory }}
- run: dotnet pack *.csproj --configuration Release --output ${{ env.NuGetDirectory }}

# Publish the NuGet package as an artifact, so they can be used in the following jobs
- uses: actions/upload-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
<PublishUrl>https://github.com/altv-atlas</PublishUrl>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RootNamespace>AltV.Atlas.Vehicles.Server</RootNamespace>
</PropertyGroup>

<ItemGroup>
<None Include="../README.md" Pack="true" PackagePath="\"/>
<None Include="README.md" Pack="true" PackagePath="\"/>
<PackageReference Include="AltV.Net.Async" Version="15.0.6"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0"/>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0"/>
Expand All @@ -26,7 +27,13 @@
<PackageReference Include="AltV.Atlas.Shared" Version="2.0.0" />
</ItemGroup>


<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<ProjectReference Include="..\..\AltV.Atlas.Shared\AltV.Atlas.Shared.csproj" />
<ProjectReference Include="..\AltV.Atlas.Shared\AltV.Atlas.Shared.csproj" />
<ProjectReference Include="..\AltV.Atlas.Vehicles.Shared\AltV.Atlas.Vehicles.Shared.csproj" />
</ItemGroup>


<ItemGroup>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using AltV.Atlas.Vehicles.AltV.Interfaces;
using AltV.Atlas.Vehicles.Server.AltV.Interfaces;
using AltV.Net;
using AltV.Net.Async.Elements.Entities;
using AltV.Net.Elements.Entities;

namespace AltV.Atlas.Vehicles.AltV.Entities;
namespace AltV.Atlas.Vehicles.Server.AltV.Entities;

public class AtlasVehicleBase( ICore core, IntPtr nativePointer, uint id ) : AsyncVehicle( core, nativePointer, id ), IAtlasVehicle
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using AltV.Atlas.Vehicles.AltV.Entities;
using AltV.Atlas.Vehicles.AltV.Interfaces;
using AltV.Atlas.Vehicles.Server.AltV.Entities;
using AltV.Atlas.Vehicles.Server.AltV.Interfaces;
using AltV.Net;
using Microsoft.Extensions.DependencyInjection;

namespace AltV.Atlas.Vehicles.AltV.Factories;
namespace AltV.Atlas.Vehicles.Server.AltV.Factories;

/// <summary>
/// Entity factory for atlas vehicles
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using AltV.Net.Data;
using AltV.Net.Elements.Entities;
using AltV.Net.Elements.Entities;

namespace AltV.Atlas.Vehicles.AltV.Interfaces;
namespace AltV.Atlas.Vehicles.Server.AltV.Interfaces;

public interface IAtlasVehicle : IVehicle
{
Expand Down
5 changes: 3 additions & 2 deletions src/Data/GtaColor.cs → Data/GtaColor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Frozen;
using AltV.Atlas.Vehicles.Enums;
namespace AltV.Atlas.Vehicles.Data;
using AltV.Atlas.Vehicles.Server.Enums;

namespace AltV.Atlas.Vehicles.Server.Data;

/// <summary>
/// A class that holds GtaColor extensions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using AltV.Net;
namespace AltV.Atlas.Vehicles.Entities;

namespace AltV.Atlas.Vehicles.Server.Entities;

public class AtlasPlayerVehicle( ICore core, IntPtr nativePointer, uint id ) : AtlasTuningVehicle( core, nativePointer, id )
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using AltV.Atlas.Shared.Extensions;
using AltV.Atlas.Vehicles.AltV.Entities;
using AltV.Atlas.Vehicles.Data;
using AltV.Atlas.Vehicles.Enums;
using AltV.Atlas.Vehicles.Models;
using AltV.Atlas.Vehicles.Server.AltV.Entities;
using AltV.Atlas.Vehicles.Server.Data;
using AltV.Atlas.Vehicles.Server.Enums;
using AltV.Atlas.Vehicles.Server.Models;
using AltV.Atlas.Vehicles.Shared.Models;

Check failure on line 6 in Entities/AtlasTuningVehicle.cs

View workflow job for this annotation

GitHub Actions / create_nuget

The type or namespace name 'Shared' does not exist in the namespace 'AltV.Atlas.Vehicles' (are you missing an assembly reference?)
using AltV.Net;
using AltV.Net.Data;
using AltV.Net.Enums;

namespace AltV.Atlas.Vehicles.Entities;
namespace AltV.Atlas.Vehicles.Server.Entities;

public class AtlasTuningVehicle : AtlasVehicleBase
{
Expand Down Expand Up @@ -246,4 +247,35 @@ public void SetWheels( EWheelType wheelType, byte variation )
SetWheels( ( byte ) wheelType, variation );
}

/// <summary>
/// Changes the vehicles wheel mods for each wheel
/// </summary>
/// <param name="wheelMod">The data to apply</param>
public void ChangeWheel( WheelMod wheelMod )

Check failure on line 254 in Entities/AtlasTuningVehicle.cs

View workflow job for this annotation

GitHub Actions / create_nuget

The type or namespace name 'WheelMod' could not be found (are you missing a using directive or an assembly reference?)
{
var wheels = new List<WheelMod>( );

for( byte i = 0; i < WheelsCount; i++ )
{
wheelMod.Index = i;
wheels.Add( wheelMod );
}

SetStreamSyncedMetaData( "changeWheels", wheels );
}

/// <summary>
/// Changes the vehicle wheel mods
/// </summary>
/// <param name="wheelMods">The mod values to apply</param>
public void ChangeWheels( IList<WheelMod> wheelMods )

Check failure on line 271 in Entities/AtlasTuningVehicle.cs

View workflow job for this annotation

GitHub Actions / create_nuget

The type or namespace name 'WheelMod' could not be found (are you missing a using directive or an assembly reference?)
{
SetStreamSyncedMetaData( "changeWheels", wheelMods );
}

public void ChangeWheelTest( float value )
{
SetStreamSyncedMetaData( "changeWheels", value );
}

}
2 changes: 1 addition & 1 deletion src/Enums/EColorMaterial.cs → Enums/EColorMaterial.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AltV.Atlas.Vehicles.Enums;
namespace AltV.Atlas.Vehicles.Server.Enums;

/// <summary>
/// Different materials a car color can have
Expand Down
2 changes: 1 addition & 1 deletion src/Enums/EGtaColor.cs → Enums/EGtaColor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AltV.Atlas.Vehicles.Enums;
namespace AltV.Atlas.Vehicles.Server.Enums;

/// <summary>
/// All default GTA colors
Expand Down
2 changes: 1 addition & 1 deletion src/Enums/EHeadlightColor.cs → Enums/EHeadlightColor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AltV.Atlas.Vehicles.Enums;
namespace AltV.Atlas.Vehicles.Server.Enums;

/// <summary>
/// All available headlight colors
Expand Down
2 changes: 1 addition & 1 deletion src/Enums/ENeonStyle.cs → Enums/ENeonStyle.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AltV.Atlas.Vehicles.Enums;
namespace AltV.Atlas.Vehicles.Server.Enums;

[Flags]
public enum ENeonStyle
Expand Down
2 changes: 1 addition & 1 deletion src/Enums/EWheelType.cs → Enums/EWheelType.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AltV.Atlas.Vehicles.Enums;
namespace AltV.Atlas.Vehicles.Server.Enums;

/// <summary>
/// All different default GTA wheel types
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using AltV.Atlas.Vehicles.AltV.Interfaces;
using AltV.Atlas.Vehicles.Server.AltV.Interfaces;
using AltV.Net.Elements.Entities;

namespace AltV.Atlas.Vehicles.Events;
namespace AltV.Atlas.Vehicles.Server.Events;

/// <summary>
/// Class that receives and emits events that occur within vehicles module
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using AltV.Atlas.Vehicles.AltV.Interfaces;
using AltV.Atlas.Vehicles.Server.AltV.Interfaces;
using AltV.Net;
using AltV.Net.Async;
using AltV.Net.Data;
using AltV.Net.Elements.Entities;

namespace AltV.Atlas.Vehicles.Events;
namespace AltV.Atlas.Vehicles.Server.Events;

/// <summary>
/// Listens to altV PlayerEnterVehicle event
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using AltV.Atlas.Vehicles.AltV.Interfaces;
using AltV.Atlas.Vehicles.Interfaces;
using AltV.Atlas.Vehicles.Server.AltV.Interfaces;
using AltV.Atlas.Vehicles.Server.Interfaces;
using AltV.Net;
using AltV.Net.Async;
using AltV.Net.Data;
using AltV.Net.Enums;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

namespace AltV.Atlas.Vehicles.Factories;
namespace AltV.Atlas.Vehicles.Server.Factories;

/// <summary>
/// Factory to create new atlas vehicle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using AltV.Atlas.Vehicles.AltV.Interfaces;
using AltV.Atlas.Vehicles.Server.AltV.Interfaces;
using AltV.Net.Data;
using AltV.Net.Enums;

namespace AltV.Atlas.Vehicles.Interfaces;
namespace AltV.Atlas.Vehicles.Server.Interfaces;

public interface IAtlasVehicleFactory
{
Expand Down
3 changes: 2 additions & 1 deletion src/Models/VehicleMod.cs → Models/VehicleMod.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using AltV.Net.Enums;
namespace AltV.Atlas.Vehicles.Models;

namespace AltV.Atlas.Vehicles.Server.Models;

public class VehicleMod
{
Expand Down
18 changes: 8 additions & 10 deletions src/VehicleModule.cs → VehicleModule.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
using AltV.Atlas.Vehicles.AltV.Entities;
using AltV.Atlas.Vehicles.AltV.Factories;
using AltV.Atlas.Vehicles.AltV.Interfaces;
using AltV.Atlas.Vehicles.Entities;
using AltV.Atlas.Vehicles.Events;
using AltV.Atlas.Vehicles.Factories;
using AltV.Atlas.Vehicles.Interfaces;
using AltV.Atlas.Vehicles.Server.AltV.Entities;
using AltV.Atlas.Vehicles.Server.AltV.Factories;
using AltV.Atlas.Vehicles.Server.AltV.Interfaces;
using AltV.Atlas.Vehicles.Server.Events;
using AltV.Atlas.Vehicles.Server.Factories;
using AltV.Atlas.Vehicles.Server.Interfaces;
using AltV.Net;
using AltV.Net.Async.Elements.Entities;
using AltV.Net.Elements.Entities;
using Microsoft.Extensions.DependencyInjection;
namespace AltV.Atlas.Vehicles;

namespace AltV.Atlas.Vehicles.Server;

/// <summary>
/// Entrypoint for atlas vehicle module
Expand Down
Loading

0 comments on commit a28d19b

Please sign in to comment.