forked from Mirrors/openclonk
Fix #1951: Disabled putting water in airplane and lorry
Removing liquid collection from the lorry is a side effect, but it is not bad. The lorry behavior was weird anyway, because you could for example put lava and wood in it, without the wood burning etc.install-platforms
parent
5aea227504
commit
ee0917d7e8
|
@ -269,5 +269,5 @@ protected func RejectEntrance(object into)
|
||||||
{
|
{
|
||||||
if (_inherited(into, ...)) return true;
|
if (_inherited(into, ...)) return true;
|
||||||
if (into->GetAlive()) return true;
|
if (into->GetAlive()) return true;
|
||||||
return !(into->~IsLiquidContainer() || into->~IsContainer());
|
return !(into->~IsLiquidContainer());
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include Library_PowerConsumer
|
#include Library_PowerConsumer
|
||||||
|
#include Library_LiquidContainer
|
||||||
|
|
||||||
// Production queue, a list of items to be produced.
|
// Production queue, a list of items to be produced.
|
||||||
// Contains proplists of format {Product = <objid>, Amount = <int>, Infinite = (optional)<bool>, ProducingPlayer = (optional)<int>}. /Infinite/ == true -> infinite production.
|
// Contains proplists of format {Product = <objid>, Amount = <int>, Infinite = (optional)<bool>, ProducingPlayer = (optional)<int>}. /Infinite/ == true -> infinite production.
|
||||||
|
@ -920,6 +921,9 @@ public func RejectCollect(id item_id, object item)
|
||||||
// Is the object a container? If so, try to empty it. Don't empty extra slots.
|
// Is the object a container? If so, try to empty it. Don't empty extra slots.
|
||||||
if ((item->~IsContainer() && !item->~HasExtraSlot()) || item->~IsLiquidContainer() || item->~IsBucket())
|
if ((item->~IsContainer() && !item->~HasExtraSlot()) || item->~IsLiquidContainer() || item->~IsBucket())
|
||||||
{
|
{
|
||||||
|
// this is not optimal, because it grabs everything, even things that should not go into the producer normally:
|
||||||
|
// the function GrabContents issues no callbacks - however, please don't change the behavior of GrabContents,
|
||||||
|
// the missing callbacks are a very good thing for certain purposes
|
||||||
GrabContents(item);
|
GrabContents(item);
|
||||||
}
|
}
|
||||||
// Can we collect the object itself?
|
// Can we collect the object itself?
|
||||||
|
|
Loading…
Reference in New Issue