Commit Graph

22 Commits (bce903ee0434ffae24bf02c898ab456adee9ffdf)

Author SHA1 Message Date
Maikel de Vries df098d2840 pump only activates when drain is free or accepts liquid 2016-08-07 21:26:23 +02:00
Mark d51a8cfa6d Liquds: Liquids can be passed either as a string or as a definition 2016-06-05 12:05:48 +02:00
Mark 923ee485ec Liquid container: PutLiquid(*, nil, *) inserts maximum amount of liquid
Added unit test.
2016-06-05 12:05:42 +02:00
Mark ffcbdc7fd0 Fixed producers unit test #7
The problems here were:
- the foundry cannot take 400 water from ice if it has a fill limit
- the pump cannot pump anything into the object if it has no fill limit
2016-06-01 19:10:46 +02:00
Mark 52542d7977 Refactoring: Liquids: Removed GetLiquidID() and changed CreateLiquid()
CreateLiquid() can be called from definition context now, to create a certain amount of liquid.
2016-03-25 19:34:36 +01:00
Mark a34eea41dc Power: Fixed unit test 21 2016-03-25 16:24:43 +01:00
Mark 02b8cf8422 Barrel: Fixed barrel getting filled with liquids
Barrels was not updating, and caused an error when getting filled with liquid.
2016-03-23 20:11:23 +01:00
Mark 7febb8fd91 Refactoring: Stackable: The size of stacks can be limited by a container now.
The function RejectEntrance() has two more callbacks to the object it should enter:
- CollectFromStack(object stack): The object can grab items from the stack, before the stack tries to merge with stacks in the object. This is necessary for barrels, so that a large liquid stack can fill an empty barrel.
- RejectStack(object stack): This is called after the stack is merged. Currently, the stack merging counts as handled only if the stack is removed. This callback allows the object to still reject the stack, for example if it accepts only one item, such as the barrel does.
2016-03-16 22:43:44 +01:00
Mark cbe8bbd8e8 Removed authors Ringwaul and ST-DDT from liquid container
They were not involved in the current script
2016-03-03 17:07:37 +01:00
Mark a7ed516c39 Refactoring: Liquid container
The liquid container library was severely reduced by the changes that the liquid objects bring. The remaining unit tests nearly work.
2016-03-01 22:29:35 +01:00
Mark 351e61832c Liquid Container: Fixed liquid objects remaining in existence after test. 2016-02-26 22:38:38 +01:00
Mark af8e681ec8 Liquid Container: Let liquid object handle removing liquids 2016-02-26 22:11:11 +01:00
Mark 8a49ae10c0 Liquid Container: Removed logging 2016-02-26 22:06:04 +01:00
Mark 1acdfd4c1a Liquid object: Fixed unit test 3 2016-02-26 21:56:52 +01:00
Mark 55401f88e3 Liquid object: Fixed unit test 12
Added test for filling an empty barrel partially
2016-02-26 15:42:54 +01:00
Mark 79df36eb6b Liquid object: Refactored object entering system.
Unit test 3 still fails, because the functions are not runtime overloadable. Test 12 fails, because liquid transfer does not work correctly yet. This fill be fixed in the next checkin.

Added debug logging, this has to be removed again later.
2016-02-26 15:19:41 +01:00
Mark 862e69655e Liquid object: Test for liquid leaving the container 2016-02-20 21:10:41 +01:00
Mark 7cc88bd909 Liquid Object: Simplified transfer into liquid container.
Unfortunately, now the object is not actually transferred, but removed, and a new one is created or an existing one is filled in the liquid container. The logic could use a rework actually, because everything was more clear when the container stored things in variables.
2016-02-20 21:00:48 +01:00
Mark 9e46d752a9 Liquid Object: Unit test for entering liquid containers
The tests handles the entrance of liquid objects into the container. Will look to simplify the script in the next commit.
2016-02-20 20:14:19 +01:00
Mark 8c578931bb Liquid Object: Replaced liquid container logic
The liquid container now stores liquid objects, instead of volume and liquid type. Liquid objects can have be of a specific type, such as Liquid_Water, Liquid_Oil, etc..., but they can also just stay Library_Liquid for other liquids.
The liquid container logic has become more complex now, but still works as before. Transferring liquids to other objects may still need some improvements:
- at the moment, transferring liquids between liquid containers is possible
- maybe liquids objects, such as oil, can enter a liquid container while another liquid is in that container already - will need a unit test for that
- transferring liquid from a liquid container to a structure or crew member should be possible (but is not yet), if the target is not a liquid container but contains liquid containers
2016-02-19 06:53:44 +01:00
Mark e2689ad1c3 Prototype: Liquid objects as menu icon
It seems that real objects would be nicer.
2016-02-16 21:08:23 +01:00
Mark ae9736c18b Move liquid libraries to sub-folder LiquidControl 2016-02-16 21:08:00 +01:00