Evil Eye
83e8729256
Check the result of loading from bytecode
2024-06-21 22:35:34 +02:00
Evil Eye
d6fc0744c7
Move Lua index helpers to components and make owner.factiooRank match other ranks
2024-06-18 21:32:16 +02:00
Kindi
d21f3809bd
test utf8
2024-06-10 18:15:07 +08:00
Kindi
22d685eca3
ensure fitness
2024-06-08 22:11:59 +08:00
Alexei Kotov
6515fdd73f
Handle zero length Lua storage files more gracefully ( #7823 )
2024-03-24 20:05:37 +03:00
Alexei Kotov
63276e0f1f
Merge branch 'avoid_copy' into 'master'
...
Follow-up for YAML API
See merge request OpenMW/openmw!3961
2024-03-23 07:13:39 +00:00
psi29a
af9f1b54da
Merge branch 'lost-warnings' into 'master'
...
Fixes for a whole bunch of warnings
See merge request OpenMW/openmw!3950
2024-03-21 07:45:21 +00:00
Andrei Kortunov
2d3a8ca0fc
Do not use an inner namespace
2024-03-17 18:15:23 +04:00
Andrei Kortunov
cb831a5917
Add more includes just for sure
2024-03-17 17:22:10 +04:00
Andrei Kortunov
2523afe9c2
Use namespace instead of static class
2024-03-16 22:06:28 +04:00
Andrei Kortunov
8037ad7f00
Remove unused includes
2024-03-16 22:06:15 +04:00
Andrei Kortunov
4520ee465d
Do not copy vector
2024-03-16 16:26:26 +04:00
AnyOldName3
28131fd62b
Fixes for a whole bunch of warnings
...
These warnings were always enabled, but we didn't see them due to https://gitlab.com/OpenMW/openmw/-/issues/7882 .
I do not fully understand the cause of 7822 as I can't repro it in a minimal CMake project.
Some of these fixes are thought through.
Some are sensible best guesses.
Some are kind of a stab in the dark as I don't know whether there was a
possible bug the warning was telling me about that I've done nothing to
help by introducing a static_cast.
Nearly all of these warnings were about some kind of narrowing
conversion, so I'm not sure why they weren't firing with GCC and Clang,
which have -Wall -Wextra -pedantic set, which should imply -Wnarrowing,
and they can't have been affected by 7882.
There were also some warnings being triggered from Boost code.
The vast majority of library headers that do questionable things weren't
firing warnings off, but for some reason, /external:I wasn't putting
these Boost headers into external mode.
We need these warnings dealt with one way or another so we can switch
the default Windows CI from MSBuild (which doesn't do ccache) to Ninja
(which does).
I have the necessary magic for that on a branch, but the branch won't
build because of these warnings.
2024-03-14 23:39:33 +00:00
Andrei Kortunov
715efe892f
Load YAML files via Lua (feature 7590)
2024-03-14 16:29:21 +04:00
psi29a
03d5872a55
Merge branch 'drop_on_exit' into 'master'
...
Add a storage mode to drop section on game exit
See merge request OpenMW/openmw!3905
2024-02-28 20:36:40 +00:00
Andrei Kortunov
ddd0945645
Add a storage mode to drop section on game exit
2024-02-27 23:26:22 +04:00
Andrei Kortunov
cf6b6020a0
Move local variables
2024-02-23 17:10:55 +04:00
uramer
08b7ee8a44
Test LuaUtil::safeGet preventing crash
2024-02-14 09:49:32 +01:00
uramer
550659c2d9
Fix loadVFS error handling
2024-02-14 09:49:32 +01:00
uramer
aa4303fc38
Fix crash when throwing in index meta methods
2024-02-14 09:49:32 +01:00
uramer
851e291501
Simplify and fix the storage subscribe test
2024-02-13 00:56:14 +01:00
uramer
35448bf0fe
Fix crash when passing a non-callback table to a callback argument
2024-02-12 20:28:56 +01:00
Alexei Kotov
8b47381162
Merge branch 'more_move' into 'master'
...
Fix some Coverity Scan complaints
See merge request OpenMW/openmw!3829
2024-02-03 17:24:53 +00:00
Andrei Kortunov
225e834b88
Fix some Coverity Scan complaints
2024-02-02 09:28:19 +04:00
uramer
9cce2e39ba
Merge branch 'master' into menuscripts
2024-01-27 15:45:31 +01:00
Andrei Kortunov
87c9f395f1
Move local variables in components
2024-01-19 16:01:48 +04:00
uramer
dd6017e81e
Avoid making engine handler methods public
2024-01-11 00:55:29 +01:00
uramer
2107bbc01d
Reuse input engine handlers in menu scripts
2024-01-10 23:13:23 +01:00
uramer
962ecc4329
Allow menu scripts to read global sections while a game is loaded
2024-01-10 22:28:57 +01:00
uramer
d1268acf95
Merge branch 'master' into menuscripts
2024-01-07 23:15:21 +01:00
uramer
e9b48e35c0
Coverity defects
2024-01-02 13:54:02 +01:00
uramer
1d8ee7984f
Make input.triggers[] consistent with input.actions[]
2024-01-02 13:45:45 +01:00
uramer
0e2e386dc9
Lua actions take 3
2023-12-29 18:56:59 +00:00
Devin Alexander Torres
8161771969
Add sol::lib::jit to actually enable JIT
2023-12-07 04:57:52 -06:00
uramer
c9eaeb47d5
Minor API inconsistencies
2023-11-21 03:04:24 +00:00
Petr Mikheev
f5325e11e3
Rename mPermanentCallbacks -> mMenuScriptsCallbacks in LuaUtil::Storage
2023-10-31 11:05:00 +01:00
Petr Mikheev
1dd7a15255
Draft: add new type of Lua scripts - menu scripts
2023-10-31 10:29:24 +01:00
Kindi
c77b88cd38
fix string format
2023-09-08 10:39:28 +08:00
Andrei Kortunov
a849a053be
Do not copy vector
2023-09-04 16:50:45 +04:00
psi29a
0b74146b05
Merge branch 'luautflib' into 'master'
...
Lua utf-8 support
Closes #6505
See merge request OpenMW/openmw!3327
2023-09-03 17:05:27 +00:00
Kindi
7eb456a169
refactoring for readability
2023-09-03 19:20:59 +08:00
Kindi
8798217b51
remove const keyword from all string_view
2023-09-02 12:21:07 +08:00
Kindi
db287b2bc6
dont use pass by const reference for small types in func arguments
2023-09-01 19:35:50 +08:00
Kindi
dd61caa96d
using misc::stringutils::format and simplify relativeposition function
2023-09-01 19:26:18 +08:00
Kindi
af58b531da
change function names and add documentation in overview.rst
2023-08-30 02:33:27 +08:00
Kindi
532230254b
add documentation
2023-08-28 02:37:52 +08:00
Kindi
92842cedf5
len,codepoint,offset
2023-08-27 16:12:52 +08:00
Petr Mikheev
87eacf774a
Control GUI modes from Lua
2023-08-20 17:49:56 +02:00
Petr Mikheev
f86a45d60a
[Lua] add __len metafunction for readonly objects
2023-08-20 17:49:56 +02:00
Kindi
6d02c31720
utf8.codes
2023-08-18 00:01:11 +08:00
Kindi
d9c102e14d
utf8.char
2023-08-13 23:37:31 +08:00
Kindi
8622a6da3b
luautf8lib
2023-08-10 18:50:22 +08:00
Andrei Kortunov
f5b18d2d5d
Do not copy objects twice where possible
2023-08-02 20:03:48 +04:00
elsid
5a0ad8cdd7
Add Morrowind specific tests
2023-07-22 01:31:55 +02:00
Petr Mikheev
3b43cc2aea
Lua: change obj.rotation from Euler angles to Quaternion
2023-06-12 00:16:42 +02:00
glassmancody.info
a7b7f99d72
Expose game object's bounding box in lua api
2023-05-18 11:10:10 -07:00
psi29a
cdc753df70
Merge branch 'lua_refactoring' into 'master'
...
MWLua refactoring
See merge request OpenMW/openmw!2956
2023-05-02 19:48:21 +00:00
Petr Mikheev
4562b8c06b
Add headers for all .cpp
files in mwlua; move packages initilaization from LuaManager to luabindings.cpp
2023-04-25 23:24:51 +02:00
Petr Mikheev
c362b2efa6
Use LuaUtil::cast for casting sol::object to prevent crashing on type mismatch in Lua scripts.
2023-04-25 22:11:04 +02:00
Petr Mikheev
61578ca39b
Add function LuaUtil::cast
2023-04-25 21:51:05 +02:00
Petr Mikheev
7b3aa621a4
[Lua] Fix memory leak in sandboxed "require".
2023-02-26 19:59:53 +01:00
Petr Mikheev
d0a82437a4
[Lua] Fix memory tracking
2023-02-26 18:46:57 +01:00
psi29a
0f331a4fc5
Merge branch 'lua_callback' into 'master'
...
Fix potential memory leak in LuaUtil::Callback
See merge request OpenMW/openmw!2733
2023-02-18 21:05:07 +00:00
Petr Mikheev
b71eac3e76
Fix #7210
2023-02-15 10:31:10 +01:00
Petr Mikheev
65885d994f
Don't expose LuaUtil::Callback to lua
2023-02-14 21:08:19 +01:00
Petr Mikheev
71ba7b88e2
Move asyncpackage from apps/openmw/mwlua to components/lua
2023-02-14 20:03:32 +01:00
elsid
c79c14da91
Fix -Wnon-virtual-dtor warnings
2023-02-03 23:00:09 +01:00
uramer
c17eedd348
Documentation and API fixes (part of !2529 )
2023-01-30 10:13:26 +00:00
Petr Mikheev
95999afefd
Apply clang-format to the previous commit
2023-01-20 23:44:12 +01:00
Kindi
07da7eddea
Add remap and round to lua utils
2023-01-20 22:28:34 +00:00
Petr Mikheev
d9e9db0983
Additional information in Lua profiler
2023-01-13 21:14:23 +01:00
Petr Mikheev
b248c3e173
Allow passing initData
to the :addSript call ( #7091 )
2022-12-31 22:08:17 +01:00
fteppe
125b21de20
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
...
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-12-27 19:15:54 +01:00
Petr Mikheev
55db95d4cf
Update Lua profiler; add ability to run OpenMW with old LuaJit that doesn't allow custom allocator (Lua profiler will be disabled in this case)
2022-12-03 16:58:03 +01:00
Petr Mikheev
6fa65e4729
Track memory and CPU usage per script in LuaUtil::LuaState
2022-11-30 00:06:14 +01:00
uramer
a2fa1fe0a5
Execute async callbacks on the main Lua stack
2022-10-18 22:12:11 +02:00
Petr Mikheev
3697c9266b
Separate l10n manager from lua
2022-10-07 17:19:04 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base
2022-09-22 21:35:26 +03:00
psi29a
ce90484898
Merge branch 'fix_lua_color' into 'openmw-48'
...
Make r, g, b, a read-only properties, rather than getters
See merge request OpenMW/openmw!2380
(cherry picked from commit 85f343e87a
)
19d01f26
Make r, g, b, a read-only properties, rather than getters
2022-09-15 22:01:59 +00:00
Project579
a13709c510
Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions.
2022-09-11 14:41:20 +02:00
Project579
e5c417c968
Make sure all paths are passed as std::filesystem::path instead of std::string where possible.
2022-09-11 14:41:15 +02:00
Andrei Kortunov
e3ad30a517
Do not copy data when it is not needed
2022-08-15 11:52:09 +04:00
elsid
f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
...
Replace all ciEqual overloads with one having std::string_view as argument.
2022-08-03 22:06:24 +02:00
ζeh Matt
764d34362e
Type forward VFS::Manager in luastate.hpp and l10n.hpp
2022-07-18 19:36:41 +03:00
Andrei Kortunov
ccbb5e03fb
Use YAML files to translate MyGUI's localization tags
2022-07-12 08:20:40 +04:00
elsid
316f666e77
Avoid constructing icu::StringPiece from std::string directly
...
Otherwise it causes a crash on Windows when OpenMW is built in debug
mode but ICU not.
2022-07-01 22:31:06 +02:00
psi29a
9c1970dce4
Merge branch 'lua_esm' into 'master'
...
Advanced Lua scripts configuration in omwaddon
See merge request OpenMW/openmw!1947
2022-06-11 18:48:23 +00:00
Petr Mikheev
1240b60a24
Console command reloadlua
also reloads l10n used by Lua scripts
2022-06-06 23:56:08 +02:00
Petr Mikheev
a70d5831c5
Lua scripts configuration in omwaddon
2022-06-05 01:36:39 +02:00
Petr Mikheev
a4b23aad05
Validate l10n context name
2022-05-23 19:25:30 +02:00
uramer
1fe794d935
Changing setting renderer arguments
2022-05-19 19:49:14 +00:00
psi29a
d3f331793e
Merge branch 'sol' into 'master'
...
Update sol. Replace combined sol.hpp with loose files.
See merge request OpenMW/openmw!1851
2022-05-18 07:57:32 +00:00
uramer
22994af728
Fix Lua pairs and ipairs
2022-05-16 16:32:18 +02:00
Petr Mikheev
7ccbf95503
[Lua] makeStrictReadOnly for enums
2022-05-16 00:16:26 +02:00
Petr Mikheev
d16fa553c8
Fix LuaUtil::Callback
2022-05-15 21:34:48 +02:00
Petr Mikheev
70c7f1880d
[Lua] pairs and ipairs for ObjectList ( resolves #6732 )
2022-05-06 23:11:47 +02:00
Petr Mikheev
eae1e87081
[Lua] Update openmw.storage
2022-04-23 18:55:12 +02:00
Petr Mikheev
45c9635e94
Fix getmetatable, fix pairsForReadonly, add util.loadCode, _G
2022-04-14 01:00:02 +02:00
Benjamin Winger
21ffbcc4b4
Lua i18n updates
2022-04-10 07:57:02 +00:00
Petr Mikheev
eca64b48e8
Bitwise operations in Lua
2022-04-06 21:55:05 +02:00