-
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lua: Migrate utility functions to separate files
- Loading branch information
Showing
8 changed files
with
515 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
|
||
#include <sol/sol.hpp> | ||
#include <uevr/API.hpp> | ||
|
||
namespace lua::utility { | ||
uevr::API::UScriptStruct* get_vector_struct(); | ||
bool is_ue5(); | ||
|
||
sol::object prop_to_object(sol::this_state s, void* self, uevr::API::FProperty* desc, bool is_self_temporary = false); | ||
sol::object prop_to_object(sol::this_state s, uevr::API::UObject* self, const std::wstring& name); | ||
void set_property(sol::this_state s, uevr::API::UObject* self, const std::wstring& name, sol::object value); | ||
|
||
sol::object call_function(sol::this_state s, uevr::API::UObject* self, uevr::API::UFunction* fn, sol::variadic_args args); | ||
sol::object call_function(sol::this_state s, uevr::API::UObject* self, const std::wstring& name, sol::variadic_args args); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include <uevr/API.hpp> | ||
#include <sol/sol.hpp> | ||
|
||
namespace lua::datatypes { | ||
struct StructObject { | ||
StructObject(void* obj, uevr::API::UStruct* def) : object{ obj }, desc{ def } {} | ||
|
||
void* object{ nullptr }; | ||
uevr::API::UStruct* desc{ nullptr }; | ||
}; | ||
|
||
void bind_struct_object(sol::state_view& lua); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.