From e1991b6adc10ff2f5700ba07c6e4a397824b7fc1 Mon Sep 17 00:00:00 2001 From: Addison Schuhardt Date: Thu, 19 Aug 2021 21:29:58 -0700 Subject: [PATCH] adding the 'foreach' alias for plane.fill to instanced planes as well as to the library table Signed-off-by: Addison Schuhardt --- CMakeLists.txt | 10 ++++++++++ lua/src/script/plane.c | 3 +++ 2 files changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 811983b..33a1df2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,3 +126,13 @@ add_subdirectory(lua) # add benchmark tools add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/bench") + +install( + TARGETS ${SU_LIBRARY} ${SU_LIBRARY_STATIC} + CONFIGURATIONS Release + RUNTIME DESTINATION /usr/local/lib) + +install( + TARGETS procyon-lua + CONFIGURATIONS Release + RUNTIME DESTINATION /usr/local/bin) diff --git a/lua/src/script/plane.c b/lua/src/script/plane.c index 86e46c8..89a63ae 100644 --- a/lua/src/script/plane.c +++ b/lua/src/script/plane.c @@ -230,6 +230,9 @@ static int plane_from(lua_State *L) { lua_pushcfunction(L, plane_fill); lua_setfield(L, -2, FUNC_PLANE_FILL); + lua_pushcfunction(L, plane_fill); + lua_setfield(L, -2, FUNC_PLANE_FOREACH); + return 1; }