This repository was archived by the owner on Jan 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 1
1
#pragma once
2
- #define SMBC_BUILD_VERSION 863
2
+ #define SMBC_BUILD_VERSION 864
Original file line number Diff line number Diff line change @@ -180,20 +180,26 @@ namespace SMBC
180
180
181
181
const PartData* Mod::GetPart (const SMBC::Uuid& uuid)
182
182
{
183
- const ObjectData* current_obj = GetObject (uuid);
184
- if (!current_obj || current_obj->Type () != ObjectType::Part)
183
+ if (Mod::AllObjects.find (uuid) == Mod::AllObjects.end ())
185
184
return nullptr ;
186
185
187
- return static_cast <const PartData*>(current_obj);
186
+ const ObjectData* p_cur_obj = Mod::AllObjects.at (uuid);
187
+ if (p_cur_obj->Type () != ObjectType::Part)
188
+ return nullptr ;
189
+
190
+ return static_cast <const PartData*>(p_cur_obj);
188
191
}
189
192
190
193
const BlockData* Mod::GetBlock (const SMBC::Uuid& uuid)
191
194
{
192
- const ObjectData* current_obj = GetObject (uuid);
193
- if (!current_obj || current_obj->Type () != ObjectType::Block)
195
+ if (Mod::AllObjects.find (uuid) == Mod::AllObjects.end ())
196
+ return nullptr ;
197
+
198
+ const ObjectData* p_cur_obj = Mod::AllObjects.at (uuid);
199
+ if (p_cur_obj->Type () != ObjectType::Block)
194
200
return nullptr ;
195
201
196
- return static_cast <const BlockData*>(current_obj );
202
+ return static_cast <const BlockData*>(p_cur_obj );
197
203
}
198
204
199
205
Mod* Mod::CreateModFromDirectory (const std::wstring& dir)
You can’t perform that action at this time.
0 commit comments