Skip to content

Commit

Permalink
Supply Raid 1.0.3
Browse files Browse the repository at this point in the history
* Updated Plugin Meta data
* Added Country of Origin to Item Categories
* Added Country of Origin to Editor
* Added Avoidance quality for maps to SR and SDK
  • Loading branch information
Packer committed Oct 21, 2023
1 parent 5f78064 commit e3d9662
Show file tree
Hide file tree
Showing 13 changed files with 170 additions and 138 deletions.
2 changes: 1 addition & 1 deletion Packer-SupplyRaid/src/Plugin/src/Hooks.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace H3VRMod
namespace SupplyRaid
{
public class Hooks
{
Expand Down
6 changes: 3 additions & 3 deletions Packer-SupplyRaid/src/Plugin/src/PluginInfo.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace H3VRMod
namespace SupplyRaid
{
internal static class PluginInfo
{
internal const string NAME = "Supply Raid";
internal const string GUID = "com.Packer.h3vrmod";
internal const string VERSION = "1.0.2";
internal const string GUID = "com.Packer.SupplyRaid";
internal const string VERSION = "1.0.3";
}
}
17 changes: 15 additions & 2 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_ItemCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class SR_ItemCategory
public List<FVRObject.OTagMeleeHandedness> meleeHandedness = new List<FVRObject.OTagMeleeHandedness>();
public List<FVRObject.OTagPowerupType> powerupTypes = new List<FVRObject.OTagPowerupType>();
public List<FVRObject.OTagThrownType> thrownTypes = new List<FVRObject.OTagThrownType>();
public List<FVRObject.OTagFirearmCountryOfOrigin> countryOfOrigins = new List<FVRObject.OTagFirearmCountryOfOrigin>();

[Header("Subtraction Items")]
[Tooltip("These defined ObjectIDs will be subtracted from the category pool")]
Expand Down Expand Up @@ -139,8 +140,6 @@ public LootTable InitializeLootTable()
minCapacity,
maxCapacity);

//Debug.Log("Supply Raid - Loot Table " + name + " | Size: " + table.Loot.Count);

//Tag Set Removal
if (set != null && set.Count > 0)
{
Expand All @@ -155,6 +154,20 @@ public LootTable InitializeLootTable()
}
}

//Country of Origin
if (countryOfOrigins != null && countryOfOrigins.Count > 0)
{
for (int num = table.Loot.Count - 1; num >= 0; num--)
{
FVRObject fVRObject = table.Loot[num];
if (!countryOfOrigins.Contains(fVRObject.TagFirearmCountryOfOrigin))
{
table.Loot.RemoveAt(num);
continue;
}
}
}

//Collect items
List<int> detractItems = new List<int>();

Expand Down
12 changes: 7 additions & 5 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.AI;

namespace SupplyRaid
{
Expand Down Expand Up @@ -79,6 +80,7 @@ public int CurrentCaptures
public bool gameCompleted = false;
[HideInInspector]
public bool inEndless = false;
public ObstacleAvoidanceType avoidanceQuailty = ObstacleAvoidanceType.MedQualityObstacleAvoidance;

[Header("Supply Points")]
[HideInInspector, Tooltip("The next supply point that is being attacked by the player")]
Expand Down Expand Up @@ -204,7 +206,6 @@ public int Points
get { return points; }
}


// Use this for initialization
void Awake()
{
Expand Down Expand Up @@ -1637,22 +1638,22 @@ Sosig CreateSosig(SosigAPI.SpawnOptions spawnOptions, Vector3 position, Quaterni
return null;
}

Debug.Log("Supply Raid - Spawning SosigEnemyID: " + (int)id + " - " + id);

Sosig sosig =
SosigAPI.Spawn(
IM.Instance.odicSosigObjsByID[id],
_spawnOptions,
position,
rotation);

//TODO not a hack job
//TODO this does nothing
sosig.m_isBlinded = false;

//Set Agents to quailty level
sosig.GetComponent<NavMeshAgent>().obstacleAvoidanceType = avoidanceQuailty;

return sosig;
}


void ClearSosigs()
{
ignoreKillStat = true;
Expand Down Expand Up @@ -1712,6 +1713,7 @@ void SetupAttachmentLootTable()
List<FVRObject.OTagSet> set = new List<FVRObject.OTagSet>
{
FVRObject.OTagSet.Real,
FVRObject.OTagSet.GroundedFictional,
FVRObject.OTagSet.TNH,
};

Expand Down
1 change: 0 additions & 1 deletion Packer-SupplyRaid/src/Plugin/src/Scripts/SR_ModTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public class SR_ModTable : MonoBehaviour
[Header("Spawn Positions")]
public Transform[] spawnPoints;


[System.Serializable]
public class TableButton
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public void ExportJson()

}


[System.Serializable]
public class SosigPool
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using BepInEx;

namespace H3VRMod
namespace SupplyRaid
{
[BepInPlugin(PluginInfo.GUID, PluginInfo.NAME, PluginInfo.VERSION)]
[BepInProcess("h3vr.exe")]
public class Plugin : BaseUnityPlugin
public class SupplyRaidPlugin : BaseUnityPlugin
{
private readonly Hooks _hooks;

public Plugin()
public SupplyRaidPlugin()
{
_hooks = new Hooks();
_hooks.Hook();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 5, y: -0.5}
m_SizeDelta: {x: -30, y: -3}
m_AnchoredPosition: {x: 0, y: -0.5}
m_SizeDelta: {x: -20, y: -3}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &513414426736292943
CanvasRenderer:
Expand Down Expand Up @@ -237,8 +237,8 @@ MonoBehaviour:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_BestFit: 1
m_MinSize: 4
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
Expand Down

0 comments on commit e3d9662

Please sign in to comment.