forked from Mirrors/openclonk
default to allow collection of objects into non-hand slots if Collect() is called by a script (#959)
parent
44989941cd
commit
8a3c965e3e
|
@ -264,6 +264,10 @@ public func Switch2Items(int one, int two)
|
|||
*/
|
||||
public func Collect(object item, bool ignoreOCF, int pos, bool force)
|
||||
{
|
||||
// Whenever a script calls the Collect function manually, an intended force is assumed.
|
||||
// That means, items will usually be collected with Collect() even if the current hand-slot is not free.
|
||||
force = force ?? true;
|
||||
|
||||
this.inventory.force_collection = force;
|
||||
var success = false;
|
||||
if (pos == nil || item->~IsCarryHeavy())
|
||||
|
|
Loading…
Reference in New Issue