def applySettings(self, avatar=None): if self.__nextShellCD > 0 and self.__nextShellCD in self.__ammo: avatar_getter.changeVehicleSetting(VEHICLE_SETTING.NEXT_SHELLS, self.__nextShellCD, avatar) if self.__currShellCD > 0 and self.__currShellCD in self.__ammo: avatar_getter.changeVehicleSetting(VEHICLE_SETTING.CURRENT_SHELLS, self.__currShellCD, avatar)
def reloadPartialClip(self, avatar=None): clipSize = self.__gunSettings.clip.size if clipSize > 1 and self.__currShellCD in self.__ammo: quantity, quantityInClip = self.__ammo[self.__currShellCD] if quantity != 0 and (quantityInClip < clipSize or self.__nextShellCD != self.__currShellCD): avatar_getter.changeVehicleSetting( VEHICLE_SETTING.RELOAD_PARTIAL_CLIP, 0, avatar)
def activate(self, entityName=None, avatar=None): if 'avatar' in self._descriptor.tags: avatar_getter.activateAvatarEquipment(self.getEquipmentID(), avatar) else: avatar_getter.changeVehicleSetting( VEHICLE_SETTING.ACTIVATE_EQUIPMENT, self.getActivationCode(entityName, avatar), avatar=avatar)
def changeSetting(self, intCD, avatar=None): if not avatar_getter.isVehicleAlive(avatar): return False else: code = self.getNextSettingCode(intCD) if code is None: return False avatar_getter.updateVehicleSetting(code, intCD, avatar) avatar_getter.changeVehicleSetting(code, intCD, avatar) return True
def changeSetting(self, intCD, avatar = None): if not avatar_getter.isVehicleAlive(avatar): return False code = self.getNextSettingCode(intCD) if code is None: return False avatar_getter.updateVehicleSetting(code, intCD, avatar) if avatar_getter.isPlayerOnArena(avatar): avatar_getter.changeVehicleSetting(code, intCD, avatar) return True
def deactivate(self): if 'avatar' in self._descriptor.tags: avatar_getter.activateAvatarEquipment(self.getEquipmentID()) else: avatar_getter.changeVehicleSetting(VEHICLE_SETTING.ACTIVATE_EQUIPMENT, self.getEquipmentID())
def activate(self, entityName = None, avatar = None): if 'avatar' in self._descriptor.tags: avatar_getter.activateAvatarEquipment(self.getEquipmentID(), avatar) else: avatar_getter.changeVehicleSetting(VEHICLE_SETTING.ACTIVATE_EQUIPMENT, self.getActivationCode(entityName, avatar), avatar=avatar)
def reloadPartialClip(self, avatar = None): clipSize = self.__gunSettings.clip.size if clipSize > 1 and self.__currShellCD in self.__ammo: quantity, quantityInClip = self.__ammo[self.__currShellCD] if quantity != 0 and (quantityInClip < clipSize or self.__nextShellCD != self.__currShellCD): avatar_getter.changeVehicleSetting(VEHICLE_SETTING.RELOAD_PARTIAL_CLIP, 0, avatar)
def applySettings(self, avatar = None): if self.__nextShellCD > 0 and self.__nextShellCD in self.__ammo: avatar_getter.changeVehicleSetting(VEHICLE_SETTING.NEXT_SHELLS, self.__nextShellCD, avatar) if self.__currShellCD > 0 and self.__currShellCD in self.__ammo: avatar_getter.changeVehicleSetting(VEHICLE_SETTING.CURRENT_SHELLS, self.__currShellCD, avatar)
def deactivate(self): if 'avatar' in self._descriptor.tags: avatar_getter.activateAvatarEquipment(self.getEquipmentID()) else: avatar_getter.changeVehicleSetting( VEHICLE_SETTING.ACTIVATE_EQUIPMENT, self.getEquipmentID())
def deactivate(self): avatar_getter.changeVehicleSetting(VEHICLE_SETTING.ACTIVATE_EQUIPMENT, self.getEquipmentID())
def activate(self, entityName = None, avatar = None): avatar_getter.changeVehicleSetting(VEHICLE_SETTING.ACTIVATE_EQUIPMENT, self.getActivationCode(entityName, avatar), avatar=avatar)