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

Adapt destroyed effect based on the model #2014

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

QuentinGruber
Copy link
Owner

@QuentinGruber QuentinGruber commented Mar 12, 2024


Generated summary (powered by Graphite)

TL;DR

This pull request introduces a new function getDestroyedEffectId to determine the effect to be displayed when an object is destroyed based on its model ID. It also modifies the Destroyable class to store the effect ID and use it when the object is destroyed.

What changed

A new function getDestroyedEffectId was added to destroyable.ts. This function takes a model ID as input and returns an effect ID based on the model ID. The effect ID is used to determine the visual effect to be displayed when an object is destroyed.

The Destroyable class was modified to store the effect ID as a property. The effect ID is determined when the object is created using the getDestroyedEffectId function. The effect ID is then used when the object is destroyed to display the appropriate visual effect.

How to test

To test these changes, create objects of different types and destroy them. Verify that the correct visual effect is displayed when each object is destroyed.

Why make this change

This change allows different visual effects to be displayed when objects of different types are destroyed. This makes the game more visually interesting and can provide additional feedback to the player about the type of object that was destroyed.

@QuentinGruber QuentinGruber added this to the v0.35.0 milestone Mar 12, 2024
@github-actions github-actions bot added the client-2016 About the 2016 client label Mar 12, 2024
@QuentinGruber QuentinGruber force-pushed the 03-12-Rework_some_destroyables_behavior branch from 664275c to ee72561 Compare March 12, 2024 10:49
@QuentinGruber QuentinGruber force-pushed the 03-12-Adapt_destroyed_effect_based_on_the_model branch from a1af46c to d4c6e37 Compare March 12, 2024 10:50
@QuentinGruber QuentinGruber force-pushed the 03-12-Rework_some_destroyables_behavior branch from ee72561 to 887ba3a Compare March 13, 2024 15:56
@QuentinGruber QuentinGruber force-pushed the 03-12-Adapt_destroyed_effect_based_on_the_model branch from d4c6e37 to b643a03 Compare March 13, 2024 15:56
@QuentinGruber QuentinGruber force-pushed the 03-12-Rework_some_destroyables_behavior branch from 887ba3a to 6f7c6bd Compare March 14, 2024 17:01
@QuentinGruber QuentinGruber force-pushed the 03-12-Adapt_destroyed_effect_based_on_the_model branch from b643a03 to 378b111 Compare March 14, 2024 17:01
Copy link
Owner Author

QuentinGruber commented Mar 14, 2024

Merge activity

@QuentinGruber QuentinGruber force-pushed the 03-12-Rework_some_destroyables_behavior branch from 6f7c6bd to bcdf323 Compare March 14, 2024 17:21
@QuentinGruber QuentinGruber changed the base branch from 03-12-Rework_some_destroyables_behavior to dev March 14, 2024 17:24
@QuentinGruber QuentinGruber force-pushed the 03-12-Adapt_destroyed_effect_based_on_the_model branch from 378b111 to 4c3ea72 Compare March 14, 2024 17:26
@QuentinGruber QuentinGruber merged commit 5616bc9 into dev Mar 14, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-2016 About the 2016 client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant