allow Lua expressions in ActorCommand parameters

This commit is contained in:
Chris Danford
2004-11-05 06:43:12 +00:00
parent 012ead80fd
commit bc184683ca
4 changed files with 14 additions and 14 deletions
+6 -6
View File
@@ -3,6 +3,8 @@
#include "RageUtil.h"
#include "RageLog.h"
#include "arch/Dialog/Dialog.h"
#include "LuaHelpers.h"
void IncorrectActorParametersWarning( const ParsedCommand &command, int iMaxIndexAccessed )
{
@@ -12,13 +14,11 @@ void IncorrectActorParametersWarning( const ParsedCommand &command, int iMaxInde
Dialog::OK( sError );
}
void ParsedCommandToken::Set( const CString &sToken )
void ParsedCommandToken::Set( const CString &sParam )
{
s = sToken;
f = strtof( sToken, NULL );
i = atoi( sToken );
b = i != 0;
bColorIsValid = c.FromString( sToken );
s = sParam;
f = Lua::RunExpressionF( sParam );
bColorIsValid = c.FromString( sParam );
}
void ParsedCommand::Set( const CString &sCommand )