예제 #1
0
    def check_system(self, star_system):
        EDRLOG.log(u"Check system called: {}".format(star_system), "INFO")
        details = []
        notams = self.edrsystems.active_notams(star_system)
        if notams:
            EDRLOG.log(u"NOTAMs for {}: {}".format(star_system, notams),
                       "DEBUG")
            details += notams

        if self.edrsystems.has_sitrep(star_system):
            if star_system == self.player.star_system and self.player.in_bad_neighborhood(
            ):
                EDRLOG.log(
                    u"Sitrep system is known to be an anarchy. Crimes aren't reported.",
                    "INFO")
                # Translators: this is shown via the overlay if the system of interest is an Anarchy (current system or !sitrep <system>)
                details.append(
                    _c(u"Sitrep|Anarchy: not all crimes are reported."))
            if self.edrsystems.has_recent_activity(star_system):
                summary = self.edrsystems.summarize_recent_activity(
                    star_system)
                for section in summary:
                    details.append(u"{}: {}".format(
                        section, "; ".join(summary[section])))
        if details:
            # Translators: this is the heading for the sitrep of a given system {}; shown via the overlay
            self.__sitrep(_(u"SITREP for {}").format(star_system), details)
예제 #2
0
파일: edtime.py 프로젝트: glock2how/edr
 def t_minus(js_epoch_then, short=False):
     ago = int((EDTime.js_epoch_now() - js_epoch_then) / 1000)
     if short:
         # Translators: this is to show how long ago an event took place, keep it ultra-short, e.g. -{} would show something like -3H
         return _c(u"short notation for t-minus|-{}").format(EDTime.pretty_print_timespan(ago, short=True))
     # Translators: this is to show how long ago an event took place, keep it short, e.g. T-{} would show something like T-3H
     return u"T-{}".format(EDTime.pretty_print_timespan(ago))
예제 #3
0
 def t_plus_py(py_epoch_later, short=False):
     ahead = int(py_epoch_later - EDTime.py_epoch_now())
     if short:
         # Translators: this is to show how long ahead an event will take place, keep it ultra-short, e.g. +{} would show something like +3H
         return _c(u"short notation for t-plus|+{}").format(
             EDTime.pretty_print_timespan(ahead, short=True))
     # Translators: this is to show how long ahead an event will take place, keep it short, e.g. T+{} would show something like T+3H
     return u"T+{}".format(EDTime.pretty_print_timespan(ahead))
예제 #4
0
파일: edentities.py 프로젝트: glock2how/edr
    def canonicalize(name):
        if name is None:
            # Translators: this is a fallback name for when the ship isn't recognized or is not known
            return _c(u"For an unknown or missing vehicle|Unknown")

        if name.lower() in EDVehicles.CANONICAL_SHIP_NAMES:
            return EDVehicles.CANONICAL_SHIP_NAMES[name.lower()]

        return name.lower()
예제 #5
0
파일: edrsystems.py 프로젝트: glock2how/edr
    def systems_with_recent_activity(self):
        systems_with_recent_crimes = {}
        systems_with_recent_traffic = {}
        systems_with_recent_outlaws = {}
        self.__update_if_stale()
        systems_ids = self.sitreps_cache.keys()
        for sid in systems_ids:
            sitrep = self.sitreps_cache.get(sid)
            star_system = sitrep.get("name", None) if sitrep else None
            if self.has_recent_outlaws(star_system):
                systems_with_recent_outlaws[star_system] = sitrep["latestOutlaw"]
            elif self.has_recent_crimes(star_system):
                systems_with_recent_crimes[star_system] = sitrep["latestCrime"]
            elif self.has_recent_traffic(star_system):
                systems_with_recent_traffic[star_system] = sitrep["latestTraffic"]

        summary = {}
        summary_outlaws = []
        systems_with_recent_outlaws = sorted(systems_with_recent_outlaws.items(), key=lambda t: t[1], reverse=True)
        for system in systems_with_recent_outlaws:
            summary_outlaws.append(u"{} {}".format(system[0], edtime.EDTime.t_minus(system[1], short=True)))
        if summary_outlaws:
            # Translators: this is for the sitreps feature; it's the title of a section to show systems with sighted outlaws 
            summary[_c(u"sitreps section|Outlaws")] = summary_outlaws

        summary_crimes = []
        systems_with_recent_crimes = sorted(systems_with_recent_crimes.items(), key=lambda t: t[1], reverse=True)
        for system in systems_with_recent_crimes:
            summary_crimes.append(u"{} {}".format(system[0], edtime.EDTime.t_minus(system[1], short=True)))
        if summary_crimes:
            # Translators: this is for the sitreps feature; it's the title of a section to show systems with reported crimes
            summary[_c(u"sitreps section|Crimes")] = summary_crimes

        summary_traffic = []
        systems_with_recent_traffic = sorted(systems_with_recent_traffic.items(), key=lambda t: t[1], reverse=True)
        for system in systems_with_recent_traffic:
            summary_traffic.append(u"{} {}".format(system[0], edtime.EDTime.t_minus(system[1], short=True)))
        if summary_traffic:
            # Translators: this is for the sitreps feature; it's the title of a section to show systems with traffic
            summary[_c(u"sitreps section|Traffic")] = summary_traffic

        return summary
예제 #6
0
파일: edentities.py 프로젝트: sersorrel/edr
 def place(self):
     if self.location.place is None:
         # Translators: this is used when a location, comprised of a system and a place (e.g. Alpha Centauri & Hutton Orbital), has no place specified
         return _c(u"For an unknown or missing place|Unknown")
     return self.location.place
예제 #7
0
파일: edrsystems.py 프로젝트: Niteship/edr
    def summarize_recent_activity(self, star_system, powerplay=None):
        #TODO refactor/simplify this mess ;)
        summary = {}
        wanted_cmdrs = {}
        enemies = {}
        if self.has_recent_traffic(star_system):
            summary_sighted = []
            recent_traffic = self.recent_traffic(star_system)
            if recent_traffic is not None:  # Should always be true... simplify. TODO
                summary_traffic = collections.OrderedDict()
                for traffic in recent_traffic:
                    previous_timestamp = summary_traffic.get(
                        traffic["cmdr"], None)
                    if traffic["timestamp"] < previous_timestamp:
                        continue
                    karma = traffic.get("karma", 0)
                    if not karma > 0:
                        karma = min(karma, traffic.get("dkarma", 0))
                    bounty = EDBounty(traffic.get("bounty", 0))
                    enemy = traffic.get("enemy", False)
                    by_pledge = traffic.get("byPledge", None)
                    if karma < 0 or bounty.is_significant():
                        wanted_cmdrs[traffic["cmdr"]] = [
                            traffic["timestamp"], karma
                        ]
                    elif powerplay and enemy and powerplay == by_pledge:
                        enemies[traffic["cmdr"]] = [
                            traffic["timestamp"], karma
                        ]
                    else:
                        summary_traffic[traffic["cmdr"]] = traffic["timestamp"]
                for cmdr in summary_traffic:
                    summary_sighted.append(u"{} {}".format(
                        cmdr,
                        edtime.EDTime.t_minus(summary_traffic[cmdr],
                                              short=True)))
                if summary_sighted:
                    # Translators: this is for the sitrep feature; it's a section to show sighted cmdrs in the system of interest
                    summary[_c(u"sitrep section|✪ Sighted")] = summary_sighted

        if self.has_recent_crimes(star_system):
            summary_interdictors = []
            summary_destroyers = []
            recent_crimes = self.recent_crimes(star_system)
            if recent_crimes is not None:  # Should always be true... simplify. TODO
                summary_crimes = collections.OrderedDict()
                for crime in recent_crimes:
                    lead_name = crime["criminals"][0]["name"]
                    if lead_name not in summary_crimes or crime[
                            "timestamp"] > summary_crimes[lead_name][0]:
                        summary_crimes[lead_name] = [
                            crime["timestamp"], crime["offence"]
                        ]
                        for criminal in crime["criminals"]:
                            previous_timestamp = wanted_cmdrs[
                                criminal["name"]][0] if criminal[
                                    "name"] in wanted_cmdrs else None
                            previous_timestamp = max(
                                previous_timestamp, enemies[criminal["name"]]
                                [0]) if criminal["name"] in enemies else None
                            if previous_timestamp > crime["timestamp"]:
                                continue
                            karma = criminal.get("karma", 0)
                            if not karma > 0:
                                karma = min(karma, criminal.get("dkarma", 0))
                            bounty = EDBounty(traffic.get("bounty", 0))
                            enemy = traffic.get("enemy", False)
                            by_pledge = traffic.get("byPledge", None)
                            if karma < 0 or bounty.is_significant():
                                wanted_cmdrs[criminal["name"]] = [
                                    crime["timestamp"], karma
                                ]
                            elif powerplay and enemy and powerplay == by_pledge:
                                enemies[traffic["cmdr"]] = [
                                    traffic["timestamp"], karma
                                ]
                for criminal in summary_crimes:
                    if summary_crimes[criminal][1] == "Murder":
                        summary_destroyers.append(u"{} {}".format(
                            criminal,
                            edtime.EDTime.t_minus(summary_crimes[criminal][0],
                                                  short=True)))
                    elif summary_crimes[criminal][1] in [
                            "Interdicted", "Interdiction"
                    ]:
                        summary_interdictors.append(u"{} {}".format(
                            criminal,
                            edtime.EDTime.t_minus(summary_crimes[criminal][0],
                                                  short=True)))
                if summary_interdictors:
                    # Translators: this is for the sitrep feature; it's a section to show cmdrs who have been reported as interdicting another cmdr in the system of interest
                    summary[_c(u"sitrep section|✪ Interdictors"
                               )] = summary_interdictors
                if summary_destroyers:
                    # Translators: this is for the sitrep feature; it's a section to show cmdrs who have been reported as responsible for destroying the ship of another cmdr in the system of interest; use a judgement-neutral term
                    summary[_c(
                        u"sitreps section|✪ Destroyers")] = summary_destroyers

        wanted_cmdrs = sorted(wanted_cmdrs.items(),
                              key=operator.itemgetter(1),
                              reverse=True)
        if wanted_cmdrs:
            summary_wanted = []
            for wanted in wanted_cmdrs:
                summary_wanted.append(u"{} {}".format(
                    wanted[0], edtime.EDTime.t_minus(wanted[1][0],
                                                     short=True)))
            if summary_wanted:
                # Translators: this is for the sitrep feature; it's a section to show wanted cmdrs who have been sighted in the system of interest
                summary[_c(u"sitreps section|✪ Outlaws")] = summary_wanted

        enemies = sorted(enemies.items(),
                         key=operator.itemgetter(1),
                         reverse=True)
        if enemies:
            summary_enemies = []
            for enemy in enemies:
                summary_enemies.append(u"{} {}".format(
                    enemies[0], edtime.EDTime.t_minus(enemies[1][0],
                                                      short=True)))
            if summary_enemies:
                # Translators: this is for the sitrep feature; it's a section to show enemy cmdrs who have been sighted in the system of interest
                summary[_c(u"sitreps section|✪ Enemies")] = summary_enemies

        return summary
예제 #8
0
    def short_profile(self, powerplay=None):
        edr_parts = []
        mapped_index = int(10 * (self._karma + self.max_karma()) /
                           (2.0 * self.max_karma()))
        lut = [
            _(u"Outlaw++++"),
            _(u"Outlaw+++"),
            _(u"Outlaw++"),
            _(u"Outlaw+"),
            _(u"Outlaw"),
            _(u"Ambiguous"),
            _(u"Lawful"),
            _(u"Lawful+"),
            _(u"Lawful++"),
            _(u"Lawful+++"),
            _(u"Lawful++++")
        ]
        karma = ""
        if self.dyn_karma:
            karma += u"≈ "
        karma += lut[mapped_index]

        edr_parts.append(karma)

        alignment = self.crowd_alignment()
        if not (alignment is None or alignment == ""):
            edr_parts.append(alignment)

        if not (self.patreon is None or self.patreon == ""):
            edr_parts.append(u"${patreon}".format(patreon=self.patreon))

        inara_parts = []
        if not (self.squadron is None or self.squadron == ""):
            inara_parts.append(self.squadron)

        if not (self.role is None or self.role == ""):
            inara_parts.append(self.role)

        powerplay_parts = []
        if not (self.powerplay is None or self.powerplay == ""):
            inara_parts.append(self.powerplay)
            if powerplay and powerplay.is_enemy(self.powerplay):
                powerplay_parts.append(_c(u"powerplay|enemy"))

        sqdex_parts = []
        iff = self.sqdrdex_profile.iff if self.sqdrdex_profile else None
        iff_by = self.sqdrdex_profile.iff_by if self.sqdrdex_profile else None
        if iff and iff_by:
            sqdex_parts.append(
                _(u"{iff} by {tagged_by}").format(iff=iff, tagged_by=iff_by))
        elif iff:
            sqdex_parts.append(iff)

        cdex_parts = []
        if self.dex_profile:
            alignment = self.dex_profile.alignment if self.dex_profile else None
            if alignment:
                cdex_parts.append(u"#{}".format(alignment))
            if self.dex_profile.friend:
                cdex_parts.append(_(u"#friend"))

            tags = self.dex_profile.tags
            if tags:
                cdex_parts.append(u"#{}".format(" #".join(tags)))

            memo = self.dex_profile.memo
            if memo:
                cdex_parts.append(memo)

        result = u""
        if edr_parts:
            result += u"✪EDR {} ".format(", ".join(edr_parts))

        if inara_parts:
            result += u"✪INR {} ".format(", ".join(inara_parts))

        if sqdex_parts:
            result += u"✪SQN {} ".format(", ".join(sqdex_parts))

        if cdex_parts:
            result += u"✪CMD {} ".format(", ".join(cdex_parts))

        if powerplay_parts:
            result += u"✪PP {} ".format(", ".join(powerplay_parts))

        return result
예제 #9
0
파일: edrsystems.py 프로젝트: sersorrel/edr
    def systems_with_recent_activity(self, pledged_to=None):
        systems_with_recent_crimes = {}
        systems_with_recent_traffic = {}
        systems_with_recent_outlaws = {}
        systems_with_recent_enemies = {}
        self.__update_if_stale()
        systems_ids = (list(self.sitreps_cache.keys())).copy()
        for sid in systems_ids:
            sitrep = self.sitreps_cache.get(sid)
            star_system = sitrep.get("name", None) if sitrep else None
            if self.has_recent_outlaws(star_system):
                systems_with_recent_outlaws[star_system] = sitrep[
                    "latestOutlaw"]
            elif pledged_to and self.has_recent_enemies(
                    star_system, pledged_to):
                latestEnemy = "latestEnemy_{}".format(
                    self.server.nodify(pledged_to))
                systems_with_recent_enemies[star_system] = sitrep[latestEnemy]
            elif self.has_recent_crimes(star_system):
                systems_with_recent_crimes[star_system] = sitrep["latestCrime"]
            elif self.has_recent_traffic(star_system):
                systems_with_recent_traffic[star_system] = sitrep[
                    "latestTraffic"]

        summary = {}
        summary_outlaws = []
        systems_with_recent_outlaws = sorted(
            systems_with_recent_outlaws.items(),
            key=lambda t: t[1],
            reverse=True)
        for system in systems_with_recent_outlaws:
            summary_outlaws.append(u"{} {}".format(
                system[0], edtime.EDTime.t_minus(system[1], short=True)))
        if summary_outlaws:
            # Translators: this is for the sitreps feature; it's the title of a section to show systems with sighted outlaws
            summary[_c(u"sitreps section|✪ Outlaws")] = summary_outlaws

        if pledged_to:
            summary_enemies = []
            systems_with_recent_enemies = sorted(
                systems_with_recent_enemies.items(),
                key=lambda t: t[1],
                reverse=True)
            for system in systems_with_recent_enemies:
                summary_enemies.append(u"{} {}".format(
                    system[0], edtime.EDTime.t_minus(system[1], short=True)))
            if summary_enemies:
                # Translators: this is for the sitreps feature; it's the title of a section to show systems with sighted enemies (powerplay)
                summary[_c(u"sitreps section|✪ Enemies")] = summary_enemies

        summary_crimes = []
        systems_with_recent_crimes = sorted(systems_with_recent_crimes.items(),
                                            key=lambda t: t[1],
                                            reverse=True)
        for system in systems_with_recent_crimes:
            summary_crimes.append(u"{} {}".format(
                system[0], edtime.EDTime.t_minus(system[1], short=True)))
        if summary_crimes:
            # Translators: this is for the sitreps feature; it's the title of a section to show systems with reported crimes
            summary[_c(u"sitreps section|✪ Crimes")] = summary_crimes

        summary_traffic = []
        systems_with_recent_traffic = sorted(
            systems_with_recent_traffic.items(),
            key=lambda t: t[1],
            reverse=True)
        for system in systems_with_recent_traffic:
            summary_traffic.append(u"{} {}".format(
                system[0], edtime.EDTime.t_minus(system[1], short=True)))
        if summary_traffic:
            # Translators: this is for the sitreps feature; it's the title of a section to show systems with traffic
            summary[_c(u"sitreps section|✪ Traffic")] = summary_traffic

        return summary
예제 #10
0
파일: edtime.py 프로젝트: glock2how/edr
    def pretty_print_timespan(timespan, short=False, verbose=False):
        if timespan < 0:
            raise ValueError('Invalid input')
        remaining = timespan
        days = remaining / 86400
        remaining -= days * 86400

        hours = (remaining / 3600) % 24
        remaining -= hours * 3600

        minutes = (remaining / 60) % 60
        remaining -= minutes * 60

        seconds = (remaining % 60)

        readable = ""
        if days > 0:
            suffix = (_c(u"suffix| days") if days > 1 else _c(u"suffix| day")) if verbose else _c(u"short suffix|d")            
            readable = _(u"{nb_days}{suffix}").format(nb_days=days, suffix=suffix)
            if hours > 0 and not short:
                suffix = (_c(u"suffix| hours") if hours > 1 else _c(u"suffix| hour")) if verbose else _c(u"short suffix|h")
                readable += _(u":{nb_hours}{suffix}").format(nb_hours=hours, suffix=suffix)
        elif hours > 0:
            suffix = (_c(u"suffix| hours") if hours > 1 else _c(u"suffix| hour")) if verbose else _c(u"short suffix|h")
            readable = _(u"{nb_hours}{suffix}").format(nb_hours=hours, suffix=suffix)
            if minutes > 0 and not short:
                suffix = (_c(u"suffix| minutes") if minutes > 1 else _c(u"suffix| minute")) if verbose else _c(u"short suffix|m")
                readable += _(u":{nb_minutes}{suffix}").format(nb_minutes=minutes, suffix=suffix)
        elif minutes > 0:
            suffix = (_c(u"suffix| minutes") if minutes > 1 else _c(u"suffix| minute")) if verbose else _c(u"short suffix|m")
            readable = _(u"{nb_minutes}{suffix}").format(nb_minutes=minutes, suffix=suffix)
            if seconds > 0 and not short:
                suffix = (_c(u"suffix| seconds") if seconds > 1 else _c(u"suffix| second")) if verbose else _c(u"short suffix|s")
                readable += _(u":{nb_seconds}{suffix}").format(nb_seconds=seconds, suffix=suffix)
        else:
            suffix = (_c(u"suffix| seconds") if seconds > 1 else _c(u"suffix| second")) if verbose else _c(u"short suffix|s")
            readable = _(u"{nb_seconds}{suffix}").format(nb_seconds=seconds, suffix=suffix)

        return readable
예제 #11
0
파일: ingamemsg.py 프로젝트: sersorrel/edr
    def docking(self, system, station, pad):
        self.clear_docking()
        if not station:
            return
        if "panel" in self.cfg["docking"]:
            self.__shape("docking", self.cfg["docking"]["panel"])
        if "panel" in self.cfg["docking-station"] and self.cfg["docking-station"].get("enabled", False):
            self.__shape("docking-station", self.cfg["docking-station"]["panel"])
        economy = u"{}/{}".format(station["economy"], station["secondEconomy"]) if station["secondEconomy"] else station["economy"]
        header = u"{} ({})".format(station["name"], economy)
        station_type = (station.get("type","N/A") or "N/A").lower()
        station_other_services = (station.get("otherServices", []) or []) 
        station_economy = (station.get('economy', "") or "").lower()
        station_second_economy = (station.get('secondEconomy', "") or "").lower()
        details = []
        a = u"◌" if station_type in ["outpost"] else u"●"
        b = u"●" if station.get("haveOutfitting", False) else u"◌"
        c = u"●" if station.get("haveShipyard", False) else u"◌"
        details.append(_(u"LG. Pad:{}   Outfit:{}   Shipyard:{}").format(a,b,c))
        a = u"●" if "Refuel" in station_other_services else u"◌"
        b = u"●" if "Repair" in station_other_services else u"◌"
        c = u"●" if "Restock" in station_other_services else u"◌"
        details.append(_(u"Refuel:{}   Repair:{}   Restock:{}").format(a,b,c))
        a = u"●" if station.get("haveMarket", False) else u"◌"
        b = u"●" if "Black Market" in station_other_services else u"◌"
        c = u"◌"
        m = _c(u"material trader|M.") 
        if "Material Trader" in station_other_services:
            c = u"●"
            if station_economy in ['extraction', 'refinery']:
                if not station["secondEconomy"]:
                    m = _(u"RAW")
                elif station_second_economy == "industrial":
                    m = _(u"R/M")
                elif station_second_economy in ["high tech", "military"]:
                    m = _(u"R/E")
            elif station_economy == 'industrial':
                if not station["secondEconomy"]:
                    m = _(u"MAN")
                elif station_second_economy in ["extraction", "refinery"]:
                    m = _(u"M/R")
                elif station_second_economy in ["high tech", "military"]:
                    m = _(u"M/E")
            elif station_economy in ['high tech', 'military']:
                if not station["secondEconomy"]:
                    m = _(u"ENC")
                elif station_second_economy in ["extraction", "refinery"]:
                    m = _(u"E/R")
                elif station_second_economy == "industrial":
                    m = _(u"E/M")
        details.append(_(u"Market:{}   B.Market:{}   {} Trad:{}").format(a,b,m,c))
        a = u"●" if "Interstellar Factors Contact" in station_other_services else u"◌"
        t = _c(u"tech broker|T.")
        b =  u"◌" 
        if "Technology Broker" in station_other_services:
            b = u"●"
            if station_economy == 'high tech':
                if not station["secondEconomy"]:
                    t = _c(u"guardian tech|GT.")
                elif station_second_economy == "industrial":
                    t = _c(u"ambiguous tech|T.")
            elif station_economy == 'industrial':
                if not station["secondEconomy"]:
                    t = _c(u"human tech|HT.") 
                elif station_second_economy == "high tech":
                    t = _c(u"ambiguous tech|T.") 

        details.append(_(u"I.Factor:{}   {} Broker:{}").format(a,t,b))
        details.append(_(u"as of {date}").format(date=station['updateTime']['information']))
        self.__msg_header("docking", header)
        self.__msg_body("docking", details)

        if not self.cfg["docking-station"]["enabled"]:
            return {"header": header, "body": details}
        
        if station_type in ["asteroid base", 'bernal starport', "coriolis starport", "ocellus starport", "orbis starport", "bernal", "bernal statioport"]:
            self.__station_schematic(pad)
        else:
            self.__landable_schematic(system, station, pad)
        return {"header": header, "body": details}
예제 #12
0
    def reset(self):
        for signal_name in self.signals:
            self.signals[signal_name]["count"] = 0
            if "expiring" in self.signals[signal_name]:
                self.signals[signal_name]["expiring"] = []

        self.stations = set()
        self.fleet_carriers = {}
        self.other_locations = set()
        self.resource_extraction_sites = {"available": False, "variants": {"$MULTIPLAYER_SCENARIO14_TITLE;": {"count": 0, "short_name": _("Standard Res|Std")}, "$MULTIPLAYER_SCENARIO77_TITLE;": {"count": 0, "short_name": _("Res Low|Low")}, "$MULTIPLAYER_SCENARIO78_TITLE;": {"count": 0, "short_name": _("Res High|High")}, "$MULTIPLAYER_SCENARIO79_TITLE;": {"count": 0, "short_name": _("Res Hazardous|Haz")}}, "short_name": _("RES") }
        self.combat_zones = {"available": False, "variants": {"$Warzone_PointRace_Low;":  {"count": 0, "short_name": _("CZ Low intensity|Low")}, "$Warzone_PointRace_Medium;":  {"count": 0, "short_name": "CZ Medium intensity|Med"}, "$Warzone_PointRace_High;":  {"count": 0, "short_name": _("CZ High intensity|High")}}, "short_name": _("CZ") }
        self.uss = {"available": False, "variants": {"$USS_Type_Salvage;":  {"count": 0, "expiring": [], "short_name": _c("Degraded Emissions|Degraded")}, "$USS_Type_ValuableSalvage;":  {"count": 0, "expiring": [], "short_name": _c("Encoded Emissions|Encoded")}, "$USS_Type_VeryValuableSalvage;": {"count": 0, "expiring": [], "short_name": _c("High Grade Emissions|High Grade")}, "misc": {"count": 0, "expiring": [], "short_name": _c("Misc.")}}, "short_name": _("USS") }
        self.star_system = {"name": None, "address": None}
        self.noteworthy = False
예제 #13
0
    def __init__(self):
        self.signals = {
            # "$MULTIPLAYER_SCENARIO42_TITLE;": {"count": 0, "short_name": _("Nav Beacon") }, # Not super interesting 
            "$MULTIPLAYER_SCENARIO64_TITLE;": {"count": 0, "short_name": _("USS") },
            "$MULTIPLAYER_SCENARIO80_TITLE;": {"count": 0, "short_name": _("Compromised Nav Beacon") },
            "$MULTIPLAYER_SCENARIO81_TITLE;": {"count": 0, "short_name": _("Salvageable Wreckage")},
            "$FIXED_EVENT_NUMBERSTATION;": {"count": 0, "short_name": _("Anomalous Signal - Numbers Station") },
            "$Warzone_TG;": {"count": 0, "short_name": _("CZ [AX]") },
            "$FIXED_EVENT_CAPSHIP;": {"count": 0, "short_name": _("CAPITAL SHIP") },
            "$NumberStation:#index=1;": {"count": 0, "short_name": _("Unreg. Comms - Numbers Station (Ⅰ)") },
            "$FIXED_EVENT_HIGHTHREATSCENARIO_T7;": {"count": 0, "short_name": _("Pirates [Th. 7]") },
            "$NumberStation:#index=1;": {"count": 0, "short_name": _("Unreg. Comms") },
            "$FIXED_EVENT_HIGHTHREATSCENARIO_T7;": {"count": 0, "short_name": _("Pirates [Th. 7]") },
            "$FIXED_EVENT_HIGHTHREATSCENARIO_T6;": {"count": 0, "short_name": _("Pirates [Th. 6]") },
            "$FIXED_EVENT_HIGHTHREATSCENARIO_T5;": {"count": 0, "short_name": _("Pirates [Th. 5]") },
            "$FIXED_EVENT_PROBE;": {"count": 0, "short_name": _("Ancient probe") },
            "$Gro_controlScenarioTitle;": {"count": 0, "short_name": _("Armed Revolt")},
            "$FIXED_EVENT_CHECKPOINT;": {"count": 0, "short_name": _("Checkpoint") },
            "$Ari_controlScenarioTitle;": {"count": 0, "short_name": _("Crime Sweep") },
            "$FIXED_EVENT_DEBRIS;": {"count": 0, "short_name": _("Debris field")},
            "$Aftermath_Large:#index=1;": {"count": 0, "short_name": _("Distress Call (Ⅰ)") },
            "$Aftermath_Large:#index=2;": {"count": 0, "short_name": _("Distress Call (Ⅱ)") },
            "$FIXED_EVENT_DISTRIBUTIONCENTRE;": {"count": 0, "short_name": _("Distribution centre") },
            "$Fixed_Event_Life_Cloud;": {"count": 0, "short_name": _("Stellar phenomena") },
            "$ListeningPost;": {"count": 0, "short_name": _("Listening Post") },
            "$Rep_controlScenarioTitle;": {"count": 0, "short_name": _("Military Strike")},
        }
        self.stations = set()
        self.fleet_carriers = {}
        self.other_locations = set()
        self.resource_extraction_sites = {"available": False, "variants": {"$MULTIPLAYER_SCENARIO14_TITLE;": {"count": 0, "short_name": _c("Standard Res|Std")}, "$MULTIPLAYER_SCENARIO77_TITLE;": {"count": 0, "short_name": _c("Res Low|Low")}, "$MULTIPLAYER_SCENARIO78_TITLE;": {"count": 0, "short_name": _c("Res High|High")}, "$MULTIPLAYER_SCENARIO79_TITLE;": {"count": 0, "short_name": _c("Res Hazardous|Haz")}}, "short_name": _("RES") }
        self.combat_zones = {"available": False, "variants": {"$Warzone_PointRace_Low;":  {"count": 0, "short_name": _c("CZ Low intensity|Low")}, "$Warzone_PointRace_Medium;":  {"count": 0, "short_name": _c("CZ Medium intensity|Med")}, "$Warzone_PointRace_High;":  {"count": 0, "short_name": _c("CZ High intensity|High")}}, "short_name": _("CZ") }
        self.uss = {"available": False, "variants": {"$USS_Type_Salvage;":  {"count": 0, "expiring": [], "short_name": _c("Degraded Emissions|Degraded")}, "$USS_Type_ValuableSalvage;":  {"count": 0, "expiring": [], "short_name": _c("Encoded Emissions|Encoded")}, "$USS_Type_VeryValuableSalvage;": {"count": 0, "expiring": [], "short_name": _c("High Grade Emissions|High Grade")}, "misc": {"count": 0, "expiring": [], "short_name": _c("Misc.")}}, "short_name": _("USS") }

        # $USS_Type_DistressSignal;
        # $USS_Type_Convoy;
        # $USS_Type_Aftermath;
        # $USS_Type_Ceremonial;
        # $USS_Type_NonHuman; USSThreat = 4
        # $USS_Type_TradingBeacon;
        # $USS_Type_WeaponsFire; USSThreat


        self.star_system = {"name": None, "address": None}
        self.noteworthy = False