From 2ed69b96a5a022c87bc10afe1352cc607b83e9d7 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 21 Dec 2018 11:57:39 +0100 Subject: [PATCH] Added producer test for substitute components --- planet/Tests.ocf/Producers.ocs/Script.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/planet/Tests.ocf/Producers.ocs/Script.c b/planet/Tests.ocf/Producers.ocs/Script.c index 6cd9e542a..60742c3c1 100644 --- a/planet/Tests.ocf/Producers.ocs/Script.c +++ b/planet/Tests.ocf/Producers.ocs/Script.c @@ -430,6 +430,8 @@ global func Test5_OnStart(int plr) passed &= doTest("Costs for single component object (Metal). Got %v, expected %v.", producer->ProductionCosts(Metal), [[Ore, 1, nil]]); passed &= doTest("Costs for multi component object (Pickaxe). Got %v, expected %v.", producer->ProductionCosts(Pickaxe), [[Metal, 1, nil], [Wood, 1, nil]]); passed &= doTest("Costs for object with liquid and fuel need (Bread). Got %v, expected %v.", producer->ProductionCosts(Bread), [[Flour, 1, nil], [Water, 50, nil]]); + passed &= doTest("Costs for object with a single substitute component (Loam). Got %v, expected %v.", producer->ProductionCosts(Loam), [[Earth, 2, Sand], [Water, 60, nil]]); + passed &= doTest("Costs for object with multiple substitute components (TeleGlove). Got %v, expected %v.", producer->ProductionCosts(TeleGlove), [[Diamond, 1, [Ruby, Amethyst]], [Metal, 2, nil]]); producer->RemoveObject(); return passed;