# Copyright (c) 2026 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT

# Sources
# itemgive.c/h are not built yet -- they depend on the RPG textbox UI
# (ui/rpg/textbox/uitextboxmain.h), which hasn't been restored. Add
# itemgive.c back here once that's back.
target_sources(${DUSK_LIBRARY_TARGET_NAME}
  PUBLIC
    item.c
    inventory.c
    backpack.c
)

# Item Definitions
dusk_run_python(
  dusk_item_json_defs
  tools.item
    --json ${CMAKE_CURRENT_SOURCE_DIR}/item.json
    --output ${DUSK_GENERATED_HEADERS_DIR}/item/itemdef.h
)
add_dependencies(${DUSK_LIBRARY_TARGET_NAME} dusk_item_json_defs)
