Jump to content

inventoryimages2的xml文件内缺少部分图集


HengZi
  • Fixed

游戏内测试时发现在通过GetInventoryItemAtlas方法获取番茄、石果等道具的atlas有误,于是检查了inventoryimages2.xml文件,发现里面缺失了tomato.tex,rock_avocado_fruit.tex等图集资源。而inventoryimages2.tex里确实是包含这部分的贴图的。

希望能检查下是不是生成工具出了问题,烦请及时修正。

image.thumb.png.752b666d8a0bf922a7ef2cb528df3c0f.png


Steps to Reproduce

print(TheSim:AtlasContains("images/inventoryimages2.xml", "tomato.tex"))




User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

print(TheSim:AtlasContains("images/inventoryimages2.xml", "quagmire_tomato.tex"))

print(TheSim:AtlasContains("images/inventoryimages2.xml", "rock_avocado_fruit_rockhard.tex"))

Not all images from these items are named consistently.

Changed Status to Closed

  • Thanks 1

Share this comment


Link to comment
Share on other sites

我知道并非所有图片和道具的命名都是一致的,但是就是这个原因,导致GetInventoryItemAtlas方法获取到的atlas是错误的。

而invslot.lua中的ConvertToConstructionSlot方法;以及各类配方相关的UI中,添加IngredientUI对象时调用的都是Ingredient类的GetAtlas和GetImage方法。

以上的调用方式都会导致这类命名不一致的道具出现在配方栏时贴图无法正常加载的问题。

image.png.4d3ea7cc0481d6dd4ee66c1b59480415.png

image.png.69f58d1d14e3d1406fa0414d4cf28b6c.png

image.png.b6c7251bc86d56b9525f3e0800f41846.png

Edited by HengZi

Share this comment


Link to comment
Share on other sites

To have the image override you will still use something like the following.

Ingredient("rock_avocado_fruit", 2, nil, nil, "rock_avocado_fruit_rockhard.tex")

I have changed this function to use the proper GetImage accessor for construction buildings so it uses the overrides as expected.

image.png

Please let me know if there is more to this, @HengZi

Changed Status to Fixed

  • Like 2
  • Thanks 1

Share this comment


Link to comment
Share on other sites



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...