Skip to content

Commit

Permalink
Added spawn points to ASA mod discovery.
Browse files Browse the repository at this point in the history
  • Loading branch information
thommcgrath committed Mar 6, 2024
1 parent b87fb1b commit 30fe519
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Project/Beacon.xojo_project
Original file line number Diff line number Diff line change
Expand Up @@ -941,11 +941,11 @@ AppMenuBar=MainMenuBar
MajorVersion=2
MinorVersion=1
SubVersion=0
NonRelease=2
Release=1
NonRelease=0
Release=3
InfoVersion=Beacon
LongVersion=Beacon 2.1.0a2 ©2016-2024 The ZAZ Studios
ShortVersion=2.1.0a2
LongVersion=Beacon 2.1.0 ©2016-2024 The ZAZ Studios
ShortVersion=2.1.0
WinCompanyName=The ZAZ Studios
WinInternalName=
WinProductName=Beacon
Expand Down
14 changes: 13 additions & 1 deletion Project/Modules/Game Support/ArkSA/ModDiscoveryEngine.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Protected Class ModDiscoveryEngine
Pack.Marketplace = Beacon.MarketplaceCurseForge
Pack.MarketplaceId = ModInfo.Value("id")

Var EngramEntries(), PrimalItems(), Creatures(), SupplyCrates(), DinoInventories() As String
Var EngramEntries(), PrimalItems(), Creatures(), SupplyCrates(), DinoInventories(), SpawnPoints() As String
Var ClassPaths As New Dictionary // Yes, this will break if a mod uses the same class in more than one namespace. This is a crappy implementation anyway, so I don't care.
For Each Entry As DictionaryEntry In Candidates
Var Path As String = Entry.Key
Expand All @@ -296,6 +296,8 @@ Protected Class ModDiscoveryEngine
SupplyCrates.Add(ClassString)
ElseIf ClassString.BeginsWith("DinoDropInventory") Or ClassString.BeginsWith("DinoInventory") Then
DinoInventories.Add(ClassString)
ElseIf ClassString.BeginsWith("DinoSpawnEntries") Then
SpawnPoints.Add(ClassString)
Else
Continue
End If
Expand Down Expand Up @@ -392,6 +394,16 @@ Protected Class ModDiscoveryEngine
Blueprints.Add(DinoLoot)
Next

For Each ClassString As String In SpawnPoints
Var Path As String = ClassPaths.Value(ClassString)
Var Point As New ArkSA.MutableSpawnPoint(Path, "")
Point.ContentPackId = ContentPackId
Point.ContentPackName = ModName
Point.RegenerateBlueprintId()
Point.Label = ArkSA.LabelFromClassString(ClassString + "_C")
Blueprints.Add(Point)
Next

RaiseEvent ContentPackDiscovered(Pack.ImmutableVersion, Blueprints)
End Sub
#tag EndMethod
Expand Down
2 changes: 1 addition & 1 deletion Project/Views/DeployManager.xojo_window
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,7 @@ End
Var Explanation As String
If NumSuccess > 0 And NumErrored = 0 Then
// Full success
Explanation = "Your server" + If(NumSuccess > 1, "s have", " has") + " been updated. " + If(NumSuccess > 1, "Any servers that were running when the deploy started will now be starting up.", "If the server was running when the deploy started, it will now be starting up.")
Explanation = "Your server" + If(NumSuccess > 1, "s have", " has") + " been updated. " + If(NumSuccess > 1, "If a restart option was selected, any servers that were running when the deploy started will now be starting up.", "If the server was running when the deploy started and a restart option was selected, it will now be starting up.")
If Preferences.PlaySoundAfterDeploy Then
SoundDeploySuccess.Play
End If
Expand Down

0 comments on commit 30fe519

Please sign in to comment.