MZ How does the new defaultIconWidth work?

Hello everyone,

So, this is the new RPG Maker's code:

Code:
ImageManager.standardIconWidth = 32;

// ...

Object.defineProperty(ImageManager, "iconWidth", {
    get: function() {
        return this.getIconSize();
    },
    configurable: true
});

// ...

ImageManager.getIconSize = function() {
    if ("iconSize" in $dataSystem) {
        return $dataSystem.iconSize;
    } else {
        return this.defaultIconWidth; // <--- ??????
    }
};

When iconSize is not defined in $dataSystem, then a fallback is called. So far, so good. However, when I Ctrl+Shift+F for "defaultIconWidth", I cannot find it anywhere else besides this single line of code where it should be returned.

1740994838395.png


Am I missing something, or is this really a typo and it should be "standardIconWidth" ? Because, that would make more sense to me.
I guess it is only there when you change it?
When I change what?
Oh sorry I thought you were talking about the json files in the data folder.
I saw that one in a profile post by someone, but that is not the only change,
as there was another from standard to default, not sure why they did that.

I can try to grab that post if I can find it (as I remember the name).

Edit:
[here] is the post of the bug?
Hello everyone,

So, this is the new RPG Maker's code:

Code:
ImageManager.standardIconWidth = 32;

// ...

Object.defineProperty(ImageManager, "iconWidth", {
    get: function() {
        return this.getIconSize();
    },
    configurable: true
});

// ...

ImageManager.getIconSize = function() {
    if ("iconSize" in $dataSystem) {
        return $dataSystem.iconSize;
    } else {
        return this.defaultIconWidth; // <--- ??????
    }
};

When iconSize is not defined in $dataSystem, then a fallback is called. So far, so good. However, when I Ctrl+Shift+F for "defaultIconWidth", I cannot find it anywhere else besides this single line of code where it should be returned.

View attachment 333214

Am I missing something, or is this really a typo and it should be "standardIconWidth" ? Because, that would make more sense to me.
It's a typo, they've used the wrong name for the fallback value.
lol
So that is why my icons don't show when I playtest a 1.9 project using a 1.8 editor.
Don't they have unit tests? 👋
Unit tests?
Real developers test in production.
"Push straight to prod" as I always say.

After reading GGG's AMA on Action Game Maker I can safely conclude that no, they do not know what they're doing.
The incorrect variable name is not the only issue. We are now accessing the $dataSystem before it is loaded in many cases when writing plugins. Usually, a programmer would check first whether $dataSystem is ready (typeof !== 'undefined').

Well, FOSSIL was dead long before, but now it's super-dead 😩

Original thread: https://forums.rpgmakerweb.com/threads/how-does-the-new-defaulticonwidth-work.175964/