Jump to content

Recommended Posts

 I made it so you can craft bottles out of sand, but I can't seem to get the icon working, it instead displays a purple gem and I double checked my inventory image, it's in the right directory. Maybe it is a bug?

 

This is the whole file.

local STRINGS = GLOBAL.STRINGSlocal RECIPETABS = GLOBAL.RECIPETABSlocal TECH = GLOBAL.TECHlocal require = GLOBAL.requireSTRINGS.RECIPE_DESC.MESSAGEBOTTLEEMPTY = "Bottle."--------------------------Bottle--------------------------local Bottle_Recipe = Recipe("messagebottleempty", {Ingredient("sand", 5)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE)Bottle_Recipe.atlas = "images/inventoryimages/bottle.xml"

In Shipwrecked, the 'Recipe' constructor is slightly changed. There is a new argument between 'level' and 'placer', 'game_type'. Use the recipes that are already in the game for reference.

 

Didn't help, I still get the purple amulet icon in the crafting menu.

 

Edit: I understood what's going on, the icon is set to that of the last recipe in the last recipe tab you accessed.

local require = GLOBAL.requirelocal STRINGS = GLOBAL.STRINGSlocal RECIPETABS = GLOBAL.RECIPETABSlocal TECH = GLOBAL.TECHlocal RECIPE_GAME_TYPE = GLOBAL.RECIPE_GAME_TYPErequire "recipe"STRINGS.RECIPE_DESC.MESSAGEBOTTLEEMPTY = "Bottle."--------------------------Bottle--------------------------local Bottle_Recipe = Recipe("messagebottleempty", {Ingredient("sand", 5)}, RECIPETABS.REFINE, TECH.SCIENCE_ONE, RECIPE_GAME_TYPE.SHIPWRECKED)Bottle_Recipe.atlas = GLOBAL.resolvefilepath("images/inventoryimages/bottle.xml")
Edited by Cyde042

Didn't help, I still get the purple amulet icon in the crafting menu.

Yeah, that's because you're changing the atlas. The empty bottle image is already in 'inventoryimages.tex', so you don't need to change the atlas from the default ('inventoryimages.tex').

Yeah, that's because you're changing the atlas. The empty bottle image is already in 'inventoryimages.tex', so you don't need to change the atlas from the default ('inventoryimages.tex').

 

Removing the atlas bit makes it work. I did think about that but didn't know there was no need to specify the location in the tex file.

 

Thanks!

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...