Naming convention
This commit is contained in:
parent
dbb62c2f7b
commit
c0f1f4c57b
@ -1,11 +0,0 @@
|
||||
function main(jsonvalue params)
|
||||
{
|
||||
if ${params.Get[1].Equal["jk"]}
|
||||
{
|
||||
echo "JK JK"
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "for real"
|
||||
}
|
||||
}
|
||||
@ -17,9 +17,10 @@ objectdef MRNavigation
|
||||
Percision:Set[${persision}]
|
||||
}
|
||||
|
||||
method MoveTo(point3f point)
|
||||
method MoveTo(point3f point, float minDistance = 1)
|
||||
{
|
||||
This:BreakCampSpot
|
||||
This.Percision:Set[${minDistance}]
|
||||
MoveToRequested:Set[TRUE]
|
||||
MoveToPoint:Set[${point.X}, ${point.Z}, ${point.Z}]
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@ objectdef TestController
|
||||
"method": "SetMoveSpot",
|
||||
"parameters": {
|
||||
"ForWho": "Dasteg",
|
||||
"minDistance": 1,
|
||||
"location": {
|
||||
"X": ${Me.Target.Loc.X},
|
||||
"Y": ${Me.Target.Loc.Y},
|
||||
|
||||
@ -3,15 +3,10 @@ objectdef RelayApi
|
||||
{
|
||||
method SetMoveSpot()
|
||||
{
|
||||
"echo SetMoveSpot: ${Context.AsJSON~}"
|
||||
if !${MRNav(exists)}
|
||||
{
|
||||
echo "Loading Movement"
|
||||
RunScript "${LavishScript.HomeDirectory}/Scripts/mr/common/Navigation/Movement"
|
||||
}
|
||||
|
||||
variable point3f location
|
||||
location:Set[${Context.Get["parameters", "location", "X"]}, ${Context.Get["parameters", "location", "Y"]}, ${Context.Get["parameters", "location", "Z"]}]
|
||||
MRApi:MoveTo["${Context.Get["parameters","ForWho"]}", "${location}"]
|
||||
MRApi:MoveTo["${Context.Get["parameters","ForWho"]}", "${location}", ${Context.Get["parameters", "minDistance"]}]
|
||||
|
||||
}
|
||||
}
|
||||
@ -20,8 +15,13 @@ variable(global) RelayApi MRRelayApi
|
||||
|
||||
function main()
|
||||
{
|
||||
if !${Script[Movement](exists)}
|
||||
{
|
||||
RunScript "${LavishScript.HomeDirectory}/Scripts/mr/common/Navigation/Movement"
|
||||
}
|
||||
|
||||
while 1
|
||||
{
|
||||
wait 1
|
||||
wait 100
|
||||
}
|
||||
}
|
||||
@ -62,7 +62,7 @@ objectdef MRApi
|
||||
return ${negate}
|
||||
}
|
||||
|
||||
static method MoveTo(string forWho, point3f location)
|
||||
static method MoveTo(string forWho, point3f location, float minDistance = 0)
|
||||
{
|
||||
echo "Moving to ${location}"
|
||||
if ${MRApi.IsForMe[${forWho}]}
|
||||
|
||||
9
mr.iss
9
mr.iss
@ -1,6 +1,10 @@
|
||||
|
||||
function main(... params)
|
||||
{
|
||||
if !${Script[Relay](exists)}
|
||||
{
|
||||
RunScript "${LavishScript.HomeDirectory}/Scripts/mr/common/Relay"
|
||||
}
|
||||
variable string command = ${params[1].Lower}
|
||||
if ${command.Equal["osa"]}
|
||||
{
|
||||
@ -17,10 +21,7 @@ function main(... params)
|
||||
}
|
||||
elseif ${command.Equal["relay"]}
|
||||
{
|
||||
if !${MRRelayApi(exists)}
|
||||
{
|
||||
RunScript "${LavishScript.HomeDirectory}/Scripts/mr/common/Relay"
|
||||
}
|
||||
|
||||
}
|
||||
elseif ${command.Equal["!c"]}
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user