Package horizons :: Package world :: Package units :: Module weaponholder :: Class StationaryWeaponHolder
[hide private]
[frames] | no frames]

Class StationaryWeaponHolder

source code

WeaponHolder --+
               |
              StationaryWeaponHolder

Towers and stuff

Instance Methods [hide private]
 
__init__(self, *args, **kwargs) source code
 
__init(self) source code
 
load(self, db, worldid) source code
    Inherited from WeaponHolder
 
_add_to_fireable(self, weapon)
Callback executed when weapon attack is ready
source code
 
_increase_fired_weapons_number(self, caller=None)
Callback that helps keeping tack of successful weapon fire number
source code
 
_remove_from_fireable(self, weapon)
Callback executed when weapon is fired
source code
 
_stance_tick(self)
Executes every few seconds, doing movement depending on the stance.
source code
 
act_attack(self, dest)
Override in subclasses for action code
source code
 
add_weapon_to_storage(self, weapon_id)
adds weapon to storage
source code
 
attack(self, target)
Triggers attack on target
source code
 
attack_in_range(self)
Returns True if the target is in range, False otherwise
source code
 
can_attack_position(self, position)
Returns True if the holder can attack position at call time
source code
 
create_weapon_storage(self) source code
 
equip_from_inventory(self, weapon_id, number)
Equips weapon if present in inventory
source code
 
fire_all_weapons(self, dest, rotated=False)
Fires all weapons in storage at a given position
source code
 
get_attack_target(self) source code
 
get_status(self)
Return the current status of the ship.
source code
 
get_weapon_storage(self)
Returns storage object for self._weapon_storage
source code
 
is_attacking(self)
Returns True if the WeaponHolder is trying to attack a target
source code
 
load_target(self, db)
Loads target from database
source code
 
remove(self) source code
 
remove_target(self)
Removes reference from target, this happens when the attack is stopped or the target is dead either way the refs are checked using gc module this is used because after unit death it's possbile that it still has refs
source code
 
remove_weapon_from_storage(self, weapon_id)
removes weapon to storage
source code
 
save(self, db) source code
 
stop_attack(self) source code
 
try_attack_target(self)
Attacking loop
source code
 
unequip_to_inventory(self, weapon_id, number)
Unequips weapon and adds it to inventory
source code
 
update_range(self, caller=None) source code
 
user_attack(self, targetid)
Called when the user triggeres the attack, executes the user_attack_issued callbacks
source code
Class Variables [hide private]
    Inherited from WeaponHolder
  log = logging.getLogger("world.combat")
Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 
Overrides: WeaponHolder.__init__

load(self, db, worldid)

source code 
Overrides: WeaponHolder.load