2023-09-04 19:45:15 +00:00
|
|
|
import sqlite3
|
|
|
|
|
|
|
|
# Connect to the SQLite database
|
|
|
|
conn = sqlite3.connect("items.db")
|
|
|
|
cursor = conn.cursor()
|
|
|
|
|
|
|
|
# Define the table schema for reloading
|
|
|
|
cursor.execute(
|
|
|
|
"""
|
|
|
|
CREATE TABLE IF NOT EXISTS reloading (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
type TEXT,
|
|
|
|
name TEXT,
|
|
|
|
rarity INTEGER,
|
|
|
|
weight REAL,
|
|
|
|
width INTEGER,
|
|
|
|
height INTEGER,
|
|
|
|
stack INTEGER,
|
|
|
|
value INTEGER
|
|
|
|
)
|
|
|
|
"""
|
|
|
|
)
|
|
|
|
|
|
|
|
# Define the table schema for ammo
|
|
|
|
cursor.execute(
|
|
|
|
"""
|
|
|
|
CREATE TABLE IF NOT EXISTS ammo (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
type TEXT,
|
|
|
|
name TEXT,
|
|
|
|
rarity INTEGER,
|
|
|
|
weight REAL,
|
|
|
|
width INTEGER,
|
|
|
|
height INTEGER,
|
|
|
|
stack INTEGER,
|
|
|
|
value INTEGER,
|
|
|
|
gunpowder INTEGER
|
|
|
|
)
|
|
|
|
"""
|
|
|
|
)
|
|
|
|
|
2023-09-04 21:52:41 +00:00
|
|
|
# Define the table schema for ammo
|
|
|
|
cursor.execute(
|
|
|
|
"""
|
|
|
|
CREATE TABLE IF NOT EXISTS craft (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
type TEXT,
|
|
|
|
name TEXT,
|
|
|
|
rarity INTEGER,
|
|
|
|
weight REAL,
|
|
|
|
width INTEGER,
|
|
|
|
height INTEGER,
|
|
|
|
stack INTEGER,
|
|
|
|
value INTEGER
|
|
|
|
)
|
|
|
|
"""
|
|
|
|
)
|
|
|
|
|
2023-09-04 19:45:15 +00:00
|
|
|
# Close the connection
|
|
|
|
conn.close()
|