def __getDescriptorOfCurrentVehicle(): igrRoomType = g_instance.igr.getRoomType() igrLayout = g_itemsCache.items.inventory.getIgrCustomizationsLayout() veh = g_currentVehicle.item defaultVehCompDescr = veh.descriptor.makeCompactDescr() igrVehCompDescr = getIGRCustomizedVehCompDescr(igrLayout, veh.invID, igrRoomType, defaultVehCompDescr) igrDescr = vehicles.VehicleDescr(igrVehCompDescr) return igrDescr
def getUpdatedDescriptor(vehDescr): igrRoomType = g_instance.igr.getRoomType() igrLayout = g_itemsCache.items.inventory.getIgrCustomizationsLayout() igrVehCompDescr = getIGRCustomizedVehCompDescr(igrLayout, g_currentVehicle.item.invID, igrRoomType, vehDescr.makeCompactDescr()) return vehicles.VehicleDescr(igrVehCompDescr)
def getCustomizationElements(type, igrType): igrLayout = g_itemsCache.items.inventory.getIgrCustomizationsLayout() veh = g_currentVehicle.item defaultVehCompDescr = veh.descriptor.makeCompactDescr() igrVehCompDescr = getIGRCustomizedVehCompDescr(igrLayout, veh.invID, igrType, defaultVehCompDescr) igrDescr = vehicles.VehicleDescr(igrVehCompDescr) dossier = g_itemsCache.items.getVehicleDossier(veh.intCD) if type == CUSTOMIZATION_ITEM_TYPE.CAMOUFLAGE: return (veh.descriptor.camouflages, igrDescr.camouflages, dossier.getBlock('camouflages')) elif type == CUSTOMIZATION_ITEM_TYPE.EMBLEM: return (veh.descriptor.playerEmblems, igrDescr.playerEmblems, dossier.getBlock('emblems')) elif type == CUSTOMIZATION_ITEM_TYPE.INSCRIPTION: return (veh.descriptor.playerInscriptions, igrDescr.playerInscriptions, dossier.getBlock('inscriptions')) else: return (None, None, None)
def getCustomizationElements(type, igrType): igrLayout = g_itemsCache.items.inventory.getIgrCustomizationsLayout() veh = g_currentVehicle.item defaultVehCompDescr = veh.descriptor.makeCompactDescr() igrVehCompDescr = getIGRCustomizedVehCompDescr(igrLayout, veh.invID, igrType, defaultVehCompDescr) igrDescr = vehicles.VehicleDescr(igrVehCompDescr) dossier = g_itemsCache.items.getVehicleDossier(veh.intCD) if type == CUSTOMIZATION_ITEM_TYPE.CAMOUFLAGE: return (veh.descriptor.camouflages, igrDescr.camouflages, dossier.getBlock('camouflages')) elif type == CUSTOMIZATION_ITEM_TYPE.EMBLEM: return (veh.descriptor.playerEmblems, igrDescr.playerEmblems, dossier.getBlock('emblems')) elif type == CUSTOMIZATION_ITEM_TYPE.INSCRIPTION: return (veh.descriptor.playerInscriptions, igrDescr.playerInscriptions, dossier.getBlock('inscriptions')) else: return (None, None, None) return None