Skip to content

Article Updates#40

Merged
WuBoytH merged 5 commits into
masterfrom
Article-Updates
Sep 2, 2024
Merged

Article Updates#40
WuBoytH merged 5 commits into
masterfrom
Article-Updates

Conversation

@WuBoytH
Copy link
Copy Markdown
Contributor

@WuBoytH WuBoytH commented Sep 1, 2024

Changelog

On_Start

On_Start now runs at the end of the BattleObjectModuleAccessor::start function instead of specifically while starting LuaModule. This allows WorkModule to be started, letting you set flags, ints, and floats in an on_start.

Update Weapon Count

Allows you to update how many of a specific article the fighter is allowed to have.

smashline::update_weapon_count(*WEAPON_KIND_MARIO_FIREBALL, 1);
// This would change how many fireballs Mario is allowed to just a single fireball.

Weapon Cloning Bugfix

Currently, the way that weapon cloning works is such:

smashline::clone_weapon(
    /* original owner */,
    original article name,
    /* new owner */,
    /* new article name */,
    /* use original code */
);

original article name would be passed into a StaticArrayAccessor, which then spits out an article index.
However, this doesn't account for articles with the same name, such as Mario and Luigi's Fireball. If you tried cloning Luigi's Fireball, for example, the game would assign the new article Mario's fireball weapon ID, which would cause the game to crash.

Weapon cloning will now work by directly passing in the article's ID:

smashline::clone_weapon(
    /* original owner */,
    *WEAPON_KIND_OWNER_ARTICLENAME,
    /* new owner */,
    /* new article name */,
    /* use original code */
);

@WuBoytH WuBoytH added the enhancement New feature or request label Sep 1, 2024
@WuBoytH WuBoytH merged commit 5546ec4 into master Sep 2, 2024
@WuBoytH WuBoytH deleted the Article-Updates branch September 2, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant