Skip to content

Commit

Permalink
"User Content" mods no longer use a fixed timestamp.
Browse files Browse the repository at this point in the history
  • Loading branch information
thommcgrath committed May 26, 2024
1 parent 649eeb3 commit ad71b8c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions Project/Modules/Beacon.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -1754,9 +1754,6 @@ Protected Module Beacon
#tag Constant, Name = FileExtensionXml, Type = String, Dynamic = False, Default = \".xml", Scope = Protected
#tag EndConstant

#tag Constant, Name = FixedTimestamp, Type = Double, Dynamic = False, Default = \"1695052800", Scope = Public
#tag EndConstant

#tag Constant, Name = FTPModeExplicitTLS, Type = String, Dynamic = False, Default = \"ftp+tls", Scope = Protected
#tag EndConstant

Expand Down
2 changes: 1 addition & 1 deletion Project/Modules/Beacon/ContentPack.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Protected Class ContentPack
Shared Function CreateUserContentPack(GameId As String, Name As String, ContentPackId As String) As Beacon.ContentPack
Var Pack As New Beacon.ContentPack(GameId, Name, ContentPackId)
Pack.mIsConsoleSafe = True
Pack.mLastUpdate = Beacon.FixedTimestamp
Pack.mLastUpdate = DateTime.Now.SecondsFrom1970
Pack.mIsDefaultEnabled = True
Pack.mType = Beacon.ContentPack.TypeLocal
Pack.mRequired = False
Expand Down
2 changes: 1 addition & 1 deletion Project/Modules/Game Support/Ark/DataSource.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ Inherits Beacon.DataSource
#tag Event
Sub Open()
Var Rows As RowSet = Self.SQLSelect("SELECT type, console_safe, default_enabled, last_update FROM content_packs WHERE content_pack_id = ?1;", Ark.UserContentPackId)
If (Rows Is Nil) Or Rows.RowCount = 0 Or Rows.Column("type").IntegerValue <> Beacon.ContentPack.TypeLocal Or Rows.Column("console_safe").BooleanValue = False Or Rows.Column("default_enabled").BooleanValue = False Or Rows.Column("last_update").DoubleValue <> Beacon.FixedTimestamp Then
If (Rows Is Nil) Or Rows.RowCount = 0 Or Rows.Column("type").IntegerValue <> Beacon.ContentPack.TypeLocal Or Rows.Column("console_safe").BooleanValue = False Or Rows.Column("default_enabled").BooleanValue = False Then
Self.ReplaceUserBlueprints()
End If
End Sub
Expand Down
2 changes: 1 addition & 1 deletion Project/Modules/Game Support/ArkSA/DataSource.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ Inherits Beacon.DataSource
#tag Event
Sub PerformMaintenance()
Var Rows As RowSet = Self.SQLSelect("SELECT type, console_safe, default_enabled, last_update FROM content_packs WHERE content_pack_id = ?1;", ArkSA.UserContentPackId)
If (Rows Is Nil) Or Rows.RowCount = 0 Or Rows.Column("type").IntegerValue <> Beacon.ContentPack.TypeLocal Or Rows.Column("console_safe").BooleanValue = False Or Rows.Column("default_enabled").BooleanValue = False Or Rows.Column("last_update").DoubleValue <> Beacon.FixedTimestamp Then
If (Rows Is Nil) Or Rows.RowCount = 0 Or Rows.Column("type").IntegerValue <> Beacon.ContentPack.TypeLocal Or Rows.Column("console_safe").BooleanValue = False Or Rows.Column("default_enabled").BooleanValue = False Then
Self.ReplaceUserBlueprints()
End If

Expand Down

0 comments on commit ad71b8c

Please sign in to comment.