Skip to content

Commit

Permalink
Put in the names for the states and some short descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
RPINerd committed Jul 26, 2024
1 parent c166937 commit 66efc82
Show file tree
Hide file tree
Showing 20 changed files with 129 additions and 58 deletions.
7 changes: 4 additions & 3 deletions src/interface/average_prices.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Average Prices screen
This shows the prices of goods in comparison to the target system.
"""

import pygame
Expand All @@ -11,7 +12,7 @@
from .state import State


class <state>(State):
class AvgPrices(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +38,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Average Price List", self.head_font, canvas)
title.render()

return canvas
7 changes: 4 additions & 3 deletions src/interface/bank.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Banking Screen
For managing both loans and insurance.
"""

import pygame
Expand All @@ -11,7 +12,7 @@
from .state import State


class <state>(State):
class Bank(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +38,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Bank", self.head_font, canvas)
title.render()

return canvas
6 changes: 3 additions & 3 deletions src/interface/buy_cargo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Buy Cargo Screen
"""

import pygame
Expand All @@ -11,7 +11,7 @@
from .state import State


class <state>(State):
class BuyCargo(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +37,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Buy Cargo", self.head_font, canvas)
title.render()

return canvas
6 changes: 3 additions & 3 deletions src/interface/buy_equip.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Buy Equipment Screen
"""

import pygame
Expand All @@ -11,7 +11,7 @@
from .state import State


class <state>(State):
class BuyEquipment(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +37,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Buy Equipment", self.head_font, canvas)
title.render()

return canvas
6 changes: 3 additions & 3 deletions src/interface/buy_ship.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

import pygame

from ..constants import INTERNAL_RES, GameStateID
from ..constants import GameStateID
from .renderer import Header, TextRender, TitleBar
from .state import State


class <state>(State):
class BuyShip(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +37,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Buy Ship", self.head_font, canvas)
title.render()

return canvas
9 changes: 5 additions & 4 deletions src/interface/char_status.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Commander Status Screen
Shows your stats, time played, etc.
"""

import pygame

from ..constants import INTERNAL_RES, GameStateID
from ..constants import GameStateID
from .renderer import Header, TextRender, TitleBar
from .state import State


class <state>(State):
class CharInfo(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +38,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Commander", self.head_font, canvas)
title.render()

return canvas
10 changes: 6 additions & 4 deletions src/interface/longrange.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Galactic Chart Screen
Shows the entire galaxy and the current range of the ship.
Also allows for systems to be tracked and wormholes to be previewed.
"""

import pygame

from ..constants import INTERNAL_RES, GameStateID
from ..constants import GameStateID
from .renderer import Header, TextRender, TitleBar
from .state import State


class <state>(State):
class LongRange(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +39,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Galactic Chart", self.head_font, canvas)
title.render()

return canvas
9 changes: 5 additions & 4 deletions src/interface/personnel.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Personnel Screen
Manage current crew and hire new crew members if available.
"""

import pygame

from ..constants import INTERNAL_RES, GameStateID
from ..constants import GameStateID
from .renderer import Header, TextRender, TitleBar
from .state import State


class <state>(State):
class Personnel(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +38,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Personnel Roster", self.head_font, canvas)
title.render()

return canvas
8 changes: 4 additions & 4 deletions src/interface/quests.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Quest Screen
"""

import pygame

from ..constants import INTERNAL_RES, GameStateID
from ..constants import GameStateID
from .renderer import Header, TextRender, TitleBar
from .state import State


class <state>(State):
class Quests(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +37,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Quests", self.head_font, canvas)
title.render()

return canvas
6 changes: 5 additions & 1 deletion src/interface/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Space Trader (PalmOS) | RPINerd, 2024
The renderer module contains classes for rendering text and UI elements to the screen.
Elements like the header, and BSYW bar are fairly universal elements and
Elements like the header, and BSYW bar are universal elements for the game states and
can be abstracted away here to keep the individual screens' classes clean.
"""

Expand All @@ -12,6 +12,10 @@
from ..constants import INTERNAL_RES


class Button:
""""""


class TextRender:
"""
A self aware object that can render itself to the screen.
Expand Down
8 changes: 4 additions & 4 deletions src/interface/sell_cargo.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Sell Cargo Screen
"""

import pygame

from ..constants import INTERNAL_RES, GameStateID
from ..constants import GameStateID
from .renderer import Header, TextRender, TitleBar
from .state import State


class <state>(State):
class SellCargo(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +37,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Sell Cargo", self.head_font, canvas)
title.render()

return canvas
6 changes: 3 additions & 3 deletions src/interface/sell_equip.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

import pygame

from ..constants import INTERNAL_RES, GameStateID
from ..constants import GameStateID
from .renderer import Header, TextRender, TitleBar
from .state import State


class <state>(State):
class SellEquipment(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +37,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Sell Equipment", self.head_font, canvas)
title.render()

return canvas
9 changes: 5 additions & 4 deletions src/interface/ship_info.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Ship Info Screen
Shows the info on your current ship.
"""

import pygame

from ..constants import INTERNAL_RES, GameStateID
from ..constants import GameStateID
from .renderer import Header, TextRender, TitleBar
from .state import State


class <state>(State):
class ShipInfo(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +38,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Current Ship", self.head_font, canvas)
title.render()

return canvas
10 changes: 6 additions & 4 deletions src/interface/shipyard.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
"""
Space Trader (PalmOS) | RPINerd, 2024
Shipyard Screen
Counterintuitively, not actually where you buy ships.
Houses refuel, repair, escape pod purchase and then link to ship sales.
"""

import pygame

from ..constants import INTERNAL_RES, GameStateID
from ..constants import GameStateID
from .renderer import Header, TextRender, TitleBar
from .state import State


class <state>(State):
class Shipyard(State):

def __init__(self, game) -> None:
self.game = game
Expand All @@ -37,7 +39,7 @@ def render(self, canvas: pygame.Surface) -> pygame.Surface:
# Draw the header
header = Header(canvas)
header.render()
title = TitleBar("<state>", self.head_font, canvas)
title = TitleBar("Shipyard", self.head_font, canvas)
title.render()

return canvas
Loading

0 comments on commit 66efc82

Please sign in to comment.