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/awards.py at main · DotModGroup/ColdWaters-DotModCampaignChecker

Expand file tree

/

awards.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
33 lines (25 loc) · 1.17 KB
/

awards.py

Copy path

File metadata and controls

33 lines (25 loc) · 1.17 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
"""This file holds the Awards class, which holds all of the awards at once.
Classes:
Awards
"""
class Awards:
"""This class stores all events from a single campaign
Attributes:
patrol_awards: list[str] = [] | List of patrol awards as pulled from awards.txt
cumulative_awards: list[str] = [] | List of cumulative awards as pulled from awards.txt
wounded_awards: list[str] = [] | List of wounded awards as pulled from awards.txt
Methods:
None
"""
def __init__(self, campaign_directory: str) -> None:
self.patrol_awards: list[str] = []
self.cumulative_awards: list[str] = []
self.wounded_awards: list[str] = []
awards_file = campaign_directory + "\\awards.txt"
for line in open(awards_file, mode="r", encoding="utf-8"):
if line.startswith("PatrolAwards="):
self.patrol_awards = line[:-1].split("=")[1].split(",")
if line.startswith("CumulativeAwards="):
self.cumulative_awards = line[:-1].split("=")[1].split(",")
if line.startswith("WoundedAwards="):
self.wounded_awards = line[:-1].split("=")[1].split(",")
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.