Moved dungen code to DunGenPlus

Added critical damage as a mechanic
Maid knife feed deals critical damage, then kills on second time
Added concept of treasure room with kitchen
Frames now only start at the player when not being looked
New attempt at snowglobe animations, it broke though
Added concept of indoor weathers
LethalConfig compability now changes the color of configs that my presets touch
Added jukebox
Changed modGUID
Removed AC compability
Falling into void deals critical damage and teleports, then kills on second time
Maid spawns revenant ghost on death
This commit is contained in:
LadyAliceMargatroid 2024-08-02 08:56:09 -07:00
parent faa391c309
commit 056cac8df1
63 changed files with 976 additions and 2061 deletions

View file

@ -14,7 +14,7 @@ namespace ScarletMansion.GamePatch.Props {
if (randomizePosition){
var x = (float)randomStream.NextDouble() * randomPositionRange;
var z = (float)randomStream.NextDouble() * randomPositionRange;
transform.localPosition = new Vector3(x, 0f, z);
transform.localPosition += new Vector3(x, 0f, z);
}
if (randomizeRotation){

View file

@ -1,49 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using DunGen;
namespace ScarletMansion.GamePatch.Props {
public class SpawnSyncedObjectCycle : MonoBehaviour, IDungeonCompleteReceiver {
public static int cycle;
public static Dictionary<int, int> cycleDictionary;
public SpawnSyncedObject spawn;
public int id;
public List<GameObject> props = new List<GameObject>();
void Reset(){
spawn = GetComponent<SpawnSyncedObject>();
}
public static void UpdateCycle(int value){
Plugin.logger.LogInfo($"Updating SpawnSyncedObject start cycle to {value}");
cycle = value;
cycleDictionary = new Dictionary<int, int>();
}
public int GetCycle(int id){
if (!cycleDictionary.TryGetValue(id, out var value)){
value = cycle;
cycleDictionary.Add(id, value);
}
cycleDictionary[id] = value + 1;
Plugin.logger.LogInfo($"Cycle{id}: {value}");
return value;
}
public void OnDungeonComplete(Dungeon dungeon) {
var index = GetCycle(id) % props.Count;
var prefab = props[index];
spawn.spawnPrefab = prefab;
}
}
}