Fuffles Posted September 10, 2017 Share Posted September 10, 2017 As the Title suggests I'd like to know what kind of FOODTYPE.X'S exist, since Im making a Character having a specific diet and can't seem to find a definition of the FOODTYPE group Link to comment Share on other sites More sharing options...
JohnWatson Posted September 10, 2017 Share Posted September 10, 2017 Link to comment Share on other sites More sharing options...
Fuffles Posted September 10, 2017 Author Share Posted September 10, 2017 11 minutes ago, JohnWatson said: And how would you create a new Foodtype? Link to comment Share on other sites More sharing options...
JohnWatson Posted September 10, 2017 Share Posted September 10, 2017 I somehow magically found out what you were trying to accomplish via my telepathic capabilities and so I bring you this: AddPrefabPostInit("put_the_name_of_your_furry_character_mod's_prefab_name_here",function(inst) if inst.components.eater~=nil then local _TestFood_Old = inst.components.eater.TestFood or (function() return end) inst.components.eater.TestFood = function(self,food,testvalues) if food:HasTag("honeyed") then return true end return false --return _TestFood_Old(self,food,testvalues) end end end) Link to comment Share on other sites More sharing options...
ptr Posted September 10, 2017 Share Posted September 10, 2017 FOODTYPE is a global table defined in constants.lua FOODTYPE = { GENERIC = "GENERIC", MEAT = "MEAT", WOOD = "WOOD", VEGGIE = "VEGGIE", ELEMENTAL = "ELEMENTAL", GEARS = "GEARS", HORRIBLE = "HORRIBLE", INSECT = "INSECT", SEEDS = "SEEDS", BERRY = "BERRY", --hack for smallbird; berries are actually part of veggie RAW = "RAW", -- things which some animals can eat off the ground, but players need to cook BURNT = "BURNT", --For lavae. ROUGHAGE = "ROUGHAGE", GOODIES = "GOODIES", } to add a custom food type, simply GLOBAL.FOODTYPE.MYFOODTYPE="MYFOODTYPE" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now