def __onAmmoSettingChanged(self, idx): if idx >= len(self._order) or idx < 0: return intCD = self._order[idx] code = self.getNextSettingCode(intCD) if code is not None: avatar_getter.updateVehicleSetting(code, intCD)
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