Fix unit tests: Some code adjustments were forgotten in the other commits.

liquid_container
Mark 2016-03-16 22:44:48 +01:00
parent 7febb8fd91
commit 8749300622
5 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@ func GetLiquidType() { return "Acid"; }
func Disperse()
{
DisperseMaterial(IsLiquid(), GetLiquidAmount());
DisperseMaterial(GetLiquidType(), GetLiquidAmount());
_inherited(...);
}

View File

@ -4,7 +4,7 @@ func GetLiquidType() { return "Lava"; }
func Disperse()
{
DisperseMaterial(IsLiquid(), GetLiquidAmount());
DisperseMaterial(GetLiquidType(), GetLiquidAmount());
_inherited(...);
}

View File

@ -4,7 +4,7 @@ func GetLiquidType() { return "Oil"; }
func Disperse()
{
DisperseMaterial(IsLiquid(), GetLiquidAmount());
DisperseMaterial(GetLiquidType(), GetLiquidAmount());
_inherited(...);
}

View File

@ -46,7 +46,7 @@ public func ContentsCheck()
{
// Ejects non fuel items immediately
var fuel;
if(fuel = FindObject(Find_Container(this), Find_Not(Find_Func("IsFuel"))))
if (fuel = FindObject(Find_Container(this), Find_Not(Find_Func("IsFuel"))))
{
fuel->Exit(-45, 21, -20, -1, -1, -30);
Sound("Chuff");

View File

@ -1102,7 +1102,7 @@ global func Test20_OnStart(int plr)
for (var i = 0; i < 3; ++i)
{
var barrel = engine->CreateContents(Barrel, 1);
barrel->SetLiquidContainer("Oil", 10);
barrel->CreateContents(Liquid_Oil, 10);
}
// Power consumer: armory.
@ -1140,7 +1140,7 @@ global func Test21_OnStart(int plr)
// Power source: one steam engine.
var engine = CreateObjectAbove(SteamEngine, 70, 160, plr);
var barrel = engine->CreateContents(Barrel, 1);
barrel->SetLiquidContainer("Oil", 10);
barrel->CreateContents(Liquid_Oil, 10);
// Power consumer: one pump.
var pump = CreateObjectAbove(Pump, 124, 160, plr);