GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ColdWaters-DotModCampaignChecker/language_info.py at main · DotModGroup/ColdWaters-DotModCampaignChecker

Expand file tree

/

language_info.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
82 lines (69 loc) · 2.57 KB
/

language_info.py

Copy path

File metadata and controls

82 lines (69 loc) · 2.57 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
"""This file holds all data relevant to the parsed language files
Imports From:
events.py
mission_language_files.py
Classes:
LanguageInfo
"""
import os
from events import Events
from mission_language_files import MissionLanguageFiles
class LangaugeInfo:
"""This class stores all mission language files found for the specified language
Attributes:
language: str | The two-letter code for the current language
events: list[str] = [] | List of all events as pilled from the files
mission_language_files: list[str] = [] | Stores the names of all parsed mission
language files
Methods:
None
"""
def __init__(self, campaign_directory: str, current_language: str):
self.language = current_language
self.events = Events(campaign_directory, current_language)
self.mission_language_files = MissionLanguageFiles(
campaign_directory, current_language
)
self.description_file = (
True
if os.path.exists(
f"{campaign_directory}\\language_{current_language}\\description.txt"
)
else False
)
try:
with open(
f"{campaign_directory}\\language_{current_language}\\campaign_map_data.txt",
encoding="utf8",
) as map_data:
self.location_names: list[str] | None = [
line.strip().split("=")[1]
for line in map_data.readlines()
if line.startswith("LocationName=")
]
except FileNotFoundError:
self.location_names = None
try:
with open(
f"{campaign_directory}\\language_{current_language}\\"
"waypoints_region_names.txt",
encoding="utf8",
) as region_names:
self.region_names: list[str] | None = [
line.strip().split("=")[0]
for line in region_names.readlines()
if not line.startswith("Regions=")
]
except FileNotFoundError:
self.region_names = None
try:
with open(
f"{campaign_directory}\\language_{current_language}\\"
"waypoints_sea_names.txt",
encoding="utf8",
) as sea_names:
self.sea_names: list[str] | None = [
line.strip() for line in sea_names.readlines()
]
except FileNotFoundError:
self.sea_names = None
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.