def METHOD_NAME(patch: DirtPatchData, enum_val: int, name: str):
    """Add patch to relevant Logic Region."""
    level_to_enum = {
        Levels.DKIsles: randomizer.LogicFiles.DKIsles.LogicRegions,
        Levels.JungleJapes: randomizer.LogicFiles.JungleJapes.LogicRegions,
        Levels.AngryAztec: randomizer.LogicFiles.AngryAztec.LogicRegions,
        Levels.FranticFactory: randomizer.LogicFiles.FranticFactory.LogicRegions,
        Levels.GloomyGalleon: randomizer.LogicFiles.GloomyGalleon.LogicRegions,
        Levels.FungiForest: randomizer.LogicFiles.FungiForest.LogicRegions,
        Levels.CrystalCaves: randomizer.LogicFiles.CrystalCaves.LogicRegions,
        Levels.CreepyCastle: randomizer.LogicFiles.CreepyCastle.LogicRegions,
    }
    level_to_name = {
        Levels.DKIsles: "Isles",
        Levels.JungleJapes: "Japes",
        Levels.AngryAztec: "Aztec",
        Levels.FranticFactory: "Factory",
        Levels.GloomyGalleon: "Galleon",
        Levels.FungiForest: "Fungi",
        Levels.CrystalCaves: "Caves",
        Levels.CreepyCastle: "Castle",
    }
    level_data = level_to_enum[patch.level_name]
    level_data[patch.logicregion].locations.append(LocationLogic(enum_val, patch.logic))
    LocationList[enum_val].name = f"{level_to_name[patch.level_name]} Dirt: {name}"
    LocationList[enum_val].default_mapid_data[0].map = patch.map_id
    LocationList[enum_val].level = patch.level_name