animation fixes + modding WIP
Some checks failed
Build / Build Game (push) Has been cancelled

This commit is contained in:
2026-03-01 19:07:01 -05:00
parent 6ed9a15177
commit 06d2cbdc12
8 changed files with 404 additions and 7 deletions

View File

@@ -199,6 +199,7 @@ namespace game::state
isEndEnd = true;
isEnd = false;
isPostgame = true;
menu.isCheats = true;
world.character_focus(character, worldCanvas, focus_get());
}
}

View File

@@ -41,7 +41,7 @@ namespace game::state::main
if (isJustStoppedInteracting)
{
cursor.queue_play({cursor.defaultAnimation});
if (cursor.mode == RUB) character.queue_idle_animation();
if (cursor.mode == RUB && character.queuedPlay.empty()) character.queue_idle_animation();
isJustStoppedInteracting = false;
}

View File

@@ -54,7 +54,7 @@ namespace game::state::main
if (isJustItemHeldStopped || isJustItemThrown)
{
cursor.queue_default_animation();
if (!isJustItemThrown) character.queue_idle_animation();
if (!isJustItemThrown && character.queuedPlay.empty()) character.queue_idle_animation();
isJustItemHeldStopped = false;
isJustItemThrown = false;
}

View File

@@ -28,7 +28,7 @@ namespace game::state::main
return it;
}
void Text::set(resource::xml::Dialogue::Entry* dialogueEntry, entity::Character& character)
void Text::set(resource::xml::Dialogue::Entry* dialogueEntry, entity::Character& character, bool isInterruptible)
{
if (!dialogueEntry) return;
this->entry = dialogueEntry;
@@ -38,7 +38,8 @@ namespace game::state::main
time = 0.0f;
isEnabled = true;
character.isTalking = true;
if (!dialogueEntry->animation.empty()) character.queue_play({dialogueEntry->animation});
if (!dialogueEntry->animation.empty())
character.queue_play({.animation = dialogueEntry->animation, .isInterruptible = isInterruptible});
if (dialogueEntry->text.empty()) isEnabled = false;
}

View File

@@ -21,7 +21,7 @@ namespace game::state::main
bool isEnabled{true};
float time{};
void set(resource::xml::Dialogue::Entry*, entity::Character&);
void set(resource::xml::Dialogue::Entry*, entity::Character&, bool isInterruptible = true);
void tick(entity::Character&);
void update(entity::Character&);
bool is_interruptible() const;