-
Notifications
You must be signed in to change notification settings - Fork 0
/
Press.cs
41 lines (38 loc) · 1.43 KB
/
Press.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
41
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
public class Press : BasicMachine
{
//! Called by unity engine on start up to initialize variables.
public new void Start()
{
base.Start();
recipes = new BasicMachineRecipe[]
{
new BasicMachineRecipe("Copper Ingot", "Copper Plate"),
new BasicMachineRecipe("Iron Ingot", "Iron Plate"),
new BasicMachineRecipe("Tin Ingot", "Tin Plate"),
new BasicMachineRecipe("Bronze Ingot", "Bronze Plate"),
new BasicMachineRecipe("Steel Ingot", "Steel Plate"),
new BasicMachineRecipe("Aluminum Ingot", "Aluminum Plate"),
new BasicMachineRecipe("Regolith", "Brick")
};
PlayerController playerController = GameObject.Find("Player").GetComponent<PlayerController>();
BlockDictionary blockDictionary = new BlockDictionary(playerController);
BasicMachineRecipe[] modRecipes = blockDictionary.GetMachineRecipes("Press");
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();
}
}