mirror of
https://github.com/duckduckdoof/miniopolis.git
synced 2025-03-15 08:51:21 +00:00
Removed stuff from gitignore
This commit is contained in:
parent
032ab0c35f
commit
7b60641dfc
4 changed files with 124 additions and 8 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -14,7 +14,6 @@ dist/
|
|||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
|
@ -171,12 +170,5 @@ cython_debug/
|
|||
.pypirc
|
||||
|
||||
# Custom Omissions
|
||||
maps/*.tiled-project
|
||||
maps/*.tiled-session
|
||||
maps/*.tsx
|
||||
maps/*.tmx
|
||||
|
||||
res/*.aseprite
|
||||
|
||||
template.py
|
||||
test-demo.py
|
||||
|
|
0
lib/__init__.py
Normal file
0
lib/__init__.py
Normal file
44
lib/game_config.py
Normal file
44
lib/game_config.py
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
"""
|
||||
game_config.py
|
||||
|
||||
author: Caleb Scott
|
||||
|
||||
Contains all constants needed to modify the game
|
||||
"""
|
||||
|
||||
# CONSTANTS ---------------------------------------------------------
|
||||
|
||||
# Sizing
|
||||
TILE_SCALE = 1.0
|
||||
|
||||
# Screen constants
|
||||
SCREEN_WIDTH = 960
|
||||
SCREEN_HEIGHT = 960
|
||||
SCREEN_TITLE = "Miniopolis Demo"
|
||||
|
||||
# World size
|
||||
WORLD_WIDTH = 960
|
||||
WORLD_HEIGHT = 640
|
||||
|
||||
# Text placement
|
||||
TEXT_X = 10
|
||||
TEXT_Y = SCREEN_HEIGHT - 30
|
||||
TEXT_Y_WIDTH = 30
|
||||
|
||||
# Resources/sprites
|
||||
RES = "res/"
|
||||
MINING_RES = RES + "miner.png"
|
||||
HOUSING_RES = RES + "housing.png"
|
||||
CROPS_RES = RES + "crops.png"
|
||||
LOGGER_RES = RES + "logger.png"
|
||||
HYDRO_RES = RES + "hydropower.png"
|
||||
FACTORY_RES = RES + "factory.png"
|
||||
|
||||
# Maps dir + map presets
|
||||
MAPS = "maps/"
|
||||
TEST_MAP = MAPS + "default-map.json"
|
||||
|
||||
# Layers for Map
|
||||
LAYER_STRUCTURES = "Structures"
|
||||
LAYER_ENVIRONMENT = "Environment"
|
80
lib/tiles.py
Normal file
80
lib/tiles.py
Normal file
|
@ -0,0 +1,80 @@
|
|||
"""
|
||||
tiles.py
|
||||
|
||||
author: Caleb Scott
|
||||
|
||||
Contains all classes of tiles used in miniopolis
|
||||
"""
|
||||
|
||||
# IMPORTS -----------------------------------------------------------
|
||||
|
||||
import arcade
|
||||
from game_config import *
|
||||
|
||||
# CLASSES -----------------------------------------------------------
|
||||
|
||||
class HousingTile(arcade.Sprite):
|
||||
|
||||
def __init__(self, x, y):
|
||||
self.image_file_name = HOUSING_RES
|
||||
super().__init__(self.image_file_name, TILE_SCALE)
|
||||
|
||||
# Set custom properties
|
||||
self.properties["type"] = "HousingTile"
|
||||
self.center_x = x
|
||||
self.center_y = y
|
||||
|
||||
class LoggerTile(arcade.Sprite):
|
||||
|
||||
def __init__(self, x, y):
|
||||
self.image_file_name = LOGGER_RES
|
||||
super().__init__(self.image_file_name, TILE_SCALE)
|
||||
|
||||
# Set custom properties
|
||||
self.properties["type"] = "LoggerTile"
|
||||
self.center_x = x
|
||||
self.center_y = y
|
||||
|
||||
class CropsTile(arcade.Sprite):
|
||||
|
||||
def __init__(self, x, y):
|
||||
self.image_file_name = CROPS_RES
|
||||
super().__init__(self.image_file_name, TILE_SCALE)
|
||||
|
||||
# Set custom properties
|
||||
self.properties["type"] = "CropsTile"
|
||||
self.center_x = x
|
||||
self.center_y = y
|
||||
|
||||
class HyroPowerTile(arcade.Sprite):
|
||||
|
||||
def __init__(self, x, y):
|
||||
self.image_file_name = HYDRO_RES
|
||||
super().__init__(self.image_file_name, TILE_SCALE)
|
||||
|
||||
# Set custom properties
|
||||
self.properties["type"] = "HydroPowerTile"
|
||||
self.center_x = x
|
||||
self.center_y = y
|
||||
|
||||
class MinerTile(arcade.Sprite):
|
||||
|
||||
def __init__(self, x, y):
|
||||
self.image_file_name = MINING_RES
|
||||
super().__init__(self.image_file_name, TILE_SCALE)
|
||||
|
||||
# Set custom properties
|
||||
self.properties["type"] = "MinerTile"
|
||||
self.center_x = x
|
||||
self.center_y = y
|
||||
|
||||
class FactoryTile(arcade.Sprite):
|
||||
|
||||
def __init__(self, x, y):
|
||||
self.image_file_name = FACTORY_RES
|
||||
super().__init__(self.image_file_name, TILE_SCALE)
|
||||
|
||||
# Set custom properties
|
||||
self.properties["type"] = "FactoryTile"
|
||||
self.center_x = x
|
||||
self.center_y = y
|
Loading…
Add table
Reference in a new issue