• Content Count

  • Joined

  • Last visited

About jiggawutt

  • Rank

Recent Profile Visitors


  1. Yeah, it appears as if maybe the break statement is causing the code to escape all the way out of every branch in the function, which broke farming. Putting this line as the condition for an if statement does the trick way better (and doesn't break farming). if (getActivatedMods():contains("FarmingNeverRot")) then --NeverRot is this if statement. if (luaObject.nbOfGrow >6) then luaObject.nbOfGrow = 6 end end
  2. If anyone encounters the same issue I had, this is the exact modified code snippet I've put into my mod. This should be inserted within the if(luaObject.state == "seeded") branch inside the function SFarmingSystem:growPlant(luaObject, nextGrowing, updateNbOfGrow). The code this file overrides is from media/lua/server/Farming/SFarmingSystem.lua local actmods = getActivatedMods(); local activeNR = false; for i=0, actmods:size()-1, 1 do if actmods:get(i) == "FarmingNeverRot" then activeNR = true; break; end end﻿ if (activeNR) then --NeverRot is this if statement. if (luaObject.nbOfGrow >6) then luaObject.nbOfGrow = 6 end end
  3. You're so handsome, Dr_Cox1911! Thank you for this!
  4. I was wondering if anyone knows how to check if a workshop mod has been enabled in the game or not? The issue is that my mod overwrites another mod called NeverRot. Now, NeverRot is just a three line conditional statement shoved into the SFarmingSystem:growPlant() function. Unfortunately, I can't just delete my version of this function as it's necessary for the new plants that my mod adds to the game. So, my thought is just to add another condition to see if NeverRot is enabled in-game. A clunkier version to this would be to check if the files from NeverRot exist, but I want people to have the choice to have NeverRot enabled or not. Does anyone have an elegant solution to this problem, or am I just going to have to rely on checking for NeverRot files in the workshop folder?