diff --git a/TR5Main/Scripting/GameScriptItemInfo.cpp b/TR5Main/Scripting/GameScriptItemInfo.cpp index 07fc40994..36f531b73 100644 --- a/TR5Main/Scripting/GameScriptItemInfo.cpp +++ b/TR5Main/Scripting/GameScriptItemInfo.cpp @@ -49,13 +49,13 @@ GameScriptItemInfo::~GameScriptItemInfo() { /*** If you create items with this you NEED to give a position, room, and object number, and then call InitialiseItem before it will work. - @function ItemInfo.newItem + @function ItemInfo.new */ /*** Like above, but the returned variable controls the lifetime of the object (it will be destroyed when the variable goes out of scope). - @function ItemInfo.newItemTemporary + @function ItemInfo.newTemporary */ template std::unique_ptr CreateEmpty() { @@ -68,7 +68,7 @@ template std::unique_ptr CreateEmpty() associated getters and setters. If you do not know what to set for these, most can just be set to zero (see usage). See also the overload which takes no arguments. - @function ItemInfo.newItem + @function ItemInfo.new @tparam ObjID object ID @tparam string name Lua name of the item @tparam Position position position in level @@ -88,7 +88,7 @@ takes no arguments. @tparam bool hitStatus hit status of object @return reference to new ItemInfo object @usage - local item = ItemInfo.newItem( + local item = ItemInfo.new( ObjID.PISTOLS_ITEM, -- object id "test", -- name Position.new(18907, 0, 21201), @@ -112,7 +112,7 @@ takes no arguments. /*** Like the above, but the returned variable controls the lifetime of the object (it will be destroyed when the variable goes out of scope). - @function ItemInfo.newItemTemporary + @function ItemInfo.newTemporary @param see_above same as above function */ @@ -166,8 +166,8 @@ template static std::unique_ptr Create( void GameScriptItemInfo::Register(sol::state* state) { state->new_usertype(LUA_CLASS_NAME, - "newItem", sol::overload(Create, CreateEmpty), - "newItemTemporary", sol::overload(Create, CreateEmpty), + "new", sol::overload(Create, CreateEmpty), + "newTemporary", sol::overload(Create, CreateEmpty), sol::meta_function::index, index_error, sol::meta_function::new_index, newindex_error, diff --git a/doc/classes/ItemInfo.html b/doc/classes/ItemInfo.html index 35bf55220..abf8493e2 100644 --- a/doc/classes/ItemInfo.html +++ b/doc/classes/ItemInfo.html @@ -153,23 +153,23 @@ pickups, and Lara herself.

Functions

- + - + - + - + @@ -454,8 +454,8 @@ the WadTool animation editor. Methods
- - ItemInfo.newItem () + + ItemInfo.new ()
If you create items with this you NEED to give a position, room, @@ -469,8 +469,8 @@ and object number, and then call InitialiseItem before it will work.
- - ItemInfo.newItemTemporary () + + ItemInfo.newTemporary ()
Like above, but the returned variable controls the @@ -485,8 +485,8 @@ out of scope).
- - ItemInfo.newItem (object, name, position, rotation, room, currentAnimState, requiredAnimState, goalAnimState, animNumber, frameNumber, hp, OCB, itemFlags, AIBits, status, active, hitStatus) + + ItemInfo.new (object, name, position, rotation, room, currentAnimState, requiredAnimState, goalAnimState, animNumber, frameNumber, hp, OCB, itemFlags, AIBits, status, active, hitStatus)
For more information on each parameter, see the @@ -577,7 +577,7 @@ takes no arguments.

Usage:

    -
    local item = ItemInfo.newItem(
    +        
    local item = ItemInfo.new(
     	ObjID.PISTOLS_ITEM, -- object id
     	"test", -- name
     	Position.new(18907, 0, 21201),
    @@ -600,8 +600,8 @@ takes no arguments.
     
     
- - ItemInfo.newItemTemporary (see_above) + + ItemInfo.newTemporary (see_above)
Like the above, but the returned variable controls the @@ -671,7 +671,7 @@ Use this if you called new with no arguments
generated by LDoc 1.4.6 -Last updated 2021-08-21 00:29:08 +Last updated 2021-08-21 00:32:39
ItemInfo.newItem ()ItemInfo.new () If you create items with this you NEED to give a position, room, and object number, and then call InitialiseItem before it will work.
ItemInfo.newItemTemporary ()ItemInfo.newTemporary () Like above, but the returned variable controls the lifetime of the object (it will be destroyed when the variable goes out of scope).
ItemInfo.newItem (object, name, position, rotation, room, currentAnimState, requiredAnimState, goalAnimState, animNumber, frameNumber, hp, OCB, itemFlags, AIBits, status, active, hitStatus)ItemInfo.new (object, name, position, rotation, room, currentAnimState, requiredAnimState, goalAnimState, animNumber, frameNumber, hp, OCB, itemFlags, AIBits, status, active, hitStatus) For more information on each parameter, see the associated getters and setters.
ItemInfo.newItemTemporary (see_above)ItemInfo.newTemporary (see_above) Like the above, but the returned variable controls the lifetime of the object (it will be destroyed when the variable goes out of scope).