RigsofRods
Soft-body Physics Simulation
TuneupFileFormat.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5  Copyright 2013-2024 Petr Ohlidal
6 
7  For more information, see http://www.rigsofrods.org/
8 
9  Rigs of Rods is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License version 3, as
11  published by the Free Software Foundation.
12 
13  Rigs of Rods is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #pragma once
23 
29 #include "Application.h"
30 #include "CacheSystem.h"
31 #include "RefCountingObject.h"
32 
33 #include <OgreResourceManager.h>
34 
35 #include <array>
36 #include <vector>
37 #include <string>
38 #include <set>
39 
40 namespace RoR {
41 
42 const size_t TUNEUP_BUF_SIZE = 2000;
43 
45 {
47  Ogre::Vector3 tnt_pos = Ogre::Vector3::ZERO;
48  std::string tnt_origin;
49 };
50 
52 {
54  std::array<std::string, 2> twt_media;
58  float twt_tire_radius = -1.f;
59  float twt_rim_radius = -1.f;
60  std::string twt_origin;
61 
62 };
63 
65 {
67  std::array<std::string, 2> tpt_media;
68  Ogre::Vector3 tpt_offset = Ogre::Vector3::ZERO;
69  Ogre::Vector3 tpt_rotation = Ogre::Vector3::ZERO;
70  std::string tpt_origin;
71 };
72 
74 {
76  std::string tft_media;
77  Ogre::Vector3 tft_offset = Ogre::Vector3::ZERO;
78  Ogre::Vector3 tft_rotation = Ogre::Vector3::ZERO;
79  std::string tft_origin;
80 };
81 
83 {
84  std::string tmt_name;
85  std::string tmt_type;
86  std::array<std::string, 3> tmt_media;
87  std::string tmt_origin;
88 };
89 
93 struct TuneupDef: public RefCountingObject<TuneupDef>
94 {
97  std::string name;
98  std::string guid;
99  std::string filename;
100  std::string thumbnail;
101  std::string description;
102  std::string author_name;
103  int author_id = -1;
106 
109  std::set<std::string> use_addonparts;
110 
111  std::map<NodeNum_t, TuneupNodeTweak> node_tweaks;
112  std::map<WheelID_t, TuneupWheelTweak> wheel_tweaks;
113  std::map<PropID_t, TuneupPropTweak> prop_tweaks;
114  std::map<FlexbodyID_t, TuneupFlexbodyTweak> flexbody_tweaks;
115  std::map<std::string, TuneupManagedMatTweak> managedmat_tweaks;
116  std::set<PropID_t> unwanted_props;
117  std::set<FlexbodyID_t> unwanted_flexbodies;
118  std::set<FlareID_t> unwanted_flares;
119  std::set<ExhaustID_t> unwanted_exhausts;
120  std::set<std::string> unwanted_managedmats;
121 
125  std::set<PropID_t> force_remove_props;
126  std::set<FlexbodyID_t> force_remove_flexbodies;
127  std::map<WheelID_t, WheelSide> force_wheel_sides;
128  std::set<FlareID_t> force_remove_flares;
129  std::set<ExhaustID_t> force_remove_exhausts;
130  std::set<std::string> force_remove_managedmats;
131 
135  std::set<NodeNum_t> protected_nodes;
136  std::set<WheelID_t> protected_wheels;
137  std::set<PropID_t> protected_props;
138  std::set<FlexbodyID_t> protected_flexbodies;
139  std::set<FlareID_t> protected_flares;
140  std::set<ExhaustID_t> protected_exhausts;
141  std::set<std::string> protected_managedmats;
142 
145  void reset();
146 
149  bool isPropProtected(PropID_t propid) const { return protected_props.find(propid) != protected_props.end(); }
150  bool isFlexbodyProtected(FlexbodyID_t flexbodyid) const { return protected_flexbodies.find(flexbodyid) != protected_flexbodies.end(); }
151  bool isWheelProtected(WheelID_t wheelid) const { return protected_wheels.find(wheelid) != protected_wheels.end(); }
152  bool isNodeProtected(NodeNum_t nodenum) const { return protected_nodes.find(nodenum) != protected_nodes.end(); }
153  bool isFlareProtected(FlareID_t flareid) const { return protected_flares.find(flareid) != protected_flares.end(); }
154  bool isExhaustProtected(ExhaustID_t exhaustid) const { return protected_exhausts.find(exhaustid) != protected_exhausts.end(); }
155  bool isManagedMatProtected(const std::string& matname) const { return protected_managedmats.find(matname) != protected_managedmats.end(); }
157 
160  bool isPropUnwanted(PropID_t propid) { return unwanted_props.find(propid) != unwanted_props.end(); }
161  bool isFlexbodyUnwanted(FlexbodyID_t flexbodyid) { return unwanted_flexbodies.find(flexbodyid) != unwanted_flexbodies.end(); }
162  bool isFlareUnwanted(FlareID_t flareid) { return unwanted_flares.find(flareid) != unwanted_flares.end(); }
163  bool isExhaustUnwanted(ExhaustID_t exhaustid) { return unwanted_exhausts.find(exhaustid) != unwanted_exhausts.end(); }
164  bool isManagedMatUnwanted(const std::string& matname) { return unwanted_managedmats.find(matname) != unwanted_managedmats.end(); }
166 
169  bool isPropForceRemoved(PropID_t propid) { return force_remove_props.find(propid) != force_remove_props.end(); }
170  bool isFlexbodyForceRemoved(FlexbodyID_t flexbodyid) { return force_remove_flexbodies.find(flexbodyid) != force_remove_flexbodies.end(); }
171  bool isWheelSideForced(WheelID_t wheelid, WheelSide& out_val) const;
172  bool isFlareForceRemoved(FlareID_t flareid) { return force_remove_flares.find(flareid) != force_remove_flares.end(); }
173  bool isExhaustForceRemoved(ExhaustID_t exhaustid) { return force_remove_exhausts.find(exhaustid) != force_remove_exhausts.end(); }
174  bool isManagedMatForceRemoved(const std::string& matname) { return force_remove_managedmats.find(matname) != force_remove_managedmats.end(); }
176 };
177 
179 {
180 public:
181 
182  static std::vector<TuneupDefPtr> ParseTuneups(Ogre::DataStreamPtr& stream);
183  static void ExportTuneup(Ogre::DataStreamPtr& stream, TuneupDefPtr& tuneup);
184 
187  static bool isAddonPartUsed(TuneupDefPtr& tuneup_entry, const std::string& filename);
189 
192  static float getTweakedWheelTireRadius(TuneupDefPtr& tuneup_entry, WheelID_t wheel_id, float orig_val);
193  static float getTweakedWheelRimRadius(TuneupDefPtr& tuneup_entry, WheelID_t wheel_id, float orig_val);
194  static std::string getTweakedWheelMedia(TuneupDefPtr& tuneup_entry, WheelID_t wheel_id, int media_idx, const std::string& orig_val);
195  static std::string getTweakedWheelMediaRG(TuneupDefPtr& tuneup_def, WheelID_t wheel_id, int media_idx, const std::string& orig_val);
196  static WheelSide getTweakedWheelSide(TuneupDefPtr& tuneup_entry, WheelID_t wheel_id, WheelSide orig_val);
197  static bool isWheelTweaked(TuneupDefPtr& tuneup_entry, WheelID_t wheel_id, TuneupWheelTweak*& out_tweak);
199 
202  static Ogre::Vector3 getTweakedNodePosition(TuneupDefPtr& tuneup_entry, NodeNum_t nodenum, Ogre::Vector3 orig_val);
203  static bool isNodeTweaked(TuneupDefPtr& tuneup_entry, NodeNum_t nodenum, TuneupNodeTweak*& out_tweak);
205 
208  static bool isPropAnyhowRemoved(TuneupDefPtr& tuneup_def, PropID_t prop_id);
209  static Ogre::Vector3 getTweakedPropOffset(TuneupDefPtr& tuneup_entry, PropID_t prop_id, Ogre::Vector3 orig_val);
210  static Ogre::Vector3 getTweakedPropRotation(TuneupDefPtr& tuneup_entry, PropID_t prop_id, Ogre::Vector3 orig_val);
211  static std::string getTweakedPropMedia(TuneupDefPtr& tuneup_entry, PropID_t prop_id, int media_idx, const std::string& orig_val);
212  static std::string getTweakedPropMediaRG(TuneupDefPtr& tuneup_def, PropID_t prop_id, int media_idx, const std::string& orig_val);
213  static bool isPropTweaked(TuneupDefPtr& tuneup_entry, PropID_t flexbody_id, TuneupPropTweak*& out_tweak);
215 
218  static bool isFlexbodyAnyhowRemoved(TuneupDefPtr& tuneup_def, FlexbodyID_t flexbody_id);
219  static Ogre::Vector3 getTweakedFlexbodyOffset(TuneupDefPtr& tuneup_entry, FlexbodyID_t flexbody_id, Ogre::Vector3 orig_val);
220  static Ogre::Vector3 getTweakedFlexbodyRotation(TuneupDefPtr& tuneup_entry, FlexbodyID_t flexbody_id, Ogre::Vector3 orig_val);
221  static std::string getTweakedFlexbodyMedia(TuneupDefPtr& tuneup_entry, FlexbodyID_t flexbody_id, int media_idx, const std::string& orig_val);
222  static std::string getTweakedFlexbodyMediaRG(TuneupDefPtr& tuneup_def, FlexbodyID_t flexbody_id, int media_idx, const std::string& orig_val);
223  static bool isFlexbodyTweaked(TuneupDefPtr& tuneup_entry, FlexbodyID_t flexbody_id, TuneupFlexbodyTweak*& out_tweak);
225 
228  static bool isFlareAnyhowRemoved(TuneupDefPtr& tuneup_def, FlareID_t flare_id);
230 
233  static bool isExhaustAnyhowRemoved(TuneupDefPtr& tuneup_def, ExhaustID_t exhaust_id);
235 
238  static bool isManagedMatAnyhowRemoved(TuneupDefPtr& tuneup_def, const std::string& matname);
239  static std::string getTweakedManagedMatType(TuneupDefPtr& tuneup_def, const std::string& matname, const std::string& orig_val);
240  static std::string getTweakedManagedMatMedia(TuneupDefPtr& tuneup_def, const std::string& matname, int media_idx, const std::string& orig_val);
241  static std::string getTweakedManagedMatMediaRG(TuneupDefPtr& tuneup_def, const std::string& matname, int media_idx, const std::string& orig_val);
242  static bool isManagedMatTweaked(TuneupDefPtr& tuneup_def, const std::string& matname, TuneupManagedMatTweak*& out_tweak);
244 
245 private:
246 
247  static void ParseTuneupAttribute(const std::string& line, TuneupDefPtr& tuneup_def);
248 };
249 
250 }; // namespace RoR
RoR::TuneupDef
Dual purpose:
Definition: TuneupFileFormat.h:93
RoR::TuneupDef::isFlexbodyForceRemoved
bool isFlexbodyForceRemoved(FlexbodyID_t flexbodyid)
Definition: TuneupFileFormat.h:170
RoR::TuneupDef::clone
TuneupDefPtr clone()
Definition: TuneupFileFormat.cpp:38
RoR::TuneupDef::force_remove_flexbodies
std::set< FlexbodyID_t > force_remove_flexbodies
UI overrides.
Definition: TuneupFileFormat.h:126
RoR::TuneupWheelTweak::twt_origin
std::string twt_origin
Addonpart filename.
Definition: TuneupFileFormat.h:60
RoR::TuneupUtil::isAddonPartUsed
static bool isAddonPartUsed(TuneupDefPtr &tuneup_entry, const std::string &filename)
Definition: TuneupFileFormat.cpp:540
RoR::TuneupDef::protected_flares
std::set< FlareID_t > protected_flares
Flares which cannot be altered via 'addonpart_unwanted_flare' directive.
Definition: TuneupFileFormat.h:139
RoR::TuneupUtil::ParseTuneups
static std::vector< TuneupDefPtr > ParseTuneups(Ogre::DataStreamPtr &stream)
Definition: TuneupFileFormat.cpp:546
RoR::TuneupNodeTweak::tnt_nodenum
NodeNum_t tnt_nodenum
Arg#1, required.
Definition: TuneupFileFormat.h:46
RoR::TuneupUtil::isWheelTweaked
static bool isWheelTweaked(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, TuneupWheelTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:219
RoR::TuneupDef::isManagedMatProtected
bool isManagedMatProtected(const std::string &matname) const
Definition: TuneupFileFormat.h:155
RoR::TuneupWheelTweak::twt_tire_radius
float twt_tire_radius
Arg#5, optional.
Definition: TuneupFileFormat.h:58
RoR::TuneupDef::force_remove_props
std::set< PropID_t > force_remove_props
UI overrides.
Definition: TuneupFileFormat.h:125
RoR::TuneupDef::unwanted_props
std::set< PropID_t > unwanted_props
'addonpart_unwanted_prop' directives.
Definition: TuneupFileFormat.h:116
RoR::TuneupPropTweak
< Data of 'addonpart_tweak_prop <prop ID> <offsetX> <offsetY> <offsetZ> <rotX> <rotY> <rotZ> <media1>...
Definition: TuneupFileFormat.h:64
RoR::TuneupWheelTweak::twt_rim_radius
float twt_rim_radius
Arg#6, optional, only applies to some wheel types.
Definition: TuneupFileFormat.h:59
RoR::TuneupFlexbodyTweak::tft_rotation
Ogre::Vector3 tft_rotation
Definition: TuneupFileFormat.h:78
RoR::TuneupUtil::isPropTweaked
static bool isPropTweaked(TuneupDefPtr &tuneup_entry, PropID_t flexbody_id, TuneupPropTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:341
RoR::TuneupFlexbodyTweak::tft_origin
std::string tft_origin
Addonpart filename.
Definition: TuneupFileFormat.h:79
RoR::TuneupManagedMatTweak::tmt_type
std::string tmt_type
Arg#2, required.
Definition: TuneupFileFormat.h:85
RoR::TuneupFlexbodyTweak::tft_media
std::string tft_media
Definition: TuneupFileFormat.h:76
RoR::TuneupUtil::isPropAnyhowRemoved
static bool isPropAnyhowRemoved(TuneupDefPtr &tuneup_def, PropID_t prop_id)
Definition: TuneupFileFormat.cpp:267
RoR::TuneupDef::unwanted_managedmats
std::set< std::string > unwanted_managedmats
'addonpart_unwanted_managedmaterial' directives.
Definition: TuneupFileFormat.h:120
RoR::TuneupDef::prop_tweaks
std::map< PropID_t, TuneupPropTweak > prop_tweaks
Mesh name(s), offset and rotation overrides via 'addonpart_tweak_prop'.
Definition: TuneupFileFormat.h:113
RoR::NODENUM_INVALID
static const NodeNum_t NODENUM_INVALID
Definition: ForwardDeclarations.h:53
RoR::PROPID_INVALID
static const PropID_t PROPID_INVALID
Definition: ForwardDeclarations.h:60
RoR::TuneupDef::unwanted_flexbodies
std::set< FlexbodyID_t > unwanted_flexbodies
'addonpart_unwanted_flexbody' directives.
Definition: TuneupFileFormat.h:117
RoR::TuneupUtil
Definition: TuneupFileFormat.h:178
RoR::TuneupUtil::ExportTuneup
static void ExportTuneup(Ogre::DataStreamPtr &stream, TuneupDefPtr &tuneup)
Definition: TuneupFileFormat.cpp:638
RoR::TuneupDef::isFlexbodyProtected
bool isFlexbodyProtected(FlexbodyID_t flexbodyid) const
Definition: TuneupFileFormat.h:150
RoR::TuneupDef::name
std::string name
Definition: TuneupFileFormat.h:97
RoR::TuneupPropTweak::tpt_prop_id
PropID_t tpt_prop_id
Definition: TuneupFileFormat.h:66
RoR::TuneupDef::protected_nodes
std::set< NodeNum_t > protected_nodes
Nodes that cannot be altered via 'addonpart_tweak_node'.
Definition: TuneupFileFormat.h:135
RoR::TuneupDef::use_addonparts
std::set< std::string > use_addonparts
Addonpart filenames.
Definition: TuneupFileFormat.h:109
RoR::TuneupDef::isExhaustUnwanted
bool isExhaustUnwanted(ExhaustID_t exhaustid)
Definition: TuneupFileFormat.h:163
RoR::TuneupDef::isPropUnwanted
bool isPropUnwanted(PropID_t propid)
Definition: TuneupFileFormat.h:160
RoR::CID_None
@ CID_None
Definition: CacheSystem.h:149
RoR::TuneupUtil::getTweakedPropOffset
static Ogre::Vector3 getTweakedPropOffset(TuneupDefPtr &tuneup_entry, PropID_t prop_id, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:273
RoR::TuneupUtil::getTweakedPropRotation
static Ogre::Vector3 getTweakedPropRotation(TuneupDefPtr &tuneup_entry, PropID_t prop_id, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:287
RoR::TuneupPropTweak::tpt_rotation
Ogre::Vector3 tpt_rotation
Definition: TuneupFileFormat.h:69
RefCountingObjectPtr< TuneupDef >
RoR::ExhaustID_t
int ExhaustID_t
Index into Actor::exhausts, use RoR::EXHAUSTID_INVALID as empty value.
Definition: ForwardDeclarations.h:71
RoR::TuneupDef::protected_props
std::set< PropID_t > protected_props
Props which cannot be altered via 'addonpart_tweak_prop' or 'addonpart_unwanted_prop' directive.
Definition: TuneupFileFormat.h:137
RoR::TuneupWheelTweak::twt_wheel_id
WheelID_t twt_wheel_id
Arg#1, required.
Definition: TuneupFileFormat.h:53
RoR::TuneupDef::isPropProtected
bool isPropProtected(PropID_t propid) const
Definition: TuneupFileFormat.h:149
RoR::TuneupUtil::isNodeTweaked
static bool isNodeTweaked(TuneupDefPtr &tuneup_entry, NodeNum_t nodenum, TuneupNodeTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:250
RoR::TuneupUtil::getTweakedFlexbodyMediaRG
static std::string getTweakedFlexbodyMediaRG(TuneupDefPtr &tuneup_def, FlexbodyID_t flexbody_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:407
RoR::TuneupFlexbodyTweak::tft_flexbody_id
FlexbodyID_t tft_flexbody_id
Definition: TuneupFileFormat.h:75
RoR::TuneupDef::managedmat_tweaks
std::map< std::string, TuneupManagedMatTweak > managedmat_tweaks
Managed material overrides via 'addonpart_tweak_managedmaterial'.
Definition: TuneupFileFormat.h:115
RoR::TuneupDef::node_tweaks
std::map< NodeNum_t, TuneupNodeTweak > node_tweaks
Node position overrides via 'addonpart_tweak_node'.
Definition: TuneupFileFormat.h:111
RoR::TuneupDef::unwanted_flares
std::set< FlareID_t > unwanted_flares
'addonpart_unwanted_flare' directives.
Definition: TuneupFileFormat.h:118
RoR::TuneupManagedMatTweak
< Data of 'addonpart_tweak_managedmaterial <name> <type> <media1> <media2> [<media3>]'
Definition: TuneupFileFormat.h:82
RoR::FLEXBODYID_INVALID
static const FlexbodyID_t FLEXBODYID_INVALID
Definition: ForwardDeclarations.h:63
RoR::TuneupManagedMatTweak::tmt_origin
std::string tmt_origin
Addonpart filename.
Definition: TuneupFileFormat.h:87
RoR::NodeNum_t
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
Definition: ForwardDeclarations.h:52
RoR::TuneupUtil::isManagedMatAnyhowRemoved
static bool isManagedMatAnyhowRemoved(TuneupDefPtr &tuneup_def, const std::string &matname)
Definition: TuneupFileFormat.cpp:464
RoR::TuneupUtil::isFlexbodyAnyhowRemoved
static bool isFlexbodyAnyhowRemoved(TuneupDefPtr &tuneup_def, FlexbodyID_t flexbody_id)
Definition: TuneupFileFormat.cpp:359
RoR::TuneupDef::isManagedMatForceRemoved
bool isManagedMatForceRemoved(const std::string &matname)
Definition: TuneupFileFormat.h:174
RoR::TuneupNodeTweak
< Data of 'addonpart_tweak_node <nodenum> <posX> <posY> <posZ>'
Definition: TuneupFileFormat.h:44
CacheSystem.h
A database of user-installed content alias 'mods' (vehicles, terrains...)
RoR::WHEELID_INVALID
static const WheelID_t WHEELID_INVALID
Definition: ForwardDeclarations.h:57
RoR::TuneupDef::protected_wheels
std::set< WheelID_t > protected_wheels
Wheels that cannot be altered via 'addonpart_tweak_wheel'.
Definition: TuneupFileFormat.h:136
RoR::TuneupWheelTweak::twt_side
WheelSide twt_side
Arg#4, optional, default LEFT (Only applicable to mesh/flexbody wheels)
Definition: TuneupFileFormat.h:57
RoR::TuneupUtil::getTweakedPropMedia
static std::string getTweakedPropMedia(TuneupDefPtr &tuneup_entry, PropID_t prop_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:301
RoR::TuneupDef::flexbody_tweaks
std::map< FlexbodyID_t, TuneupFlexbodyTweak > flexbody_tweaks
Mesh name, offset and rotation overrides via 'addonpart_tweak_flexbody'.
Definition: TuneupFileFormat.h:114
RoR::WheelID_t
int WheelID_t
Index to Actor::ar_wheels, use RoR::WHEELID_INVALID as empty value.
Definition: ForwardDeclarations.h:56
RoR::TuneupNodeTweak::tnt_pos
Ogre::Vector3 tnt_pos
Args#234, required.
Definition: TuneupFileFormat.h:47
RoR::TuneupDef::reset
void reset()
Definition: TuneupFileFormat.cpp:79
RoR::TuneupDef::thumbnail
std::string thumbnail
Definition: TuneupFileFormat.h:100
RoR::TUNEUP_BUF_SIZE
const size_t TUNEUP_BUF_SIZE
Definition: TuneupFileFormat.h:42
RoR::TuneupDef::protected_managedmats
std::set< std::string > protected_managedmats
Managed materials which cannot be altered via 'addonpart_tweak_managedmaterial' directive.
Definition: TuneupFileFormat.h:141
RoR::TuneupDef::isWheelProtected
bool isWheelProtected(WheelID_t wheelid) const
Definition: TuneupFileFormat.h:151
RoR::TuneupDef::isFlareUnwanted
bool isFlareUnwanted(FlareID_t flareid)
Definition: TuneupFileFormat.h:162
RefCountingObject.h
RoR::CacheCategoryId
CacheCategoryId
Definition: CacheSystem.h:147
Application.h
Central state/object manager and communications hub.
RoR::TuneupPropTweak::tpt_origin
std::string tpt_origin
Addonpart filename.
Definition: TuneupFileFormat.h:70
RoR::TuneupDef::description
std::string description
Definition: TuneupFileFormat.h:101
RoR::TuneupUtil::getTweakedFlexbodyMedia
static std::string getTweakedFlexbodyMedia(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:393
RoR::TuneupDef::unwanted_exhausts
std::set< ExhaustID_t > unwanted_exhausts
'addonpart_unwanted_exhaust' directives.
Definition: TuneupFileFormat.h:119
RoR::TuneupUtil::getTweakedManagedMatMediaRG
static std::string getTweakedManagedMatMediaRG(TuneupDefPtr &tuneup_def, const std::string &matname, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:514
RoR::TuneupUtil::getTweakedWheelRimRadius
static float getTweakedWheelRimRadius(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, float orig_val)
Definition: TuneupFileFormat.cpp:137
RoR::TuneupDef::isFlareForceRemoved
bool isFlareForceRemoved(FlareID_t flareid)
Definition: TuneupFileFormat.h:172
RoR::TuneupUtil::isFlareAnyhowRemoved
static bool isFlareAnyhowRemoved(TuneupDefPtr &tuneup_def, FlareID_t flare_id)
Definition: TuneupFileFormat.cpp:450
RoR::TuneupDef::force_remove_managedmats
std::set< std::string > force_remove_managedmats
User unticked an UI checkbox in Tuning menu, section Managed Materials.
Definition: TuneupFileFormat.h:130
RoR::TuneupUtil::getTweakedFlexbodyRotation
static Ogre::Vector3 getTweakedFlexbodyRotation(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:379
RoR::TuneupWheelTweak::twt_media
std::array< std::string, 2 > twt_media
twt_media[0] Arg#2, required ('wheels[2]': face material, 'meshwheels[2]/flexbodywheels': rim mesh) t...
Definition: TuneupFileFormat.h:56
RoR::TuneupDef::author_id
int author_id
Definition: TuneupFileFormat.h:103
RoR::TuneupPropTweak::tpt_media
std::array< std::string, 2 > tpt_media
Media1 = prop mesh; Media2: Steering wheel mesh or beacon flare material.
Definition: TuneupFileFormat.h:67
RoR::TuneupDef::author_name
std::string author_name
Definition: TuneupFileFormat.h:102
RoR::TuneupDef::protected_exhausts
std::set< ExhaustID_t > protected_exhausts
Exhausts which cannot be altered via 'addonpart_unwanted_exhaust' directive.
Definition: TuneupFileFormat.h:140
RoR::TuneupUtil::getTweakedFlexbodyOffset
static Ogre::Vector3 getTweakedFlexbodyOffset(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:365
RoR::TuneupNodeTweak::tnt_origin
std::string tnt_origin
Addonpart filename.
Definition: TuneupFileFormat.h:48
RoR::TuneupDef::protected_flexbodies
std::set< FlexbodyID_t > protected_flexbodies
Flexbodies which cannot be altered via 'addonpart_tweak_flexbody' or 'addonpart_unwanted_flexbody' di...
Definition: TuneupFileFormat.h:138
RoR::TuneupPropTweak::tpt_offset
Ogre::Vector3 tpt_offset
Definition: TuneupFileFormat.h:68
RoR::TuneupUtil::getTweakedPropMediaRG
static std::string getTweakedPropMediaRG(TuneupDefPtr &tuneup_def, PropID_t prop_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:316
RoR::WheelSide::INVALID
@ INVALID
RoR::TuneupUtil::getTweakedManagedMatType
static std::string getTweakedManagedMatType(TuneupDefPtr &tuneup_def, const std::string &matname, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:485
RoR::TuneupDef::filename
std::string filename
target vehicle filename
Definition: TuneupFileFormat.h:99
RoR::TuneupUtil::isExhaustAnyhowRemoved
static bool isExhaustAnyhowRemoved(TuneupDefPtr &tuneup_def, ExhaustID_t exhaust_id)
Definition: TuneupFileFormat.cpp:457
RoR::TuneupUtil::isManagedMatTweaked
static bool isManagedMatTweaked(TuneupDefPtr &tuneup_def, const std::string &matname, TuneupManagedMatTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:470
RoR::TuneupUtil::getTweakedWheelMediaRG
static std::string getTweakedWheelMediaRG(TuneupDefPtr &tuneup_def, WheelID_t wheel_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:166
RoR::FlareID_t
int FlareID_t
Index into Actor::ar_flares, use RoR::FLAREID_INVALID as empty value.
Definition: ForwardDeclarations.h:68
RoR::TuneupUtil::getTweakedWheelSide
static WheelSide getTweakedWheelSide(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, WheelSide orig_val)
Definition: TuneupFileFormat.cpp:193
RoR::TuneupDef::isFlareProtected
bool isFlareProtected(FlareID_t flareid) const
Definition: TuneupFileFormat.h:153
RoR::TuneupUtil::getTweakedWheelTireRadius
static float getTweakedWheelTireRadius(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, float orig_val)
Definition: TuneupFileFormat.cpp:123
RoR::TuneupDef::isExhaustForceRemoved
bool isExhaustForceRemoved(ExhaustID_t exhaustid)
Definition: TuneupFileFormat.h:173
RoR::TuneupUtil::getTweakedManagedMatMedia
static std::string getTweakedManagedMatMedia(TuneupDefPtr &tuneup_def, const std::string &matname, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:499
RoR::TuneupDef::category_id
CacheCategoryId category_id
Definition: TuneupFileFormat.h:104
RoR::TuneupManagedMatTweak::tmt_name
std::string tmt_name
Arg#1, required.
Definition: TuneupFileFormat.h:84
RoR::TuneupWheelTweak
< Data of 'addonpart_tweak_wheel <wheel ID> <media1> <media2> <side flag> <tire radius> <rim radius>'
Definition: TuneupFileFormat.h:51
RoR::TuneupUtil::getTweakedNodePosition
static Ogre::Vector3 getTweakedNodePosition(TuneupDefPtr &tuneup_entry, NodeNum_t nodenum, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:236
RoR::TuneupDef::force_remove_flares
std::set< FlareID_t > force_remove_flares
User unticked an UI checkbox in Tuning menu, section Flares.
Definition: TuneupFileFormat.h:128
RoR::TuneupDef::force_wheel_sides
std::map< WheelID_t, WheelSide > force_wheel_sides
UI overrides.
Definition: TuneupFileFormat.h:127
RoR::TuneupDef::isExhaustProtected
bool isExhaustProtected(ExhaustID_t exhaustid) const
Definition: TuneupFileFormat.h:154
RoR::TuneupDef::isFlexbodyUnwanted
bool isFlexbodyUnwanted(FlexbodyID_t flexbodyid)
Definition: TuneupFileFormat.h:161
RoR::WheelSide
WheelSide
Used by rig-def/addonpart/tuneup formats to specify wheel rim mesh orientation.
Definition: GfxData.h:115
RoR::FlexbodyID_t
int FlexbodyID_t
Index to GfxActor::m_flexbodies, use RoR::FLEXBODYID_INVALID as empty value.
Definition: ForwardDeclarations.h:62
RefCountingObject
Self reference-counting objects, as requred by AngelScript garbage collector.
Definition: RefCountingObject.h:26
RoR::TuneupDef::isWheelSideForced
bool isWheelSideForced(WheelID_t wheelid, WheelSide &out_val) const
Definition: TuneupFileFormat.cpp:107
RoR::TuneupUtil::isFlexbodyTweaked
static bool isFlexbodyTweaked(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, TuneupFlexbodyTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:432
RoR::TuneupDef::guid
std::string guid
target vehicle GUID
Definition: TuneupFileFormat.h:98
RoR::TuneupUtil::ParseTuneupAttribute
static void ParseTuneupAttribute(const std::string &line, TuneupDefPtr &tuneup_def)
Definition: TuneupFileFormat.cpp:605
RoR::TuneupFlexbodyTweak::tft_offset
Ogre::Vector3 tft_offset
Definition: TuneupFileFormat.h:77
RoR::TuneupFlexbodyTweak
< Data of 'addonpart_tweak_flexbody <flexbody ID> <offsetX> <offsetY> <offsetZ> <rotX> <rotY> <rotZ> ...
Definition: TuneupFileFormat.h:73
RoR::TuneupUtil::getTweakedWheelMedia
static std::string getTweakedWheelMedia(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:151
RoR::TuneupDef::isPropForceRemoved
bool isPropForceRemoved(PropID_t propid)
Definition: TuneupFileFormat.h:169
RoR
Definition: AppContext.h:36
RoR::TuneupManagedMatTweak::tmt_media
std::array< std::string, 3 > tmt_media
Arg#3, required, Arg#4, optional, Arg#5, optional.
Definition: TuneupFileFormat.h:86
RoR::TuneupDef::force_remove_exhausts
std::set< ExhaustID_t > force_remove_exhausts
User unticked an UI checkbox in Tuning menu, section Exhausts.
Definition: TuneupFileFormat.h:129
RoR::TuneupDef::wheel_tweaks
std::map< WheelID_t, TuneupWheelTweak > wheel_tweaks
Mesh name and radius overrides via 'addonpart_tweak_wheel'.
Definition: TuneupFileFormat.h:112
RoR::TuneupDef::isManagedMatUnwanted
bool isManagedMatUnwanted(const std::string &matname)
Definition: TuneupFileFormat.h:164
RoR::PropID_t
int PropID_t
Index to GfxActor::m_props, use RoR::PROPID_INVALID as empty value.
Definition: ForwardDeclarations.h:59
RoR::TuneupDef::isNodeProtected
bool isNodeProtected(NodeNum_t nodenum) const
Definition: TuneupFileFormat.h:152