Skip to content

New trainers can be created by importing data from another trainer#440

Merged
AerunDev merged 5 commits intodevelopfrom
317-add-a-way-to-create-a-trainer-by-using-the-data-of-an-existing-one
Feb 3, 2025
Merged

New trainers can be created by importing data from another trainer#440
AerunDev merged 5 commits intodevelopfrom
317-add-a-way-to-create-a-trainer-by-using-the-data-of-an-existing-one

Conversation

@Aelysya
Copy link
Collaborator

@Aelysya Aelysya commented Jan 31, 2025

Description

The user can now create a new trainer by importing data from another existing trainer.
The imported data are:

  • Creature party
  • Bag items
  • Graphic, audio and text resources
  • Additional dialogs

closes #317

Tests to perform

Open the "New trainer" editor

Creating a new trainer without importing any data

  • Fill the basic data and create the trainer => only the basic data is filled in the new trainer
  • Fill the basic data, un-collapse the "other data" component, leave the selection on "None" and create the trainer => only the basic data is filled in the new trainer
  • Fill the basic data, un-collapse the "other data" component, select a trainer, re-collapse the "other data" component and create the trainer => only the basic data is filled in the new trainer

Creating a new trainer by importing data

  • Fill the basic data, un-collapse the "other data" component, select a trainer and create the trainer => the basic data is filled in the new trainer with the information you entered AND the resources, party, bag entries and additional dialogs are filled with the same data as the chosen trainer

@Aelysya Aelysya self-assigned this Jan 31, 2025
@Aelysya Aelysya linked an issue Jan 31, 2025 that may be closed by this pull request
3 tasks
@Aelysya Aelysya changed the title New trainers data can be filled by importing data from another trainer New trainers can be created by importing data from another trainer Jan 31, 2025
Copy link
Collaborator

@AerunDev AerunDev left a comment

Choose a reason for hiding this comment

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

C'est testé de mon côté, et ça fonctionne très bien ! Bien joué 😄

@Aelysya
Copy link
Collaborator Author

Aelysya commented Jan 31, 2025

Salut @NuriYuri, est-ce que tu pourrais me donner ton avis à propos de ce que j'ai fais dans le fichier utils/importEntityData.ts stp ?

@NuriYuri
Copy link
Collaborator

NuriYuri commented Feb 2, 2025

Le code est plutôt OK, cela dit, il serait préférable que ça soit vraiment spécialisé pour l'entité Trainer histoire de pas trainer des as keyof T etc...

Ca simplifiera aussi surement le code. Les fonctions qui font tout sont pas forcément bénéfiques ;)

@Aelysya
Copy link
Collaborator Author

Aelysya commented Feb 2, 2025

Ca marche, je vais réécrire tout ça correctement.

Copy link
Collaborator

@AerunDev AerunDev left a comment

Choose a reason for hiding this comment

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

J'ai refait des tests après les dernières modifications du code, et pour moi c'est toujours nickel, du coup on peut merge ! 😄
Bien joué !

@AerunDev AerunDev merged commit 4428f15 into develop Feb 3, 2025
2 checks passed
@AerunDev AerunDev deleted the 317-add-a-way-to-create-a-trainer-by-using-the-data-of-an-existing-one branch February 3, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to create a trainer by using the data of an existing one

4 participants