Lwmte
d1735d4bbd
Cleanup
2021-09-25 16:00:30 +03:00
Nils
8b336fcf73
Added newlines
2021-09-25 11:27:47 +02:00
Nils
01bf1881b3
Fixed duplicated ITEM_INFO definition
2021-09-24 07:53:42 +02:00
Lwmte
afa0504c6c
Move around some files
2021-09-19 23:41:26 +03:00
Lwmte
7f5dceef0c
Further organizing
2021-09-08 18:31:35 +03:00
hispidence
1cccef16b2
Give documentation comments new tag names. Part 2 of making the documentation better.
2021-08-23 19:16:24 +01:00
hispidence
dda1d7143b
Rename ItemInfo functions newItem and newItemTemporary to new and newTemporary for consistency.
2021-08-23 02:07:17 +01:00
hispidence
73eb96ee39
Add and fix documentation.
2021-08-21 00:29:54 +01:00
hispidence
ce38cae2d7
Fix GetFrameNumber, SetFrameNumber, GetAnimNumber and SetAnimNumber.
2021-08-21 00:25:15 +01:00
hispidence
12d896776a
Give newindex errors to script classes which already have index errors.
2021-08-20 01:41:14 +01:00
hispidence
8cba52f026
Fix assert error message.
2021-08-17 00:30:21 +01:00
hispidence
e7166b05ba
Fix some documentation.
2021-08-12 22:11:50 +01:00
hispidence
3b2775203b
Remove GetLara as the Lara object is easier to use.
...
Add documentation for the Lara object.
2021-08-12 20:14:02 +01:00
hispidence
bd0a681fb0
Fix wrong name in ItemInfo documentation.
2021-08-11 01:21:11 +01:00
hispidence
ea08939509
Fix clusterfuck of a sentence.
2021-08-09 20:01:39 +01:00
hispidence
ead31e63f2
Replace WarningsAsErrors usage with ScriptAssert usage.
...
For recoverable errors, add some recovery behaviour and logging so a level designer can see in the log what was done as a result of the error.
Warn about default behaviour if no callbacks are added.
2021-08-04 16:51:28 +01:00
hispidence
fde79b4704
Replace std::runtime_exception with TENScriptException.
2021-08-03 15:15:42 +01:00
hispidence
1af07aa8b5
Rearrange GameScriptItemInfo a bit.
...
Exchange m_temporary in the move constructor.
Fix documentation to reference ObjID instead of int.
2021-07-23 02:03:31 +01:00
hispidence
3d464becb2
Make GameScriptItemInfo inherit from GameScriptNamedBase and remove functions which now reside there.
2021-07-21 18:16:35 +01:00
hispidence
ffa8791c03
Add concept of 'temporary' ItemInfo instances. These instances will kill the ITEM_INFO they reference when they are destroyed. This was previously the default behaviour. However, now that we're using things like GetItemByName, it makes more sense for ItemInfos to be non-owning by default.
...
Move LDoc from GameScriptItemInfo.h to GameScriptItemInfo.cpp. This might seem counter-intuitive, but LDoc is concerned with the Lua interfaces rather than the actual C++ functions; since the Lua interfaces are defined in GameScriptItemInfo::Register, it makes more sense for the comments to be nearby.
2021-07-20 17:18:39 +01:00
hispidence
f379de7c89
Add m_initialised to GameScriptItemInfo. This is possibly temporary, and controls whether SetRoom calls ItemNewRoom or just sets the room number. This is because ItemNewRoom relies on InitialiseItem having been called, but InitialiseItem requires the roomNumber of the object to be correct.
...
Add and document GetLara.
2021-07-20 00:10:00 +01:00
MontyTRC89
81611e2bdd
Added LUA name insertion on items loading; Fixed item rooms change (use ItemNewRoom);
2021-07-19 05:52:21 +02:00
hispidence
07d9fdae2f
Add SetAnimNumber, GetAnimNumber, SetFrameNumber and GetFrameNumber. Fix SetGoalAnimState call.
2021-07-18 17:37:39 +01:00
hispidence
6e11570e3f
Rename «Current/Goal/Required»Anim to «Current/Goal/Required»AnimState.
2021-07-18 15:29:40 +01:00
hispidence
5c30fdee5d
Implementations for GameScriptItemInfo member functions «Get/Set»ObjectID, «Get/Set»Name, and default implementations for the callbacks.
2021-07-17 23:48:35 +01:00
hispidence
61d5767035
Add and register "name" getter and setter for the string ID of an item.
2021-07-05 18:19:10 +01:00
hispidence
de165aaa04
Merge branch 'NewLuaScripting' of https://github.com/MontyTRC89/TombEngine into NewLuaScripting
2021-07-05 18:14:06 +01:00
MontyTRC89
d85d624609
Merge branch 'NewLuaScripting' of https://github.com/MontyTRC89/TR5Main into NewLuaScripting
...
# Conflicts:
# TR5Main/Game/control.cpp
# TR5Main/Scripting/GameScriptItemInfo.cpp
2021-07-05 16:38:22 +02:00
MontyTRC89
34862c94e7
Added trigger volumes experimental
2021-07-05 16:33:50 +02:00
hispidence
a29326f407
Add an index metafunction that throws an error. This will prevent the end user from accidentally reading a value which does not exist (as happened to me because of a typo).
2021-07-04 14:37:50 +01:00
hispidence
2dd4f546fa
Make SetHP only throw an error if the item represents something intelligent - as it stands, with one of the constructors requiring a HP value, it makes the most sense to just allow HP to be set for a non-intelligent item, as it seems said value is ignored by the engine, anyway.
2021-07-04 14:36:01 +01:00
hispidence
0d082bea8b
GetCurrentAnim -> SetCurrentAnim
2021-07-03 23:14:58 +01:00
hispidence
2def69f79a
Change most Getters and Setters into assignments. Change GameScriptItemInfo to use new PHD_3DPOS -> GameScript[Position/Rotation] constructor. Add value conversions/corrections to Get/SetRot.
2021-07-03 23:14:09 +01:00
hispidence
3b6e0e1b8c
Merge GameScriptInfo into GameScriptItemInfo. Add move constructor. Make functions use item ptr directly.
2021-07-01 19:27:57 +01:00
hispidence
56a305b546
Add CreateEmpty, so that new can be called on the Lua side with no args.
...
Change pos and rot from arrays to GameScript[Position/Rotation].
Add getters and setters for the members used so far.
Add Init, which for now is needed to get an item working properly.
2021-06-30 14:08:12 +01:00
Brad Ellis
434707286c
Add GameScriptItemInfo class.
...
This is the first pass at wrapping an ITEM_INFO in a struct and handing it over to Lua. Many improvements should follow - this is more of a test implementation.
2021-06-28 18:23:26 +01:00