コード例 #1
0
    public Sprite GetResourceIcon()
    {
        FloorBase   floor       = resourceHolder.GetComponent <FloorBase>();
        MiningDrill miningDrill = resourceHolder.GetComponent <MiningDrill>();

        if (floor)
        {
            return(floor.resourceIcon);
        }
        return(null);
    }
コード例 #2
0
    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?..
 }
コード例 #4
0
 static void Prefix(MiningDrill __instance)
 {
     __instance.MineCompletionTime = DeepMinePlugin.MineCompletionTime;
     __instance.MineAmount         = DeepMinePlugin.MineAmount;
 }