public Sprite GetResourceIcon() { FloorBase floor = resourceHolder.GetComponent <FloorBase>(); MiningDrill miningDrill = resourceHolder.GetComponent <MiningDrill>(); if (floor) { return(floor.resourceIcon); } return(null); }
public int GetResourceCount() { FloorBase floor = resourceHolder.GetComponent <FloorBase>(); MiningDrill miningDrill = resourceHolder.GetComponent <MiningDrill>(); if (floor) { return(floor.resourceCount); } return(0); }
private static void Prefix(MiningDrill __instance) { if (WorldManager.Instance.GameMode == GameMode.Creative) { __instance.MineCompletionTime = 0.01f; //copied from DeepMine mod of daniellovell __instance.MineAmount = 1f; } //else //{ __instance.MineCompletionTime = __instance.MineCompletionTime; //__instance.MineAmount = __instance.MineAmount;} // how to return them to default in survival mode?.. }
static void Prefix(MiningDrill __instance) { __instance.MineCompletionTime = DeepMinePlugin.MineCompletionTime; __instance.MineAmount = DeepMinePlugin.MineAmount; }