zjkaku2 发表于 2023-5-2 14:10

【★畜栏水槽饲料槽永久满的,永久清洁,不会使动物中毒||★箭毒蛙架子给吹箭无消耗淬毒,一淬十支吹箭】

本帖最后由 zjkaku2 于 2023-5-2 14:20 编辑

---------------------------------------
★畜栏水槽饲料槽永久满的,永久清洁,不会使动物中毒
步骤一:
Trough.SetupVis
找到:
if (this.m_Amount <= 0f)
      {
                this.m_Vis.SetActive(false);
                return;
      }
修改为:
if (this.m_Amount <= 0f || this.m_Amount > 0f)
      {
                this.m_Vis.SetActive(false);
                return;
      }

找到:
this.m_Vis.transform.localPosition = localPosition;
      this.m_Vis.SetActive(true);
修改为:
this.m_Vis.transform.localPosition = localPosition * 0f;
      this.m_Vis.SetActive(false);

步骤二:
Trough.UpdateDirt
找到:
if (this.m_DirtLevel >= 3)
      {
                return;
      }
      this.m_DirtCounter += this.GetTimeDelta() * this.m_TroughInfo.m_DroppingsDirtMul;
      if (this.m_DirtCounter >= (float)this.m_TroughInfo.m_DirtLevelTime)
      {
                this.m_DirtLevel++;
                this.m_DirtLevel = Mathf.Min(3, this.m_DirtLevel);
                this.m_DirtCounter = 0f;
                this.SetupVis();
               }
修改为:
if (this.m_DirtLevel >= 1)
      {
                              this.m_DirtLevel = 0;
                              this.m_DirtCounter = 0f;
                return;
      }
      this.m_DirtCounter -= this.GetTimeDelta() * this.m_TroughInfo.m_DroppingsDirtMul;
      if (this.m_DirtCounter >= (float)this.m_TroughInfo.m_DirtLevelTime)
      {
                this.m_DirtLevel--;
                this.m_DirtLevel = 0;
                this.m_DirtCounter = 0f;
                this.SetupVis();
      }

步骤三:
Trough.UpdateNaturalWater
找到:
if (this.m_TroughType != Trough.TroughType.Water)
      {
                return;
      }
修改为:
if (this.m_TroughType != Trough.TroughType.Water)
      {
                              this.m_Amount = this.m_TroughInfo.m_Capacity;
                return;
      }
找到:
WaterCollider waterCollider = this.m_CurrentWaters;
修改为:
WaterCollider waterCollider = this.m_CurrentWaters;
找到:
                this.m_Amount += num * 1f;
                this.m_Amount = Mathf.Clamp(this.m_Amount, this.m_Amount, this.m_TroughInfo.m_Capacity);      
修改为:
                              this.m_Amount += num+this.m_TroughInfo.m_Capacity * 1f;
                this.m_Amount = this.m_TroughInfo.m_Capacity;
               
步骤四:
Trough.UseByAi
找到:
this.m_Amount -= num * 100f;
      
修改为:
this.m_Amount = this.m_TroughInfo.m_Capacity;
---------------------------------------
★箭毒蛙架子给吹箭无消耗淬毒,一淬十支吹箭
FrogStretcher.Oninsertitem
找到:
if (slot == this.m_ArrowSlot)
      {
                this.m_PoisonCount -= 5;
                if (this.m_PoisonCount == 0)
                {
                        this.SetIsFrog(false);
                }
                for (int i = 0; i < 5; i++)
                {
                        ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, false).Take(false);
                }
修改为:
if (slot == this.m_ArrowSlot)
{
this.m_PoisonCount += 5;
if (this.m_PoisonCount == 0)
   {
   this.m_PoisonCount = 15;
   this.SetIsFrog(true);
   }
    for (int i = 0; i < 5; i++)
   {
    ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, true).Take(true);
    ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, true).Take(true);
    ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, true).Take(true);
    ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, true).Take(true);
    ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, true).Take(true);
    ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, true).Take(true);
    ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, true).Take(true);
    ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, true).Take(true);
    ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, true).Take(true);
    ItemsManager.Get().CreateItem(ItemID.Blowpipe_Arrow, true).Take(true);
   }




这下齐活了,没啥追求了

总结下自己的心路历程,STEAM打折买了游戏——进游戏——玩的很不爽——满世界找MOD安装——还是玩的不爽——尝试自己修改MOD——发现自己C#语言不太行——更不爽了——开始学习语言硬肝——爽了——对游戏没兴趣了(弃坑了)

xtcal768 发表于 2023-6-17 22:34

我来支持一下吧6666666666666

wlgangan 发表于 2023-8-9 20:33

6666666666666666666666

djallan888 发表于 2023-8-25 22:00

b都给你装完了

zkk34 发表于 2024-6-24 02:40

大佬你太棒了,按照你的方法改了,可以询问一下,改之后数值是满的但是动画不是满的,有什么代码可以改动画么?

RexDeathRose 发表于 2024-8-17 15:58

食物,水,洁净度这三必须一起改吗?我能不能只改一个?
页: [1]
查看完整版本: 【★畜栏水槽饲料槽永久满的,永久清洁,不会使动物中毒||★箭毒蛙架子给吹箭无消耗淬毒,一淬十支吹箭】