Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore items missing id from assets (appearances.dat object) #954

Merged
merged 6 commits into from
Mar 26, 2023

Conversation

dudantas
Copy link
Member

Description

In some specific scenario, the assets editor bugs when saving items without a sprite and starts debug client, this way, we ignore the creation of items that do not have "object id" in the assets, preventing it from being able to debug due to an invalid item.

Behaviour

Actual

Creating items with no object, example of items:
168, 371, 858 and various others...

Expected

When creating the item without an ID, a message will appear stating that the item has no ID in the assets and the position of the item on the map, if you try to create it in game it will not work, it will return the message:
image

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

Try to create an item without a sprite, and you will get the error mentioned in the print above, I put some example IDs for testing.

It will also inform the distro if the map has invalid items.

dudantas and others added 2 commits March 24, 2023 17:30
in some scenarios, the assets editor bugs when saving items without a sprite and starts debugging, this way, we ignore the creation of items that do not have "object id" in the assets, preventing it from being able to debug due to an invalid item.
@Rekoms90
Copy link

This Feature saved my life <3 @dudantas

Copy link

@Rekoms90 Rekoms90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve all of these changes.
What this does is amazing!

Its going to tell the server to block debugging tiles/items in assets thats not corresponding to an ACTUAL id from the items section.

What we/I could do now is safely start my server without getting anything to crash it.
Plus its gonna tell us the itemid thats causing a problem and the position of it.
This way we can keep all maps "clean" from bugs.

Extremely well done @dudantas !

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link

@Rekoms90 Rekoms90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fully fixed now

@dudantas dudantas merged commit fb745cf into main Mar 26, 2023
@dudantas dudantas deleted the fix-loading-empty-assets-objects branch March 26, 2023 13:37
luan pushed a commit that referenced this pull request Jul 11, 2023
In some specific scenario, the assets editor bugs when saving items without a sprite and starts debug client, this way, we ignore the creation of items that do not have "object id" in the assets, preventing it from being able to debug due to an invalid item.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants