public ITES5ValueCodeChunk ConvertFunction(ITES5Referencer calledOn, TES4Function function, TES5CodeScope codeScope, TES5GlobalScope globalScope, TES5MultipleScriptsScope multipleScriptsScope) { TES5StaticReference newCalledOn = TES5StaticReferenceFactory.Game; TES5ObjectCallArguments arguments = objectCallArgumentsFactory.CreateArgumentList(function.Arguments, codeScope, globalScope, multipleScriptsScope); return(this.objectCallFactory.CreateObjectCall(newCalledOn, "PlayBink", arguments)); }
public ITES5ValueCodeChunk ConvertFunction(ITES5Referencer calledOn, TES4Function function, TES5CodeScope codeScope, TES5GlobalScope globalScope, TES5MultipleScriptsScope multipleScriptsScope) { TES5PlayerReference player = TES5ReferenceFactory.CreateReferenceToPlayer(globalScope); TES5ObjectCallArguments arguments = objectCallArgumentsFactory.CreateArgumentList(function.Arguments, codeScope, globalScope, multipleScriptsScope); return(objectCallFactory.CreateObjectCall(player, "SetDisplayName", arguments)); }
public ITES5ValueCodeChunk ConvertFunction(ITES5Referencer calledOn, TES4Function function, TES5CodeScope codeScope, TES5GlobalScope globalScope, TES5MultipleScriptsScope multipleScriptsScope) { //WTM: Note: This always uses the player to send the tresspass alarm. This might mean the player ultimately sends the trespass alarm for the player. //Oblivion doesn't seem to have a sender, only a trespasser. TES5ObjectCallArguments arguments = objectCallArgumentsFactory.CreateArgumentList(function.Arguments, codeScope, globalScope, multipleScriptsScope); return(objectCallFactory.CreateObjectCall(TES5ReferenceFactory.CreateReferenceToPlayer(globalScope), function.FunctionCall.FunctionName, arguments)); }
public ITES5ValueCodeChunk ConvertFunction(ITES5Referencer calledOn, TES4Function function, TES5CodeScope codeScope, TES5GlobalScope globalScope, TES5MultipleScriptsScope multipleScriptsScope) { const string functionName = "QueryStat"; ITES5Referencer newCalledOn = TES5StaticReferenceFactory.Game; TES4FunctionArguments functionArguments = function.Arguments; int oldArgValue = (int)functionArguments.Single().Data; string newArgValue = statMap[oldArgValue]; TES4FunctionArguments tes4Arguments = new TES4FunctionArguments() { new TES4String(newArgValue) }; TES5ObjectCallArguments tes5Arguments = objectCallArgumentsFactory.CreateArgumentList(tes4Arguments, codeScope, globalScope, multipleScriptsScope); return(objectCallFactory.CreateObjectCall(newCalledOn, functionName, tes5Arguments)); }
public ITES5ValueCodeChunk ConvertFunction(ITES5Referencer calledOn, TES4Function function, TES5CodeScope codeScope, TES5GlobalScope globalScope, TES5MultipleScriptsScope multipleScriptsScope) { TES5ObjectCallArguments arguments = objectCallArgumentsFactory.CreateArgumentList(function.Arguments, codeScope, globalScope, multipleScriptsScope); return(this.objectCallFactory.CreateObjectCall(TES5StaticReference.Game, "ModAmountSoldStolen", multipleScriptsScope, arguments)); }