from collections.abc import Callable from typing import TYPE_CHECKING from BaseClasses import CollectionState from .player_logic import AccessRequirements if TYPE_CHECKING: from . import Lingo2World def lingo2_can_satisfy_requirements(state: CollectionState, reqs: AccessRequirements, world: "Lingo2World") -> bool: if not all(state.has(item, world.player) for item in reqs.items): return False if not all(state.has(item, world.player, amount) for item, amount in reqs.progressives.items()): return False if not all(state.can_reach_region(region_name, world.player) for region_name in reqs.rooms): return False for letter_key, letter_level in reqs.letters.items(): if not state.has(letter_key, world.player, letter_level): return False if reqs.cyans: if not any(state.has(letter, world.player, amount) for letter, amount in world.player_logic.double_letter_amount.items()): return False if len(reqs.or_logic) > 0: if not all(any(lingo2_can_satisfy_requirements(state, sub_reqs, world) for sub_reqs in subjunction) for subjunction in reqs.or_logic): return False return True def make_location_lambda(reqs: AccessRequirements, world: "Lingo2World") -> Callable[[CollectionState], bool]: return lambda state: lingo2_can_satisfy_requirements(state, reqs, world) '> about summary refs log tree commit diff stats
path: root/tools/validator/godot_processor.h
blob: 97bcea6e7ca04f34f54ae064f118659d84c045f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef TOOLS_VALIDATOR_GODOT_PROCESSOR_H_
#define TOOLS_VALIDATOR_GODOT_PROCESSOR_H_

#include <string>

namespace com::fourisland::lingo2_archipelago {

struct CollectedInfo;

void ProcessGodotData(const std::string& repodir, CollectedInfo& info);

}  // namespace com::fourisland::lingo2_archipelago

#endif /* TOOLS_VALIDATOR_GODOT_PROCESSOR_H_ */