about summary refs log tree commit diff stats
path: root/apworld/__init__.py
blob: 20c145492d9f08b2f6505380362865b94a9d790c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight:
"""
Archipelago init file for Lingo 2
"""
from BaseClasses import ItemClassification, Item
from worlds.AutoWorld import WebWorld, World
from .items import Lingo2Item
from .options import Lingo2Options
from .player_logic import Lingo2PlayerLogic
from .regions import create_regions
from .static_logic import Lingo2StaticLogic


class Lingo2WebWorld(WebWorld):
    rich_text_options_doc = True
    theme = "grass"


class Lingo2World(World):
    """
    Lingo 2 is a first person indie puzzle game where you solve word puzzles in a labyrinthe world. Compared to its
    predecessor, Lingo 2 has new mechanics, more areas, and a unique progression system where you have to unlock letters
    before using them in puzzle solutions.
    """
    game = "Lingo 2"
    web = Lingo2WebWorld()

    options_dataclass = Lingo2Options
    options: Lingo2Options

    static_logic = Lingo2StaticLogic()
    item_name_to_id = static_logic.item_name_to_id
    location_name_to_id = static_logic.location_name_to_id

    player_logic: Lingo2PlayerLogic

    def generate_early(self):
        self.player_logic = Lingo2PlayerLogic(self)

    def create_regions(self):
        create_regions(self)

        from Utils import visualize_regions

        visualize_regions(self.multiworld.get_region("Menu", self.player), "my_world.puml")

    def create_items(self):
        pool = [self.create_item(name) for name in self.player_logic.real_items]

        self.multiworld.itempool += pool

    def create_item(self, name: str) -> Item:
        return Lingo2Item(name, ItemClassification.progression, self.item_name_to_id.get(name), self.player)