Tobias Tribble
b52ab04c43
Added soulValue to creatureRecord, added documentation
2023-04-26 12:01:59 -05:00
psi29a
0cf9fe0e2e
Merge branch 'lua_casting_error' into 'master'
...
Fix crash on sol::object type mismatch in invalid Lua script
See merge request OpenMW/openmw!2975
2023-04-25 22:19:45 +00:00
Zackhasacat
f6fb05d1ca
Add functionality for lua to view and modify ownership data for GameObjects
2023-04-25 21:20:43 +00: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
073e379057
Add missing type validation in mwlua/objectvariant.hpp
2023-04-23 20:47:24 +02:00
Petr Mikheev
f1beaa7b8c
Put ESMStore to Environment
2023-04-20 21:45:49 +02:00
Petr Mikheev
227a993b94
Remove createRecord
functions from World because the only forward the argument to ESMStore that can be used directly.
2023-04-20 21:45:49 +02:00
Petr Mikheev
90397662bc
Lua bindings for magic. Based on the work made by @bharbich in !2765 .
2023-04-20 18:48:34 +02:00
florent.teppe
53cc9f3614
functions return reference instead of ptr
...
because the function can never return an nullptr, we return a reference.
2023-04-20 15:55:40 +02:00
psi29a
2a6e301925
Merge branch 'activation' into 'master'
...
Allow Lua scripts to extend or override standard activation mechanics
See merge request OpenMW/openmw!2935
2023-04-20 11:29:21 +00:00
psi29a
cace3e6566
Merge branch 'fix_teleporting' into 'master'
...
Fix bugs related to Lua commands `obj:teleport` and `obj:moveInto`
See merge request OpenMW/openmw!2937
2023-04-20 11:28:02 +00:00
Petr Mikheev
1c3903f155
Support ESM4 types in cell:getAll
2023-04-20 01:47:16 +02:00
Petr Mikheev
00beb06391
Initial Lua bindings for ESM4 types; bindings for ESM4Door.
2023-04-20 01:47:16 +02:00
Petr Mikheev
75e47f859c
Restore logic that was accidentally removed in !2852 . Because of it onUpdate
handler in local Lua scripts doesn't work.
2023-04-18 23:31:44 +02:00
Petr Mikheev
0cebaec360
Fix bug: world.createObject(id):moveTo(inventory) produces disabled objects that are visible in inventory, but can not be droped to the ground.
2023-04-17 19:07:44 +02:00
Petr Mikheev
60a8d08e66
Refactor teleporting in Lua; fix a bug in worldmodel.cpp
2023-04-17 19:07:30 +02:00
Petr Mikheev
61d207bd78
Allow Lua scripts to extend or override standard activation mechanics
2023-04-16 23:50:27 +02:00
Zackhasacat
224b7a0bf8
Allow Soul values on Misc Items to be set by Lua
2023-04-16 19:28:26 +00:00
psi29a
d6d7746c9b
Merge branch 'records' into 'master'
...
[Lua] Fix implementation of types.*.records
See merge request OpenMW/openmw!2918
2023-04-11 06:54:19 +00:00
Petr Mikheev
55c9cde2ed
[Lua] Add missing record.id
for NPC and Creature records.
2023-04-10 23:28:15 +02:00
Petr Mikheev
9279c3d3e1
[Lua] Fix implementation of types.*.records
2023-04-10 23:15:28 +02:00
Mitten.O
85dc0ec481
Create a custom Lua usertype to expose a record store as a read-only array
2023-04-09 15:00:01 +03:00
Petr Mikheev
f09a689a4f
Merge ESM::RefNum and ESM4::FormId
2023-04-09 00:23:32 +02:00
florent.teppe
3f678c3b0a
Dest Door and teleport use ESM::RefId
...
This changes a lot of files as a consequence.
Still buggy, moving to exterior doesn't bring to the right place yet
coc "seyda neen" doesn't work. SO I broke somehting when fetching a cell from a name
2023-04-03 14:16:03 +02:00
uramer
7f3926db3f
Merge branch 'lua_ai' into 'master'
...
Expose the argument `cancelOther` of `AiSequence::stack` to Lua
Closes #7245
See merge request OpenMW/openmw!2865
2023-03-30 19:35:48 +00:00
Mitten Orvan
4744b1eeda
Make API for creating potions
2023-03-29 07:46:11 +00:00
Petr Mikheev
3c5a9f55c5
Expose the argument cancelOther
of AiSequence::stack
to Lua
2023-03-27 02:28:45 +02:00
Petr Mikheev
a72dc6c7a1
(Lua) Add onActivate handler in global scripts
2023-03-27 01:36:45 +02:00
psi29a
76cba95a44
Merge branch 'lua' into 'master'
...
LuaManager refactoring
See merge request OpenMW/openmw!2852
2023-03-26 11:12:51 +00:00
Petr Mikheev
a88fcbffb0
Address review comments
2023-03-26 03:38:40 +02:00
Petr Mikheev
8d1e52ed51
Extract engine handlers processing from LuaManager to a new class EngineEvents
2023-03-26 03:38:40 +02:00
Petr Mikheev
7ef759c78b
Refactor mwlua/eventqueue and extract some code out of LuaManager
2023-03-26 03:38:40 +02:00
Petr Mikheev
4fd07cb58d
Implement MWWorld::Class::isItem(ptr) and remove a hacky MWLua::WorldView::isItem.
2023-03-26 03:38:40 +02:00
elsid
b7fdca0fe6
Use serialized ESM::RefId for Lua records
2023-03-25 18:19:46 +01:00
elsid
ca9c55ac26
Use common function to add record binding
2023-03-25 15:05:58 +01:00
elsid
33a59a9342
Use ESM::RefId::toDebugString to convert record to string in Lua
2023-03-25 15:05:55 +01:00
elsid
017f3d5484
Interpret ESM::Light::mSound as identifier not a path
2023-03-24 15:42:26 +01:00
elsid
069d4255b9
Make ESM::RefId to be fixed size cheap to copy
...
Use std::variant. Store refId strings in unordered_set and use pointer to an
item there. Inserts to unordered_set do not invalidate pointers to values so the
pointer is always valid. Elements are not removed. Assume there is finite number
of string refIds.
2023-03-19 17:20:43 +01:00
Petr Mikheev
2bfffb3063
Move std::variant<SelfObject*, LObject, GObject>
from mwlua/stats.cpp to mwlua/objectvariant.hpp
2023-03-13 23:44:00 +01:00
Petr Mikheev
0b385d5db9
Create MWWorld::SafePtr
2023-03-13 23:44:00 +01:00
Mitten Orvan
4e6d48d246
Add a bit of high-level developer documentation about the Lua system
2023-03-13 22:41:28 +00: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
Kindi
4734504e2c
Lua binding for Clothing
2023-02-12 00:19:08 +08:00
Alexei Kotov
5340c2c816
Fix Lua ingredient bindings
2023-02-10 02:50:13 +03:00
elsid
f09789002a
Define hardcoded global variable names as constants
2023-02-07 00:47:34 +01:00
psi29a
4032c447e9
Merge branch 'load-ESM4-Cell' into 'master'
...
Can load and coc into an interrior oblivion cell
See merge request OpenMW/openmw!2647
2023-02-06 08:56:23 +00:00
psi29a
68b3b90255
Merge branch 'ui_content_leak' into 'master'
...
Move implementation of UI Content to Lua (#7155 )
See merge request OpenMW/openmw!2661
2023-02-01 22:51:47 +00:00
uramer
e96681151c
Get rid of the LuaUI::Content namespace
2023-02-01 17:18:50 +01:00
uramer
fb0646dda1
Remove Ui Content counter in Lua profiler
2023-01-31 19:52:28 +01:00