Added new treasure room spawn (servant's quarters)

Fixed treasure room event for bedroom
Fixed painting's interaction with MattyFixes
Fixed critical damage bug introduced by v62
Increased lights spawn for all presets by a lot
Added Coroner compatibility
Added Scarlet Devil Mansion (moon) to the interior's spawn list
Lights now have a chance of flickering and dying
This commit is contained in:
LadyAliceMargatroid 2024-09-01 18:45:16 -07:00
parent 93e249d838
commit 4413d12ea3
42 changed files with 986 additions and 333 deletions

View file

@ -16,8 +16,24 @@ namespace ScarletMansion.GamePatch.Props {
var prefab = props[value];
SpawnGameObject(randomStream, prefab);
}
public void ProcessIndex(RandomStream randomStream, int index){
if (index >= props.Count) return;
var prefab = props[index];
SpawnGameObject(randomStream, prefab);
}
public void ProcessSkipCount(RandomStream randomStream, int count){
if (count >= props.Count) return;
var index = randomStream.Next(count, props.Count);
var prefab = props[index];
SpawnGameObject(randomStream, prefab);
}
}
}

View file

@ -11,12 +11,24 @@ namespace ScarletMansion.GamePatch.Props {
public List<GameObject> props = new List<GameObject>();
[Header("Randomizer")]
public bool randomizePosition = false;
public float randomPositionRange = 0f;
public bool randomizeRotation = true;
public FloatRange randomRotationRange = new FloatRange(0f, 360f);
[Header("Special Logic")]
public bool skipNextSpawn;
public void SpawnGameObject(RandomStream randomStream, GameObject prefab){
// I really hate that I have to do this
// but DungeonGenerator.ProcessProps() goes through every RandomProp regardless if the gameobject is active or not
// I cannot escape it
if (skipNextSpawn) {
skipNextSpawn = false;
return;
}
var gameObject = GameObject.Instantiate(prefab);
var gameObjectTransform = gameObject.transform;
gameObjectTransform.parent = transform;
@ -37,6 +49,7 @@ namespace ScarletMansion.GamePatch.Props {
}
}
public void OnDrawGizmosSelected(){
if (randomizePosition) {
Utility.DrawGizmoCircle(transform, randomPositionRange, Color.green);