Skip to content

Commit

Permalink
Add path to character storage location
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm committed Dec 4, 2024
1 parent e478fd5 commit 3fecae7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ ex_ttrpg_dev

# Ignore custom/local rule system configs
/local_system_configs/
/local_characters/
14 changes: 14 additions & 0 deletions lib/globals.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ defmodule ExTTRPGDev.Globals do
Module which defines globals like project paths
"""
@project_root File.cwd!()
@characters_path Path.join(~w(#{@project_root} local_characters))
@system_configs_path Path.join(~w(#{@project_root} priv system_configs))
@local_system_configs_path Path.join(~w(#{@project_root} local_system_configs))
@license_file_name "license.md"
Expand All @@ -21,6 +22,19 @@ defmodule ExTTRPGDev.Globals do
@project_root
end

@doc """
The path to where characters are stored on your machine
## Examples
iex> ExTTRPGDev.Globals.characters_path()
"/full/path/to/project/ex_ttrpg_dev/priv/characters"
"""
def characters_path do
@characters_path
end

@doc """
The path to where system configs are stored
Expand Down

0 comments on commit 3fecae7

Please sign in to comment.