Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-05-01 05:04:15 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-05-01 05:04:15 +1000
commit9e3048ea16316e434fb899b97b2b48e314fae457 (patch)
tree2398b70bb249c887fbaa153b68ea9c25000970d6
parent840d64dbed5bf6d8f6b5bd69c1933beaa8b7ff1a (diff)
world.entityAimPosition
-rw-r--r--source/game/scripting/StarWorldLuaBindings.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/game/scripting/StarWorldLuaBindings.cpp b/source/game/scripting/StarWorldLuaBindings.cpp
index 13be5ee..ba4322d 100644
--- a/source/game/scripting/StarWorldLuaBindings.cpp
+++ b/source/game/scripting/StarWorldLuaBindings.cpp
@@ -539,6 +539,11 @@ namespace LuaBindings {
return entity->isInteractive();
return {};
});
+ callbacks.registerCallback("entityAimPosition", [world](EntityId entityId) -> Maybe<Vec2F> {
+ if (auto entity = world->get<ToolUserEntity>(entityId))
+ return entity->aimPosition();
+ return {};
+ });
callbacks.registerCallback("entityMouthPosition", [world](EntityId entityId) -> Maybe<Vec2F> {
if (auto entity = world->get<ChattyEntity>(entityId))
return entity->mouthPosition();