2013-03-22 04:50:54 +00:00
|
|
|
#ifndef OPENMW_ESM_LOCK_H
|
|
|
|
#define OPENMW_ESM_LOCK_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2022-06-04 14:07:59 +00:00
|
|
|
#include "components/esm/defs.hpp"
|
|
|
|
|
2013-03-22 04:50:54 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
2013-03-22 04:50:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
struct Lockpick
|
|
|
|
{
|
|
|
|
constexpr static RecNameInts sRecordId = REC_LOCK;
|
2022-06-04 14:07:59 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
|
|
|
static std::string_view getRecordType() { return "Lockpick"; }
|
2013-09-24 11:17:28 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
struct Data
|
|
|
|
{
|
|
|
|
float mWeight;
|
|
|
|
int mValue;
|
2013-03-22 04:50:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
float mQuality;
|
|
|
|
int mUses;
|
|
|
|
}; // Size = 16
|
2013-03-22 04:50:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
Data mData;
|
|
|
|
unsigned int mRecordFlags;
|
|
|
|
std::string mId, mName, mModel, mIcon, mScript;
|
2013-03-22 04:50:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void load(ESMReader& esm, bool& isDeleted);
|
|
|
|
void save(ESMWriter& esm, bool isDeleted = false) const;
|
2013-05-06 12:10:43 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void blank();
|
|
|
|
///< Set record to default state (does not touch the ID).
|
|
|
|
};
|
2013-03-22 04:50:54 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|