Minor script formatting

install-platforms
Mark 2017-06-08 21:25:11 +02:00
parent a87eed5de1
commit 6440b16387
6 changed files with 8 additions and 10 deletions

View File

@ -41,6 +41,7 @@ public func SetEncounterCB(object clonk, string cb_fn)
return true;
}
// Enable/disable auto-searching of targets.
public func SetAutoSearchTarget(object clonk, bool new_auto_search_target)
{
@ -109,6 +110,7 @@ public func OnAddAI(proplist fx_ai)
fx_ai.commander = fx_ai.Target.commander;
}
// Callback from the Definition()-call
public func OnDefineAI(proplist def)
{

View File

@ -46,4 +46,3 @@ public func CheckHandsAction(effect fx)
// Probably hands busy. Just wait.
return false;
}

View File

@ -15,4 +15,4 @@ public func LogAI(effect fx, string message)
if (fx.control.DebugLoggingOn)
Log("[%d]AI WARNING (%v): %s", FrameCounter(), fx.Target, message);
return;
}
}

View File

@ -15,12 +15,9 @@ public func SetHome(object clonk, int x, int y, int dir)
if (!fx_ai)
return false;
// nil/nil defaults to current position.
if (!GetType(x))
x = clonk->GetX();
if (!GetType(y))
y = clonk->GetY();
if (!GetType(dir))
dir = clonk->GetDir();
x = x ?? clonk->GetX();
y = y ?? clonk->GetY();
dir = dir ?? clonk->GetDir();
fx_ai.home_x = x;
fx_ai.home_y = y;
fx_ai.home_dir = dir;

View File

@ -250,4 +250,4 @@ public func ExecuteLookAtTarget(effect fx)
else
fx.Target->SetDir(DIR_Left);
return true;
}
}

View File

@ -100,4 +100,4 @@ public func IsVehicleForTarget(effect fx, object vehicle, object target)
if (vehicle->GetID() == Catapult)
return true;
return false;
}
}