1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

55 Commits

Author SHA1 Message Date
Petr Mikheev
6f5e0e7697 Merge branch 'solve_6430' into 'master'
Use a setting to enable Lua Action tracebacks

See merge request OpenMW/openmw!1419
2021-11-22 19:39:47 +00:00
uramer
4a976a8e23 Use a setting to enable Lua Action tracebacks 2021-11-22 19:39:47 +00:00
uramer
5b8cba7323 Clear Lua-created UI on game load and reloadlua command 2021-11-22 19:17:36 +00:00
Petr Mikheev
f42badd7be Dehardcode camera 2021-11-19 20:37:21 +01:00
Petr Mikheev
e56ee2c735 Apply lua handlers for user input in the main thread in order to reduce latency. 2021-11-19 20:37:21 +01:00
uramer
68963538ae Lua UI API 2021-11-18 15:19:54 +00:00
Petr Mikheev
e53d5ed91b Fix compiler warnings in apps/openmw/mwlua/inputbindings.cpp 2021-11-15 17:31:57 +01:00
Petr Mikheev
c7d6620c35 Add error checking in MWLua::Action 2021-11-15 01:17:53 +01:00
psi29a
bd694128b9 Merge branch 'lua_input' into 'master'
Update Lua package openmw.input

See merge request OpenMW/openmw!1356
2021-11-14 19:57:37 +00:00
Petr Mikheev
32839cc727 Allow Lua scripts to work on pause (except timers and onUpdate handlers) 2021-11-12 22:06:59 +01:00
Petr Mikheev
ed85393288 Replace sol::table::create_table_with with a more compiler-friendly implementation. It fixes MSVC error "compiler is out of heap space" and also slightly reduces binary size. 2021-11-11 22:46:01 +01:00
Petr Mikheev
d285427485 Update Lua package openmw.input 2021-11-11 20:14:30 +01:00
Bo Svensson
1960e976e2
refactors stringops.hpp (#3192)
With this PR we refactor `StringUtils::replaceAll` to accept `string_view` as suggested in a code comment. In addition, while we are touching this rebuild happy file, we slim it down a bit by moving a few sparingly used functions elsewhere.
2021-11-05 10:53:52 +01:00
Petr Mikheev
e7ec89573e Refactoring. Lua Callback is moved from apps/openmw/mwlua to components/lua. 2021-10-31 17:47:46 +01:00
Petr Mikheev
95faeaa9c1 Fix: after reloadlua call onActive for all active scripts 2021-10-26 21:52:42 +02:00
Petr Mikheev
47c89567fb Load LuaScriptsCfg from both *.omwscripts and *.omwaddon files. 2021-10-26 21:52:42 +02:00
Petr Mikheev
9adc190209 Redesign LuaUtil::ScriptsContainer to work with ScriptsConfiguration 2021-10-26 21:32:48 +02:00
Petr Mikheev
6aab246879 Add ESM records that are needed to store Lua scripts configuration;
Use ptr.getType() (i.e. esm record names) instead of typeid(ptr.getClass()) in apps/openmw/mwlua.
2021-10-26 21:32:02 +02:00
Bo Svensson
d6613d3677
mostly reverts MWLua changes (#3170)
We just can no longer use the former ptr.getTypeName() as a fallback, but I do not suppose it matters. This value was an implementation defined string that usually contained a garbled mess.
Probably we should additionally refactor Lua types completely now that we have Ptr::getType(). I will leave this up to MWLua developers.
2021-10-11 16:56:26 +02:00
Bo Svensson
ef906cbfa8
improves MWClass mapping (#3166)
Currently, we use a peculiar mapping of ESM classes by their std::type_info::name. This mapping is an undefined behaviour because std::type_info::name is strictly implementation defined. It could return a non-unique value on some platforms. With this PR we use the unsigned int sRecordId of the ESM class as a more efficient lookup type that does not build on undefined behaviour. We can expect marginally faster save-game loading with these changes as well.
2021-10-11 13:46:21 +02:00
psi29a
c3f5e8f968 Merge branch 'lua_transform' into 'master'
3D transforms in Lua

See merge request OpenMW/openmw!1235
2021-10-06 09:21:21 +00:00
Petr Mikheev
48538d5cef 3D transforms in Lua 2021-09-28 20:37:47 +02:00
Petr Mikheev
eb2f863b7d Resolve unused-lambda-capture warnings 2021-09-28 13:02:45 +02:00
Petr Mikheev
fb3917fc1a Lua callbacks 2021-09-28 09:36:23 +02:00
Petr Mikheev
0bd1c22e24 Raycasting in Lua 2021-09-28 09:36:23 +02:00
Petr Mikheev
2f25257a3e Move LuaState::makeReadOnly(sol::table) out of the class because it doesn't need to access LuaState internals. 2021-09-19 14:38:27 +02:00
elsid
e910dd7a25
Rename CellRef::getRefIdPtr -> getRefIdRef and return reference
Return value can't be nullptr. Pointer complicates the code because has to be
dereferenced.

Also move function definition to hpp to make it easier for compiler to optimize
calls.
2021-09-06 22:52:08 +02:00
Petr Mikheev
3771e523f1 More object bindings 2021-08-21 17:18:11 +02:00
Petr Mikheev
0e6fbbc126 Lua package 'openmw.input' 2021-08-10 19:00:52 +03:00
Petr Mikheev
a94072243b Lua command core.quit 2021-08-04 19:14:24 +03:00
Petr Mikheev
0f7f5ce140 Remove Lua command "self:setDirectControl" 2021-08-03 14:36:51 +03:00
Evil Eye
5cdf1e7e6b Merge branch 'vec3_vs_xyz' into 'master'
Use Vec3f instead of x,y,z in World API

See merge request OpenMW/openmw!730
2021-07-31 10:36:11 +00:00
fredzio
a7b190ad29 Change rotateObject() to take a osg::Vec3f argument instead of 3 floats
for readability.
2021-07-30 23:24:53 +02:00
fredzio
88a5ca440b Change moveObject() to take a osg::Vec3f argument instead of 3 floats
for readability.
2021-07-30 23:24:49 +02:00
Petr Mikheev
2938aaf05c Rename API_VERSION -> API_REVISION in Lua API. 2021-07-27 20:06:04 +02:00
Petr Mikheev
3e4c0b775d Add Lua package 'openmw.settings' 2021-07-27 20:06:04 +02:00
Petr Mikheev
68b8a148d7 Initialize Lua packages in LuaManager::init rather than in constructor. 2021-07-27 19:52:17 +02:00
Petr Mikheev
c2280ada1d OpenMW Lua, API_VERSION=0 2021-07-09 20:48:54 +02:00
Petr Mikheev
85c441ec9a Refactoring and minor fixes related to active/inactive object state 2021-07-09 20:48:54 +02:00
Petr Mikheev
702eb19271 Fixes and refactoring 2021-07-09 20:48:54 +02:00
Petr Mikheev
cc7dbabd19 Change argument of onKeyPress 2021-07-09 20:48:54 +02:00
Petr Mikheev
b1a6441c23 Add LocalScripts::LocalEngineEvent. Add OnConsume engine handler. 2021-07-09 20:48:54 +02:00
Petr Mikheev
1268597676 Make loaded but inactive objects available in Lua scripts. 2021-07-09 20:48:54 +02:00
Petr Mikheev
a8f76260bc A possibility to view actor controls from lua scripts without disabling AI. 2021-07-09 20:48:54 +02:00
Petr Mikheev
c463f52390 Add Cell Lua bindings 2021-07-09 20:48:54 +02:00
Petr Mikheev
de349962d1 Engine handlers onActive/onInactive and a function self:isActive() 2021-07-09 20:32:53 +02:00
Petr Mikheev
d5cda61855 Console command "reload lua" 2021-07-09 20:24:56 +02:00
Petr Mikheev
9d09ecf8ca Add mwlua/actions 2021-07-09 20:24:56 +02:00
Petr Mikheev
f5722f9ba0 Inventory bindings 2021-07-09 20:24:56 +02:00
Petr Mikheev
bdccf161c4 Add lua package 'openmw.query' 2021-07-09 20:24:56 +02:00