Skip to content

Commit

Permalink
move spawns?
Browse files Browse the repository at this point in the history
  • Loading branch information
Govorunb committed May 18, 2024
1 parent 510aa70 commit d13e268
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
9 changes: 8 additions & 1 deletion SCHIZO/Tweaks/Content/ContentVisibilityHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ partial class ContentVisibilityHelper
{
private float _blinkTimer;
private List<Renderer> _renderers;
private bool _dead;

private void Start()
{
Expand All @@ -19,7 +20,12 @@ private void Start()
transform.parent.GetComponentsInChildren(true, _renderers);
_renderers.RemoveAll(r => r.transform.IsChildOf(transform));

if (_renderers.Count < 1) Destroy(gameObject);
if (_renderers.Count < 1 || !_renderers[0])
{
_dead = true;
gameObject.SetActive(false);
return;
}

// scale self with parent's mesh bounds
Vector3 origScale = transform.localScale;
Expand Down Expand Up @@ -63,6 +69,7 @@ private void Changed()
}
private void LateUpdate()
{
if (_dead) return;
if (!ContentAlertManager.AlertsEnabled) return;

Vector3 pos = Camera.main.transform.position;
Expand Down
4 changes: 2 additions & 2 deletions Unity/Assets/Mod/Anneel/Egg Spawns.asset
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MonoBehaviour:
spawn: 1
spawnLocation: 2
biomeFilters:
- ShipWreck_Wall
- ShipWreck_
rules:
- count: 1
probability: 1
probability: 0.02
2 changes: 1 addition & 1 deletion Unity/Assets/Mod/Anneel/Materials/Star 1.mat
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ Material:
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.99228066, g: 1, b: 0.56, a: 1}
- _EmissionColor: {r: 2.9803922, g: 2.9960785, b: 1.6941177, a: 1}
- _EmissionColor: {r: 0.9173233, g: 0.9221513, b: 0.5214259, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
4 changes: 2 additions & 2 deletions Unity/Assets/Mod/Ermshark/Egg Spawns.asset
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MonoBehaviour:
spawn: 1
spawnLocation: 2
biomeFilters:
- LilyPads_Deep_Grass
- LilyPads_MegaTrench
rules:
- count: 1
probability: 1
probability: 0.1
2 changes: 1 addition & 1 deletion Unity/Assets/Mod/Ermshark/Ermshark Egg.asset
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ MonoBehaviour:
craftingTime: 2.5
pdaEncyInfo: {fileID: 0}
knownTechInfo: {fileID: 0}
spawnData: {fileID: 0}
spawnData: {fileID: 11400000, guid: 35a911b79bbe1f9459216187bea1ce21, type: 2}
unlockAtStart: 1
registerInSN: 1
recipeSN: {fileID: 0}
Expand Down

0 comments on commit d13e268

Please sign in to comment.