From 9ec88fa5211631009cc4fe0e3dca61b5816b8dd4 Mon Sep 17 00:00:00 2001 From: William JCM Date: Mon, 21 Nov 2022 18:00:38 +0100 Subject: [PATCH] Mass: QoL changes. Now property names are behind defines, so if a name changes, I don't have to hunt it down in up to six source files. --- src/CMakeLists.txt | 1 + src/Mass/Mass.cpp | 19 ++--- src/Mass/Mass_Armour.cpp | 75 ++++++++++---------- src/Mass/Mass_DecalsAccessories.cpp | 73 +++++++++---------- src/Mass/Mass_Frame.cpp | 89 ++++++++++++------------ src/Mass/Mass_Styles.cpp | 50 ++++++------- src/Mass/Mass_Weapons.cpp | 80 ++++++++++----------- src/Mass/PropertyNames.h | 104 ++++++++++++++++++++++++++++ 8 files changed, 301 insertions(+), 190 deletions(-) create mode 100644 src/Mass/PropertyNames.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6487079..902f8e5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -159,6 +159,7 @@ add_executable(MassBuilderSaveTool WIN32 Mass/Mass_Weapons.cpp Mass/Mass_Styles.cpp Mass/Mass_DecalsAccessories.cpp + Mass/PropertyNames.h Mass/Weapon.h Mass/Weapon.cpp Mass/WeaponPart.h diff --git a/src/Mass/Mass.cpp b/src/Mass/Mass.cpp index c9e1b42..fbbd209 100644 --- a/src/Mass/Mass.cpp +++ b/src/Mass/Mass.cpp @@ -21,6 +21,7 @@ #include #include +#include "PropertyNames.h" #include "../UESaveFile/Types/ArrayProperty.h" #include "../UESaveFile/Types/BoolProperty.h" #include "../UESaveFile/Types/ColourStructProperty.h" @@ -57,14 +58,14 @@ auto Mass::getNameFromFile(Containers::StringView path) -> Containers::Optional< return Containers::NullOpt; } - auto unit_data = mass.at("UnitData"_s); + auto unit_data = mass.at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Couldn't find unit data in the file."_s; return Containers::NullOpt; } - auto name_prop = unit_data->at("Name_45_A037C5D54E53456407BDF091344529BB"_s); + auto name_prop = unit_data->at(MASS_NAME); if(!name_prop) { Utility::Error{} << "Couldn't find the name in the file."_s; @@ -105,14 +106,14 @@ void Mass::refreshValues() { Utility::Error{} << _filename << "is not a valid unit save."; } - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Couldn't find unit data in" << _filename; _state = State::Invalid; return; } - auto name_prop = unit_data->at("Name_45_A037C5D54E53456407BDF091344529BB"_s); + auto name_prop = unit_data->at(MASS_NAME); if(!name_prop) { Utility::Error{} << "Couldn't find a M.A.S.S. name in" << _filename; @@ -261,17 +262,19 @@ void Mass::setDirty(bool dirty) { } void Mass::getTuning() { - getTuningCategory("Engine"_s, _tuning.engineId, "Gears"_s, _tuning.gearIds); + getTuningCategory(MASS_ENGINE, _tuning.engineId, + MASS_GEARS, _tuning.gearIds); if(_state == State::Invalid) { return; } - getTuningCategory("OS"_s, _tuning.osId, "Modules"_s, _tuning.moduleIds); + getTuningCategory(MASS_OS, _tuning.osId, + MASS_MODULES, _tuning.moduleIds); if(_state == State::Invalid) { return; } - getTuningCategory("Architect"_s, _tuning.archId, "Techs"_s, _tuning.techIds); + getTuningCategory(MASS_ARCHITECT, _tuning.archId, if(_state == State::Invalid) { return; } @@ -308,7 +311,7 @@ auto Mass::account() -> Containers::StringView { auto Mass::updateAccount(Containers::StringView new_account) -> bool { _account = new_account; - auto account = _mass->at("Account"_s); + auto account = _mass->at(MASS_ACCOUNT); if(!account) { _state = State::Invalid; _lastError = "Couldn't find the account property."_s; diff --git a/src/Mass/Mass_Armour.cpp b/src/Mass/Mass_Armour.cpp index e80a727..d370b80 100644 --- a/src/Mass/Mass_Armour.cpp +++ b/src/Mass/Mass_Armour.cpp @@ -16,6 +16,7 @@ #include +#include "PropertyNames.h" #include "../UESaveFile/Types/ArrayProperty.h" #include "../UESaveFile/Types/ByteProperty.h" #include "../UESaveFile/Types/GenericStructProperty.h" @@ -32,14 +33,14 @@ auto Mass::armourParts() -> Containers::ArrayView { } void Mass::getArmourParts() { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Couldn't find unit data in" << _filename; _state = State::Invalid; return; } - auto armour_array = unit_data->at("Armor_10_12E266C44116DDAF57E99ABB575A4B3C"_s); + auto armour_array = unit_data->at(MASS_ARMOUR_PARTS); if(!armour_array) { Utility::Error{} << "Couldn't find the armour parts array in" << _filename; _state = State::Invalid; @@ -56,7 +57,7 @@ void Mass::getArmourParts() { auto part_prop = armour_array->at(i); auto& part = _armour.parts[i]; - auto& armour_slot = part_prop->at("Slot_3_408BA56F4C9605C7E805CF91B642249C"_s)->enumValue; + auto& armour_slot = part_prop->at(MASS_ARMOUR_SLOT)->enumValue; #define c(enumerator, strenum, name) if(armour_slot == (strenum)) { part.slot = ArmourSlot::enumerator; } else #include "../Maps/ArmourSlots.hpp" #undef c @@ -65,9 +66,9 @@ void Mass::getArmourParts() { Utility::Warning{} << "Invalid armour slot enum value in getArmourParts()."_s; } - part.id = part_prop->at("ID_5_ACD101864D3481DE96EDACACC09BDD25"_s)->value; + part.id = part_prop->at(MASS_ARMOUR_ID)->value; - auto part_styles = part_prop->at("Styles_47_3E31870441DFD7DB8BEE5C85C26B365B"_s); + auto part_styles = part_prop->at(MASS_ARMOUR_STYLES); if(!part_styles) { Utility::Error{} << "Part styles not found for part number" << i << "in" << _filename; _state = State::Invalid; @@ -84,7 +85,7 @@ void Mass::getArmourParts() { part.styles[j] = part_styles->at(j)->value; } - auto decals_array = part_prop->at("Decals_42_F358794A4F18497970F56BA9627D3603"_s); + auto decals_array = part_prop->at(MASS_ARMOUR_DECALS); if(!decals_array) { Utility::Error{} << "Part decals not found for part number" << i << "in" << _filename; _state = State::Invalid; @@ -95,7 +96,7 @@ void Mass::getArmourParts() { getDecals(part.decals, decals_array); - auto accs_array = part_prop->at("Accessories_52_D902DD4241FA0050C2529596255153F3"_s); + auto accs_array = part_prop->at(MASS_ARMOUR_ACCESSORIES); if(!accs_array) { Utility::Error{} << "Part accessories not found for part number" << i << "in" << _filename; part.accessories = Containers::Array{}; @@ -113,9 +114,9 @@ void Mass::getArmourParts() { auto Mass::writeArmourPart(ArmourSlot slot) -> bool { auto& part = *std::find_if(_armour.parts.begin(), _armour.parts.end(), [&slot](const ArmourPart& part){ return slot == part.slot; }); - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); - auto armour_array = unit_data->at("Armor_10_12E266C44116DDAF57E99ABB575A4B3C"_s); + auto armour_array = unit_data->at(MASS_ARMOUR_PARTS); Containers::StringView slot_str = nullptr; switch(slot) { @@ -130,7 +131,7 @@ auto Mass::writeArmourPart(ArmourSlot slot) -> bool { for(UnsignedInt i = 0; i < armour_array->items.size(); i++) { part_prop = armour_array->at(i); - if(slot_str == part_prop->at("Slot_3_408BA56F4C9605C7E805CF91B642249C"_s)->enumValue) { + if(slot_str == part_prop->at(MASS_ARMOUR_SLOT)->enumValue) { break; } else { @@ -150,18 +151,18 @@ auto Mass::writeArmourPart(ArmourSlot slot) -> bool { return false; } - part_prop->at("ID_5_ACD101864D3481DE96EDACACC09BDD25"_s)->value = part.id; + part_prop->at(MASS_ARMOUR_ID)->value = part.id; - auto part_styles = part_prop->at("Styles_47_3E31870441DFD7DB8BEE5C85C26B365B"_s); + auto part_styles = part_prop->at(MASS_ARMOUR_STYLES); for(UnsignedInt i = 0; i < part.styles.size(); i++) { part_styles->at(i)->value = part.styles[i]; } - auto decals_array = part_prop->at("Decals_42_F358794A4F18497970F56BA9627D3603"_s); + auto decals_array = part_prop->at(MASS_ARMOUR_DECALS); writeDecals(part.decals, decals_array); if(part.accessories.size() != 0) { - auto accs_array = part_prop->at("Accessories_52_D902DD4241FA0050C2529596255153F3"_s); + auto accs_array = part_prop->at(MASS_ARMOUR_ACCESSORIES); writeAccessories(part.accessories, accs_array); } @@ -182,15 +183,15 @@ auto Mass::bulletLauncherAttachments() -> Containers::ArrayViewat("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Couldn't find unit data in" << _filename; _state = State::Invalid; return; } - auto attach_style_prop = unit_data->at("WeaponBLAttachmentStyle_65_5943FCE8406F18D2C3F69285EB23A699"_s); - auto attach_array = unit_data->at("WeaponBLAttachment_61_442D08F547510A4CEE1501BBAF297BA0"_s); + auto attach_style_prop = unit_data->at(MASS_BL_ATTACHMENT_STYLE); + auto attach_array = unit_data->at(MASS_BL_ATTACHMENTS); if(!attach_style_prop && !attach_array) { _armour.blAttachmentStyle = BulletLauncherAttachmentStyle::NotFound; @@ -211,7 +212,7 @@ void Mass::getBulletLauncherAttachments() { auto attachment_prop = attach_array->at(i); auto& attachment = _armour.blAttachment[i]; - Containers::StringView socket = attachment_prop->at("Socket_9_B9DBF30D4A1F0032A2BE2F8B342B35A9"_s)->value; + Containers::StringView socket = attachment_prop->at(MASS_BL_ATTACHMENT_SOCKET)->value; #define c(enumerator, strenum, name) if(socket == (strenum)) { attachment.socket = BulletLauncherSocket::enumerator; } else #include "../Maps/BulletLauncherSockets.hpp" #undef c @@ -221,15 +222,15 @@ void Mass::getBulletLauncherAttachments() { return; } - auto rel_loc_prop = attachment_prop->at("RelativeLocation_10_2F6E75DF4C40622658340E9A22D38B02"_s); + auto rel_loc_prop = attachment_prop->at(MASS_BL_ATTACHMENT_RELLOC); attachment.relativeLocation = Vector3{rel_loc_prop->x, rel_loc_prop->y, rel_loc_prop->z}; - auto off_loc_prop = attachment_prop->at("OffsetLocation_11_F42B3DA3436948FF85752DB33722382F"_s); + auto off_loc_prop = attachment_prop->at(MASS_BL_ATTACHMENT_OFFLOC); attachment.offsetLocation = Vector3{off_loc_prop->x, off_loc_prop->y, off_loc_prop->z}; - auto rel_rot_prop = attachment_prop->at("RelativeRotation_12_578140464621245132CFF2A2AD85E735"_s); + auto rel_rot_prop = attachment_prop->at(MASS_BL_ATTACHMENT_RELROT); attachment.relativeRotation = Vector3{rel_rot_prop->x, rel_rot_prop->y, rel_rot_prop->z}; - auto off_rot_prop = attachment_prop->at("OffsetRotation_13_B5980BCD47905D842D1490A1A520B064"_s); + auto off_rot_prop = attachment_prop->at(MASS_BL_ATTACHMENT_OFFROT); attachment.offsetRotation = Vector3{off_rot_prop->x, off_rot_prop->y, off_rot_prop->z}; - auto rel_scale_prop = attachment_prop->at("RelativeScale_16_37BC80EF42699F79533F7AA7B3094E38"_s); + auto rel_scale_prop = attachment_prop->at(MASS_BL_ATTACHMENT_RELSCALE); attachment.relativeScale = Vector3{rel_scale_prop->x, rel_scale_prop->y, rel_scale_prop->z}; } } @@ -249,15 +250,15 @@ void Mass::getBulletLauncherAttachments() { } auto Mass::writeBulletLauncherAttachments() -> bool { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { _state = State::Invalid; _lastError = "No unit data in " + _filename; return false; } - auto attach_style_prop = unit_data->at("WeaponBLAttachmentStyle_65_5943FCE8406F18D2C3F69285EB23A699"_s); - auto attach_array = unit_data->at("WeaponBLAttachment_61_442D08F547510A4CEE1501BBAF297BA0"_s); + auto attach_style_prop = unit_data->at(MASS_BL_ATTACHMENT_STYLE); + auto attach_array = unit_data->at(MASS_BL_ATTACHMENTS); if(!attach_style_prop && !attach_array) { _armour.blAttachmentStyle = BulletLauncherAttachmentStyle::NotFound; @@ -279,7 +280,7 @@ auto Mass::writeBulletLauncherAttachments() -> bool { auto attachment_prop = attach_array->at(i); auto& attachment = _armour.blAttachment[i]; - auto& socket = attachment_prop->at("Socket_9_B9DBF30D4A1F0032A2BE2F8B342B35A9"_s)->value; + auto& socket = attachment_prop->at(MASS_BL_ATTACHMENT_SOCKET)->value; switch(attachment.socket) { #define c(enumerator, strenum, name) case BulletLauncherSocket::enumerator: socket = strenum; break; #include "../Maps/BulletLauncherSockets.hpp" @@ -289,23 +290,23 @@ auto Mass::writeBulletLauncherAttachments() -> bool { return false; } - auto rel_loc_prop = attachment_prop->at("RelativeLocation_10_2F6E75DF4C40622658340E9A22D38B02"_s); + auto rel_loc_prop = attachment_prop->at(MASS_BL_ATTACHMENT_RELLOC); rel_loc_prop->x = attachment.relativeLocation.x(); rel_loc_prop->y = attachment.relativeLocation.y(); rel_loc_prop->z = attachment.relativeLocation.z(); - auto off_loc_prop = attachment_prop->at("OffsetLocation_11_F42B3DA3436948FF85752DB33722382F"_s); + auto off_loc_prop = attachment_prop->at(MASS_BL_ATTACHMENT_OFFLOC); off_loc_prop->x = attachment.offsetLocation.x(); off_loc_prop->y = attachment.offsetLocation.y(); off_loc_prop->z = attachment.offsetLocation.z(); - auto rel_rot_prop = attachment_prop->at("RelativeRotation_12_578140464621245132CFF2A2AD85E735"_s); + auto rel_rot_prop = attachment_prop->at(MASS_BL_ATTACHMENT_RELROT); rel_rot_prop->x = attachment.relativeRotation.x(); rel_rot_prop->y = attachment.relativeRotation.y(); rel_rot_prop->z = attachment.relativeRotation.z(); - auto off_rot_prop = attachment_prop->at("OffsetRotation_13_B5980BCD47905D842D1490A1A520B064"_s); + auto off_rot_prop = attachment_prop->at(MASS_BL_ATTACHMENT_OFFROT); off_rot_prop->x = attachment.offsetRotation.x(); off_rot_prop->y = attachment.offsetRotation.y(); off_rot_prop->z = attachment.offsetRotation.z(); - auto rel_scale_prop = attachment_prop->at("RelativeScale_16_37BC80EF42699F79533F7AA7B3094E38"_s); + auto rel_scale_prop = attachment_prop->at(MASS_BL_ATTACHMENT_RELSCALE); rel_scale_prop->x = attachment.relativeScale.x(); rel_scale_prop->y = attachment.relativeScale.y(); rel_scale_prop->z = attachment.relativeScale.z(); @@ -314,7 +315,7 @@ auto Mass::writeBulletLauncherAttachments() -> bool { if(!attach_style_prop) { attach_style_prop = new ByteProperty; - attach_style_prop->name.emplace("WeaponBLAttachmentStyle_65_5943FCE8406F18D2C3F69285EB23A699"_s); + attach_style_prop->name.emplace(MASS_BL_ATTACHMENT_STYLE); attach_style_prop->enumType = "enuBLAttachmentStyle"_s; ByteProperty::ptr prop{attach_style_prop}; arrayAppend(unit_data->properties, std::move(prop)); @@ -345,14 +346,14 @@ auto Mass::armourCustomStyles() -> Containers::ArrayView { } void Mass::getArmourCustomStyles() { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Couldn't find unit data in" << _filename; _state = State::Invalid; return; } - auto armour_styles = unit_data->at("ArmorStyle_42_E2F6AC3647788CB366BD469B3B7E899E"_s); + auto armour_styles = unit_data->at(MASS_CUSTOM_ARMOUR_STYLES); if(!armour_styles) { Utility::Error{} << "Couldn't find custom armour styles in" << _filename; _state = State::Invalid; @@ -374,14 +375,14 @@ auto Mass::writeArmourCustomStyle(UnsignedLong index) -> bool { return false; } - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { _state = State::Invalid; _lastError = "Couldn't find unit data in "_s + _filename; return false; } - auto armour_styles = unit_data->at("ArmorStyle_42_E2F6AC3647788CB366BD469B3B7E899E"_s); + auto armour_styles = unit_data->at(MASS_CUSTOM_ARMOUR_STYLES); if(!armour_styles) { _lastError = "Couldn't find armour custom styles in "_s + _filename; _state = State::Invalid; diff --git a/src/Mass/Mass_DecalsAccessories.cpp b/src/Mass/Mass_DecalsAccessories.cpp index 6f795c7..acb987f 100644 --- a/src/Mass/Mass_DecalsAccessories.cpp +++ b/src/Mass/Mass_DecalsAccessories.cpp @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include "PropertyNames.h" #include "../UESaveFile/Types/ArrayProperty.h" #include "../UESaveFile/Types/BoolProperty.h" #include "../UESaveFile/Types/ColourStructProperty.h" @@ -34,21 +35,21 @@ void Mass::getDecals(Containers::ArrayView decals, ArrayProperty* decal_a CORRADE_INTERNAL_ASSERT(decal_prop); auto& decal = decals[i]; - decal.id = decal_prop->at("ID_3_694C0B35404D8A3168AEC89026BC8CF9"_s)->value; - auto colour_prop = decal_prop->at("Color_8_1B0B9D2B43DA6AAB9FA549B374D3E606"_s); + decal.id = decal_prop->at(MASS_DECAL_ID)->value; + auto colour_prop = decal_prop->at(MASS_DECAL_COLOUR); decal.colour = Color4{colour_prop->r, colour_prop->g, colour_prop->b, colour_prop->a}; - auto pos_prop = decal_prop->at("Position_41_022C8FE84E1AAFE587261E88F2C72250"_s); + auto pos_prop = decal_prop->at(MASS_DECAL_POSITION); decal.position = Vector3{pos_prop->x, pos_prop->y, pos_prop->z}; - auto u_prop = decal_prop->at("UAxis_37_EBEB715F45491AECACCC07A1AE4646D1"_s); + auto u_prop = decal_prop->at(MASS_DECAL_UAXIS); decal.uAxis = Vector3{u_prop->x, u_prop->y, u_prop->z}; - auto v_prop = decal_prop->at("VAxis_39_C31EB2664EE202CAECFBBB84100B5E35"_s); + auto v_prop = decal_prop->at(MASS_DECAL_VAXIS); decal.vAxis = Vector3{v_prop->x, v_prop->y, v_prop->z}; - auto offset_prop = decal_prop->at("Offset_29_B02BBBB74FC60F5EDBEBAB8020738020"_s); + auto offset_prop = decal_prop->at(MASS_DECAL_OFFSET); decal.offset = Vector2{offset_prop->x, offset_prop->y}; - decal.scale = decal_prop->at("Scale_32_959D1C2747AFD8D62808468235CBBA40"_s)->value; - decal.rotation = decal_prop->at("Rotation_27_12D7C314493D203D5C2326A03C5F910F"_s)->value; - decal.flip = decal_prop->at("Flip_35_CECCFB184CCD9412BD93FE9A8B656BE1"_s)->value; - decal.wrap = decal_prop->at("Wrap_43_A7C68CDF4A92AF2ECDA53F953EE7CA62"_s)->value; + decal.scale = decal_prop->at(MASS_DECAL_SCALE)->value; + decal.rotation = decal_prop->at(MASS_DECAL_ROTATION)->value; + decal.flip = decal_prop->at(MASS_DECAL_FLIP)->value; + decal.wrap = decal_prop->at(MASS_DECAL_WRAP)->value; } } @@ -58,31 +59,31 @@ void Mass::writeDecals(Containers::ArrayView decals, ArrayProperty* decal CORRADE_INTERNAL_ASSERT(decal_prop); auto& decal = decals[i]; - decal_prop->at("ID_3_694C0B35404D8A3168AEC89026BC8CF9"_s)->value = decal.id; - auto colour_prop = decal_prop->at("Color_8_1B0B9D2B43DA6AAB9FA549B374D3E606"_s); + decal_prop->at(MASS_DECAL_ID)->value = decal.id; + auto colour_prop = decal_prop->at(MASS_DECAL_COLOUR); colour_prop->r = decal.colour.r(); colour_prop->g = decal.colour.g(); colour_prop->b = decal.colour.b(); colour_prop->a = decal.colour.a(); - auto pos_prop = decal_prop->at("Position_41_022C8FE84E1AAFE587261E88F2C72250"_s); + auto pos_prop = decal_prop->at(MASS_DECAL_POSITION); pos_prop->x = decal.position.x(); pos_prop->y = decal.position.y(); pos_prop->z = decal.position.z(); - auto u_prop = decal_prop->at("UAxis_37_EBEB715F45491AECACCC07A1AE4646D1"_s); + auto u_prop = decal_prop->at(MASS_DECAL_UAXIS); u_prop->x = decal.uAxis.x(); u_prop->y = decal.uAxis.y(); u_prop->z = decal.uAxis.z(); - auto v_prop = decal_prop->at("VAxis_39_C31EB2664EE202CAECFBBB84100B5E35"_s); + auto v_prop = decal_prop->at(MASS_DECAL_VAXIS); v_prop->x = decal.vAxis.x(); v_prop->y = decal.vAxis.y(); v_prop->z = decal.vAxis.z(); - auto offset_prop = decal_prop->at("Offset_29_B02BBBB74FC60F5EDBEBAB8020738020"_s); + auto offset_prop = decal_prop->at(MASS_DECAL_OFFSET); offset_prop->x = decal.offset.x(); offset_prop->y = decal.offset.y(); - decal_prop->at("Scale_32_959D1C2747AFD8D62808468235CBBA40"_s)->value = decal.scale; - decal_prop->at("Rotation_27_12D7C314493D203D5C2326A03C5F910F"_s)->value = decal.rotation; - decal_prop->at("Flip_35_CECCFB184CCD9412BD93FE9A8B656BE1"_s)->value = decal.flip; - decal_prop->at("Wrap_43_A7C68CDF4A92AF2ECDA53F953EE7CA62"_s)->value = decal.wrap; + decal_prop->at(MASS_DECAL_SCALE)->value = decal.scale; + decal_prop->at(MASS_DECAL_ROTATION)->value = decal.rotation; + decal_prop->at(MASS_DECAL_FLIP)->value = decal.flip; + decal_prop->at(MASS_DECAL_WRAP)->value = decal.wrap; } } @@ -92,21 +93,21 @@ void Mass::getAccessories(Containers::ArrayView accessories, ArrayPro CORRADE_INTERNAL_ASSERT(acc_prop); auto& accessory = accessories[i]; - accessory.attachIndex = acc_prop->at("AttachIndex_2_4AFCF6024E4BA7426C6B9F80B8179D20"_s)->value; - accessory.id = acc_prop->at("ID_4_5757B32647BAE263266259B8A7DFFFC1"_s)->value; - auto acc_styles = acc_prop->at("Styles_7_91DEB0F24E24D13FC9472882C11D0DFD"_s); + accessory.attachIndex = acc_prop->at(MASS_ACCESSORY_ATTACH_INDEX)->value; + accessory.id = acc_prop->at(MASS_ACCESSORY_ID)->value; + auto acc_styles = acc_prop->at(MASS_ACCESSORY_STYLES); for(UnsignedInt j = 0; j < acc_styles->items.size(); j++) { accessory.styles[j] = acc_styles->at(j)->value; } - auto rel_pos_prop = acc_prop->at("RelativePosition_14_BE8FB2A94074F34B3EDA6683B227D3A1"_s); + auto rel_pos_prop = acc_prop->at(MASS_ACCESSORY_RELPOS); accessory.relativePosition = Vector3{rel_pos_prop->x, rel_pos_prop->y, rel_pos_prop->z}; - auto rel_pos_offset_prop = acc_prop->at("RelativePositionOffset_15_98FD0CE74E44BBAFC2D46FB4CA4E0ED6"_s); + auto rel_pos_offset_prop = acc_prop->at(MASS_ACCESSORY_OFFPOS); accessory.relativePositionOffset = Vector3{rel_pos_offset_prop->x, rel_pos_offset_prop->y, rel_pos_offset_prop->z}; - auto rel_rot_prop = acc_prop->at("RelativeRotation_20_C78C73274E6E78E7878F8C98ECA342C0"_s); + auto rel_rot_prop = acc_prop->at(MASS_ACCESSORY_RELROT); accessory.relativeRotation = Vector3{rel_rot_prop->x, rel_rot_prop->y, rel_rot_prop->z}; - auto rel_rot_offset_prop = acc_prop->at("RelativeRotationOffset_21_E07FA0EC46728B7BA763C6861249ABAA"_s); + auto rel_rot_offset_prop = acc_prop->at(MASS_ACCESSORY_OFFROT); accessory.relativeRotationOffset = Vector3{rel_rot_offset_prop->x, rel_rot_offset_prop->y, rel_rot_offset_prop->z}; - auto local_scale_prop = acc_prop->at("LocalScale_24_DC2D93A742A41A46E7E61D988F15ED53"_s); + auto local_scale_prop = acc_prop->at(MASS_ACCESSORY_SCALE); accessory.localScale = Vector3{local_scale_prop->x, local_scale_prop->y, local_scale_prop->z}; } } @@ -117,29 +118,29 @@ void Mass::writeAccessories(Containers::ArrayView accessories, ArrayP CORRADE_INTERNAL_ASSERT(acc_prop); auto& accessory = accessories[i]; - acc_prop->at("AttachIndex_2_4AFCF6024E4BA7426C6B9F80B8179D20"_s)->value = accessory.attachIndex; - acc_prop->at("ID_4_5757B32647BAE263266259B8A7DFFFC1"_s)->value = accessory.id; - auto acc_styles = acc_prop->at("Styles_7_91DEB0F24E24D13FC9472882C11D0DFD"_s); + acc_prop->at(MASS_ACCESSORY_ATTACH_INDEX)->value = accessory.attachIndex; + acc_prop->at(MASS_ACCESSORY_ID)->value = accessory.id; + auto acc_styles = acc_prop->at(MASS_ACCESSORY_STYLES); for(UnsignedInt j = 0; j < acc_styles->items.size(); j++) { acc_styles->at(j)->value = accessory.styles[j]; } - auto rel_pos_prop = acc_prop->at("RelativePosition_14_BE8FB2A94074F34B3EDA6683B227D3A1"_s); + auto rel_pos_prop = acc_prop->at(MASS_ACCESSORY_RELPOS); rel_pos_prop->x = accessory.relativePosition.x(); rel_pos_prop->y = accessory.relativePosition.y(); rel_pos_prop->z = accessory.relativePosition.z(); - auto rel_pos_offset_prop = acc_prop->at("RelativePositionOffset_15_98FD0CE74E44BBAFC2D46FB4CA4E0ED6"_s); + auto rel_pos_offset_prop = acc_prop->at(MASS_ACCESSORY_OFFPOS); rel_pos_offset_prop->x = accessory.relativePositionOffset.x(); rel_pos_offset_prop->y = accessory.relativePositionOffset.y(); rel_pos_offset_prop->z = accessory.relativePositionOffset.z(); - auto rel_rot_prop = acc_prop->at("RelativeRotation_20_C78C73274E6E78E7878F8C98ECA342C0"_s); + auto rel_rot_prop = acc_prop->at(MASS_ACCESSORY_RELROT); rel_rot_prop->x = accessory.relativeRotation.x(); rel_rot_prop->y = accessory.relativeRotation.y(); rel_rot_prop->z = accessory.relativeRotation.z(); - auto rel_rot_offset_prop = acc_prop->at("RelativeRotationOffset_21_E07FA0EC46728B7BA763C6861249ABAA"_s); + auto rel_rot_offset_prop = acc_prop->at(MASS_ACCESSORY_OFFROT); rel_rot_offset_prop->x = accessory.relativeRotationOffset.x(); rel_rot_offset_prop->y = accessory.relativeRotationOffset.y(); rel_rot_offset_prop->z = accessory.relativeRotationOffset.z(); - auto local_scale_prop = acc_prop->at("LocalScale_24_DC2D93A742A41A46E7E61D988F15ED53"_s); + auto local_scale_prop = acc_prop->at(MASS_ACCESSORY_SCALE); local_scale_prop->x = accessory.localScale.x(); local_scale_prop->y = accessory.localScale.y(); local_scale_prop->z = accessory.localScale.z(); diff --git a/src/Mass/Mass_Frame.cpp b/src/Mass/Mass_Frame.cpp index 44f45f3..91f2058 100644 --- a/src/Mass/Mass_Frame.cpp +++ b/src/Mass/Mass_Frame.cpp @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include "PropertyNames.h" #include "../UESaveFile/Types/ArrayProperty.h" #include "../UESaveFile/Types/ColourStructProperty.h" #include "../UESaveFile/Types/FloatProperty.h" @@ -29,48 +30,48 @@ auto Mass::jointSliders() -> Joints& { } void Mass::getJointSliders() { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Can't find unit data in" << _filename; _state = State::Invalid; return; } - auto frame_prop = unit_data->at("Frame_3_F92B0F6A44A15088AF7F41B9FF290653"_s); + auto frame_prop = unit_data->at(MASS_FRAME); if(!frame_prop) { Utility::Error{} << "Can't find frame data in" << _filename; _state = State::Invalid; return; } - auto length = frame_prop->at("NeckLength_6_ED6AF79849C27CD1A9D523A09E2BFE58"_s); + auto length = frame_prop->at(MASS_JOINT_NECK); _frame.joints.neck = (length ? length->value : 0.0f); - length = frame_prop->at("BodyLength_7_C16287754CBA96C93BAE36A5C154996A"_s); + length = frame_prop->at(MASS_JOINT_BODY); _frame.joints.body = (length ? length->value : 0.0f); - length = frame_prop->at("ShoulderLength_8_220EDF304F1C1226F0D8D39117FB3883"_s); + length = frame_prop->at(MASS_JOINT_SHOULDER); _frame.joints.shoulders = (length ? length->value : 0.0f); - length = frame_prop->at("HipLength_14_02AEEEAC4376087B9C51F0AA7CC92818"_s); + length = frame_prop->at(MASS_JOINT_HIP); _frame.joints.hips = (length ? length->value : 0.0f); - length = frame_prop->at("ArmUpperLength_10_249FDA3E4F3B399E7B9E5C9B7C765EAE"_s); + length = frame_prop->at(MASS_JOINT_ARM_UPPER); _frame.joints.upperArms = (length ? length->value : 0.0f); - length = frame_prop->at("ArmLowerLength_12_ACD0F02745C28882619376926292FB36"_s); + length = frame_prop->at(MASS_JOINT_ARM_LOWER); _frame.joints.lowerArms = (length ? length->value : 0.0f); - length = frame_prop->at("LegUpperLength_16_A7C4C71249A3776F7A543D96819C0C61"_s); + length = frame_prop->at(MASS_JOINT_LEG_UPPER); _frame.joints.upperLegs = (length ? length->value : 0.0f); - length = frame_prop->at("LegLowerLength_18_D2DF39964EA0F2A2129D0491B08A032F"_s); + length = frame_prop->at(MASS_JOINT_LEG_LOWER); _frame.joints.lowerLegs = (length ? length->value : 0.0f); } auto Mass::writeJointSliders() -> bool { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { _state = State::Invalid; _lastError = "No unit data in "_s + _filename; return false; } - auto frame_prop = unit_data->at("Frame_3_F92B0F6A44A15088AF7F41B9FF290653"_s); + auto frame_prop = unit_data->at(MASS_FRAME); if(!frame_prop) { _state = State::Invalid; @@ -80,81 +81,81 @@ auto Mass::writeJointSliders() -> bool { Containers::Array temp; - auto length = frame_prop->atMove("NeckLength_6_ED6AF79849C27CD1A9D523A09E2BFE58"_s); + auto length = frame_prop->atMove(MASS_JOINT_NECK); if(_frame.joints.neck != 0.0f) { if(!length) { length.emplace(); - length->name.emplace("NeckLength_6_ED6AF79849C27CD1A9D523A09E2BFE58"_s); + length->name.emplace(MASS_JOINT_NECK); } length->value = _frame.joints.neck; arrayAppend(temp, std::move(length)); } - length = frame_prop->atMove("BodyLength_7_C16287754CBA96C93BAE36A5C154996A"_s); + length = frame_prop->atMove(MASS_JOINT_BODY); if(_frame.joints.body != 0.0f) { if(!length) { length.emplace(); - length->name.emplace("BodyLength_7_C16287754CBA96C93BAE36A5C154996A"_s); + length->name.emplace(MASS_JOINT_BODY); } length->value = _frame.joints.body; arrayAppend(temp, std::move(length)); } - length = frame_prop->atMove("ShoulderLength_8_220EDF304F1C1226F0D8D39117FB3883"_s); + length = frame_prop->atMove(MASS_JOINT_SHOULDER); if(_frame.joints.shoulders != 0.0f) { if(!length) { length.emplace(); - length->name.emplace("ShoulderLength_8_220EDF304F1C1226F0D8D39117FB3883"_s); + length->name.emplace(MASS_JOINT_SHOULDER); } length->value = _frame.joints.shoulders; arrayAppend(temp, std::move(length)); } - length = frame_prop->atMove("ArmUpperLength_10_249FDA3E4F3B399E7B9E5C9B7C765EAE"_s); + length = frame_prop->atMove(MASS_JOINT_ARM_UPPER); if(_frame.joints.upperArms != 0.0f) { if(!length) { length.emplace(); - length->name.emplace("ArmUpperLength_10_249FDA3E4F3B399E7B9E5C9B7C765EAE"_s); + length->name.emplace(MASS_JOINT_ARM_UPPER); } length->value = _frame.joints.upperArms; arrayAppend(temp, std::move(length)); } - length = frame_prop->atMove("ArmLowerLength_12_ACD0F02745C28882619376926292FB36"_s); + length = frame_prop->atMove(MASS_JOINT_ARM_LOWER); if(_frame.joints.lowerArms != 0.0f) { if(!length) { length.emplace(); - length->name.emplace("ArmLowerLength_12_ACD0F02745C28882619376926292FB36"_s); + length->name.emplace(MASS_JOINT_ARM_LOWER); } length->value = _frame.joints.lowerArms; arrayAppend(temp, std::move(length)); } - length = frame_prop->atMove("HipLength_14_02AEEEAC4376087B9C51F0AA7CC92818"_s); + length = frame_prop->atMove(MASS_JOINT_HIP); if(_frame.joints.hips != 0.0f) { if(!length) { length.emplace(); - length->name.emplace("HipLength_14_02AEEEAC4376087B9C51F0AA7CC92818"_s); + length->name.emplace(MASS_JOINT_HIP); } length->value = _frame.joints.hips; arrayAppend(temp, std::move(length)); } - length = frame_prop->atMove("LegUpperLength_16_A7C4C71249A3776F7A543D96819C0C61"_s); + length = frame_prop->atMove(MASS_JOINT_LEG_UPPER); if(_frame.joints.upperLegs != 0.0f) { if(!length) { length.emplace(); - length->name.emplace("LegUpperLength_16_A7C4C71249A3776F7A543D96819C0C61"_s); + length->name.emplace(MASS_JOINT_LEG_UPPER); } length->value = _frame.joints.upperLegs; arrayAppend(temp, std::move(length)); } - length = frame_prop->atMove("LegLowerLength_18_D2DF39964EA0F2A2129D0491B08A032F"_s); + length = frame_prop->atMove(MASS_JOINT_LEG_LOWER); if(_frame.joints.lowerLegs != 0.0f) { if(!length) { length.emplace(); - length->name.emplace("LegLowerLength_18_D2DF39964EA0F2A2129D0491B08A032F"_s); + length->name.emplace(MASS_JOINT_LEG_LOWER); } length->value = _frame.joints.lowerLegs; arrayAppend(temp, std::move(length)); @@ -179,21 +180,21 @@ auto Mass::frameStyles() -> Containers::ArrayView { } void Mass::getFrameStyles() { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Can't find unit data in" << _filename; _state = State::Invalid; return; } - auto frame_prop = unit_data->at("Frame_3_F92B0F6A44A15088AF7F41B9FF290653"_s); + auto frame_prop = unit_data->at(MASS_FRAME); if(!frame_prop) { Utility::Error{} << "Can't find frame data in" << _filename; _state = State::Invalid; return; } - auto frame_styles = frame_prop->at("Styles_32_00A3B3284B37F1E7819458844A20EB48"_s); + auto frame_styles = frame_prop->at(MASS_FRAME_STYLES); if(!frame_styles) { Utility::Error{} << "Can't find frame styles in" << _filename; _state = State::Invalid; @@ -212,21 +213,21 @@ void Mass::getFrameStyles() { } auto Mass::writeFrameStyles() -> bool { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { _state = State::Invalid; _lastError = "No unit data in "_s + _filename; return false; } - auto frame = unit_data->at("Frame_3_F92B0F6A44A15088AF7F41B9FF290653"_s); + auto frame = unit_data->at(MASS_FRAME); if(!frame) { _state = State::Invalid; _lastError = "No frame data in "_s + _filename; return false; } - auto frame_styles = frame->at("Styles_32_00A3B3284B37F1E7819458844A20EB48"_s); + auto frame_styles = frame->at(MASS_FRAME_STYLES); if(!frame_styles) { _state = State::Invalid; _lastError = "No frame styles in "_s + _filename; @@ -250,21 +251,21 @@ auto Mass::eyeFlareColour() -> Color4& { } void Mass::getEyeFlareColour() { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Can't find unit data in" << _filename; _state = State::Invalid; return; } - auto frame_prop = unit_data->at("Frame_3_F92B0F6A44A15088AF7F41B9FF290653"_s); + auto frame_prop = unit_data->at(MASS_FRAME); if(!frame_prop) { Utility::Error{} << "Can't find frame data in" << _filename; _state = State::Invalid; return; } - auto eye_flare_prop = frame_prop->at("EyeFlareColor_36_AF79999C40FCA0E88A2F9A84488A38CA"_s); + auto eye_flare_prop = frame_prop->at(MASS_EYE_FLARE); if(!eye_flare_prop) { Utility::Error{} << "Can't find eye flare data in" << _filename; _state = State::Invalid; @@ -275,21 +276,21 @@ void Mass::getEyeFlareColour() { } auto Mass::writeEyeFlareColour() -> bool { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { _state = State::Invalid; _lastError = "No unit data in "_s + _filename; return false; } - auto frame = unit_data->at("Frame_3_F92B0F6A44A15088AF7F41B9FF290653"_s); + auto frame = unit_data->at(MASS_FRAME); if(!frame) { _state = State::Invalid; _lastError = "No frame data in "_s + _filename; return false; } - auto eye_flare_prop = frame->at("EyeFlareColor_36_AF79999C40FCA0E88A2F9A84488A38CA"_s); + auto eye_flare_prop = frame->at(MASS_EYE_FLARE); if(!eye_flare_prop) { _state = State::Invalid; _lastError = "No eye flare property in "_s + _filename; @@ -314,14 +315,14 @@ auto Mass::frameCustomStyles() -> Containers::ArrayView { } void Mass::getFrameCustomStyles() { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Can't find unit data in" << _filename; _state = State::Invalid; return; } - auto frame_styles = unit_data->at("FrameStyle_44_04A44C9440363CCEC5443D98BFAF22AA"_s); + auto frame_styles = unit_data->at(MASS_CUSTOM_FRAME_STYLES); if(!frame_styles) { Utility::Error{} << "Can't find frame styles in" << _filename; _state = State::Invalid; @@ -343,14 +344,14 @@ auto Mass::writeFrameCustomStyle(UnsignedLong index) -> bool { return false; } - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { _state = State::Invalid; _lastError = "No unit data in "_s + _filename; return false; } - auto frame_styles = unit_data->at("FrameStyle_44_04A44C9440363CCEC5443D98BFAF22AA"_s); + auto frame_styles = unit_data->at(MASS_CUSTOM_FRAME_STYLES); if(!frame_styles) { _state = State::Invalid; _lastError = "No frame styles in "_s + _filename; diff --git a/src/Mass/Mass_Styles.cpp b/src/Mass/Mass_Styles.cpp index 0407f4d..f2e06f8 100644 --- a/src/Mass/Mass_Styles.cpp +++ b/src/Mass/Mass_Styles.cpp @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include "PropertyNames.h" #include "../UESaveFile/Types/ArrayProperty.h" #include "../UESaveFile/Types/ColourStructProperty.h" #include "../UESaveFile/Types/FloatProperty.h" @@ -30,14 +31,14 @@ auto Mass::globalStyles() -> Containers::ArrayView { } void Mass::getGlobalStyles() { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Can't find unit data in" << _filename; _state = State::Invalid; return; } - auto global_styles = unit_data->at("GlobalStyles_57_6A681C114035241F7BDAAE9B43A8BF1B"_s); + auto global_styles = unit_data->at(MASS_GLOBAL_STYLES); if(!global_styles) { _globalStyles = Containers::Array{0}; return; @@ -56,14 +57,14 @@ auto Mass::writeGlobalStyle(UnsignedLong index) -> bool { return false; } - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { _state = State::Invalid; _lastError = "No unit data found in "_s + _filename; return false; } - auto global_styles = unit_data->at("GlobalStyles_57_6A681C114035241F7BDAAE9B43A8BF1B"_s); + auto global_styles = unit_data->at(MASS_GLOBAL_STYLES); if(!global_styles) { _state = State::Invalid; _lastError = "No global styles found in "_s + _filename; @@ -78,21 +79,21 @@ void Mass::getCustomStyles(Containers::ArrayView styles, ArrayPrope auto style_prop = style_array->at(i); auto& style = styles[i]; - style.name = style_prop->at("Name_27_1532115A46EF2B2FA283908DF561A86B"_s)->value; - auto colour_prop = style_prop->at("Color_5_F0D383DF40474C9464AE48A0984A212E"_s); + style.name = style_prop->at(MASS_STYLE_NAME)->value; + auto colour_prop = style_prop->at(MASS_STYLE_COLOUR); style.colour = Color4{colour_prop->r, colour_prop->g, colour_prop->b, colour_prop->a}; - style.metallic = style_prop->at("Metallic_10_0A4CD1E4482CBF41CA61D0A856DE90B9"_s)->value; - style.gloss = style_prop->at("Gloss_11_9769599842CC275A401C4282A236E240"_s)->value; style.glow = colour_prop->a == 0.0f ? false : true; + style.metallic = style_prop->at(MASS_STYLE_METALLIC)->value; + style.gloss = style_prop->at(MASS_STYLE_GLOSS)->value; - style.patternId = style_prop->at("PatternID_14_516DB85641DAF8ECFD2920BE2BDF1311"_s)->value; - style.opacity = style_prop->at("Opacity_30_53BD060B4DFCA1C92302D6A0F7831131"_s)->value; + style.patternId = style_prop->at(MASS_STYLE_PATTERN_ID)->value; + style.opacity = style_prop->at(MASS_STYLE_PATTERN_OPACITY)->value; style.offset = Vector2{ - style_prop->at("OffsetX_23_70FC2E814C64BBB82452748D2AF9CD48"_s)->value, - style_prop->at("OffsetY_24_5E1F866C4C054D9B2EE337ADC180C17F"_s)->value + style_prop->at(MASS_STYLE_PATTERN_OFFSETX)->value, + style_prop->at(MASS_STYLE_PATTERN_OFFSETY)->value }; - style.rotation = style_prop->at("Rotation_25_EC2DFAD84AD0A6BD3FA841ACD52EDD6D"_s)->value; - style.scale = style_prop->at("Scale_26_19DF0708409262183E1247B317137671"_s)->value; + style.rotation = style_prop->at(MASS_STYLE_PATTERN_ROTATION)->value; + style.scale = style_prop->at(MASS_STYLE_PATTERN_SCALE)->value; } } @@ -103,27 +104,26 @@ auto Mass::writeCustomStyle(const CustomStyle& style, UnsignedLong index, ArrayP } auto style_prop = style_array->at(index); - if(!style_prop) { _lastError = "Style index is out of range in "_s + _filename; return false; } - style_prop->at("Name_27_1532115A46EF2B2FA283908DF561A86B"_s)->value = style.name; - auto colour_prop = style_prop->at("Color_5_F0D383DF40474C9464AE48A0984A212E"_s); + style_prop->at(MASS_STYLE_NAME)->value = style.name; + auto colour_prop = style_prop->at(MASS_STYLE_COLOUR); colour_prop->r = style.colour.r(); colour_prop->g = style.colour.g(); colour_prop->b = style.colour.b(); colour_prop->a = style.glow ? 1.0f : 0.0f; - style_prop->at("Metallic_10_0A4CD1E4482CBF41CA61D0A856DE90B9"_s)->value = style.metallic; - style_prop->at("Gloss_11_9769599842CC275A401C4282A236E240"_s)->value = style.gloss; + style_prop->at(MASS_STYLE_METALLIC)->value = style.metallic; + style_prop->at(MASS_STYLE_GLOSS)->value = style.gloss; - style_prop->at("PatternID_14_516DB85641DAF8ECFD2920BE2BDF1311"_s)->value = style.patternId; - style_prop->at("Opacity_30_53BD060B4DFCA1C92302D6A0F7831131"_s)->value = style.opacity; - style_prop->at("OffsetX_23_70FC2E814C64BBB82452748D2AF9CD48"_s)->value = style.offset.x(); - style_prop->at("OffsetY_24_5E1F866C4C054D9B2EE337ADC180C17F"_s)->value = style.offset.y(); - style_prop->at("Rotation_25_EC2DFAD84AD0A6BD3FA841ACD52EDD6D"_s)->value = style.rotation; - style_prop->at("Scale_26_19DF0708409262183E1247B317137671"_s)->value = style.scale; + style_prop->at(MASS_STYLE_PATTERN_ID)->value = style.patternId; + style_prop->at(MASS_STYLE_PATTERN_OPACITY)->value = style.opacity; + style_prop->at(MASS_STYLE_PATTERN_OFFSETX)->value = style.offset.x(); + style_prop->at(MASS_STYLE_PATTERN_OFFSETY)->value = style.offset.y(); + style_prop->at(MASS_STYLE_PATTERN_ROTATION)->value = style.rotation; + style_prop->at(MASS_STYLE_PATTERN_SCALE)->value = style.scale; if(!_mass->saveToFile()) { _lastError = _mass->lastError(); diff --git a/src/Mass/Mass_Weapons.cpp b/src/Mass/Mass_Weapons.cpp index 20a4d5c..1e5baad 100644 --- a/src/Mass/Mass_Weapons.cpp +++ b/src/Mass/Mass_Weapons.cpp @@ -31,11 +31,11 @@ auto Mass::meleeWeapons() -> Containers::ArrayView { } void Mass::getMeleeWeapons() { - getWeaponType("WeaponCC_22_0BBEC58C4A0EA1DB9E037B9339EE26A7"_s, _weapons.melee); + getWeaponType(MASS_WEAPONS_MELEE, _weapons.melee); } auto Mass::writeMeleeWeapons() -> bool { - return writeWeaponType("WeaponCC_22_0BBEC58C4A0EA1DB9E037B9339EE26A7"_s, _weapons.melee); + return writeWeaponType(MASS_WEAPONS_MELEE, _weapons.melee); } auto Mass::shields() -> Containers::ArrayView { @@ -43,11 +43,11 @@ auto Mass::shields() -> Containers::ArrayView { } void Mass::getShields() { - getWeaponType("Shield_53_839BFD7945481BAEA3E43A9C5CA8E92E"_s, _weapons.shields); + getWeaponType(MASS_WEAPONS_SHIELD, _weapons.shields); } auto Mass::writeShields() -> bool { - return writeWeaponType("Shield_53_839BFD7945481BAEA3E43A9C5CA8E92E"_s, _weapons.shields); + return writeWeaponType(MASS_WEAPONS_SHIELD, _weapons.shields); } auto Mass::bulletShooters() -> Containers::ArrayView { @@ -55,11 +55,11 @@ auto Mass::bulletShooters() -> Containers::ArrayView { } void Mass::getBulletShooters() { - getWeaponType("WeaponBS_35_6EF6E0104FD7A138DF47F88CB57A83ED"_s, _weapons.bulletShooters); + getWeaponType(MASS_WEAPONS_BSHOOTER, _weapons.bulletShooters); } auto Mass::writeBulletShooters() -> bool { - return writeWeaponType("WeaponBS_35_6EF6E0104FD7A138DF47F88CB57A83ED"_s, _weapons.bulletShooters); + return writeWeaponType(MASS_WEAPONS_BSHOOTER, _weapons.bulletShooters); } auto Mass::energyShooters() -> Containers::ArrayView { @@ -67,11 +67,11 @@ auto Mass::energyShooters() -> Containers::ArrayView { } void Mass::getEnergyShooters() { - getWeaponType("WeaponES_37_1A295D544528623880A0B1AC2C7DEE99"_s, _weapons.energyShooters); + getWeaponType(MASS_WEAPONS_ESHOOTER, _weapons.energyShooters); } auto Mass::writeEnergyShooters() -> bool { - return writeWeaponType("WeaponES_37_1A295D544528623880A0B1AC2C7DEE99"_s, _weapons.energyShooters); + return writeWeaponType(MASS_WEAPONS_ESHOOTER, _weapons.energyShooters); } auto Mass::bulletLaunchers() -> Containers::ArrayView { @@ -79,11 +79,11 @@ auto Mass::bulletLaunchers() -> Containers::ArrayView { } void Mass::getBulletLaunchers() { - getWeaponType("WeaponBL_36_5FD7C41E4613A75B44AB0E90B362846E"_s, _weapons.bulletLaunchers); + getWeaponType(MASS_WEAPONS_BLAUNCHER, _weapons.bulletLaunchers); } auto Mass::writeBulletLaunchers() -> bool { - return writeWeaponType("WeaponBL_36_5FD7C41E4613A75B44AB0E90B362846E"_s, _weapons.bulletLaunchers); + return writeWeaponType(MASS_WEAPONS_BLAUNCHER, _weapons.bulletLaunchers); } auto Mass::energyLaunchers() -> Containers::ArrayView { @@ -91,15 +91,15 @@ auto Mass::energyLaunchers() -> Containers::ArrayView { } void Mass::getEnergyLaunchers() { - getWeaponType("WeaponEL_38_9D23F3884ACA15902C9E6CA6E4995995"_s, _weapons.energyLaunchers); + getWeaponType(MASS_WEAPONS_ELAUNCHER, _weapons.energyLaunchers); } auto Mass::writeEnergyLaunchers() -> bool { - return writeWeaponType("WeaponEL_38_9D23F3884ACA15902C9E6CA6E4995995"_s, _weapons.energyLaunchers); + return writeWeaponType(MASS_WEAPONS_ELAUNCHER, _weapons.energyLaunchers); } void Mass::getWeaponType(Containers::StringView prop_name, Containers::ArrayView weapon_array) { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { Utility::Error{} << "Can't find unit data in" << _filename; _state = State::Invalid; @@ -123,8 +123,8 @@ void Mass::getWeaponType(Containers::StringView prop_name, Containers::ArrayView auto weapon_prop = prop->at(i); auto& weapon = weapon_array[i]; - weapon.name = weapon_prop->at("Name_13_7BF0D31F4E50C50C47231BB36A485D92"_s)->value; - auto& weapon_type = weapon_prop->at("Type_2_35ABA8C3406F8D9BBF14A89CD6BCE976"_s)->enumValue; + weapon.name = weapon_prop->at(MASS_WEAPON_NAME)->value; + auto& weapon_type = weapon_prop->at(MASS_WEAPON_TYPE)->enumValue; #define c(enumerator, strenum, name) if(weapon_type == (strenum)) { weapon.type = WeaponType::enumerator; } else #include "../Maps/WeaponTypes.hpp" #undef c @@ -133,28 +133,28 @@ void Mass::getWeaponType(Containers::StringView prop_name, Containers::ArrayView Utility::Warning{} << "Invalid weapon type enum value in getWeaponType()."_s; } - auto parts_prop = weapon_prop->at("Element_6_8E4617CC4B2C1F1490435599784EC6E0"_s); + auto parts_prop = weapon_prop->at(MASS_WEAPON_ELEMENT); weapon.parts = Containers::Array{ValueInit, parts_prop->items.size()}; for(UnsignedInt j = 0; j < parts_prop->items.size(); j++) { auto part_prop = parts_prop->at(j); auto& part = weapon.parts[j]; - part.id = part_prop->at("ID_2_A74D75434308158E5926178822DD28EE"_s)->value; + part.id = part_prop->at(MASS_WEAPON_PART_ID)->value; - auto part_styles = part_prop->at("Styles_17_994C97C34A90667BE5B716BFD0B97588"_s); + auto part_styles = part_prop->at(MASS_WEAPON_PART_STYLES); for(UnsignedInt k = 0; k < part_styles->items.size(); k++) { part.styles[k] = part_styles->at(k)->value; } - auto part_decals = part_prop->at("Decals_13_8B81112B453D7230C0CDE982185E14F1"_s); + auto part_decals = part_prop->at(MASS_WEAPON_PART_DECALS); if(part_decals->items.size() != part.decals.size()) { part.decals = Containers::Array{part_decals->items.size()}; } getDecals(part.decals, part_decals); - auto part_accs = part_prop->at("Accessories_21_3878DE8B4ED0EA0DB725E98BCDC20E0C"_s); + auto part_accs = part_prop->at(MASS_WEAPON_PART_ACCESSORIES); if(!part_accs) { part.accessories = Containers::Array{0}; continue; @@ -166,7 +166,7 @@ void Mass::getWeaponType(Containers::StringView prop_name, Containers::ArrayView getAccessories(part.accessories, part_accs); } - auto custom_styles = weapon_prop->at("Styles_10_8C3C82444B986AD7A99595AD4985912D"_s); + auto custom_styles = weapon_prop->at(MASS_CUSTOM_WEAPON_STYLES); if(!custom_styles) { Utility::Error{} << "Can't find weapon custom styles in" << _filename; _state = State::Invalid; @@ -181,8 +181,8 @@ void Mass::getWeaponType(Containers::StringView prop_name, Containers::ArrayView getCustomStyles(weapon.customStyles, custom_styles); - weapon.attached = weapon_prop->at("Attach_15_D00AABBD4AD6A04778D56D81E51927B3"_s)->value; - auto& damage_type = weapon_prop->at("DamageType_18_E1FFA53540591A9087EC698117A65C83"_s)->enumValue; + weapon.attached = weapon_prop->at(MASS_WEAPON_ATTACH)->value; + auto& damage_type = weapon_prop->at(MASS_WEAPON_DAMAGE_TYPE)->enumValue; #define c(enumerator, strenum) if(damage_type == (strenum)) { weapon.damageType = DamageType::enumerator; } else #include "../Maps/DamageTypes.hpp" #undef c @@ -190,8 +190,8 @@ void Mass::getWeaponType(Containers::StringView prop_name, Containers::ArrayView _state = State::Invalid; Utility::Warning{} << "Invalid damage type enum value in getWeaponType()."_s; } - weapon.dualWield = weapon_prop->at("DualWield_20_B2EB2CEA4A6A233DC7575996B6DD1222"_s)->value; - auto& effect_colour_mode = weapon_prop->at("ColorEfxMode_24_D254BCF943E852BF9ADB8AAA8FD80014"_s)->enumValue; + weapon.dualWield = weapon_prop->at(MASS_WEAPON_DUAL_WIELD)->value; + auto& effect_colour_mode = weapon_prop->at(MASS_WEAPON_COLOUR_EFX_MODE)->enumValue; #define c(enumerator, strenum) if(effect_colour_mode == (strenum)) { weapon.effectColourMode = EffectColourMode::enumerator; } else #include "../Maps/EffectColourModes.hpp" #undef c @@ -199,13 +199,13 @@ void Mass::getWeaponType(Containers::StringView prop_name, Containers::ArrayView _state = State::Invalid; Utility::Warning{} << "Invalid effect colour mode in getWeaponType()."_s; } - auto effect_colour = weapon_prop->at("ColorEfx_26_D921B62946C493E487455A831F4520AC"_s); + auto effect_colour = weapon_prop->at(MASS_WEAPON_COLOUR_EFX); weapon.effectColour = Color4{effect_colour->r, effect_colour->g, effect_colour->b, effect_colour->a}; } } auto Mass::writeWeaponType(Containers::StringView prop_name, Containers::ArrayView weapon_array) -> bool { - auto unit_data = _mass->at("UnitData"_s); + auto unit_data = _mass->at(MASS_UNIT_DATA); if(!unit_data) { _state = State::Invalid; _lastError = "No unit data in "_s + _filename; @@ -229,16 +229,16 @@ auto Mass::writeWeaponType(Containers::StringView prop_name, Containers::ArrayVi auto weapon_prop = prop->at(i); auto& weapon = weapon_array[i]; - weapon_prop->at("Name_13_7BF0D31F4E50C50C47231BB36A485D92"_s)->value = weapon.name; + weapon_prop->at(MASS_WEAPON_NAME)->value = weapon.name; switch(weapon.type) { - #define c(enumerator, strenum, name) case WeaponType::enumerator: weapon_prop->at("Type_2_35ABA8C3406F8D9BBF14A89CD6BCE976"_s)->enumValue = strenum; break; + #define c(enumerator, strenum, name) case WeaponType::enumerator: weapon_prop->at(MASS_WEAPON_TYPE)->enumValue = strenum; break; #include "../Maps/WeaponTypes.hpp" #undef c default: Utility::Warning{} << "Invalid weapon type enum value in writeWeaponType()."_s; } - auto parts_prop = weapon_prop->at("Element_6_8E4617CC4B2C1F1490435599784EC6E0"_s); + auto parts_prop = weapon_prop->at(MASS_WEAPON_ELEMENT); if(parts_prop->items.size() != weapon.parts.size()) { _state = State::Invalid; _lastError = "Weapon parts array size mismatch."_s; @@ -249,17 +249,17 @@ auto Mass::writeWeaponType(Containers::StringView prop_name, Containers::ArrayVi auto part_prop = parts_prop->at(j); auto& part = weapon.parts[j]; - part_prop->at("ID_2_A74D75434308158E5926178822DD28EE"_s)->value = part.id; + part_prop->at(MASS_WEAPON_PART_ID)->value = part.id; - auto part_styles = part_prop->at("Styles_17_994C97C34A90667BE5B716BFD0B97588"_s); + auto part_styles = part_prop->at(MASS_WEAPON_PART_STYLES); for(UnsignedInt k = 0; k < part_styles->items.size(); k++) { part_styles->at(k)->value = part.styles[k]; } - auto part_decals = part_prop->at("Decals_13_8B81112B453D7230C0CDE982185E14F1"_s); + auto part_decals = part_prop->at(MASS_WEAPON_PART_DECALS); writeDecals(part.decals, part_decals); - auto part_accs = part_prop->at("Accessories_21_3878DE8B4ED0EA0DB725E98BCDC20E0C"_s); + auto part_accs = part_prop->at(MASS_WEAPON_PART_ACCESSORIES); if(!part_accs) { continue; } @@ -273,7 +273,7 @@ auto Mass::writeWeaponType(Containers::StringView prop_name, Containers::ArrayVi writeAccessories(part.accessories, part_accs); } - auto custom_styles = weapon_prop->at("Styles_10_8C3C82444B986AD7A99595AD4985912D"_s); + auto custom_styles = weapon_prop->at(MASS_CUSTOM_WEAPON_STYLES); if(!custom_styles) { _state = State::Invalid; _lastError = "No custom styles found for weapon."_s; @@ -290,25 +290,25 @@ auto Mass::writeWeaponType(Containers::StringView prop_name, Containers::ArrayVi writeCustomStyle(weapon.customStyles[j], j, custom_styles); } - weapon_prop->at("Attach_15_D00AABBD4AD6A04778D56D81E51927B3"_s)->value = weapon.attached; + weapon_prop->at(MASS_WEAPON_ATTACH)->value = weapon.attached; switch(weapon.damageType) { - #define c(enumerator, strenum) case DamageType::enumerator: weapon_prop->at("DamageType_18_E1FFA53540591A9087EC698117A65C83"_s)->enumValue = strenum; break; + #define c(enumerator, strenum) case DamageType::enumerator: weapon_prop->at(MASS_WEAPON_DAMAGE_TYPE)->enumValue = strenum; break; #include "../Maps/DamageTypes.hpp" #undef c default: Utility::Warning{} << "Unknown damage type enum value in writeWeaponType()."_s; } - weapon_prop->at("DualWield_20_B2EB2CEA4A6A233DC7575996B6DD1222"_s)->value = weapon.dualWield; + weapon_prop->at(MASS_WEAPON_DUAL_WIELD)->value = weapon.dualWield; switch(weapon.effectColourMode) { #define c(enumerator, enumstr) case EffectColourMode::enumerator: \ - weapon_prop->at("ColorEfxMode_24_D254BCF943E852BF9ADB8AAA8FD80014"_s)->enumValue = enumstr; \ + weapon_prop->at(MASS_WEAPON_COLOUR_EFX_MODE)->enumValue = enumstr; \ break; #include "../Maps/EffectColourModes.hpp" #undef c default: Utility::Warning{} << "Unknown effect colour mode in writeWeaponType()."_s; } - auto effect_colour = weapon_prop->at("ColorEfx_26_D921B62946C493E487455A831F4520AC"_s); + auto effect_colour = weapon_prop->at(MASS_WEAPON_COLOUR_EFX); effect_colour->r = weapon.effectColour.r(); effect_colour->g = weapon.effectColour.g(); effect_colour->b = weapon.effectColour.b(); diff --git a/src/Mass/PropertyNames.h b/src/Mass/PropertyNames.h new file mode 100644 index 0000000..862163b --- /dev/null +++ b/src/Mass/PropertyNames.h @@ -0,0 +1,104 @@ +#pragma once + +#define MASS_UNIT_DATA "UnitData" +#define MASS_NAME "Name_45_A037C5D54E53456407BDF091344529BB" +#define MASS_ACCOUNT "Account" +#define MASS_GLOBAL_STYLES "GlobalStyles_57_6A681C114035241F7BDAAE9B43A8BF1B" + +// Frame stuff +#define MASS_FRAME "Frame_3_F92B0F6A44A15088AF7F41B9FF290653" +#define MASS_JOINT_NECK "NeckLength_6_ED6AF79849C27CD1A9D523A09E2BFE58" +#define MASS_JOINT_BODY "BodyLength_7_C16287754CBA96C93BAE36A5C154996A" +#define MASS_JOINT_SHOULDER "ShoulderLength_8_220EDF304F1C1226F0D8D39117FB3883" +#define MASS_JOINT_ARM_UPPER "ArmUpperLength_10_249FDA3E4F3B399E7B9E5C9B7C765EAE" +#define MASS_JOINT_ARM_LOWER "ArmLowerLength_12_ACD0F02745C28882619376926292FB36" +#define MASS_JOINT_HIP "HipLength_14_02AEEEAC4376087B9C51F0AA7CC92818" +#define MASS_JOINT_LEG_UPPER "LegUpperLength_16_A7C4C71249A3776F7A543D96819C0C61" +#define MASS_JOINT_LEG_LOWER "LegLowerLength_18_D2DF39964EA0F2A2129D0491B08A032F" +#define MASS_FRAME_STYLES "Styles_32_00A3B3284B37F1E7819458844A20EB48" +#define MASS_EYE_FLARE "EyeFlareColor_36_AF79999C40FCA0E88A2F9A84488A38CA" +#define MASS_CUSTOM_FRAME_STYLES "FrameStyle_44_04A44C9440363CCEC5443D98BFAF22AA" + +// Armour stuff +#define MASS_ARMOUR_PARTS "Armor_10_12E266C44116DDAF57E99ABB575A4B3C" +#define MASS_ARMOUR_SLOT "Slot_3_408BA56F4C9605C7E805CF91B642249C" +#define MASS_ARMOUR_ID "ID_5_ACD101864D3481DE96EDACACC09BDD25" +#define MASS_ARMOUR_STYLES "Styles_47_3E31870441DFD7DB8BEE5C85C26B365B" +#define MASS_ARMOUR_DECALS "Decals_42_F358794A4F18497970F56BA9627D3603" +#define MASS_ARMOUR_ACCESSORIES "Accessories_52_D902DD4241FA0050C2529596255153F3" +#define MASS_CUSTOM_ARMOUR_STYLES "ArmorStyle_42_E2F6AC3647788CB366BD469B3B7E899E" + +// Weapon stuff +#define MASS_WEAPONS_MELEE "WeaponCC_22_0BBEC58C4A0EA1DB9E037B9339EE26A7" +#define MASS_WEAPONS_SHIELD "Shield_53_839BFD7945481BAEA3E43A9C5CA8E92E" +#define MASS_WEAPONS_BSHOOTER "WeaponBS_35_6EF6E0104FD7A138DF47F88CB57A83ED" +#define MASS_WEAPONS_ESHOOTER "WeaponES_37_1A295D544528623880A0B1AC2C7DEE99" +#define MASS_WEAPONS_BLAUNCHER "WeaponBL_36_5FD7C41E4613A75B44AB0E90B362846E" +#define MASS_WEAPONS_ELAUNCHER "WeaponEL_38_9D23F3884ACA15902C9E6CA6E4995995" +#define MASS_WEAPON_NAME "Name_13_7BF0D31F4E50C50C47231BB36A485D92" +#define MASS_WEAPON_TYPE "Type_2_35ABA8C3406F8D9BBF14A89CD6BCE976" +#define MASS_WEAPON_ELEMENT "Element_6_8E4617CC4B2C1F1490435599784EC6E0" +#define MASS_CUSTOM_WEAPON_STYLES "Styles_10_8C3C82444B986AD7A99595AD4985912D" +#define MASS_WEAPON_ATTACH "Attach_15_D00AABBD4AD6A04778D56D81E51927B3" +#define MASS_WEAPON_DAMAGE_TYPE "DamageType_18_E1FFA53540591A9087EC698117A65C83" +#define MASS_WEAPON_DUAL_WIELD "DualWield_20_B2EB2CEA4A6A233DC7575996B6DD1222" +#define MASS_WEAPON_COLOUR_EFX_MODE "ColorEfxMode_24_D254BCF943E852BF9ADB8AAA8FD80014" +#define MASS_WEAPON_COLOUR_EFX "ColorEfx_26_D921B62946C493E487455A831F4520AC" + +// Weapon part stuff +#define MASS_WEAPON_PART_ID "ID_2_A74D75434308158E5926178822DD28EE" +#define MASS_WEAPON_PART_STYLES "Styles_17_994C97C34A90667BE5B716BFD0B97588" +#define MASS_WEAPON_PART_DECALS "Decals_13_8B81112B453D7230C0CDE982185E14F1" +#define MASS_WEAPON_PART_ACCESSORIES "Accessories_21_3878DE8B4ED0EA0DB725E98BCDC20E0C" + +// BL attachment stuff +#define MASS_BL_ATTACHMENT_STYLE "WeaponBLAttachmentStyle_65_5943FCE8406F18D2C3F69285EB23A699" +#define MASS_BL_ATTACHMENTS "WeaponBLAttachment_61_442D08F547510A4CEE1501BBAF297BA0" +#define MASS_BL_ATTACHMENT_SOCKET "Socket_9_B9DBF30D4A1F0032A2BE2F8B342B35A9" +#define MASS_BL_ATTACHMENT_RELLOC "RelativeLocation_10_2F6E75DF4C40622658340E9A22D38B02" +#define MASS_BL_ATTACHMENT_OFFLOC "OffsetLocation_11_F42B3DA3436948FF85752DB33722382F" +#define MASS_BL_ATTACHMENT_RELROT "RelativeRotation_12_578140464621245132CFF2A2AD85E735" +#define MASS_BL_ATTACHMENT_OFFROT "OffsetRotation_13_B5980BCD47905D842D1490A1A520B064" +#define MASS_BL_ATTACHMENT_RELSCALE "RelativeScale_16_37BC80EF42699F79533F7AA7B3094E38" + +// Style stuff +#define MASS_STYLE_NAME "Name_27_1532115A46EF2B2FA283908DF561A86B" +#define MASS_STYLE_COLOUR "Color_5_F0D383DF40474C9464AE48A0984A212E" +#define MASS_STYLE_METALLIC "Metallic_10_0A4CD1E4482CBF41CA61D0A856DE90B9" +#define MASS_STYLE_GLOSS "Gloss_11_9769599842CC275A401C4282A236E240" +#define MASS_STYLE_PATTERN_ID "PatternID_14_516DB85641DAF8ECFD2920BE2BDF1311" +#define MASS_STYLE_PATTERN_OPACITY "Opacity_30_53BD060B4DFCA1C92302D6A0F7831131" +#define MASS_STYLE_PATTERN_OFFSETX "OffsetX_23_70FC2E814C64BBB82452748D2AF9CD48" +#define MASS_STYLE_PATTERN_OFFSETY "OffsetY_24_5E1F866C4C054D9B2EE337ADC180C17F" +#define MASS_STYLE_PATTERN_ROTATION "Rotation_25_EC2DFAD84AD0A6BD3FA841ACD52EDD6D" +#define MASS_STYLE_PATTERN_SCALE "Scale_26_19DF0708409262183E1247B317137671" + +// Decal stuff +#define MASS_DECAL_ID "ID_3_694C0B35404D8A3168AEC89026BC8CF9" +#define MASS_DECAL_COLOUR "Color_8_1B0B9D2B43DA6AAB9FA549B374D3E606" +#define MASS_DECAL_POSITION "Position_41_022C8FE84E1AAFE587261E88F2C72250" +#define MASS_DECAL_UAXIS "UAxis_37_EBEB715F45491AECACCC07A1AE4646D1" +#define MASS_DECAL_VAXIS "VAxis_39_C31EB2664EE202CAECFBBB84100B5E35" +#define MASS_DECAL_OFFSET "Offset_29_B02BBBB74FC60F5EDBEBAB8020738020" +#define MASS_DECAL_SCALE "Scale_32_959D1C2747AFD8D62808468235CBBA40" +#define MASS_DECAL_ROTATION "Rotation_27_12D7C314493D203D5C2326A03C5F910F" +#define MASS_DECAL_FLIP "Flip_35_CECCFB184CCD9412BD93FE9A8B656BE1" +#define MASS_DECAL_WRAP "Wrap_43_A7C68CDF4A92AF2ECDA53F953EE7CA62" + +// Accessory stuff +#define MASS_ACCESSORY_ATTACH_INDEX "AttachIndex_2_4AFCF6024E4BA7426C6B9F80B8179D20" +#define MASS_ACCESSORY_ID "ID_4_5757B32647BAE263266259B8A7DFFFC1" +#define MASS_ACCESSORY_STYLES "Styles_7_91DEB0F24E24D13FC9472882C11D0DFD" +#define MASS_ACCESSORY_RELPOS "RelativePosition_14_BE8FB2A94074F34B3EDA6683B227D3A1" +#define MASS_ACCESSORY_OFFPOS "RelativePositionOffset_15_98FD0CE74E44BBAFC2D46FB4CA4E0ED6" +#define MASS_ACCESSORY_RELROT "RelativeRotation_20_C78C73274E6E78E7878F8C98ECA342C0" +#define MASS_ACCESSORY_OFFROT "RelativeRotationOffset_21_E07FA0EC46728B7BA763C6861249ABAA" +#define MASS_ACCESSORY_SCALE "LocalScale_24_DC2D93A742A41A46E7E61D988F15ED53" + +// Tuning stuff +#define MASS_ENGINE "Engine" +#define MASS_GEARS "Gears" +#define MASS_OS "OS" +#define MASS_MODULES "Modules" +#define MASS_ARCHITECT "Architect" +#define MASS_TECHS "Techs"