class GenericShip(UserShip): class_abbreviation = database.Column(database.String(128)) fighter_type = database.Column(database.Integer) fighter_count = database.Column(database.Integer) cargo_bay_size = database.Column(database.Integer) size = database.Column(database.Integer) #ship_type_giant = database.relationship('GiantShip', backref='GenericShip' , lazy=True) #ship_type_huge = database.relationship('HugeShip', backref='GenericShip' , lazy=True) #ship_type_capital = database.relationship('CapitalShip', backref='GenericShip' , lazy=True) #ship_type_medium = database.relationship('MediumShip', backref='GenericShip' , lazy=True) #ship_type_small = database.relationship('SmallShip', backref='GenericShip' , lazy=True) #ship_type_pod = database.relationship('PodShip', backref='GenericShip' , lazy=True) ship_class = database.Column(database.String(128)) class_name = database.Column(database.String(128)) mine_rate_metal = database.Column(database.Integer) mine_rate_fuel = database.Column(database.Integer) move_turn_cost = database.Column(database.Integer) point_value = database.Column(database.Integer) num_ot = database.Column(database.Integer) num_dt = database.Column(database.Integer) num_pc = database.Column(database.Integer) # Manifest is a serialized dict of :+ # {"equipment_name" : "number_of_units"} cargo_manifest = database.Column(database.PickleType) configuration = database.Column(database.String(128)) equipment = database.Column(database.PickleType) damage_taken = database.Column(database.Integer) shields_max = database.Column(database.Integer) shields_current = database.Column(database.Integer) hull_max = database.Column(database.Integer) hull_current = database.Column(database.Integer)
class PlanetInfo(database.Model): #planet ID 3 : EARTH # 8 reserved Planetoids __tablename__ = 'planetinfo' planet_id = database.Column(database.Integer, primary_key = True, unique=True, autoincrement=True) system_id = database.Column(database.Integer) name = database.Column(database.String(128))
class StarPort(database.Model): __tablename__ = 'starport' starport_id = database.Column(database.Integer) system_id = database.Column(database.Integer) location_id = database.Column(database.Integer) name = database.Column(database.String(128)) x_loc = database.Column(database.Integer) y_loc = database.Column(database.Integer)
class User(database.Model): __tablename__ = 'User' user_id = database.Column(database.Integer, primary_key=True, unique=True, autoincrement=True) username = database.Column(database.String(64), index=True, unique=True) email = database.Column(database.String(120), index=True, unique=True) password_hash = database.Column(database.String(128), default=DANGER_STRING) turns_run = database.Column(database.Integer, default=0) cash = database.Column(database.Integer, default=1000) location = database.Column(database.String(128)) max_turns = database.Column(database.Integer) turns_run = database.Column(database.Integer) safe_turns_left = database.Column(database.Integer) cash_available = database.Column(database.Integer) on_planet = database.Column(database.Boolean) active = database.Column(database.Boolean) game_login_count = database.Column(database.Integer) pocket_space = database.Column(database.String(128)) def __repr__(self): return '<User {}>'.format(self.username)
class SystemInfo(database.Model): __tablename__ = 'SystemInfo' system_id = database.Column(database.Integer, primary_key = True, unique=True, autoincrement=True) location_id = database.Column(database.Integer) name = database.Column(database.String(128)) x_loc = database.Column(database.Integer) y_loc = database.Column(database.Integer) num_stars = database.Column(database.Integer) navigation_hazard = database.Column(database.Boolean) random_events_level = database.Column(database.Integer) # thou shall not say pickle rick links = database.Column(database.PickleType) has_wormhole = database.Column(database.Boolean) # system ID of link location wormhole = database.Column(database.Integer)
class UserShip(User): __tablename__ = 'UserShip' ship_id = database.Column(database.Integer) ship_name = database.Column(database.String(128)) ship_type = database.Column(database.Integer) clan_id = database.Column(database.Integer) #special weapons #shots quark = database.Column(database.Integer) black_hole_gun = database.Column(database.Integer) nova_wave_time = database.Column(database.Integer) #resources minerals = database.Column(database.Integer) technology = database.Column(database.Integer) organics = database.Column(database.Integer) fuel = database.Column(database.Integer) metals = database.Column(database.Integer) fighters = database.Column(database.Integer) # This holds an array of the ships and ship_ids that the player owns and is currently towing fleet_array = database.Column()
class GameVars(database.Model): score_method = database.Column(database.Integer, default=1) mineral_total = database.Column(database.Integer, default=1) metal_total = database.Column(database.Integer, default=1) organic_total = database.Column(database.Integer, default=1) #let us NOT get into complex economics here # we are limiting the cash and everything else is trade/production money_total = database.Column(database.Integer, default=1) mineral_total = database.Column(database.Integer, default=1) size = database.Column(database.Integer, default=1000) num_systems = database.Column(database.Integer, default=500) num_planets = database.Column(database.Integer, default=200) num_ports = database.Column(database.Integer, default=50) num_starports = database.Column(database.Integer, default=50) num_black_markets = database.Column(database.Integer, default=25) max_planets_in_system = database.Column(database.Integer, default=6) map_layout = database.Column(database.Integer, default=1) ships_built = database.Column(database.Integer) is_game_paused = database.Column(database.Boolean) logged_in_players_int = database.Column(database.Integer) logged_out_players = database.Column(database.Integer) ships_destroyed = database.Column(database.Integer) clans = database.Column(database.Integer) global_safe_turns_left = database.Column(database.Integer) newbies_left = database.Column(database.Integer) sudden_death = database.Column(database.Boolean) sudden_death_turns_feft = database.Column(database.Integer) are_we_political = database.Column(database.Boolean) game_name = database.Column(database.String(128)) #turns required to attack per round? set to 30? sv_turns = database.Column(database.Integer) #we allowing the quark disruptor? quark = database.Column(database.Boolean) quark_damage = database.Column(database.Integer, default=QUARK_DAMAGE) turns_before_planet_attack = database.Column(database.Integer) # is planet attacking allowed? flag_planet_attack = database.Column(database.Boolean) random_events = database.Column(database.Integer) starting_ship = database.Column(database.Integer, default=1)
class ForumPost(database.Model): __tablename__ = "base forum post class" user_id = database.Column(database.String(128), primary_key=True) time = database.Column(database.String(128)) content = database.Column(database.String(528))
class ClanPost(ForumPost): __tablename__ = "Clan Forum Fosts" clan_post_id = database.Column(database.Integer) clan = database.Column(database.String(128))
class BlackMarket(Store): blackmarket_id = database.Column(database.Integer) name = database.Column(database.String(128)) location = database.Column(database.Integer)