forked from Mirrors/openclonk
Minor script formatting
parent
a87eed5de1
commit
6440b16387
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -46,4 +46,3 @@ public func CheckHandsAction(effect fx)
|
|||
// Probably hands busy. Just wait.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -250,4 +250,4 @@ public func ExecuteLookAtTarget(effect fx)
|
|||
else
|
||||
fx.Target->SetDir(DIR_Left);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,4 +100,4 @@ public func IsVehicleForTarget(effect fx, object vehicle, object target)
|
|||
if (vehicle->GetID() == Catapult)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue