Package horizons :: Package world :: Module resourcehandler :: Class ResourceTransferHandler
[hide private]
[frames] | no frames]

Class ResourceTransferHandler

source code

Objects that can transfer resources. ResourceHandler and units with storages

Instance Methods [hide private]
 
transfer_to_storageholder(self, amount, res_id, transfer_to, signal_errors=False)
Transfers amount of res_id to transfer_to.
source code
Method Details [hide private]

transfer_to_storageholder(self, amount, res_id, transfer_to, signal_errors=False)

source code 

Transfers amount of res_id to transfer_to.

Parameters:
  • transfer_to - worldid or object reference
  • signal_errors - whether to play an error sound in case the transfer completely failed (no res transferred)
Returns:
amount that was actually transferred (NOTE: this is different from the return value of inventory.alter, since here are 2 storages involved)