Cstrike
2010-12-01 14:22:23
What do you think of this?
Ex 1:
In the Interfaces.simba file, we already have
With all the new functions added, GetInterfaceText is now the odd one out due to the name, but obviously we can't remove it or some scripts wouldnt work, so I propose that we move this one down to the bottom and just give it inheritance of GetInterfaceComponentText
like:
function GetInterfaceText…
begin
Result := GetInterfaceComponentText…
end;
That way we keep the main stuff at the top and it keeps the reflection files neater.
Three functions right off the bat I can name that would need this based on our function naming would be:
Ex 2:
I don't know if Nava2 meant to put an R there or not :p, assuming he did, then inheritance would keep the subject the same and make it more clear to everyone else as well that its reflection.
I was a bit hesitant to post this topic since it isn't quite 'progress', but rather 'clean up', to keep the includes nice.
Another idea that may seem more far-fetched is the notion of creating a new include file that houses all of the inheritance, if you approve of the idea above… since the functions need to be kept. In addition, IIRC… SRL does function deletion even at times every new SRL version (4–>5)?
What do you think?
Ex 1:
In the Interfaces.simba file, we already have
GetInterfaceComponentText...
// Which does the same as
GetInterfaceTextWith all the new functions added, GetInterfaceText is now the odd one out due to the name, but obviously we can't remove it or some scripts wouldnt work, so I propose that we move this one down to the bottom and just give it inheritance of GetInterfaceComponentText
like:
function GetInterfaceText…
begin
Result := GetInterfaceComponentText…
end;
That way we keep the main stuff at the top and it keeps the reflection files neater.
Three functions right off the bat I can name that would need this based on our function naming would be:
GetInterfaceText
GetModelID
GetModelZoom
Ex 2:
{*******************************************************************************
function _SkillStringToInt(skill: string): Integer;
By: Nava2
Description: Gets the integer index of a skill string name.
*******************************************************************************}
function _SkillStringToInt(skill: string): Integer;
var
i, h: Integer;
begin
Result := -1;
skill := LowerCase(skill);
h := High(SKILL_STRINGS);
for i := 0 to h do
if (skill = SKILL_STRINGS[i]) then
begin
Result := i;
Exit;
end;
SRL_Warn('_SkillStringToInt',
'skill: ' + skill + ' was not valid.',
warn_AllVersions);
end;
{*******************************************************************************
function _SkillStringToInt(skill: string): Integer;
By: Nava2
Description: Inheritance
*******************************************************************************}
function R_SkillStringToInt(skill: string): Integer;
begin
Result := _SkillStringToInt(skill);
end; ** Technically reverse inheritance I don't know if Nava2 meant to put an R there or not :p, assuming he did, then inheritance would keep the subject the same and make it more clear to everyone else as well that its reflection.
I was a bit hesitant to post this topic since it isn't quite 'progress', but rather 'clean up', to keep the includes nice.
Another idea that may seem more far-fetched is the notion of creating a new include file that houses all of the inheritance, if you approve of the idea above… since the functions need to be kept. In addition, IIRC… SRL does function deletion even at times every new SRL version (4–>5)?
What do you think?