
> Having another "non-limited, but not infinite" mode for stackable objects seemed to be strange, too.
I think having one library for "small stacks" and one library for "large stacks" seems more weird. Why not just increase the limit of 999 objects? Worst case, just limit the display to 999 but allow larger stacks internally.
> You can put oil into it, but then you would not be able to put any water into it (as a reserve) until the oil is used up
Why is that? If the liquids are objects, you can have a stacked water object and a stacked oil object both sitting in the foundry.
> This is somewhat hindered by the fact that the producer handles fuel and liquid completely different from normal components.
I thought the whole idea of the "liquids are objects"-change was to unify this interface. I.e.: Remove the special handling of liquids from the producer library.
> - what is the benefit of having, say 100 water items in the kitchen, instead of a barrel that contains 100 water?
You do not need to route stuff through the barrel. You just look for components directly in the producer.
> - would barrel empty into the kitchen if you transfer a water barrel to the kitchen, leaving the empty barrel in the Clonk?
Yes, just like earth in the foundry right now.
>Worst case, just limit the display to 999 but allow larger stacks internally.
Did so.
>Why is that? If the liquids are objects, you can have a stacked water object and a stacked oil object both sitting in the foundry.
It's not a problem for producers, but a barrel with both water and oil, or oil and lava might be weird. As a nice side effect the barrel could have an extra slot then, and it would display the contained liquid.
>I thought the whole idea of the "liquids are objects"-change was to unify this interface. I.e.: Remove the special handling of liquids from the producer library.
Forgot about that, as I already said. I am rewriting that part again, but I still keep a small special handling: Producers will still convert wood/coal to "fuel", or ice to "water" (<- is this still necessary? Ice could be converted to water right on entrance. Wood not so much, because it may be an actual resource component) if the contained amount of liquid objects is insufficient.

> but I still keep a small special handling: Producers will still convert wood/coal to "fuel", or ice to "water"
Yes, I don't think there's need for a "fuel" object because it can just be a property of existing objects. I.e. IsFuel (or GetFuelValue?) and IsWater.
Another (maybe unrelated) idea we had was that definition components should accept strings as callback functions. I.e. stuff like Components=Wood=1,"IsEarth"=5,"IsWater"=10.

If that is not possible, I would probably iterate through every definition once and then create a mapping for the replacement parts. That might imply that they would not be able to change at runtime.


At first I overloaded MaxStackCount() in the liquid object, so that it regards the liquid container capacity. This still lets the object enter an empty liquid container with the capacity exceeded (i.e. put a stack 500 water into a barrel, the barrel should contain a stack with 300 water and the other water should be reduced to 200 -> now the 500 water simply enter the barrel).
Is it ok if I implement this in the stackable library right away, because it could also be a use case in other objects (infinite arrow dispenser or whatever?)

>Is it ok if I implement this in the stackable library right away, because it could also be a use case in other objects (infinite arrow dispenser or whatever?)
What exactly? Don't forget that this might have implications for the interaction menu and other things, too
x
objects into an empty container that can hold up to y < x
items => the container now holds a stack of y
items, and the original object still exists outside the container with now x - y
in the stack.Would not have an effect on containers that have no limit for specific items.
- Convert ice to water on collection. Not a bad option in my opinion: Ice can enter the producer only if one of its products needs ice or water. I cannot think of many products that need ice. In that case the producer would convert ice to water as a first option, then collect ice if there is sufficient water and other products need ice.
- Remove the ice to water conversion entirely. I am neutral on this.
- Make ice collectible, and have it convert to water object when it melts (on its own?) inside the container. May be a little weird for the player.
Furthermore, I want to rename the liquids. At the moment their IDs are Liquid_Water, Liquid_Acid, etc., but I think that Water or Acid is better. Any opinions on this?

- the object interaction menu transfers items differently when you clicking a single item in the inventory and when clicking the "transfer all" arrow/button between the both sides
- this results in a particularly annoying border case: say you have 50 single arrows in a lorry (which is unlikely, how should they get there?) if you transfer all at once, this leaves you with 50 single arrows in the surrounding. If you transfer the arrows by clicking each arrow separately, then the arrows would form stacks.
- the lorry seems to collect certain items that are transferred from it again. This was the case if I have a large number of arrow packs inside the lorry.
This is all tested by yet another unit test. I extracted the transfer to two functions, so that I can test them and see the difference. My aim is to use one function for transferring items in the end and have the unit tests still pass. It is not my intention to test other aspects of the interaction menu, this can be done by someone else later if the need arises.

>- this results in a particularly annoying border case: say you have 50 single arrows in a lorry (which is unlikely, how should they get there?) if you transfer all at once, this leaves you with 50 single arrows in the surrounding. If you transfer the arrows by clicking each arrow separately, then the arrows would form stacks.
Yes. I guess I assumed that when transferring "all" items of a stack into another objects, the objects would merge themselves appropriately. That's obviously not true if you transfer to a non-container (i.e. "surrounding")
>- the lorry seems to collect certain items that are transferred from it again. This was the case if I have a large number of arrow packs inside the lorry.
That sounds like a real bug. Is the object directly recollected because it is ejected inside the collection zone of the lorry?

>My solution would be to add a "BlockCollectionByLorry" effect to that item for a few frames, so that it can safely drop to the ground.
Why don't you just set
Collectible = false
for a few frames (probably exactly 1)?
* Oil and water liquid objects do not have a Description.
* I would expect it to be possible to connect the pump to the foundry as well.
What is the other stuff that needs testing?
Also: There should be a function for barrels which fills it fully with a new liquid, i.e. for scenario scripts.
Also: please fix this bug and potentially other scenarios with barrels that broke.
a) CreateObject(Barrel)->PutLiquid("Water", 300);
b) CreateObject(Barrel)->PutLiquid("Water", Barrel->GetLiquidContainerMaxFillLevel());
c) Water->CreateLiquid(300, CreateObject(Barrel));
First, I'd like to replace the string input with a definition input:
barrel->PutLiquid(Water, 300);
Second, the function PutLiquid could automatically insert as much as possible if the second parameter is nil. What do you think?

>Second, the function PutLiquid could automatically insert as much as possible if the second parameter is nil. What do you think?
Yes, please.



If you think the objects are stable enough that we stick with them, I guess we could keep saving as objects.
Btw: To not save an object, you can just return false in SaveScenarioObject.
At the moment, saving a barrel with liquid is the same as saving a bow with arrows internally, so that works. Replacing the working system with a call, while making sure that the contained liquid objects are not saved means both effort and possibly more confusion (i.e. why was that added??). In case we want to remove the liquid objects again we will just have to implement SaveScenarioObject() in the barrel again, however we like.
On the other hand, I understand that we cannot forget implementing SaveScenarioObject() again if we already have that call there. This, however, also means that the liquid objects have to decide when they should be saved and when not. This makes things more complicated than necessary, in my opinion, so I'd just leave it as it is.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill