initiative-sh / initiative.sh

A web-based command line for game masters
https://initiative.sh/
GNU General Public License v3.0
44 stars 4 forks source link

Ensure that Things always have a UUID #351

Closed MikkelPaulson closed 1 month ago

MikkelPaulson commented 2 months ago

Currently, UUIDs are only assigned when Things are saved to the journal (ie. rather than the temporary Things generated with commands like npc). In order to reference the Thing across its entire lifespan (#349), ensure that the UUID is generated when the Thing is created and persists throughout.

MikkelPaulson commented 2 months ago

Investigation indicates that I've been very loosy-goosy when talking about a Thing that exists (even ephemerally) vs. a description of a Thing. For instance, if I run the command Mikkel is an elf, a Thing will be created with only the diff (species: Species::Elf) and overlaid on the Thing called Mikkel.

Even aside from the specific objective of a type-level guarantee that the UUID will always be present, I think there's actually quite a bit of benefit in separating the concept of a Thing from a blob of Thing-shaped data, but it will be a lot of work.

@ChrisRenfrow