Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
SYMGEN_VERSION: v1.2.4
SYMGEN_VERSION: v1.3.6

jobs:
build:
Expand Down Expand Up @@ -96,6 +96,8 @@ jobs:
name: Combine bundles
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7

Expand Down
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
cmake_minimum_required(VERSION 3.26)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

if (NOT DEFINED CMAKE_BUILD_TYPE AND NOT DEFINED ENV{CMAKE_BUILD_TYPE})
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Build type")
Expand All @@ -8,7 +11,7 @@ project(my_mod VERSION 1.0.0 LANGUAGES CXX)

# The Dusklight version to build against: a release tag (e.g. "v2.0.0") or a commit SHA.
if (NOT DUSKLIGHT_VERSION)
set(DUSKLIGHT_VERSION "v2.0.0")
set(DUSKLIGHT_VERSION "v2.0.2")
endif ()
# Fetches the Dusklight sources into ./dusklight and provides DUSKLIGHT_DIR.
# Use -DDUSKLIGHT_DIR= to point at an existing Dusklight checkout.
Expand All @@ -18,7 +21,7 @@ add_subdirectory("${DUSKLIGHT_DIR}/sdk" dusklight-sdk EXCLUDE_FROM_ALL)
configure_file(mod.json.in "${CMAKE_CURRENT_BINARY_DIR}/mod.json" @ONLY NEWLINE_STYLE LF)

add_mod(my_mod
FEATURES game # remove for service/asset-only mods; add webgpu for GfxService
FEATURES game fmt # remove for service/asset-only mods; add webgpu for GfxService
SOURCES src/mod.cpp
MOD_JSON "${CMAKE_CURRENT_BINARY_DIR}/mod.json"
RES_DIR res # mod resources, including icon.png and banner.png
Expand Down
9 changes: 4 additions & 5 deletions src/mod.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "mods/svc/hook.hpp"
#include "mods/service.hpp"
#include "mods/svc/hook.h"
#include "mods/svc/log.h"
#include "mods/svc/hook.hpp"
#include "mods/svc/log.hpp"

// Game includes
#include "d/d_item_data.h"
Expand All @@ -28,11 +27,11 @@ MOD_EXPORT ModResult mod_initialize(ModError*) {
// Installs a pre hook on fopAcM_createItem.
ModResult result = mods::hook::add_pre<CreateItem>(on_create_item_pre);
if (result != MOD_OK) {
svc_log->error(mod_ctx, "failed to install on_create_item_pre");
mods::log::error("failed to install pre_hook on_create_item_pre");
return result;
}

svc_log->info(mod_ctx, "my_mod initialized");
mods::log::info("my_mod initialized");
return MOD_OK;
}

Expand Down
Loading