Skip to content
Permalink
Browse files

Fix Bug #1742

Fixed and tested other problems in tutorial 3 and 4, too
  • Loading branch information
gitMarky committed Jun 1, 2016
1 parent 46ac671 commit 98dc6fa25240d4eacdc79642c91f128ac519884c
@@ -275,7 +275,7 @@ private func InitLorries()
if (!Random(5))
{
var barrel = lorry->CreateContents(Barrel);
barrel->SetLiquidContainer("Water", Barrel->GetLiquidContainerMaxFillLevel());
barrel->PutLiquid("Water", Barrel->GetLiquidContainerMaxFillLevel());
}
// Objects which are only in one eighth of the lorries.
if (!Random(8))
@@ -200,7 +200,7 @@ private func InitAI()
var npc_fireman = CreateObjectAbove(Clonk, 200, 384);
npc_fireman->SetName("Hubert");
var barrel = npc_fireman->CreateContents(Barrel);
barrel->SetLiquidContainer("Water", 300);
barrel->PutLiquid("Water", 300);
npc_fireman->SetObjectLayer(npc_fireman);
npc_fireman->SetDir(DIR_Left);
npc_fireman->SetDialogue("Fireman", false);
@@ -353,8 +353,7 @@ global func FxTutorialFilledBarrelTimer(object target, proplist effect)
var foundry = FindObject(Find_ID(Foundry));
if (!foundry)
return FX_OK;
var barrel = FindObject(Find_ID(Barrel), Find_Container(foundry));
if (barrel && barrel->GetLiquidFillLevel() >= 100)
if (foundry->GetLiquidAmount("Water") >= 100)
{
var contents = GetPlayerControlAssignment(effect.plr, CON_Contents, true, true);
guide->AddGuideMessage(Format("$MsgTutorialProduceLoam$", contents));
@@ -139,7 +139,7 @@ private func UpdateFuel()
private func GetBarrel()
{
for (var barrel in FindObjects(Find_Func("IsBarrel"), Find_Container(this)))
if (barrel->GetLiquidFillLevel() > 0)
if (barrel->GetLiquidAmount("Water") > 0)
return barrel;
return;
}
@@ -6,7 +6,7 @@ public func Intro_Start()
{
var train = FindObject(Find_ID(Locomotive));
train->CreateContents(Coal, 2)->SetCon(20);
train->CreateContents(Barrel)->SetLiquidContainer("Water", 300);
train->CreateContents(Barrel)->PutLiquid("Water", 300);
train->ContainedRight();
return ScheduleNext(4);
}

0 comments on commit 98dc6fa

Please sign in to comment.
You can’t perform that action at this time.