Package horizons :: Package command :: Module sounds :: Class PlaySound
[hide private]
[frames] | no frames]

Class PlaySound

source code

Command --+
          |
         PlaySound

Command class that plays the build sound. This has been moved to a separate class, in order to be able to play only one sound for 20 buildings(like a group of trees)

Instance Methods [hide private]
 
__init__(self, sound, position=None, **trash) source code
 
__call__(self, issuer)
Execute the command
source code
    Inherited from Command
 
execute(self, session, local=False)
Execute command.
source code
Class Methods [hide private]
    Inherited from Command
 
allow_network(cls, klass)
NOTE: this is a security related method and may lead to execution of arbritary code if used in a wrong way see documentation inside horizons.network.packets.SafeUnpickler
source code
 
get_all_commands(cls) source code
Class Variables [hide private]
    Inherited from Command
  log = logging.getLogger("command")
Method Details [hide private]

__init__(self, sound, position=None, **trash)
(Constructor)

source code 
Parameters:
  • sound - sound id that is to be played
  • position - tuple of int coordinates where the sound is to be played.

__call__(self, issuer)
(Call operator)

source code 

Execute the command

Parameters:
  • issuer - the issuer of the command