Jump to content

RegisterInventoryItemAtlas Bug Found with Mini Signs


mathem99
  • DLC VERSION - IMPORTANT!: Vanilla - NO DLC, Reign of Giants, Shipwrecked, Hamlet Closed

I'm trying to add a new item (a journal to be specific) in DS that changes image based on which page it is in, I've registered both images in modmain.lua:

RegisterInventoryItemAtlas("images/wilson_journal.xml", "wilson_journal.tex")
RegisterInventoryItemAtlas("images/wilson_journal_open.xml", "wilson_journal_open.tex")

And on the prefab file of the new item I use:

inst.components.inventoryitem.atlasname = "images/wilson_journal_open.xml"
inst.components.inventoryitem:ChangeImageName("wilson_journal_open")

to change the image based on which page it is on, it works perfectly and placing it on bookshelfs work correctly, but drawing the new icon with a Feather Pencil on a Mini Sign will make it be invisible and will only show up if you dig it up and replant it. I don't know what's causing this issue, but I hope it gets addressed. I've posted two images below:

Image 1: the new item was drawn using feather pencil while the book was open:

image.thumb.png.1af9f3b57971bbbc929225b8a88db3b1.png

Image 2: I dig up the mini sign of the new item and replanted it and now it shows up:

image.thumb.png.ddcb25e49fb8c8c94d6d84880d4bddef.png


Steps to Reproduce

1. Create a new item that has 2 inventory images and switches between them using inst.components.inventoryitem.atlasname = "images/INV_ITEM_NAME_2.xml" and inst.components.inventoryitem:ChangeImageName("INV_ITEM_NAME_2")

2. Draw the new item on a mini sign and see that it is invisible,

3. Dig it up and replant it

4. The inventoryimage shows up now.




User Feedback


You don't need to set inst.components.inventoryitem.atlasname when using RegisterInventoryItemAtlas. Try removing that line and see if that solves the problem.

Changed Status to Can't Reproduce

  • Like 2
  • Thanks 1

Share this comment


Link to comment
Share on other sites

13 hours ago, DiogoW said:

You don't need to set inst.components.inventoryitem.atlasname when using RegisterInventoryItemAtlas. Try removing that line and see if that solves the problem.

Changed Status to Can't Reproduce

That worked, thank you, DiogoW!!

Edited by mathem99
  • Like 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...