dmdorman / hero6e-foundryvtt

MIT License
7 stars 7 forks source link

Coderodent/gamesystem #938

Closed coderodent-calfee closed 5 months ago

coderodent-calfee commented 5 months ago

This set of changes removes the name of the repo folder from everywhere but the system.json.

system.json id must match the folder it is inside.

I was prompted to make these changes because the default folder the repo is created in is hero6e-foundryvtt, and the system.json id is hero6efoundryvttv2.

Which means the system won't work immediately for new developers.

now, they could be forced to use the clone instruction like

git clone https://github.com/coderodent-calfee/hero6e-foundryvtt.git hero6efoundryvttv2

which will work out of the box, but it's nice to decouple and remove hard-coded paths if possible.

Please give me all of your comments; this is a super new thing for me, and I want to learn and grow.

EDIT:ok, I kinda knew that data already had to be in there somewhere ... it is.

Reloading the system.json is duplicated work; I will remove that part, but the rest should be golden

coderodent-calfee commented 5 months ago

First: I needed to get the id out of the system.json That has to be an async operation, and that can't be used in static assignments Most of the paths were static Second: All of the handlebar files needed the paths assigned where invoked in mjs files Third: partials also needed to use the new path But you can't evaluate variables when loading partials Fourth: The icons that are added to herosys also needed a system path