From 588065cfc32b8ee23f8ac20dc42d64f3546e5e7f Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:48:43 +1100 Subject: [PATCH] Update StarRootLuaBindings.cpp --- source/game/scripting/StarRootLuaBindings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/game/scripting/StarRootLuaBindings.cpp b/source/game/scripting/StarRootLuaBindings.cpp index 1898fff..6759811 100644 --- a/source/game/scripting/StarRootLuaBindings.cpp +++ b/source/game/scripting/StarRootLuaBindings.cpp @@ -63,10 +63,11 @@ LuaCallbacks LuaBindings::makeRootCallbacks() { callbacks.registerCallbackWithSignature, String, Maybe>("materialMiningSound", bind(RootCallbacks::materialMiningSound, root, _1, _2)); callbacks.registerCallbackWithSignature, String, Maybe>("materialFootstepSound", bind(RootCallbacks::materialFootstepSound, root, _1, _2)); - callbacks.registerCallback("assetOrigin", [root](String const& path) { + callbacks.registerCallback("assetOrigin", [root](String const& path) -> Maybe { auto assets = root->assets(); if (auto descriptor = assets->assetDescriptor(path)) return assets->assetSourcePath(descriptor->source); + return {}; }); callbacks.registerCallback("assetPatches", [root](LuaEngine& engine, String const& path) -> Maybe {