forked from Mirrors/openclonk
Fix inherited() calls
The ... operator should be added so that the parameters are passed down. In some cases even the named parameters were not passed down.directional-lights
parent
94ec4e336b
commit
d356d9db3d
|
@ -8,7 +8,7 @@
|
|||
|
||||
func Initialize()
|
||||
{
|
||||
return _inherited();
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
public func ControlUse(object pClonk, int ix, int iy)
|
||||
|
|
|
@ -7,7 +7,7 @@ local fast;
|
|||
func Initialize()
|
||||
{
|
||||
fast = 0;
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
func MakeFast(int f) { fast = f; }
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
func Initialize()
|
||||
{
|
||||
AddEffect("Lifesteal", this, 100, 0, nil);
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
|
@ -12,7 +12,7 @@ private func Stick()
|
|||
fade_out_forced = true;
|
||||
if (g_object_fade) AddEffect("IntFadeOut", this, 100, 1, g_object_fade, Rule_ObjectFade);
|
||||
}
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
public func FadeOutForced() { return fade_out_forced; }
|
|
@ -114,7 +114,7 @@ public func HasInteractionMenu() { return true; }
|
|||
// Show settins in interaction menu
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
var cablecar_menu =
|
||||
{
|
||||
title = "$CableCarOptions$",
|
||||
|
|
|
@ -25,7 +25,7 @@ public func CableDeactivation(int count) { }
|
|||
|
||||
/*--- Callbacks ---*/
|
||||
|
||||
// Be sure to always call these via _inherited();
|
||||
// Be sure to always call these via _inherited(...);
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ public func HasInteractionMenu() { return true; }
|
|||
// Show settings in interaction menu
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
var crossing_menu =
|
||||
{
|
||||
title = "$StationSettings$",
|
||||
|
|
|
@ -180,7 +180,7 @@ public func GetExtensionMenuEntries(object clonk)
|
|||
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
var menu =
|
||||
{
|
||||
title = "$ReinforceScaffold$",
|
||||
|
|
|
@ -56,7 +56,7 @@ private func GetAttraction(proplist coordinates)
|
|||
|
||||
private func MissionComplete()
|
||||
{
|
||||
if (!attraction) return _inherited();
|
||||
if (!attraction) return _inherited(...);
|
||||
var wait = 20 + Random(80);
|
||||
// Slow animation speed
|
||||
fly_anim = PlayAnimation("Fly", 1, Anim_Linear(GetAnimationPosition(fly_anim), 0, fly_anim_len, 20, ANIM_Loop));
|
||||
|
@ -78,14 +78,14 @@ private func RegularSpeed()
|
|||
private func SleepComplete()
|
||||
{
|
||||
fly_anim = PlayAnimation("Fly", 1, Anim_Linear(GetAnimationPosition(fly_anim), 0, fly_anim_len/2, 10, ANIM_Hold));
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
// Restart the animation
|
||||
private func WakeUp()
|
||||
{
|
||||
fly_anim = PlayAnimation("Fly", 1, Anim_Linear(GetAnimationPosition(fly_anim), 0, fly_anim_len, 10, ANIM_Loop));
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
private func GetRestingPlace(proplist coordinates)
|
||||
|
|
|
@ -81,14 +81,14 @@ private func MissionComplete()
|
|||
private func Sleep()
|
||||
{
|
||||
this.Visibility = VIS_None;
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
|
||||
private func WakeUp()
|
||||
{
|
||||
this.Visibility = VIS_All;
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
// Action end call.
|
||||
|
|
|
@ -16,12 +16,12 @@ private func Initialize()
|
|||
SetAction("Fly");
|
||||
SetPhase(Random(3));
|
||||
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
private func Death()
|
||||
{
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
RemoveObject();
|
||||
}
|
||||
|
||||
|
@ -52,13 +52,13 @@ private func Sleep()
|
|||
private func SleepComplete()
|
||||
{
|
||||
SetAction("Sleep");
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
private func WakeUp()
|
||||
{
|
||||
SetAction("Fly");
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
// Array: [object lovely_object, int x, int y]
|
||||
|
|
|
@ -103,7 +103,7 @@ public func Construction()
|
|||
|
||||
_inherited(...);
|
||||
|
||||
// setup of the force fields after the call to inherited()
|
||||
// setup of the force fields after the call to inherited(...)
|
||||
SetDefaultForceFieldMaxDistance(SQUID_VISION_MAX_RANGE);
|
||||
SetDefaultForceFieldTTD(36 * 4);
|
||||
SetMaxEmitterNumber(7);
|
||||
|
|
|
@ -44,12 +44,12 @@ private func Initialize()
|
|||
SetAction("Fly");
|
||||
SetPhase(Random(3));
|
||||
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
private func Death()
|
||||
{
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
RemoveObject();
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ private func MissionComplete()
|
|||
if (enraged)
|
||||
MoveToTarget();
|
||||
else
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
private func Sleep()
|
||||
|
@ -82,13 +82,13 @@ private func Sleep()
|
|||
private func SleepComplete()
|
||||
{
|
||||
SetAction("Sleep");
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
private func WakeUp()
|
||||
{
|
||||
SetAction("Fly");
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
private func GetAttraction(proplist coordinates)
|
||||
|
|
|
@ -7,7 +7,7 @@ local back;
|
|||
private func Initialize()
|
||||
{
|
||||
this.cover_area = Shape->Rectangle(-118, -31, 236, 62);
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
public func Set(object trunk)
|
||||
|
|
|
@ -168,7 +168,7 @@ public func HasInteractionMenu() { return true; }
|
|||
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
|
||||
var pipe_menu =
|
||||
{
|
||||
|
|
|
@ -40,13 +40,13 @@ public func SaveScenarioObject(props, ...)
|
|||
|
||||
public func TurnOn()
|
||||
{
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
SetMeshMaterial("LanternLit", 1);
|
||||
}
|
||||
|
||||
public func TurnOff()
|
||||
{
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
SetMeshMaterial("LanternGlass", 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public func GetLadderData()
|
|||
{
|
||||
if (master)
|
||||
return master->~GetLadderData(index);
|
||||
return _inherited();
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
public func OnLadderGrab(object clonk)
|
||||
|
|
|
@ -105,7 +105,7 @@ private func Death()
|
|||
lib_swarm_previnline->SetNextInLine(lib_swarm_nextinline);
|
||||
}
|
||||
PurgeLine(); // Don't do everything twice in case Destruction() follows
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
private func Destruction()
|
||||
|
@ -131,7 +131,7 @@ private func PurgeLine()
|
|||
private func MoveToTarget()
|
||||
{
|
||||
if (!lib_swarm_helper || (lib_swarm_helper->GetMaster() == this))
|
||||
return _inherited();
|
||||
return _inherited(...);
|
||||
|
||||
var x, y;
|
||||
// Follow previous in line
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
(object) menu control, hotkey controls, usage and it's callbacks and
|
||||
forwards to script.
|
||||
|
||||
Objects that inherit this object need to return _inherited() in the
|
||||
Objects that inherit this object need to return _inherited(...) in the
|
||||
following callbacks (if defined):
|
||||
Construction, Collection2, Ejection, RejectCollect, Departure,
|
||||
Entrance, AttachTargetLost, CrewSelection, Death,
|
||||
|
|
|
@ -12,7 +12,7 @@ private func Initialize()
|
|||
{
|
||||
AddTimer("CheckCoverage", 1);
|
||||
this.Visibility = [VIS_Select];
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
}
|
||||
|
||||
private func CheckCoverage()
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Clonk-side scripts for the HUD. This object basically redirects the
|
||||
engine callbacks for the clonk to the HUD. All crew members that
|
||||
are to be shown in the HUD have to include this object and return
|
||||
_inherited(); if they overload one of the callbacks used here.
|
||||
_inherited(...); if they overload one of the callbacks used here.
|
||||
|
||||
This adapter redirects to the per player HUD controller and also
|
||||
directly to the per clonk HUD selector.
|
||||
|
|
|
@ -53,7 +53,7 @@ public func IsLiquidTank() { return true;}
|
|||
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
|
||||
if (CanConnectPipe())
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
Most objects which can be stacked might want to set different pictures
|
||||
and ingame graphics for different counts of objects. This can be done
|
||||
by overloading UpdatePicture(), but remember to write _inherited() then.
|
||||
by overloading UpdatePicture(), but remember to write _inherited(...) then.
|
||||
--*/
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ public func HasInteractionMenu() { return true; }
|
|||
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
// Only add a power menu if the structure is a flagpole (Library_Flag).
|
||||
// And only if a power network is already initialized for this object.
|
||||
if (this->~IsFlagpole() && this->GetPowerHelper())
|
||||
|
|
|
@ -142,7 +142,7 @@ public func GetProductionMenuEntries(object clonk)
|
|||
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
var prod_menu =
|
||||
{
|
||||
title = "$Production$",
|
||||
|
|
|
@ -270,7 +270,7 @@ public func RejectInteractionMenu(object clonk)
|
|||
// Show damage and allow a player to repair the building when damaged.
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
var damage_menu =
|
||||
{
|
||||
title = "$Damage$",
|
||||
|
|
|
@ -170,7 +170,7 @@ public func HasInteractionMenu() { return true; }
|
|||
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
// only open the menus if ready
|
||||
if (this->AllowBuyMenuEntries())
|
||||
{
|
||||
|
|
|
@ -71,7 +71,7 @@ public func GetMissingMaterialMenuEntries(object clonk)
|
|||
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
var comp_menu =
|
||||
{
|
||||
title = "$TxtMissingMaterial$",
|
||||
|
|
|
@ -96,7 +96,7 @@ private func Initialize()
|
|||
else
|
||||
partner = nil;
|
||||
}
|
||||
return _inherited();
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
private func CreateCase()
|
||||
|
|
|
@ -122,7 +122,7 @@ func GetPumpMenuEntry(proplist custom_entry, symbol, string text, int priority,
|
|||
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
var prod_menu =
|
||||
{
|
||||
title = "$Control$",
|
||||
|
|
|
@ -93,7 +93,7 @@ public func HasInteractionMenu() { return true; }
|
|||
// Show a helpful hint to the player. The hint is colored and titled the same as the production menu for more visual coherence.
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
var prod_menu =
|
||||
{
|
||||
title = "$Production$",
|
||||
|
|
|
@ -131,7 +131,7 @@ public func HasInteractionMenu() { return true; }
|
|||
// Show hint about efficiency in the interaction menu.
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
var prod_menu =
|
||||
{
|
||||
title = "$Efficiency$",
|
||||
|
|
|
@ -15,7 +15,7 @@ protected func Construction()
|
|||
var graphic = Random(6);
|
||||
if(graphic)
|
||||
SetGraphics(Format("%d",graphic));
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
|
||||
if(GetCon() < 100) SetCon(100);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public func Open(clonk)
|
|||
GameCall("OnChestOpened", clonk);
|
||||
Sound("Toot");
|
||||
ScheduleCall(this, "DoTheConfetti", 2, 20);
|
||||
return inherited();
|
||||
return inherited(clonk, ...);
|
||||
}
|
||||
|
||||
public func DoTheConfetti()
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
|
||||
protected func Initialize()
|
||||
{
|
||||
_inherited();
|
||||
_inherited(...);
|
||||
SetHalfVehicleSolidMask(true);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public func HasInteractionMenu() { return true; }
|
|||
|
||||
public func GetInteractionMenus(object clonk)
|
||||
{
|
||||
var menus = _inherited() ?? [];
|
||||
var menus = _inherited(clonk, ...) ?? [];
|
||||
var oil_menu =
|
||||
{
|
||||
title = "$MsgOilOverview$",
|
||||
|
|
Loading…
Reference in New Issue