default to allow collection of objects into non-hand slots if Collect() is called by a script (#959)

Controls
David Dormagen 2014-12-25 18:40:10 +01:00
parent 44989941cd
commit 8a3c965e3e
1 changed files with 4 additions and 0 deletions

View File

@ -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())