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
Mark 2016-11-26 18:57:31 +01:00
parent 94ec4e336b
commit d356d9db3d
36 changed files with 50 additions and 50 deletions

View File

@ -8,7 +8,7 @@
func Initialize()
{
return _inherited();
return _inherited(...);
}
public func ControlUse(object pClonk, int ix, int iy)

View File

@ -6,10 +6,10 @@ local fast;
func Initialize()
{
fast=0;
_inherited();
fast = 0;
_inherited(...);
}
func MakeFast(int f) { fast=f; }
func MakeFast(int f) { fast = f; }
func FuseTime() { return 140 - fast; }

View File

@ -4,5 +4,5 @@
func Initialize()
{
AddEffect("Lifesteal", this, 100, 0, nil);
_inherited();
_inherited(...);
}

View File

@ -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; }

View File

@ -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$",

View File

@ -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()
{

View File

@ -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$",

View File

@ -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$",

View File

@ -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)

View File

@ -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.

View File

@ -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]

View File

@ -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);

View File

@ -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)

View File

@ -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)

View File

@ -168,7 +168,7 @@ public func HasInteractionMenu() { return true; }
public func GetInteractionMenus(object clonk)
{
var menus = _inherited() ?? [];
var menus = _inherited(clonk, ...) ?? [];
var pipe_menu =
{

View File

@ -40,13 +40,13 @@ public func SaveScenarioObject(props, ...)
public func TurnOn()
{
_inherited();
_inherited(...);
SetMeshMaterial("LanternLit", 1);
}
public func TurnOff()
{
_inherited();
_inherited(...);
SetMeshMaterial("LanternGlass", 1);
}

View File

@ -41,7 +41,7 @@ public func GetLadderData()
{
if (master)
return master->~GetLadderData(index);
return _inherited();
return _inherited(...);
}
public func OnLadderGrab(object clonk)

View File

@ -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

View File

@ -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,

View File

@ -12,7 +12,7 @@ private func Initialize()
{
AddTimer("CheckCoverage", 1);
this.Visibility = [VIS_Select];
_inherited();
_inherited(...);
}
private func CheckCoverage()

View File

@ -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.

View File

@ -53,7 +53,7 @@ public func IsLiquidTank() { return true;}
public func GetInteractionMenus(object clonk)
{
var menus = _inherited() ?? [];
var menus = _inherited(clonk, ...) ?? [];
if (CanConnectPipe())
{

View File

@ -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.
--*/

View File

@ -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())

View File

@ -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$",

View File

@ -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$",

View File

@ -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())
{

View File

@ -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$",

View File

@ -96,7 +96,7 @@ private func Initialize()
else
partner = nil;
}
return _inherited();
return _inherited(...);
}
private func CreateCase()

View File

@ -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$",

View File

@ -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$",

View File

@ -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$",

View File

@ -15,7 +15,7 @@ protected func Construction()
var graphic = Random(6);
if(graphic)
SetGraphics(Format("%d",graphic));
_inherited();
_inherited(...);
if(GetCon() < 100) SetCon(100);
}

View File

@ -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()

View File

@ -4,6 +4,6 @@
protected func Initialize()
{
_inherited();
_inherited(...);
SetHalfVehicleSolidMask(true);
}

View File

@ -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$",