Skip to content

Commit

Permalink
Put temporary code for preventing publishing by contributors while pe…
Browse files Browse the repository at this point in the history
…rms are mopped
  • Loading branch information
Solxanich committed Oct 25, 2023
1 parent c43e0e1 commit ae0d4cd
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ private bool _PublishMod(TmodFile modFile, NameValueCollection buildData, Worksh
buildData["trueversion"] = buildData["version"];

if (currPublishID != 0) {
var currID = Steamworks.SteamUser.GetSteamID();

// Reject posting the mod if you don't 'own' the mod copy. NOTE: Steam doesn't support updating via contributor role anyways.
if (DateTime.Today < new DateTime(2023, 11, 21) && existingAuthorID != currID.m_SteamID) {
IssueReporter.ReportInstantUploadProblem("tModLoader.ModAlreadyUploaded");
return false;
}

// Publish by updating the files available on the current published version
workshopFolderPath = Path.Combine(Directory.GetParent(ModOrganizer.WorkshopFileFinder.ModPaths[0]).ToString(), $"{currPublishID}");

Expand Down

0 comments on commit ae0d4cd

Please sign in to comment.