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

91 Commits

Author SHA1 Message Date
uramer
c9eaeb47d5 Minor API inconsistencies 2023-11-21 03:04:24 +00:00
Zackhasacat
78e9a1753e Add lua binding for gameObject globalVariable 2023-10-24 13:55:50 +00:00
Evil Eye
7594d94024 Prevent re-adding local scripts 2023-09-27 22:24:28 +02:00
Evil Eye
f6626e36cf Unbreak respawns and fix #7588 2023-09-27 22:07:55 +02:00
Evil Eye
33b57d9134 Use moveToCell and init mwscript 2023-09-27 21:23:07 +02:00
Evil Eye
641f34a3c9 Treat teleportation out of the draft cell as object creation 2023-09-25 21:01:32 +02:00
Andrei Kortunov
5d211d3c93 Return nil when we try to use an invalid store index from Lua 2023-09-08 09:48:45 +04:00
Petr Mikheev
55a9ab4f52 Add obj.parentContainer in Lua. Refactor ContainerStore::mPtr, ContainerStore::mActor. 2023-08-27 23:45:19 +02:00
Petr Mikheev
842e154d8a Fix incorrect validation in obj:moveInto 2023-08-19 13:08:30 +02:00
Petr Mikheev
1a53e9db5d [Lua] Accept GameObject as destination in obj:moveInto. 2023-08-08 22:56:42 +02:00
elsid
c9c32d9a0d
Cleanup includes 2023-07-29 00:16:43 +02:00
psi29a
3032b340a2 Merge branch 'teleporting' into 'master'
A few Lua changes related to teleporting

See merge request OpenMW/openmw!3246
2023-07-27 09:32:28 +00:00
Petr Mikheev
f99582e671 [Lua] Fix removing from inventory 2023-07-25 23:34:25 +02:00
Petr Mikheev
4016e8b383 Lua engine handler onTeleported 2023-07-19 10:42:58 +02:00
elsid
f6fce5ee15
Cleanup includes 2023-07-08 11:28:56 +02:00
Petr Mikheev
d830ae37b1 Add special cell for objects created via Lua scripts and not yet added into the world 2023-07-04 17:15:14 +02:00
Petr Mikheev
39fc832fde Fix #7441: Objects that are removed and disabled in the same frame via lua remain in the world but become uninteractable 2023-06-28 21:43:30 +02:00
psi29a
68415a952e Merge branch 'lua_quat' into 'master'
Breaking change in Lua API: change obj.rotation from Euler angles to Quaternion

See merge request OpenMW/openmw!3123
2023-06-20 09:59:06 +00:00
Zackhasacat
f4980c178d Lua: Add functions to resolve inventories 2023-06-19 18:15:42 +00:00
Petr Mikheev
790ddcf32e Fix #7420 (Local scripts on items cause the game to crash when activated) 2023-06-12 21:25:48 +02:00
Petr Mikheev
3b43cc2aea Lua: change obj.rotation from Euler angles to Quaternion 2023-06-12 00:16:42 +02:00
psi29a
3fcf9dc1d2 Merge branch 'set_scale' into 'master'
Allow Lua to set and get GameObject's in game scale

See merge request OpenMW/openmw!3114
2023-06-10 08:48:14 +00:00
Tobias Tribble
0e6155c529 Added delayed action 2023-06-08 23:50:54 -05:00
Tobias Tribble
41a2c82f93 Added scale property and setScale function 2023-06-07 19:23:36 -05:00
Petr Mikheev
3b5849add8 Move content files functions to core.contentFiles and add obj.contentFile 2023-06-07 20:57:48 +02:00
Kindi
dfafac72e9 add startingPosition and startingRotation lua property to gameobject 2023-06-04 14:35:33 +08:00
elsid
9012207e32
Make WorldModel a front-end for PtrRegistry 2023-05-31 21:44:27 +02:00
elsid
ce91784085
Move Ptr registry into a separate type
There is no dependency on the rest of the WorldModel state.
2023-05-28 13:04:17 +02:00
elsid
183202cd65
Remove WorldModel::getCellByPosition function
It's used in a single place. Move the code there.
2023-05-27 15:49:36 +02:00
glassmancody.info
06676fd623 lua - fix bounding box in active grid 2023-05-19 14:29:01 -07:00
psi29a
1ce35fa9e7 Merge branch 'lua-bounding-box' into 'master'
Expose game object's bounding box in lua api

See merge request OpenMW/openmw!3009
2023-05-19 09:33:44 +00:00
glassmancody.info
a7b7f99d72 Expose game object's bounding box in lua api 2023-05-18 11:10:10 -07:00
Petr Mikheev
7113638848 Fix animation of teleported non-teleporting doors. 2023-05-13 20:59:55 +02:00
Petr Mikheev
2725a9d7f4 Add option "onGround=true/false" in Lua teleporting 2023-05-13 20:59:55 +02:00
Petr Mikheev
e53f907a53 Set CharacterController::mSmoothedSpeed to zero after teleporting. 2023-05-13 15:26:39 +02:00
Petr Mikheev
86fce41a39 Keep refnum when moving objects to/from inventory (#6148) 2023-05-07 17:19:44 +02:00
Tobias Tribble
43544e7d30 Fixed teleport function to use rotation flags 2023-05-03 18:29:50 -05: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
Zackhasacat
c4246159af Fix gameObject.teleport function, previously would not work with items in inventories 2023-04-27 19:37:38 +00: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
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
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
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
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
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
7ef759c78b Refactor mwlua/eventqueue and extract some code out of LuaManager 2023-03-26 03:38:40 +02:00