1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:59:57 +00:00
openmw/components/esm3/loadmisc.hpp
2022-06-04 16:34:23 +02:00

46 lines
1.1 KiB
C++

#ifndef OPENMW_ESM_MISC_H
#define OPENMW_ESM_MISC_H
#include <string>
#include "components/esm/defs.hpp"
namespace ESM
{
class ESMReader;
class ESMWriter;
/*
* Misc inventory items, basically things that have no use but can be
* carried, bought and sold. It also includes keys.
*/
struct Miscellaneous
{
constexpr static RecNameInts sRecordId = REC_MISC;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Miscellaneous"; }
struct MCDTstruct
{
float mWeight;
int mValue;
int mIsKey; // There are many keys in Morrowind.esm that has this
// set to 0. TODO: Check what this field corresponds to
// in the editor.
};
MCDTstruct mData;
unsigned int mRecordFlags;
std::string mId, mName, mModel, mIcon, mScript;
void load(ESMReader &esm, bool &isDeleted);
void save(ESMWriter &esm, bool isDeleted = false) const;
void blank();
///< Set record to default state (does not touch the ID).
};
}
#endif