public void Consumables() { if (tpd.RollPercent(currentMob.consumableChance)) { //if (true) { var env = sim.currentEnvironment; var consumableKey = tpd.RollMap(env.consumableChances); var consumableGenerator = new ConsumableGenerator(sim); var consumable = consumableGenerator.Generate(consumableKey); var ev = PlayerEvent.Consumable(consumable); sim.AddEvent(ev); } }
public void Generate() { var rand = Random.Range(0, 2); if (rand == 0) { _equipmentGenerator.category = (Equipment.Category)rand; _equipmentGenerator.Generate(); } else { _consumableGenerator.category = (Consumable.Category)rand; _consumableGenerator.Generate(); } }