allow ER coop

This commit is contained in:
Fabian Dill
2021-02-20 02:30:55 +01:00
parent a7cbb440d1
commit c55cf28229
5 changed files with 24 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import copy
from enum import Enum, unique
import logging
import json
import functools
from collections import OrderedDict, Counter, deque
from typing import Union, Optional, List, Dict, NamedTuple, Iterable
import secrets
@@ -160,6 +161,10 @@ class World(object):
region.world = self
self._region_cache[region.player][region.name] = region
@functools.cached_property
def world_name_lookup(self):
return {self.player_names[player_id][0]: player_id for player_id in self.player_ids}
def _recache(self):
"""Rebuild world cache"""
for region in self.regions: