Commit Graph

21 Commits (cf7469043d0ea2dac52f7fd93bfb74ae74603d98)

Author SHA1 Message Date
Mark cf7469043d Simplified logic for substitutes
The production cost method returns an array of material cost arrays, but
their format has changed. Instead of
  [<default resource>, <cost>, <substitute(s)>]
it now returns an array of proplists
  [{Resource = optionA, Amount = costA}, {Resource = optionB, Amount =
costB}]
so that there are fewer cases to keep in mind: No "are there
substitutes?", but you can simply check all variants and pick the best.
This also allows different substitutions, for example "2 earth or 3
sand" is now possible.
2018-12-21 16:54:43 +01:00
Mark c6254c2512 Added more producer tests 2018-12-21 14:05:30 +01:00
Mark 2ed69b96a5 Added producer test for substitute components 2018-12-21 11:57:39 +01:00
Mark b73169616b Fix producer test
Updating the values for substitutions was forgotten in 808e7fa, leading
to a failing test 5.
2018-12-21 11:49:56 +01:00
Mark 46ac671ef4 Fixed producers unit test #6
The problems here were:
- the syntax for GetComponent() was wrong.
2016-06-01 20:14:11 +02:00
Mark 10c918d4a2 Fixed producers unit test #5
The problems here were:
- the pickaxe component list returned [[Metal, 1], [Wood, 1]] instead of [[Wood, 1], [Metal, 1]]. This may be a result of the new component system with proplists; probably the components are sorted alphabetically now
2016-06-01 20:08:55 +02:00
Mark ad74d44943 Foundry can be fueled by pipe.
A pipe from a pump can be connected to a foundry now, so that oil can be pumped into the foundry.
2016-06-01 19:10:42 +02:00
Mark 1c1ea38efa Renamed the liquids IDs
Omitted the prefix "Liquid_".
2016-03-25 19:11:55 +01:00
Mark 9298d27719 Producers: New test for collection 2016-03-24 22:04:53 +01:00
Mark 1f25fa2679 Producers: Additional unit tests 2016-03-24 21:20:49 +01:00
Mark e3a991bb86 Producers: Additional unit tests 2016-03-24 20:45:48 +01:00
Mark 898530ed37 Producers: Additional unit tests 2016-03-24 19:40:34 +01:00
Mark 9645b4afe9 Producers: Additional unit tests 2016-03-24 19:17:21 +01:00
Mark fc3d6a69f0 Producers: More unit tests for basic operation
Added tests for adding to the queue and clearing the queue. The other tests are dummies for now. Found out that the parameter 'abort' in ClearQueue() was never used.
2016-03-24 18:27:23 +01:00
Mark 18ad5894e2 Producers: Producers can convert ice to water
This special case is a relic, because I do not know whether this is actually a use case that is required in a scenario. All unit tests in the producers test pass now.
2016-03-24 16:19:15 +01:00
Mark 8298bc789f Producers: Unit test for continued production
Made test 7 more specific: Production must be halted, material must stay.
2016-03-19 11:49:50 +01:00
Mark 3ad6cb2177 Producers: Unit test for halted production 2016-03-19 11:41:49 +01:00
Mark 274379ddc3 Producers: Fixed unit test 5
Added unit test 6 for fuel objects that do not behave correctly. Fuel should always return the current fuel amount if not parameter is passed.
2016-03-18 17:44:51 +01:00
Mark 1d8163e3f2 Producers: Unit tests for fuel objects 2016-03-18 17:18:33 +01:00
Mark 992c3cd074 Producers: Modified unit test 2016-03-17 22:43:31 +01:00
Mark a24ec9f0ac Producers: Basic unit test 2016-03-17 21:51:35 +01:00