Skip to content

Commit cf994be

Browse files
committed
Update dependency and little edit on lobbyscene
1 parent 8746db9 commit cf994be

22 files changed

+147
-198
lines changed

EIV_Game.csproj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,13 @@
4646
</EmbeddedResource>
4747
</ItemGroup>
4848
<ItemGroup>
49-
<PackageReference Include="EIV_Common" Version="0.0.1.3" />
49+
<PackageReference Include="EIV_Common" Version="0.0.1.8" />
5050
<PackageReference Include="EIV_DataPack" Version="1.0.3.1" />
51-
<PackageReference Include="EIV_JsonLib" Version="2.0.1" />
51+
<PackageReference Include="EIV_JsonLib" Version="2.0.4.1" />
5252
<PackageReference Include="ini-parser-netstandard" Version="2.5.2" />
53-
<PackageReference Include="ModAPI" Version="0.0.1.1" />
53+
<PackageReference Include="ModAPI" Version="0.0.2.1" />
5454
<PackageReference Include="SemanticVersioning" Version="2.0.2" />
5555
</ItemGroup>
56-
<ItemGroup>
57-
<Folder Include="csharp\Modding\Item\" />
58-
</ItemGroup>
5956
<ItemGroup>
6057
<None Include="license.txt">
6158
<Pack>True</Pack>

csharp/Data/BuildEnums.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

csharp/Data/ModData.cs

Lines changed: 0 additions & 27 deletions
This file was deleted.

csharp/Data/Permissions.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

csharp/Items/GunBase.cs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,11 @@ public abstract partial class GunBase : InventoryItemBase
1313
{
1414
Marker3D BulletSpawner;
1515
public virtual Gun Gun { get; set; }
16-
public virtual List<Ammo> Ammos { get; set; } = [];
1716

1817
public bool IsJammed { get; internal set; } = false;
1918
public override void _Ready()
2019
{
2120
BulletSpawner = GetNode<Marker3D>("BulletSpawner");
22-
if (Gun.Magazine != null)
23-
{
24-
foreach (var item in Gun.Magazine.Ammunitions)
25-
{
26-
var ammo = ItemMaker.CreateItem<Ammo>(item);
27-
if (ammo == null)
28-
continue;
29-
Ammos.Add(ammo);
30-
}
31-
}
3221
}
3322

3423
public virtual void Shoot()
@@ -37,9 +26,9 @@ public virtual void Shoot()
3726
return;
3827
if (IsJammed)
3928
return;
40-
if (Ammos.Count > 0)
29+
if (Gun.Magazine.Ammunitions.Count > 0)
4130
{
42-
var ammo = Ammos.First();
31+
var ammo = Gun.Magazine.Ammunitions.First();
4332
// Ammo doesnt have 3D representation of itself :(
4433
if (!ammo.HasValidAssetPath())
4534
{
@@ -51,7 +40,7 @@ public virtual void Shoot()
5140
Rpc("ShootBullet", (int)id, MemoryPackSerializer.Serialize(ammo), BulletSpawnTransform);
5241
GetNode<AnimationPlayer>("AnimationPlayer").Play("Shoot");
5342
// UI update here
54-
Ammos.Remove(ammo);
43+
Gun.Magazine.Ammunitions.Remove(ammo);
5544
}
5645
}
5746

csharp/Items/HealingBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using EIV_Common.JsonStuff;
22
using EIV_JsonLib;
3+
using EIV_JsonLib.Extension;
34
using ExtractIntoVoid.Modules;
45

56
namespace ExtractIntoVoid.Items;

csharp/Items/ItemExt.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using EIV_JsonLib.Base;
2+
3+
namespace ExtractIntoVoid.Items;
4+
5+
public static class ItemExt
6+
{
7+
public static bool HasValidAssetPath(this CoreItem item)
8+
{
9+
return Godot.FileAccess.FileExists(item.AssetPath) || Godot.ResourceLoader.Exists(item.AssetPath);
10+
}
11+
}

csharp/Items/ThrowableBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using EIV_Common.JsonStuff;
2-
using EIV_JsonLib;
1+
using EIV_JsonLib;
2+
using EIV_JsonLib.Extension;
33

44
namespace ExtractIntoVoid.Items;
55

csharp/Items/UsableBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace ExtractIntoVoid.Items;
66
public abstract partial class UsableBase : InventoryItemBase
77
{
88
AnimationPlayer Animation;
9-
public UsableItemBase UsableItem { get; set; }
9+
public CoreUsable UsableItem { get; set; }
1010
bool IsInUse = false;
1111
decimal UseTime = 0;
1212

csharp/Managers/BuildDefined.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Godot;
1+
using EIV_JsonLib;
2+
using Godot;
23
using System;
34
using System.IO;
45

0 commit comments

Comments
 (0)