Skip to content

Commit b22248d

Browse files
use updated chalk interface
2 parents bdb4559 + aac4e4c commit b22248d

6 files changed

Lines changed: 40 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Added dedicated `ready` and `reload` files so `main.lua` can be ignored for simple mods.
13+
- Added a stub `defs.lua` as a reminder to document the plugin if relevant.
14+
15+
### Changed
16+
17+
- Default template is more up-to-date.
18+
19+
## [0.5.1] - 2024-05-15
20+
21+
### Fixed
22+
23+
- Use `plugins` as target for `src` files to prevent flattening the Thunderstore package on decompression.
24+
25+
## [0.5.0] - 2024-05-15
26+
1027
### Changed
1128

1229
- Default template is now a valid example plugin
@@ -43,7 +60,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4360

4461
- First version of the template!
4562

46-
[unreleased]: https://github.com/SGG-Modding/Hades2ModTemplate/compare/0.4.0...HEAD
63+
[unreleased]: https://github.com/SGG-Modding/Hades2ModTemplate/compare/0.5.1...HEAD
64+
[0.5.1]: https://github.com/SGG-Modding/Hades2ModTemplate/compare/0.5.0...0.5.1
65+
[0.5.0]: https://github.com/SGG-Modding/Hades2ModTemplate/compare/0.4.0...0.5.0
4766
[0.4.0]: https://github.com/SGG-Modding/Hades2ModTemplate/compare/0.3.0...0.4.0
4867
[0.3.0]: https://github.com/SGG-Modding/Hades2ModTemplate/compare/0.2.0...0.3.0
4968
[0.2.0]: https://github.com/SGG-Modding/Hades2ModTemplate/compare/0.1.0...0.2.0

src/src/def.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---@meta AuthorName-ModName
2+
local public = {}
3+
4+
-- document whatever you made publicly available to other plugins here
5+
-- use luaCATS annotations and give descriptions where appropriate
6+
-- e.g.
7+
-- ---@param a integer helpful description
8+
-- ---@param b string helpful description
9+
-- ---@return table c helpful description
10+
-- function public.do_stuff(a, b)
11+
12+
return public

src/src/main.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---@meta _
12
-- grabbing our dependencies,
23
-- these funky (---@) comments are just there
34
-- to help VS Code find the definitions of things
@@ -30,8 +31,8 @@ chalk = mods["SGG_Modding-Chalk"]
3031
reload = mods['SGG_Modding-ReLoad']
3132

3233
---@module 'config'
33-
config = chalk.auto_lua_toml()
34-
-- ^ this updates our config.toml in the config folder!
34+
config = chalk.auto 'config.lua'
35+
-- ^ this updates our `.cfg` file in the config folder!
3536
public.config = config -- so other mods can access our config
3637

3738
local function on_ready()

src/src/ready.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---@meta _
12
-- globals we define are private to our plugin!
23
---@diagnostic disable: lowercase-global
34

src/src/reload.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---@meta _
12
-- globals we define are private to our plugin!
23
---@diagnostic disable: lowercase-global
34

src/thunderstore.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ websiteUrl = "https://github.com/AuthorName/ModName"
1111
containsNsfwContent = false
1212

1313
[package.dependencies]
14+
Hell2Modding-Hell2Modding = "1.0.26"
1415
SGG_Modding-ENVY = "1.0.0"
15-
SGG_Modding-Chalk = "1.0.0"
16+
SGG_Modding-Chalk = "2.0.2"
1617
SGG_Modding-ReLoad = "1.0.1"
1718
SGG_Modding-SJSON = "1.0.0"
1819
SGG_Modding-ModUtil = "3.1.0"
@@ -33,7 +34,7 @@ target = "./LICENSE"
3334

3435
[[build.copy]]
3536
source = "./src"
36-
target = "./"
37+
target = "./plugins"
3738

3839

3940
[publish]

0 commit comments

Comments
 (0)