Skip to content

Commit

Permalink
Simply mod launch counter only
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike committed Sep 24, 2018
1 parent d4d0bbc commit c7a1a98
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 45 deletions.
Binary file modified Assemblies/AchtungMod.dll
Binary file not shown.
Binary file removed Assemblies/Firebaser.dll
Binary file not shown.
7 changes: 2 additions & 5 deletions Source/Achtung.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<HintPath>D:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Firebaser, Version=0.9.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Firebaser.0.9.6\lib\net35\Firebaser.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="UnityEngine">
<HintPath>D:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
Expand All @@ -57,7 +54,7 @@
<ItemGroup>
<Compile Include="Colonist.cs" />
<Compile Include="Controller.cs" />
<Compile Include="FireStats.cs" />
<Compile Include="ModCounter.cs" />
<Compile Include="ForcedFloatMenuOption.cs" />
<Compile Include="ForcedJob.cs" />
<Compile Include="ForcedWork.cs" />
Expand All @@ -84,7 +81,7 @@
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_DetectChanges="False" BuildVersion_ConfigurationName="Any" BuildVersion_IncrementBeforeBuild="False" BuildVersion_StartDate="2000/1/1" BuildVersion_BuildVersioningStyle="None.None.None.None" BuildVersion_UpdateAssemblyVersion="False" BuildVersion_UpdateFileVersion="False" BuildVersion_UseGlobalSettings="False" BuildVersion_UseUniversalClock="False" BuildVersion_ReplaceNonNumerics="False" />
<UserProperties BuildVersion_ReplaceNonNumerics="False" BuildVersion_UseUniversalClock="False" BuildVersion_UseGlobalSettings="False" BuildVersion_UpdateFileVersion="False" BuildVersion_UpdateAssemblyVersion="False" BuildVersion_BuildVersioningStyle="None.None.None.None" BuildVersion_StartDate="2000/1/1" BuildVersion_IncrementBeforeBuild="False" BuildVersion_ConfigurationName="Any" BuildVersion_DetectChanges="False" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
36 changes: 0 additions & 36 deletions Source/FireStats.cs

This file was deleted.

4 changes: 1 addition & 3 deletions Source/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ static AchtungLoader()
const string sameSpotId = "net.pardeike.rimworld.mod.samespot";
IsSameSpotInstalled = harmony.GetPatchedMethods()
.Any(method => harmony.GetPatchInfo(method).Transpilers.Any(transpiler => transpiler.owner == sameSpotId));

FireStats.Trigger(true);
}
}

Expand Down Expand Up @@ -59,7 +57,7 @@ static class Game_FinalizeInit_Patch
{
static void Postfix()
{
FireStats.Trigger(false);
ModCounter.Trigger();
}
}

Expand Down
25 changes: 25 additions & 0 deletions Source/ModCounter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;

namespace AchtungMod
{
public class ModCounter
{
// a very simple and gdpr friendly mod launch counter.
// no personal information is transfered and firebase
// doesn't store the IP or any other traceable information

static readonly string baseUrl = "http://us-central1-brrainz-mod-stats.cloudfunctions.net/ping?";
public static void Trigger()
{
try
{
var uri = new Uri(baseUrl + "Achtung");
var client = new System.Net.WebClient();
client.DownloadStringAsync(uri);
}
catch (Exception)
{
}
}
}
}
1 change: 0 additions & 1 deletion Source/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Firebaser" version="0.9.6" targetFramework="net35" />
<package id="Lib.Harmony" version="1.2.0.1" targetFramework="net35" />
</packages>

0 comments on commit c7a1a98

Please sign in to comment.