Skip to content

Commit

Permalink
tweak(mono-rt2): swap back to using Prop instead of Object
Browse files Browse the repository at this point in the history
- using Object alongside the regular C# Object leads to annoying cases where you have to disambiguate between if you want to use CitizenFX.Core.Object or System.Object

- this goes back to the default that rt1 uses which is to have objects named prop
  • Loading branch information
AvarianKnight committed Aug 20, 2024
1 parent 705cd79 commit 624524e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 32 deletions.
25 changes: 0 additions & 25 deletions code/client/clrcore-v2/Client/FiveM/Object.cs

This file was deleted.

1 change: 0 additions & 1 deletion code/client/clrcore/External/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using CitizenFX.FiveM.Native;
using API = CitizenFX.FiveM.Native.Natives;
using Function = CitizenFX.FiveM.Native.Natives;
using Prop = CitizenFX.FiveM.Object;

namespace CitizenFX.FiveM
#else
Expand Down
12 changes: 9 additions & 3 deletions code/client/clrcore/External/Prop.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#if !MONO_V2
#if MONO_V2
using API = CitizenFX.FiveM.Native.Natives;
namespace CitizenFX.FiveM
#else
using CitizenFX.Core.Native;

namespace CitizenFX.Core
#endif
{
public sealed class Prop : Entity
#if MONO_V2
, Shared.IObject
#endif

{
public Prop(int handle) : base(handle)
{
Expand All @@ -28,4 +35,3 @@ public static bool Exists(Prop prop)
}
}
}
#endif
1 change: 0 additions & 1 deletion code/client/clrcore/External/WeaponCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#if MONO_V2
using API = CitizenFX.FiveM.Native.Natives;
using Prop = CitizenFX.FiveM.Object;

namespace CitizenFX.FiveM
#else
Expand Down
3 changes: 1 addition & 2 deletions code/client/clrcore/External/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
#if MONO_V2
using CitizenFX.Core;
using API = CitizenFX.FiveM.Native.Natives;
using Prop = CitizenFX.FiveM.Object;
using TaskPed = CitizenFX.Core.Coroutine<CitizenFX.FiveM.Ped>;
using TaskPickup = CitizenFX.Core.Coroutine<CitizenFX.FiveM.Pickup>;
using TaskProp = CitizenFX.Core.Coroutine<CitizenFX.FiveM.Object>;
using TaskProp = CitizenFX.Core.Coroutine<CitizenFX.FiveM.Prop>;
using TaskVehicle = CitizenFX.Core.Coroutine<CitizenFX.FiveM.Vehicle>;
using compat_i32_u32 = System.UInt32;
using compat_i32_i64 = System.Int64;
Expand Down

0 comments on commit 624524e

Please sign in to comment.