2021-07-28 18:44:24 +01:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
2021-08-09 00:01:40 +01:00
|
|
|
#include "ItemEnumPair.h"
|
2021-08-11 01:23:07 +01:00
|
|
|
#include "GameScriptRotation.h"
|
|
|
|
#include "newinv2.h"
|
|
|
|
|
|
|
|
static const std::unordered_map<std::string, rotflags> kRotAxes{
|
|
|
|
{"X", rotflags::INV_ROT_X},
|
|
|
|
{"Y", rotflags::INV_ROT_Y},
|
|
|
|
{"Z", rotflags::INV_ROT_Z}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const std::unordered_map<std::string, item_options> kItemActions{
|
|
|
|
{"USE", item_options::OPT_USE},
|
|
|
|
{"EQUIP", item_options::OPT_EQUIP},
|
|
|
|
{"EXAMINE", item_options::OPT_EXAMINABLE}
|
|
|
|
};
|
2021-07-28 18:44:24 +01:00
|
|
|
|
|
|
|
namespace sol {
|
|
|
|
class state;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct GameScriptInventoryObject
|
|
|
|
{
|
|
|
|
std::string name;
|
2021-08-09 00:01:40 +01:00
|
|
|
inv_objects slot;
|
2021-07-28 18:44:24 +01:00
|
|
|
float yOffset;
|
|
|
|
float scale;
|
2021-08-11 01:23:07 +01:00
|
|
|
GameScriptRotation rot;
|
|
|
|
rotflags rotationFlags;
|
2021-07-28 18:44:24 +01:00
|
|
|
int meshBits;
|
2021-08-11 01:23:07 +01:00
|
|
|
item_options action;
|
2021-07-28 18:44:24 +01:00
|
|
|
|
2021-08-11 01:23:07 +01:00
|
|
|
GameScriptInventoryObject(std::string const & a_name, ItemEnumPair a_slot, float a_yOffset, float a_scale, GameScriptRotation const & a_rot, rotflags a_rotationFlags, int a_meshBits, item_options a_actions);
|
2021-07-28 18:44:24 +01:00
|
|
|
|
|
|
|
static void Register(sol::state* lua);
|
2021-08-11 01:23:07 +01:00
|
|
|
|
|
|
|
void SetAction(item_options a_action);
|
2021-07-28 18:44:24 +01:00
|
|
|
};
|