Added the new coilhead behaviour to the knight Added treasure room puzzle for bedroom Changed many LogInfo into LogDebug Removed jank animator override stuff (no offense) Changed how treasure rooms lock their doors to work in multiplayer Removed basement scripts
31 lines
759 B
C#
31 lines
759 B
C#
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 RandomPrefabCycle : RandomPrefabBase {
|
|
|
|
public static int cycle = 0;
|
|
|
|
public static void UpdateCycle(int value){
|
|
Plugin.logger.LogDebug($"Updating RandomPrefab cylce to {value}");
|
|
cycle = value;
|
|
}
|
|
|
|
public override void Process(RandomStream randomStream, Tile tile) {
|
|
if (props.Count <= 0) return;
|
|
|
|
Plugin.logger.LogDebug($"Cycle {cycle}");
|
|
var cycleValue = cycle++;
|
|
var index = cycleValue % props.Count;
|
|
var prefab = props[index];
|
|
|
|
SpawnGameObject(randomStream, prefab);
|
|
}
|
|
|
|
}
|
|
}
|