TehScot Posted March 9, 2015 Share Posted March 9, 2015 In my mod I have added a gold fragment prefab. 4 gold fragments can be made from 1 gold nugget via a recipe in the refine tab whereas 1 gold nugget can be split into 4 gold fragments from the same tab. I have encountered a strange issue in that when the recipe for the 4 fragments -> 1 gold nugget is displayed, the 4 gold fragments do not render in the recipe. http://imgur.com/a/wCV8p This imgur album shows both the working recipe and the recipe which isn't displaying correctly Relevant code: modmain.lua...Assets = { Asset("ATLAS","images/inventoryimages/goldfragment.xml"), Asset("IMAGE","images/inventoryimages/goldfragment.tex"),} STRINGS = GLOBAL.STRINGSRECIPETABS = GLOBAL.RECIPETABSRecipe = GLOBAL.RecipeIngredient = GLOBAL.IngredientTECH = GLOBAL.TECHSTRINGS.NAMES.GOLDNUGGET = "Gold Nugget"STRINGS.RECIPE_DESC.GOLDNUGGET = "Shiny!" local goldfragment = GLOBAL.Recipe("goldfragment",{ Ingredient("goldnugget", 1)},RECIPETABS.REFINE, TECH.NONE,nil,nil,nil,4)goldfragment.atlas = "images/inventoryimages/goldfragment.xml"goldfragment.texture = "images/inventoryimages/goldfragment.tex" local goldnugget = GLOBAL.Recipe("goldnugget",{ Ingredient("goldfragment", 4)},RECIPETABS.REFINE, TECH.NONE)...goldfragment.lualocal Assets={ Asset("ANIM", "anim/goldfragment.zip"), Asset("ATLAS", "images/inventoryimages/goldfragment.xml"),}STRINGS.NAMES.GOLDFRAGMENT= "Gold Fragment" STRINGS.RECIPE_DESC.GOLDFRAGMENT = "A fragment of gold"STRINGS.CHARACTERS.GENERIC.DESCRIBE.GOLDFRAGMENT = "It's so small!"local function fn(Sim) local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddPhysics() MakeInventoryPhysics(inst) inst.AnimState:SetBank("goldfragmentbank") inst.AnimState:SetBuild("goldfragment") inst.AnimState:PlayAnimation("idle", true) inst:AddComponent("inspectable") inst:AddComponent("stackable") inst.components.stackable.maxsize = 100 inst:AddComponent("inventoryitem") inst.components.inventoryitem.atlasname = "images/inventoryimages/goldfragment.xml" return instendreturn Prefab( "common/inventory/goldfragment", fn, Assets) Any help would be greatly appreciated, cheers! Link to comment https://forums.kleientertainment.com/forums/topic/51889-mod-recipe-issues/ 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