1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-16 07:07:13 +02:00

Use 'color' instead of 'colour' internally and expose aliases to both for the script interface.

This commit is contained in:
Sandu Liviu Catalin
2016-08-21 18:07:35 +03:00
parent a64fa8a3a1
commit 07d37831b9
8 changed files with 39 additions and 34 deletions

View File

@ -1158,21 +1158,21 @@ void CVehicle::SetTrackRotation(SQInteger num) const
}
// ------------------------------------------------------------------------------------------------
Int32 CVehicle::GetLastPrimaryColour() const
Int32 CVehicle::GetLastPrimaryColor() const
{
// Validate the managed identifier
Validate();
// Return the requested information
return Core::Get().GetVehicle(m_ID).mLastPrimaryColour;
return Core::Get().GetVehicle(m_ID).mLastPrimaryColor;
}
// ------------------------------------------------------------------------------------------------
Int32 CVehicle::GetLastSecondaryColour() const
Int32 CVehicle::GetLastSecondaryColor() const
{
// Validate the managed identifier
Validate();
// Return the requested information
return Core::Get().GetVehicle(m_ID).mLastSecondaryColour;
return Core::Get().GetVehicle(m_ID).mLastSecondaryColor;
}
// ------------------------------------------------------------------------------------------------
@ -1813,6 +1813,8 @@ void Register_CVehicle(HSQUIRRELVM vm)
.Prop(_SC("Health"), &CVehicle::GetHealth, &CVehicle::SetHealth)
.Prop(_SC("PrimaryColor"), &CVehicle::GetPrimaryColor, &CVehicle::SetPrimaryColor)
.Prop(_SC("SecondaryColor"), &CVehicle::GetSecondaryColor, &CVehicle::SetSecondaryColor)
.Prop(_SC("PrimaryColour"), &CVehicle::GetPrimaryColor, &CVehicle::SetPrimaryColor)
.Prop(_SC("SecondaryColour"), &CVehicle::GetSecondaryColor, &CVehicle::SetSecondaryColor)
.Prop(_SC("DamageData"), &CVehicle::GetDamageData, &CVehicle::SetDamageData)
.Prop(_SC("Radio"), &CVehicle::GetRadio, &CVehicle::SetRadio)
.Prop(_SC("TurretRotation"), &CVehicle::GetTurretRotation)
@ -1822,8 +1824,10 @@ void Register_CVehicle(HSQUIRRELVM vm)
.Prop(_SC("VerticalTurretRotation"), &CVehicle::GetVerticalTurretRotation)
.Prop(_SC("TrackPosition"), &CVehicle::GetTrackPosition, &CVehicle::SetTrackPosition)
.Prop(_SC("TrackRotation"), &CVehicle::GetTrackRotation, &CVehicle::SetTrackRotation)
.Prop(_SC("LastPrimaryColour"), &CVehicle::GetLastPrimaryColour)
.Prop(_SC("LastSecondaryColour"), &CVehicle::GetLastSecondaryColour)
.Prop(_SC("LastPrimaryColor"), &CVehicle::GetLastPrimaryColor)
.Prop(_SC("LastSecondaryColor"), &CVehicle::GetLastSecondaryColor)
.Prop(_SC("LastPrimaryColour"), &CVehicle::GetLastPrimaryColor)
.Prop(_SC("LastSecondaryColour"), &CVehicle::GetLastSecondaryColor)
.Prop(_SC("LastHealth"), &CVehicle::GetLastHealth)
.Prop(_SC("LastPosition"), &CVehicle::GetLastPosition)
.Prop(_SC("LastRotation"), &CVehicle::GetLastRotation)

View File

@ -640,12 +640,12 @@ public:
/* --------------------------------------------------------------------------------------------
* Retrieve the last known primary color for the managed vehicle entity.
*/
Int32 GetLastPrimaryColour() const;
Int32 GetLastPrimaryColor() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the last known secondary color for the managed vehicle entity.
*/
Int32 GetLastSecondaryColour() const;
Int32 GetLastSecondaryColor() const;
/* --------------------------------------------------------------------------------------------
* Retrieve the last known health for the managed vehicle entity.