Skip to content

Commit

Permalink
Pre-1.0.7
Browse files Browse the repository at this point in the history
* Added Cash Money to Recycler
* Removed Cash Money from Ammo Spawner
* Hack Job - Arrow points up and down at Supply Points
* Ammo Spawn Locked fix using correct var
* Ignore Loot drops on capture
* Added Added Stopping Distance
* Add Faction Category Button Prefab reference - Not in use yet but mappers should set it up, Hack Job work around in place.
* Slightly increased recycler scan update time from 1 to 0.8 secs
* Removed 4 Sosigs Teams, less random chance of enemy team selection
* Added sr_69cal icoon
  • Loading branch information
Packer committed Nov 30, 2023
1 parent 2d9d800 commit 4127f5b
Show file tree
Hide file tree
Showing 15 changed files with 660 additions and 101 deletions.
65 changes: 65 additions & 0 deletions Packer-SupplyRaid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

## 1.0.6
* Changed Attack arrow now faces vertically at the point to help with vertical maps
* Fixed Item Categories not using ammoSpawnLockedCount - was previously using ammoLimitedCount
* Fixed Loot dropping on captures - Loot only drops on kills
* Changed Squads to spawn from rabbit holes (Sosig Spawns) instead of the Squad point
* Fixed Health bar number to match players max health

<details>
<summary>Older Versions:</summary>

## 1.0.5
* Fixed Loot Drop Chance - Can now drop multiple item categories based on % chance (No more non-sense calculation)

## 1.0.4
* Increased game time estimate by 1 minute per capture - For better average map sizes
* Increased default ammo count on Limited ammo from 3 to 4
* Added Thrown Damage Type to Item Categories
* Added Recycler accepts $1 69 Cal items for points - Safehouse Progression Support
* Added Player line of sight Check on Sosig spawn locations - Less camping rabbit holes
* Added playerNearby Setting to Supply Point (SDK) - Works with LOS check to stop sosigs spawning next to players

#### Coal (Points)
* Did you know - you can exchange coal for points on the recycler
* Added Golden Material - It's a golden Supply Point!
* Added Coal Exchange for $1 69 Cal at the end of the game - Safehouse Progression Support

#### Picatinny Pierre
* Added Grenade Launchers - 8 Point Cost
* Reduced Random Picatinny Weapon cost by 1
* Increase 1st capture points by 1
* Added $1 69 Cal purchase - Marathon Safehouse Progression Support
* Added Grenade Category
* Added Smoke Grenade Category
* Added Flashbang Category
* Fixed Health Icon - Woops

## 1.0.3
* Added Country of Origin Support to Item Categories
* Increased Sosig performance
* Added Sosig Obstacle Avoidance Quality to SDK for map makers

## 1.0.2
* Added Automatic Shotguns!
* Fixed Magazine Table Buttons - Will display proper available upgrades
* Tweaked Mod table - Purchases will be weighted towards bespoke attachments if bespoke weapon is used
* H3MP Spawn Fixes - Perhaps now its fixed?
* Fixed Ammo Table Purchases - Ammo table buttons now display proper costs and function properly
* Fixed Default Character/Faction - Ready for mods
* Added Compass health Text - Now you never need to look up!
* Added Item Category Ammo spawn count - Allows modders to define how many magazines/rounds etc that spawn at the buy menu
* Hiding SR Manager options for SDK inspector - those were words
* Recycler now players correct sound SFX - ka-ching!
* Handling Buy Menu spawns slightly better - multi object spawning now properly stacks for new grouping system
* Added Edges to the spawn intial gear table

## 1.0.1
* Fixed H3MP Player spawning
* Added Credits to README
* Changed Anti Material Sniper Icon to proper icon
* Readded Shotguns

## 1.0.0
Initial Release of Supply Raid
</details>
7 changes: 5 additions & 2 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_AmmoSpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ private void Scan()
if (colbuffer[i].attachedRigidbody != null)
{
FVRFireArm component = colbuffer[i].attachedRigidbody.gameObject.GetComponent<FVRFireArm>();
if (component != null)
if (component != null && component.RoundType != FireArmRoundType.a69CashMoney)
{
if (!m_detectedFirearms.Contains(component))
{
Expand Down Expand Up @@ -514,7 +514,10 @@ private void Scan()
}

FVRFireArmMagazine component3 = colbuffer[i].attachedRigidbody.gameObject.GetComponent<FVRFireArmMagazine>();
if (component3 != null && component3.FireArm == null && !m_detectedMags.Contains(component3))
if (component3 != null
&& component3.FireArm == null
&& !m_detectedMags.Contains(component3)
&& component3.RoundType != FireArmRoundType.a69CashMoney)
{
m_detectedMags.Add(component3);
}
Expand Down
1 change: 0 additions & 1 deletion Packer-SupplyRaid/src/Plugin/src/Scripts/SR_BuyMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ void Start()
//Debug.Log("Assigned EVENTS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
pointDisplay.text = SR_Manager.instance.Points.ToString();
}

}

void OnDestroy()
Expand Down
18 changes: 14 additions & 4 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_Compass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace SupplyRaid
{

public class SR_Compass : MonoBehaviour
{
[Header("Directions")]
Expand All @@ -23,12 +22,21 @@ public class SR_Compass : MonoBehaviour
//public Text levelText;
public Text capturesText;


[Header("Networking")]
public GameObject playerArrowPrefab;
public int playerCount = 0;
public List<Transform> playerArrows = new List<Transform>();

void Start()
{
//v1.0.6
Transform childArrow = Instantiate(supplyPointDirection.GetChild(0).gameObject, supplyPointDirection.GetChild(0)).transform;
supplyPointDirection.GetChild(0).GetComponent<Image>().enabled = false;
supplyPointDirection.GetChild(0).localRotation = Quaternion.Euler(new Vector3(0, 0, 0));
childArrow.localRotation = Quaternion.Euler(new Vector3(270, 0, 0));
childArrow.localPosition = Vector3.zero;
}

void Update()
{
//If There is a manager and we're in gameplay
Expand Down Expand Up @@ -58,12 +66,14 @@ void Update()

//Not in v1.0.0, error check
if(healthText != null)
healthText.text = (Mathf.CeilToInt(GM.GetPlayerHealth() * GM.CurrentPlayerBody.GetPlayerHealthRaw())).ToString();

healthText.text = (Mathf.CeilToInt(GM.GetPlayerHealth() * GM.CurrentPlayerBody.GetMaxHealthPlayerRaw())).ToString();
Transform marker = SR_Manager.instance.GetCompassMarker();
if (!marker)
return;
pos = marker.position;
supplyPointDirection.GetChild(0).LookAt(pos); //Arrow points straight at position

pos.y = transform.position.y;
supplyPointDirection.LookAt(pos);

Expand Down
6 changes: 4 additions & 2 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public static bool SpawnLoot(LootTable table, SR_ItemCategory itemCategory, Tran
//Spawn Locking only 3, 1 mag in, 1 mag lock, 1 for loading extra bullet in
ammoCount = 3;
if (itemCategory != null && itemCategory.ammoSpawnLockedCount >= 0)
ammoCount = itemCategory.ammoLimitedCount;
ammoCount = itemCategory.ammoSpawnLockedCount;
}
else if (ammoCount < 12) //TODO make this reflect something
{
Expand Down Expand Up @@ -540,8 +540,10 @@ public static Material SetToGoldMaterial(Material input)

gold.SetColor("_Color", goldColor);
gold.SetColor("_DecalColor", goldColor);
gold.SetColor("_EmissionColor", goldColor);


gold.SetFloat("_EmissionWeight", 1);
gold.SetFloat("_Emission", 1);
gold.SetFloat("_Mode", 0);
gold.SetFloat("_Metal", 0.666f);
gold.SetFloat("_Roughness", 0.5f);
Expand Down
10 changes: 7 additions & 3 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ private void CurrentSceneSettingsOnSosigKillEvent(Sosig s)
if (!sosig) return;

//Loot Drop
LootDrop(s);
if(!ignoreKillStat)
LootDrop(s);

if (squadSosigs.Contains(s))
currentSquad--;
Expand Down Expand Up @@ -1686,7 +1687,7 @@ void SpawnSquadSosig(SR_SupplyPoint spawnSupply, SR_SupplyPoint target, FactionL
}

//Place sosig on the squad point
Transform sosigSpawn = spawnSupply.squadPoint;
Transform sosigSpawn = spawnSupply.GetRandomSosigSpawn();

Sosig sosig = CreateSosig(_spawnOptions, sosigSpawn.position, sosigSpawn.rotation, currentLevel.squadPool, currentLevel.name);

Expand Down Expand Up @@ -1777,7 +1778,10 @@ Sosig CreateSosig(SosigAPI.SpawnOptions spawnOptions, Vector3 position, Quaterni
sosig.m_isBlinded = false;

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

agent.obstacleAvoidanceType = avoidanceQuailty;
agent.stoppingDistance = 1;

return sosig;
}
Expand Down
8 changes: 3 additions & 5 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_Menu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class SR_Menu : MonoBehaviour
[SerializeField] Transform factionCategoryContent;
[SerializeField] Transform factionCategoryContainer;
[SerializeField] GameObject factionButtonPrefab;
//[SerializeField] GameObject factionCategoryButtonPrefab; //Button to Open a Category
[SerializeField] GameObject factionCategoryButtonPrefab;
List<GameObject> factionCategories = new List<GameObject>();

[Header("Networking")]
Expand All @@ -74,7 +74,6 @@ void Start()
PopulateCharacters();
PopulateFactions();


//Open first of everything TODO maybe disable this ?
OpenCharacterCategory(0);
OpenFactionCategory(0);
Expand Down Expand Up @@ -119,7 +118,6 @@ void Start()
UpdateGameOptions();
}


//Force Hide Settings Menu
if(settingsButton != null)
settingsButton.SetActive(false); //Hide for Release
Expand Down Expand Up @@ -537,9 +535,9 @@ void PopulateFactions()
}
}

PopulateCategories(createdCategories, factionCategoryContent, factionCategoryContainer, factionButtonPrefab, factionCategories);
PopulateCategories(createdCategories, factionCategoryContent, factionCategoryContainer, factionCategoryContent.GetChild(0).gameObject, factionCategories);

//Create Our Characters Buttons
//Create Our Faction Buttons
for (int i = 0; i < SR_Manager.instance.factions.Count; i++)
{
GameObject content = null;
Expand Down
64 changes: 50 additions & 14 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_Recycler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ public class SR_Recycler : MonoBehaviour
//[SerializeField] AudioSource audioSource;
//[SerializeField] AudioClip[] clips;

private GameObject cashGameObject;


public Transform ScanningVolume;
private float m_scanTick = 1f;
private float m_scanTick = 0.8f;
private Collider[] colbuffer;
public LayerMask ScanningLM;

private List<GameObject> cashList = new List<GameObject>();

/*
void OnTriggerEnter(Collider other)
{
Expand Down Expand Up @@ -78,15 +77,17 @@ private void Start()
public void Button_Recycler()
{
bool ignoreFail = false;
if (cashGameObject != null)
for (int i = 0; i < cashList.Count; i++)
{
SR_Manager.instance.Points += SR_Manager.instance.character.recyclerPoints;
SR_Manager.PlayPointsGainSFX();
Destroy(cashGameObject);
cashGameObject = null;
int cash = GetCashValue(cashList[i].name);
SR_Manager.instance.Points += cash;
Destroy(cashList[i]);
ignoreFail = true;
}

if(ignoreFail)
SR_Manager.PlayPointsGainSFX();

if (this.weapons.Count <= 0)
{
if(!ignoreFail)
Expand All @@ -101,12 +102,13 @@ public void Button_Recycler()
SR_Manager.PlayPointsGainSFX();
SR_Manager.instance.Points += SR_Manager.instance.character.recyclerPoints;
}

private void Update()
{
this.m_scanTick -= Time.deltaTime;
if (this.m_scanTick <= 0f)
{
this.m_scanTick = Random.Range(0.8f, 1f);
this.m_scanTick = Random.Range(0.6f, 0.8f);
float num = Vector3.Distance(base.transform.position, GM.CurrentPlayerBody.transform.position);
if (num < 12f)
{
Expand All @@ -115,16 +117,50 @@ private void Update()
}
}

int GetCashValue(string itemName)
{
switch (itemName)
{
case "CharcoalBriquette(Clone)":
case "Ammo_69_CashMoney_D1(Clone)":
return 1;
case "Ammo_69_CashMoney_D5(Clone)":
return 5;
case "Ammo_69_CashMoney_D10(Clone)":
return 10;
case "Ammo_69_CashMoney_D25(Clone)":
return 25;
case "Ammo_69_CashMoney_D100(Clone)":
return 100;
case "Ammo_69_CashMoney_D1000(Clone)":
return 1000;
default:
return 0;
}
}

private void Scan()
{
int num = Physics.OverlapBoxNonAlloc(this.ScanningVolume.position, this.ScanningVolume.localScale * 0.5f, this.colbuffer, this.ScanningVolume.rotation, this.ScanningLM, QueryTriggerInteraction.Collide);
this.weapons.Clear();
cashGameObject = null;
weapons.Clear();
cashList.Clear();


for (int i = 0; i < num; i++)
{
if (colbuffer[i].name == "CharcoalBriquette(Clone)" || colbuffer[i].name == "Ammo_69_CashMoney_D1(Clone)")
switch (colbuffer[i].name)
{
cashGameObject = colbuffer[i].gameObject;
default:
break;
case "CharcoalBriquette(Clone)":
case "Ammo_69_CashMoney_D1(Clone)":
case "Ammo_69_CashMoney_D5(Clone)":
case "Ammo_69_CashMoney_D10(Clone)":
case "Ammo_69_CashMoney_D25(Clone)":
case "Ammo_69_CashMoney_D100(Clone)":
case "Ammo_69_CashMoney_D1000(Clone)":
cashList.Add(colbuffer[i].gameObject);
break;
}

if (this.colbuffer[i].attachedRigidbody != null)
Expand Down
4 changes: 0 additions & 4 deletions Packer-SupplyRaid/src/Plugin/src/Scripts/SR_SosigFaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ public enum TeamEnum
Team2 = 2,
Team3 = 3,
Team4 = 4,
Team5 = 5,
Team6 = 6,
Team7 = 7,
Team8 = 8,
RandomTeam = -1, //0-4
RandomEnemyTeam = -2, //Only enemy teams 1-2-3 etc
}
Expand Down

0 comments on commit 4127f5b

Please sign in to comment.