-
Notifications
You must be signed in to change notification settings - Fork 0
/
GearCutter.cs
40 lines (37 loc) · 1.38 KB
/
GearCutter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
public class GearCutter : BasicMachine
{
//! Called by unity engine on start up to initialize variables.
public new void Start()
{
base.Start();
recipes = new BasicMachineRecipe[]
{
new BasicMachineRecipe("Copper Plate", "Copper Gear"),
new BasicMachineRecipe("Iron Plate", "Iron Gear"),
new BasicMachineRecipe("Tin Plate", "Tin Gear"),
new BasicMachineRecipe("Bronze Plate", "Bronze Gear"),
new BasicMachineRecipe("Steel Plate", "Steel Gear"),
new BasicMachineRecipe("Aluminum Plate", "Aluminum Gear")
};
PlayerController playerController = GameObject.Find("Player").GetComponent<PlayerController>();
BlockDictionary blockDictionary = new BlockDictionary(playerController);
BasicMachineRecipe[] modRecipes = blockDictionary.GetMachineRecipes("Gear Cutter");
if (modRecipes != null)
{
List<BasicMachineRecipe> recipeList = recipes.ToList();
foreach (BasicMachineRecipe recipe in modRecipes)
{
recipeList.Add(recipe);
}
recipes = recipeList.ToArray();
}
}
//! Called by MachineManager update coroutine.
public override void UpdateMachine()
{
base.UpdateMachine();
}
}