Skip to content

Commit

Permalink
Editor Prep for 1.2.0
Browse files Browse the repository at this point in the history
* Removed Selection Box from Ammo Spawner
* Commented out code in CaptureZone
* Fixed Magazine Duplicator to use proper magazine capacity compare
* Removed Potatos BGM code
* Added Modul button for later mod compatiblity
* Fixed Sniper Gizmo to have no rotation
* Added Icons to Editor
* Started Faction Editor portion
* Added New feature buttons to Character and Item Category
* Updated Assets to reflect new Modul Button
  • Loading branch information
Packer committed Jun 23, 2024
1 parent 96cdbd5 commit fec2048
Show file tree
Hide file tree
Showing 39 changed files with 16,564 additions and 5,634 deletions.
3 changes: 0 additions & 3 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_AmmoSpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class SR_AmmoSpawner : MonoBehaviour
private List<FVRObject.OTagSet> m_validSets = new List<FVRObject.OTagSet>();

private float m_scanTick = 1f;
public Transform selectedBox;

//Ammo
List<AmmoRound> ammoList = new List<AmmoRound>();
Expand Down Expand Up @@ -222,7 +221,6 @@ public void TogglePages()
ammoPage.SetActive(!roundPage.activeSelf);
}


private void Start()
{
instance = this;
Expand Down Expand Up @@ -898,5 +896,4 @@ public class AmmoClass
//public bool hasAmmo = false;
}
}

}
5 changes: 4 additions & 1 deletion Packer-SupplyRaid/src/Plugin/src/Scripts/SR_CaptureZone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ void CaptureZoneScan()
if (SR_Compass.instance && SR_Compass.instance.captureText.gameObject.activeSelf == false)
{
SR_Compass.instance.captureText.gameObject.SetActive(true);
/*
//BGM
if (SupplyRaidPlugin.bgmEnabled)
{
BGM.SetHoldMusic(SR_Manager.instance.CurrentCaptures);
}

*/
}

if(SR_Compass.instance)
Expand Down Expand Up @@ -150,11 +151,13 @@ void CaptureZoneScan()
if (SR_Manager.instance.captureProtection <= 0)
{
SR_Manager.PlayFailSFX();
/*
//BGM
if (SupplyRaidPlugin.bgmEnabled)
{
BGM.SetHoldMusic(SR_Manager.instance.CurrentCaptures);
}
*/
}
if (SR_Compass.instance)
SR_Compass.instance.captureText.gameObject.SetActive(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private void SetupCosts()
//Update Magazine Cost Calculation
costUpgrade = SR_Manager.Character().GetRoundCost(
SR_Manager.instance.character.upgradeMagazineCost,
m_detectedMag.m_capacity,
magazineUpgrade.MagazineCapacity,
multiplier);

if (magazineUpgrade.ItemID == m_detectedMag.ObjectWrapper.ItemID)
Expand Down
8 changes: 8 additions & 0 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -382,20 +382,24 @@ void Start()
//Random the Random
Random.InitState((int)Time.realtimeSinceStartup);

/*
if (SupplyRaidPlugin.bgmEnabled)
{
Invoke("LoadBGM", 0.25f);
}
*/
}

void LoadBGM()
{
/*
//BGM
if (SupplyRaidPlugin.bgmEnabled)
{
BGM.SpawnPanel(spawnMenu.transform.position + Vector3.up, spawnMenu.transform.rotation);
BGM.InitializeSoundtrackInterface();
}
*/
}

void OnDisable()
Expand Down Expand Up @@ -513,11 +517,13 @@ public void LaunchGame()
//DEBUG
//StartCoroutine(SR_Global.SpawnAllLevelSosigs());

/*
//BGM
if (SupplyRaidPlugin.bgmEnabled)
{
BGM.SetTakeMusic(CurrentCaptures);
}
*/
}

void SetupSupplyPoints()
Expand Down Expand Up @@ -857,11 +863,13 @@ public void CapturedPoint()

CurrentCaptures++;

/*
//BGM
if (SupplyRaidPlugin.bgmEnabled)
{
BGM.SetTakeMusic(CurrentCaptures);
}
*/

if (inEndless)
endlessLevel++;
Expand Down
7 changes: 5 additions & 2 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_ModTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class SR_ModTable : MonoBehaviour
public GameObject menuAdapters;


[Header("Modul Support")]
public GameObject modulButton;

[System.Serializable]
public class TableButton
{
Expand Down Expand Up @@ -61,7 +64,7 @@ public class TableButton
public void Setup()
{
instance = this;
colbuffer = new Collider[50];
colbuffer = new Collider[60];

//Get All Muzzle Brakes
modernEras.Add(FVRObject.OTagEra.PostWar);
Expand Down Expand Up @@ -238,7 +241,7 @@ public void BuyAttachment(int i)

bool forceSecondary = false;

if (i == 1) //Iron Sights
if (i == 1 || i == 2) //Iron Sights & scopes
forceSecondary = true;

if (SR_Global.SpawnLoot(buttons[i].attachmentTable, null, spawnPoints, forceSecondary))
Expand Down
2 changes: 1 addition & 1 deletion Packer-SupplyRaid/src/Plugin/src/Scripts/SR_SupplyPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void OnDrawGizmos()
Gizmos.DrawSphere(sniperPoints[i].position + (Vector3.up * 1.75f), 0.25f);

spawnSize = new Vector3(sniperPoints[i].lossyScale.x * spawnRadius, 0.1f, sniperPoints[i].lossyScale.z * spawnRadius);
Gizmos.matrix = Matrix4x4.TRS(sniperPoints[i].position, sniperPoints[i].rotation, spawnSize);
Gizmos.matrix = Matrix4x4.TRS(sniperPoints[i].position, Quaternion.identity, spawnSize);
Gizmos.DrawWireCube(Vector3.zero, Vector3.one);
}
}
Expand Down
6 changes: 3 additions & 3 deletions Packer-SupplyRaid/src/Plugin/src/SupplyRaidPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ namespace SupplyRaid
[BepInPlugin(PluginInfo.GUID, PluginInfo.NAME, PluginInfo.VERSION)]
[BepInProcess("h3vr.exe")]
[BepInDependency("VIP.TommySoucy.H3MP", BepInDependency.DependencyFlags.SoftDependency)]
[BepInDependency("dll.potatoes.ptnhbgml", BepInDependency.DependencyFlags.SoftDependency)]
//[BepInDependency("dll.potatoes.ptnhbgml", BepInDependency.DependencyFlags.SoftDependency)]
[BepInDependency(AtlasConstants.Guid, AtlasConstants.Version)]
public class SupplyRaidPlugin : BaseUnityPlugin
{
private readonly Hooks _hooks;
public static bool h3mpEnabled = false;
public static bool bgmEnabled = false;
//public static bool bgmEnabled = false;
public static bool loadTnH = false;
public static Text tnhButtonText = null;
//public static Dictionary<int, SR_SosigEnemyTemplate> customSosigs = new Dictionary<int, SR_SosigEnemyTemplate>();
Expand All @@ -36,7 +36,7 @@ private void Awake()
{
AtlasPlugin.Loaders["supplyraid"] = new SandboxLoader();
h3mpEnabled = Chainloader.PluginInfos.ContainsKey("VIP.TommySoucy.H3MP");
bgmEnabled = Chainloader.PluginInfos.ContainsKey("dll.potatoes.ptnhbgml");
//bgmEnabled = Chainloader.PluginInfos.ContainsKey("dll.potatoes.ptnhbgml");

SceneManager.activeSceneChanged += ChangedActiveScene;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fec2048

Please sign in to comment.