-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: better organization of game character - #5
- Loading branch information
1 parent
89d3642
commit a4a01b0
Showing
3 changed files
with
53 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package game | ||
|
||
import ( | ||
"os" | ||
) | ||
|
||
// TODO: I think this needs another sub property to work with the validator | ||
type VtmGameCharacter struct { | ||
Name string `json:"name"` | ||
Disciplines []Discipline `json:"disciplines,omitempty"` | ||
} | ||
|
||
type Discipline struct { | ||
Name string `json:"name"` | ||
Level int `json:"level"` | ||
Powers []Power `json:"powers"` | ||
} | ||
|
||
type Power struct { | ||
Name string `json:"name"` | ||
Level int `json:"level"` | ||
Description string `json:"description,omitempty"` | ||
} | ||
|
||
func (g VtmGameCharacter) Schema() ([]byte, error) { | ||
return os.ReadFile("./vtm_v5_character_schema.json") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters