1 Commits

Author SHA1 Message Date
David Markowitz
40af39cec5 Update SQLAlchemy version to 2.0.40
fixes an issue with models on newer versions of python
2025-09-29 18:44:52 -07:00
2 changed files with 13 additions and 88 deletions

View File

@@ -139,7 +139,6 @@ class Account(db.Model, UserMixin):
unique=True
)
# ND Exclusive
email = db.Column(
db.Unicode(255),
nullable=True,
@@ -147,7 +146,6 @@ class Account(db.Model, UserMixin):
unique=False
)
# ND Exclusive
email_confirmed_at = db.Column(db.DateTime())
password = db.Column(
@@ -168,7 +166,6 @@ class Account(db.Model, UserMixin):
server_default='0'
)
# ND Exclusive
active = db.Column(
mysql.BOOLEAN,
nullable=False,
@@ -218,7 +215,7 @@ class Account(db.Model, UserMixin):
db.session.delete(self)
db.session.commit()
# ND Exclusive
class AccountInvitation(db.Model):
__tablename__ = 'account_invites'
id = db.Column(db.Integer, primary_key=True)
@@ -459,34 +456,17 @@ class Leaderboard(db.Model):
passive_deletes=True
)
primaryScore = db.Column(
time = db.Column(
mysql.BIGINT(unsigned=True),
nullable=False,
server_default='0'
)
secondaryScore = db.Column(
score = db.Column(
mysql.BIGINT(unsigned=True),
nullable=False,
server_default='0'
)
tertiaryScore = db.Column(
mysql.BIGINT(unsigned=True),
nullable=False,
server_default='0'
)
numWins = db.Column(
mysql.INTEGER(unsigned=True),
nullable=False,
server_default='0'
)
timesPlayed = db.Column(
mysql.INTEGER(unsigned=True),
nullable=False,
server_default='0'
)
def save(self):
db.session.add(self)
@@ -506,7 +486,7 @@ class Mail(db.Model):
)
sender_id = db.Column(
mysql.BIGINT,
mysql.INTEGER,
nullable=False
)
@@ -604,15 +584,12 @@ class PetNames(db.Model):
mysql.TEXT,
nullable=False
)
# ND Exclusive
approved = db.Column(
mysql.INTEGER(unsigned=True),
nullable=False,
server_default='0'
)
# ND Exclusive
owner_id = db.Column(
mysql.BIGINT,
nullable=True
@@ -744,7 +721,7 @@ class Property(db.Model):
class UGC(db.Model):
__tablename__ = 'ugc'
id = db.Column(
mysql.BIGINT,
mysql.INTEGER,
primary_key=True
)
account_id = db.Column(
@@ -824,7 +801,7 @@ class PropertyContent(db.Model):
)
ugc_id = db.Column(
db.BIGINT,
db.INT,
db.ForeignKey(UGC.id, ondelete='CASCADE'),
nullable=True
)
@@ -875,39 +852,6 @@ class PropertyContent(db.Model):
nullable=False,
)
model_name = db.Column(
mysql.TEXT,
nullable=False,
server_default=''
)
model_description = db.Column(
mysql.TEXT,
nullable=False,
server_default=''
)
behavior_1 = db.Column(
mysql.BIGINT(),
server_default='0'
)
behavior_2 = db.Column(
mysql.BIGINT(),
server_default='0'
)
behavior_3 = db.Column(
mysql.BIGINT(),
server_default='0'
)
behavior_4 = db.Column(
mysql.BIGINT(),
server_default='0'
)
behavior_5 = db.Column(
mysql.BIGINT(),
server_default='0'
)
def save(self):
db.session.add(self)
db.session.commit()
@@ -1012,7 +956,7 @@ class BugReport(db.Model):
)
reporter_id = db.Column(
mysql.BIGINT,
mysql.INTEGER(),
nullable=False,
server_default='0'
)

View File

@@ -277,9 +277,7 @@
this.xmldata = ''
}
// placement: optional THREE.Matrix4 that places this model in the property. DLU stores player-built
// (UGC) models normalized around their own origin, with the position and rotation in properties_contents.
AddScene(file, placement = null){
AddScene(file){
let lxfmlfile = new DBURLFile(file,file)
this.xmldata = lxfmlfile.read()
@@ -307,9 +305,7 @@
for (let j = 0; j < childnodes.length ;j++) {
let childnode = childnodes[j]
if (childnode.nodeName == 'Brick'){
let brick = new Brick(childnode)
brick.placement = placement
this.Bricks.push(brick)
this.Bricks.push(new Brick(childnode))
}
}
}
@@ -535,9 +531,9 @@
}
}
LoadScene(filename, placement = null){
LoadScene(filename){
if(this.database.initok){
this.scene.AddScene(filename, placement)
this.scene.AddScene(filename)
}
}
@@ -612,11 +608,6 @@
n14, n24 ,n34, n44);
}
// Move the brick from model space to its place on the property
if (bri.placement){
m.premultiply(bri.placement)
}
let decoCount = 0
for (const [partindex, part] of geo.Parts.entries()){
@@ -1042,14 +1033,10 @@
//Start
// Player-built models with the position and rotation stored for them in properties_contents
let lxfml_file_list = [
{% for model in content %}
{% if model.lot == 14 %}
{
"url": "{{url_for('properties.get_model', id=model.id, file_format='lxfml', lod=lod)}}",
"pos": {{ model.pos[0]|tojson }}
}{{ ", " if not loop.last else "" }}
"{{url_for('properties.get_model', id=model.id, file_format='lxfml', lod=lod)}}"{{ ", " if not loop.last else "" }}
{% endif %}
{% endfor %}
]
@@ -1060,13 +1047,7 @@
let converter = new Converter()
converter.LoadDBURL(ldddburl)
for (let i = 0; i < lxfml_file_list.length; i++) {
let pos = lxfml_file_list[i].pos
let placement = new THREE.Matrix4().compose(
new THREE.Vector3(pos.x, pos.y, pos.z),
new THREE.Quaternion(pos.rx, pos.ry, pos.rz, pos.rw),
new THREE.Vector3(1, 1, 1)
)
converter.LoadScene(lxfml_file_list[i].url, placement)
converter.LoadScene(lxfml_file_list[i])
}
converter.Export('test.webgl')