示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 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
示例#5
0
 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
示例#6
0
 def deactivate(self):
     if 'avatar' in self._descriptor.tags:
         avatar_getter.activateAvatarEquipment(self.getEquipmentID())
     else:
         avatar_getter.changeVehicleSetting(VEHICLE_SETTING.ACTIVATE_EQUIPMENT, self.getEquipmentID())
示例#7
0
 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)
示例#8
0
 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)
示例#9
0
 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)
示例#10
0
 def deactivate(self):
     if 'avatar' in self._descriptor.tags:
         avatar_getter.activateAvatarEquipment(self.getEquipmentID())
     else:
         avatar_getter.changeVehicleSetting(
             VEHICLE_SETTING.ACTIVATE_EQUIPMENT, self.getEquipmentID())
示例#11
0
 def deactivate(self):
     avatar_getter.changeVehicleSetting(VEHICLE_SETTING.ACTIVATE_EQUIPMENT, self.getEquipmentID())
示例#12
0
 def activate(self, entityName = None, avatar = None):
     avatar_getter.changeVehicleSetting(VEHICLE_SETTING.ACTIVATE_EQUIPMENT, self.getActivationCode(entityName, avatar), avatar=avatar)