コード例 #1
0
class AmusementPark1(BaseAmusementPark):
    data = {
        'first': ListData(first1),
        'last': ListData(second1),
    }

    def __str__(self):
        return "{}{}".format(self.first, self.last)
コード例 #2
0
ファイル: fixtures.py プロジェクト: d2emon/generator-pack
class AquaticFixtures(MammalFixtures):
    body1 = ListData(race.aquatic_tails)

    # tails = ListData(race.tails)
    arms = ListData(race.aquatic_arms)
    legs = ListData(race.aquatic_dorsals)

    covers = StaticData()
    horns = ListData(race.aquatic_horns)
コード例 #3
0
class World(ListGenerated):
    data = {
        'adjective': ListData(adjective),
        'noun': ListData(noun),
    }

    def __init__(self, adjective="", noun=""):
        super().__init__()
        self.adjective = adjective
        self.noun = noun

    def __str__(self):
        return "{} {}".format(self.adjective, self.noun)
コード例 #4
0
ファイル: generators.py プロジェクト: d2emon/generator-pack
class DivercityGenerator(BasicGenerator):
    generated_class = Divercity

    divercity = ListData(race.divercities)
    colors = ListData(race.divercity_colors_data)

    def value(self, *args, **kwargs):
        divercity = self.divercity.unique(2)
        return {
            'm': divercity[0],
            'f': divercity[1],
            'color': next(self.colors),
        }
コード例 #5
0
ファイル: galaxy.py プロジェクト: d2emon/generator-pack
class BaseGalaxyGenerator(ListGenerator):
    generated_class = Galaxy
    template = "{part1} {part2}"
    data = {
        'part1': ListData(galaxy_names[0]),
        'part2': ListData(galaxy_names[1]),
    }

    @classmethod
    def __next__1(cls):
        choices = [ListData(n) for n in cls.galaxy_names]
        return "%s %s" % (
            choices[0].__next__(),
            choices[1].__next__(),
        )
コード例 #6
0
ファイル: fixtures.py プロジェクト: d2emon/generator-pack
class RaceFixtures:
    eyes_count = ListData(race.eyes_count)
    eyesockets = ListData(race.eyesockets)
    mouths = ListData(race.mouths)
    noses = ListData(race.noses)
    ears = ListData(race.ears)

    arms = ListData(race.arms)
    legs = ListData(race.legs)
    tails = ListData(race.tails)
    limbs = StaticData()
    wings = StaticData()

    body1 = StaticData()
    body2 = StaticData()
    body3 = StaticData()

    horns = ListData(race.horns)
    covers = ListData(race.covers)
コード例 #7
0
ファイル: universe.py プロジェクト: d2emon/generator-pack
class Universe(ListGenerated):
    data = {'value': ListData(universe)}

    def __init__(self, value, position=(0, 0, 0)):
        super().__init__(value)
        self.position = position

    @classmethod
    def generate(cls):
        u = super().generate()
        u.position = [
            1,
            2,
            3,
        ]
        return u
コード例 #8
0
ファイル: fixtures.py プロジェクト: d2emon/generator-pack
class FishFixtures(RaceFixtures):
    noses = ListData(race.fish_noses)
    ears = ListData(race.fish_ears)

    arms = ListData(race.fish_sides)
    legs = ListData(race.fish_dorsals)

    body1 = ListData(race.fish_tails)

    # tails = ListData(race.tails)

    covers = ListData(race.fish_scales)
コード例 #9
0
ファイル: fixtures.py プロジェクト: d2emon/generator-pack
class BirdFixtures(RaceFixtures):
    mouths = ListData(race.beaks)
    noses = None
    ears = ListData(race.bird_ears)

    arms = ListData(race.bird_wings)
    legs = ListData(race.bird_legs)
    tails = ListData(race.bird_tails)

    horns = StaticData()
    # ears_generator = BirdEarsGenerator
    # mouth_generator = BeakGenerator
    # nose_generator = None
    covers = ListData(race.feathers)
コード例 #10
0
class Multiverse(NamedGenerated):
    class MultiverseNameGenerator(TextGenerator):
        block_id = 'multiverse'

    data = {'value': ListData(multiverse)}
    name_generator = MultiverseNameGenerator

    children_count = 10, 30

    def __init__(self, value=None, generator_data=None, item_id=None):
        super().__init__(value, generator_data, item_id)
        self.positions = TwoPoint()
        self._universes = None

    @property
    def universes_ids(self):
        if self._children is None:
            self._children = [self.positions.generate() for _ in range(self.generate_children_count())]
        return self._children

    @property
    def universes(self):
        return self.universes_ids
コード例 #11
0
ファイル: fixtures.py プロジェクト: d2emon/generator-pack
class AmphibianFixtures(RaceFixtures):
    tails = ListData(race.amphibian_tails)

    covers = ListData(race.mucouses)
コード例 #12
0
ファイル: galaxy.py プロジェクト: d2emon/generator-pack
 def __next__1(cls):
     choices = [ListData(n) for n in cls.galaxy_names]
     return "%s %s" % (
         choices[0].__next__(),
         choices[1].__next__(),
     )
コード例 #13
0
ファイル: generators.py プロジェクト: d2emon/generator-pack
 def __init__(self, **kwargs):
     self.skins = kwargs.get('skins', ListData(race.skins))
     self.covers = kwargs.get('covers', StaticData())
     self.colors = kwargs.get('colors', ListData(race.skin_colors))
     self.color_chances = kwargs.get('color_chances', race.skin_color_chances)
     self.agings = kwargs.get('agings', ListData(race.agings))
コード例 #14
0
ファイル: galaxy.py プロジェクト: d2emon/generator-pack
 class GalaxyGenerator1(BaseGalaxyGenerator):
     data = {
         'part1': ListData(galaxy_names[0]),
         'part2': ListData(galaxy_names[1]),
     }
コード例 #15
0
ファイル: band.py プロジェクト: d2emon/generator-pack
 class BandSubGenerator2(BandSubGenerator):
     data = { 'name': ListData(names5) }
コード例 #16
0
class Outfit:
    storage = []

    belt_data = ListData(belt)
    gloves_data = ListData(gloves)
    jacket_data = ListData(jacket)
    pants_data = ListData(pants)
    scarf_data = ListData(scarf)
    shirt_data = ListData(shirt)
    shoes_data = ListData(shoes)
    skirt_data = ListData(skirt)

    def __init__(self):
        self.gender = "male"

        self.scarf = ""
        self.jacket = ""
        self.shirt = ""
        self.pants = ""
        self.shoes = ""
        self.gloves = ""
        self.belt = ""
        self.skirt = ""
        self.armor = []

    def clear(self):
        self.scarf = ""
        self.jacket = ""
        self.shirt = ""
        self.pants = ""
        self.shoes = ""
        self.gloves = ""
        self.belt = ""
        self.skirt = ""

    def generate(self):
        self.scarf = "https://rollforfantasy.com/images/clothing/n{}/{}".format(
            self.gender, next(self.scarf_data))
        self.jacket = "https://rollforfantasy.com/images/clothing/n{}/{}".format(
            self.gender, next(self.jacket_data))
        self.shirt = "https://rollforfantasy.com/images/clothing/n{}/{}".format(
            self.gender, next(self.shirt_data))
        self.pants = "https://rollforfantasy.com/images/clothing/n{}/{}".format(
            self.gender, next(self.pants_data))
        self.shoes = "https://rollforfantasy.com/images/clothing/n{}/{}".format(
            self.gender, next(self.shoes_data))
        self.gloves = "https://rollforfantasy.com/images/clothing/n{}/{}".format(
            self.gender, next(self.gloves_data))
        self.belt = "https://rollforfantasy.com/images/clothing/n{}/{}".format(
            self.gender, next(self.belt_data))
        self.skirt = "https://rollforfantasy.com/images/clothing/n{}/{}".format(
            self.gender, next(self.skirt_data))

    def load(self, name):
        return self.storage[name]

    def save(self, name):
        self.storage[name] = self

    def image(self):
        armor = [
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/" + a.id + ".png" for a in self.armor
        ]
        return {
            'body':
            "https://rollforfantasy.com/images/armor/" + self.gender +
            "/body.png",
            'armor':
            armor,
            'scarf':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/" + self.scarf + ".png",
            'glove':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/" + self.gloves + ".png",
            'jacket':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/" + self.jacket + ".png",
            'shirt':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/" + self.shirt + ".png",
            'shoes':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/" + self.shoes + ".png",
            'pants':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/" + self.pants + ".png",
            'skirt':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/" + self.skirt + ".png",
            'belt':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/" + self.belt + ".png",
            'bshoes':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/b" + self.shoes + ".png",
            'bshirt':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/b" + self.shirt + ".png",
            'bjacket':
            "https://rollforfantasy.com/images/clothing/n" + self.gender +
            "/b" + self.jacket + ".png",
        }
コード例 #17
0
ファイル: galaxy.py プロジェクト: d2emon/generator-pack
 class GalaxyGenerator3(BaseGalaxyGenerator):
     data = {
         'part1': ListData(galaxy_names[2]),
         'part2': ListData(galaxy_names[3]),
     }
コード例 #18
0
class AmusementPark2(BaseAmusementPark):
    data = {
        'first': ListData(first2),
        'last': ListData(second2),
    }
コード例 #19
0
ファイル: fixtures.py プロジェクト: d2emon/generator-pack
class ReptileFixtures(RaceFixtures):
    limbs = ListData(race.reptilian_arms)
    tails = ListData(race.reptilian_tails)

    covers = ListData(race.reptile_scales)
コード例 #20
0
ファイル: band.py プロジェクト: d2emon/generator-pack
 class BandSubGenerator1(BandSubGenerator):
     template = "{name1} {name2}"
     data = {
         'name1': ListData(names1),
         'name2': ListData(names2),
     }
コード例 #21
0
ファイル: fixtures.py プロジェクト: d2emon/generator-pack
class InvertebrateFixtures(RaceFixtures):
    arms = ListData(race.invertebrate_arms)
    legs = ListData(race.invertebrate_legs)
    tails = ListData(race.invertebrate_tails)
コード例 #22
0
ファイル: band.py プロジェクト: d2emon/generator-pack
 class BandSubGenerator3(BandSubGenerator):
     template = "{name1} of {name2}"
     data = {
         'name1': ListData(names3),
         'name2': ListData(names4),
     }
コード例 #23
0
class AlbumGenerator(ListGenerator):
    generated_class = Album
    data = {'name': ListData(names)}