CommonLibSSE (Parapets fork)
BGSConstructibleObject.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/F/FormTypes.h"
4 #include "RE/T/TESCondition.h"
5 #include "RE/T/TESContainer.h"
6 #include "RE/T/TESForm.h"
7 
8 namespace RE
9 {
11  {
12  public:
13  inline static constexpr auto RTTI = RTTI_BGSConstructibleObject;
14  inline static constexpr auto FORMTYPE = FormType::ConstructibleObject;
15 
16  struct RecordFlags
17  {
18  enum RecordFlag : std::uint32_t
19  {
20  kDeleted = 1 << 5,
21  kIgnored = 1 << 12
22  };
23  };
24 
26  {
27  std::uint16_t numConstructed; // 0 - NAM1
28  };
29  static_assert(sizeof(ConstructibleObjectData) == 0x2);
30 
31  ~BGSConstructibleObject() override; // 00
32 
33  // override (TESForm)
34  void InitializeData() override; // 04
35  void ClearData() override; // 05
36  bool Load(TESFile* a_mod) override; // 06
37  void InitItemImpl() override; // 13
38 
39  [[nodiscard]] bool CanBeCreatedOnWorkbench(const TESFurniture* a_workbench, bool a_checkConditions) const;
40  [[nodiscard]] float CalcSkillUse() const;
41  bool CreateItem() const;
42 
43  // members
46  TESForm* createdItem; // 40 - CNAM
47  BGSKeyword* benchKeyword; // 48 - BNAM
49  std::uint16_t pad52; // 52
50  std::uint32_t unk54; // 54
51  };
52  static_assert(sizeof(BGSConstructibleObject) == 0x58);
53 }
Definition: BGSConstructibleObject.h:11
TESCondition conditions
Definition: BGSConstructibleObject.h:45
static constexpr auto FORMTYPE
Definition: BGSConstructibleObject.h:14
ConstructibleObjectData data
Definition: BGSConstructibleObject.h:48
std::uint16_t pad52
Definition: BGSConstructibleObject.h:49
bool Load(TESFile *a_mod) override
BGSKeyword * benchKeyword
Definition: BGSConstructibleObject.h:47
TESForm * createdItem
Definition: BGSConstructibleObject.h:46
~BGSConstructibleObject() override
bool CanBeCreatedOnWorkbench(const TESFurniture *a_workbench, bool a_checkConditions) const
std::uint32_t unk54
Definition: BGSConstructibleObject.h:50
static constexpr auto RTTI
Definition: BGSConstructibleObject.h:13
void InitializeData() override
TESContainer requiredItems
Definition: BGSConstructibleObject.h:44
void ClearData() override
void InitItemImpl() override
Definition: BGSKeyword.h:10
Definition: TESCondition.h:989
Definition: TESContainer.h:22
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESFurniture.h:11
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BGSConstructibleObject
Definition: Offsets_RTTI.h:1277
Definition: BGSConstructibleObject.h:26
std::uint16_t numConstructed
Definition: BGSConstructibleObject.h:27
Definition: BGSConstructibleObject.h:17
RecordFlag
Definition: BGSConstructibleObject.h:19
@ kIgnored
Definition: BGSConstructibleObject.h:21
@ kDeleted
Definition: BGSConstructibleObject.h:20