Commit graph

6 commits

Author SHA1 Message Date
hispidence
4342c8c466 Add GameScriptItemInfo::«Set/Get»ObjectID and GameScriptItemInfo::SetNameCallbacks.
Add calls to the callbacks to GameScriptItemInfo::SetName, so that giving a Lua name to an object removes its existing object and any other object currently using the new name, before then putting the name into the map.

Add initial documentation for the Lua-exported parts.
2021-07-17 23:47:07 +01:00
hispidence
988d595955 Add and register "name" getter and setter for the string ID of an item. 2021-07-05 18:19:10 +01:00
hispidence
68f4603c9c Merge GameScriptInfo into GameScriptItemInfo. Add move constructor. Make functions use item ptr directly. 2021-07-01 19:27:57 +01:00
hispidence
d225041048 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
MontyTRC89
a507e9e1be Moved GameScriptPosition, GameScriptRotation and GameScriptColor classes in separate files 2021-06-29 05:28:17 +02:00
hispidence
5a1c6f78ac 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