FoundryDevelopmentConsortium / Knowledge-Recalled-PF2e-FVTT

Creative Commons Zero v1.0 Universal
0 stars 3 forks source link

duplicateCheck #19

Closed christianhturner closed 3 months ago

christianhturner commented 1 year ago

CreateActor -> check against the documentedActor for duplicate.

If a duplicate happens -> same ID or same name we should ask the user if they won't the entities to be merged and treated the same or if they should be treated as different. In one case, we have a base creature that we want to make a "boss" with buffed up stats. These should be treated as seperate. In the case of three bandits with different names we may want these to be the same. Truly we prefer the user to just use the same actor in this case from the sidebar and allow them to have unique names at the token level. We should block a new actor form being dragged onto the side if "merge" is preferred and only allow to unique items in the side bar if we want them to be treated differently.

christianhturner commented 1 year ago

Blocked -> documentedActors (dependsON)

christianhturner commented 1 year ago

if a duplicate occurs (true or false) [duplicate is defined as the new object having either the same name or the same actorID against {{documentedActors}}]. The expected return is a boolean and the duplicate parameter.

AlecHolloway commented 1 year ago

I coded the duplicate check to check against the npc actors array. It was easier to check against the npc actor array than the documented actors because the documented actors has no logic to add them to the array. It just takes the current state of the foundry documented actors. I need to engineer a more permanent solution for the npc actor storage because the same characters are prompted for merge upon start of the game. Perhaps this is where the json file comes into play?

christianhturner commented 1 year ago

That's correct

christianhturner commented 3 months ago

Resolved