19#ifndef HEADER_ABSTRACT_CHARACTERISTICS_HPP
20#define HEADER_ABSTRACT_CHARACTERISTICS_HPP
49 std::vector<float> *fv;
52 Value(
float *f) : f(f) {}
53 Value(
bool *b) : b(b) {}
54 Value(std::vector<float> *fv) : fv(fv) {}
63 TYPE_INTERPOLATION_ARRAY
66 enum CharacteristicType
78 SUSPENSION_EXP_SPRING_RESPONSE,
82 STABILITY_ROLL_INFLUENCE,
83 STABILITY_CHASSIS_LINEAR_DAMPING,
84 STABILITY_CHASSIS_ANGULAR_DAMPING,
85 STABILITY_DOWNWARD_IMPULSE_FACTOR,
86 STABILITY_TRACK_CONNECTION_ACCEL,
87 STABILITY_ANGULAR_FACTOR,
88 STABILITY_SMOOTH_FLYING_IMPULSE,
92 TURN_TIME_RESET_STEER,
98 ENGINE_GENERIC_MAX_SPEED,
100 ENGINE_BRAKE_TIME_INCREASE,
101 ENGINE_MAX_SPEED_REVERSE_RATIO,
111 WHEELS_DAMPING_RELAXATION,
112 WHEELS_DAMPING_COMPRESSION,
129 PARACHUTE_DURATION_OTHER,
130 PARACHUTE_DURATION_RANK_MULT,
131 PARACHUTE_DURATION_SPEED_MULT,
132 PARACHUTE_LBOUND_FRACTION,
133 PARACHUTE_UBOUND_FRACTION,
137 FRICTION_KART_FRICTION,
141 BUBBLEGUM_SPEED_FRACTION,
143 BUBBLEGUM_FADE_IN_TIME,
144 BUBBLEGUM_SHIELD_DURATION,
150 ZIPPER_MAX_SPEED_INCREASE,
151 ZIPPER_FADE_OUT_TIME,
156 SWATTER_SQUASH_DURATION,
157 SWATTER_SQUASH_SLOWDOWN,
160 PLUNGER_BAND_MAX_LENGTH,
162 PLUNGER_BAND_DURATION,
163 PLUNGER_BAND_SPEED_INCREASE,
164 PLUNGER_BAND_FADE_OUT_TIME,
165 PLUNGER_IN_FACE_TIME,
179 EXPLOSION_INVULNERABILITY_TIME,
186 NITRO_SMALL_CONTAINER,
188 NITRO_MAX_SPEED_INCREASE,
193 SLIPSTREAM_DURATION_FACTOR,
194 SLIPSTREAM_BASE_SPEED,
197 SLIPSTREAM_INNER_FACTOR,
198 SLIPSTREAM_MIN_COLLECT_TIME,
199 SLIPSTREAM_MAX_COLLECT_TIME,
200 SLIPSTREAM_ADD_POWER,
201 SLIPSTREAM_MIN_SPEED,
202 SLIPSTREAM_MAX_SPEED_INCREASE,
203 SLIPSTREAM_FADE_OUT_TIME,
212 SKID_REVERT_VISUAL_TIME,
214 SKID_TIME_TILL_BONUS,
218 SKID_PHYSICAL_JUMP_TIME,
219 SKID_GRAPHICAL_JUMP_TIME,
220 SKID_POST_SKID_ROTATE_FACTOR,
221 SKID_REDUCE_TURN_MIN,
222 SKID_REDUCE_TURN_MAX,
249 virtual void process(CharacteristicType type, Value value,
bool *is_set)
const;
251 static ValueType
getType(CharacteristicType type);
252 static std::string
getName(CharacteristicType type);
261 float getSuspensionStiffness()
const;
262 float getSuspensionRest()
const;
263 float getSuspensionTravel()
const;
264 bool getSuspensionExpSpringResponse()
const;
265 float getSuspensionMaxForce()
const;
267 float getStabilityRollInfluence()
const;
268 float getStabilityChassisLinearDamping()
const;
269 float getStabilityChassisAngularDamping()
const;
270 float getStabilityDownwardImpulseFactor()
const;
271 float getStabilityTrackConnectionAccel()
const;
272 std::vector<float> getStabilityAngularFactor()
const;
273 float getStabilitySmoothFlyingImpulse()
const;
276 float getTurnTimeResetSteer()
const;
279 float getEnginePower()
const;
280 float getEngineMaxSpeed()
const;
281 float getEngineGenericMaxSpeed()
const;
282 float getEngineBrakeFactor()
const;
283 float getEngineBrakeTimeIncrease()
const;
284 float getEngineMaxSpeedReverseRatio()
const;
286 std::vector<float> getGearSwitchRatio()
const;
287 std::vector<float> getGearPowerIncrease()
const;
289 float getMass()
const;
291 float getWheelsDampingRelaxation()
const;
292 float getWheelsDampingCompression()
const;
294 float getJumpAnimationTime()
const;
296 float getLeanMax()
const;
297 float getLeanSpeed()
const;
299 float getAnvilDuration()
const;
300 float getAnvilWeight()
const;
301 float getAnvilSpeedFactor()
const;
303 float getParachuteFriction()
const;
304 float getParachuteDuration()
const;
305 float getParachuteDurationOther()
const;
306 float getParachuteDurationRankMult()
const;
307 float getParachuteDurationSpeedMult()
const;
308 float getParachuteLboundFraction()
const;
309 float getParachuteUboundFraction()
const;
310 float getParachuteMaxSpeed()
const;
312 float getFrictionKartFriction()
const;
314 float getBubblegumDuration()
const;
315 float getBubblegumSpeedFraction()
const;
316 float getBubblegumTorque()
const;
317 float getBubblegumFadeInTime()
const;
318 float getBubblegumShieldDuration()
const;
320 float getZipperDuration()
const;
321 float getZipperForce()
const;
322 float getZipperSpeedGain()
const;
323 float getZipperMaxSpeedIncrease()
const;
324 float getZipperFadeOutTime()
const;
326 float getSwatterDuration()
const;
327 float getSwatterDistance()
const;
328 float getSwatterSquashDuration()
const;
329 float getSwatterSquashSlowdown()
const;
331 float getPlungerBandMaxLength()
const;
332 float getPlungerBandForce()
const;
333 float getPlungerBandDuration()
const;
334 float getPlungerBandSpeedIncrease()
const;
335 float getPlungerBandFadeOutTime()
const;
336 float getPlungerInFaceTime()
const;
338 std::vector<float> getStartupTime()
const;
339 std::vector<float> getStartupBoost()
const;
341 float getRescueDuration()
const;
342 float getRescueVertOffset()
const;
343 float getRescueHeight()
const;
345 float getExplosionDuration()
const;
346 float getExplosionRadius()
const;
347 float getExplosionInvulnerabilityTime()
const;
349 float getNitroDuration()
const;
350 float getNitroEngineForce()
const;
351 float getNitroEngineMult()
const;
352 float getNitroConsumption()
const;
353 float getNitroSmallContainer()
const;
354 float getNitroBigContainer()
const;
355 float getNitroMaxSpeedIncrease()
const;
356 float getNitroFadeOutTime()
const;
357 float getNitroMax()
const;
359 float getSlipstreamDurationFactor()
const;
360 float getSlipstreamBaseSpeed()
const;
361 float getSlipstreamLength()
const;
362 float getSlipstreamWidth()
const;
363 float getSlipstreamInnerFactor()
const;
364 float getSlipstreamMinCollectTime()
const;
365 float getSlipstreamMaxCollectTime()
const;
366 float getSlipstreamAddPower()
const;
367 float getSlipstreamMinSpeed()
const;
368 float getSlipstreamMaxSpeedIncrease()
const;
369 float getSlipstreamFadeOutTime()
const;
371 float getSkidIncrease()
const;
372 float getSkidDecrease()
const;
373 float getSkidMax()
const;
374 float getSkidTimeTillMax()
const;
375 float getSkidVisual()
const;
376 float getSkidVisualTime()
const;
377 float getSkidRevertVisualTime()
const;
378 float getSkidMinSpeed()
const;
379 std::vector<float> getSkidTimeTillBonus()
const;
380 std::vector<float> getSkidBonusSpeed()
const;
381 std::vector<float> getSkidBonusTime()
const;
382 std::vector<float> getSkidBonusForce()
const;
383 float getSkidPhysicalJumpTime()
const;
384 float getSkidGraphicalJumpTime()
const;
385 float getSkidPostSkidRotateFactor()
const;
386 float getSkidReduceTurnMin()
const;
387 float getSkidReduceTurnMax()
const;
388 bool getSkidEnabled()
const;
Characteristics are the properties of a kart that influence gameplay mechanics.
Definition: abstract_characteristic.hpp:43
static ValueType getType(CharacteristicType type)
Returns the type of a given characteristic.
Definition: abstract_characteristic.cpp:45
static std::string getName(CharacteristicType type)
Converts the enum value to a string.
Definition: abstract_characteristic.cpp:281
virtual void process(CharacteristicType type, Value value, bool *is_set) const
The process function is the core of this characteristics system.
Definition: abstract_characteristic.cpp:37
This class manages a set of (x_i,y_i) points, x_i must be sorted.
Definition: interpolation_array.hpp:32
Definition: abstract_characteristic.hpp:46