Moved plugins to a seperate folder
Uncapped the search result limit for !find
This commit is contained in:
474
Plugins/SimpleStats/Plugin.cs
Normal file
474
Plugins/SimpleStats/Plugin.cs
Normal file
@ -0,0 +1,474 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using SharedLibrary;
|
||||
|
||||
namespace StatsPlugin
|
||||
{
|
||||
public class CViewStats : Command
|
||||
{
|
||||
public CViewStats() : base("stats", "view your stats. syntax !stats", "xlrstats", Player.Permission.User, 0, false) { }
|
||||
|
||||
public override async Task ExecuteAsync(Event E)
|
||||
{
|
||||
String statLine;
|
||||
PlayerStats pStats;
|
||||
|
||||
if (E.Data.Length > 0 && E.Target == null)
|
||||
{
|
||||
await E.Origin.Tell("Cannot find the player you specified");
|
||||
return;
|
||||
}
|
||||
|
||||
if (E.Target != null)
|
||||
{
|
||||
pStats = Stats.statLists.Find(x => x.Port == E.Owner.getPort()).playerStats.GetStats(E.Target);
|
||||
statLine = String.Format("^5{0} ^7KILLS | ^5{1} ^7DEATHS | ^5{2} ^7KDR | ^5{3} ^7SKILL", pStats.Kills, pStats.Deaths, pStats.KDR, pStats.Skill);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
pStats = Stats.statLists.Find(x => x.Port == E.Owner.getPort()).playerStats.GetStats(E.Origin);
|
||||
statLine = String.Format("^5{0} ^7KILLS | ^5{1} ^7DEATHS | ^5{2} ^7KDR | ^5{3} ^7SKILL", pStats.Kills, pStats.Deaths, pStats.KDR, pStats.Skill);
|
||||
}
|
||||
|
||||
if (E.Message.IsBroadcastCommand())
|
||||
{
|
||||
string name = E.Target == null ? E.Origin.Name : E.Target.Name;
|
||||
await E.Owner.Broadcast($"Stats for ^5{name}^7");
|
||||
await E.Owner.Broadcast(statLine);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (E.Target != null)
|
||||
await E.Origin.Tell($"Stats for ^5{E.Target.Name}^7");
|
||||
await E.Origin.Tell(statLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CViewTopStats : Command
|
||||
{
|
||||
public CViewTopStats() : base("topstats", "view the top 5 players on this server. syntax !topstats", "ts", Player.Permission.User, 0, false) { }
|
||||
|
||||
public override async Task ExecuteAsync(Event E)
|
||||
{
|
||||
List<KeyValuePair<String, PlayerStats>> pStats = Stats.statLists.Find(x => x.Port == E.Owner.getPort()).playerStats.GetTopStats();
|
||||
StringBuilder msgBlder = new StringBuilder();
|
||||
|
||||
await E.Origin.Tell("^5--Top Players--");
|
||||
foreach (KeyValuePair<String, PlayerStats> pStat in pStats)
|
||||
{
|
||||
Player P = E.Owner.Manager.GetClientDatabase().GetPlayer(pStat.Key, -1);
|
||||
if (P == null)
|
||||
continue;
|
||||
await E.Origin.Tell(String.Format("^3{0}^7 - ^5{1} ^7KDR | ^5{2} ^7SKILL", P.Name, pStat.Value.KDR, pStat.Value.Skill));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class CResetStats : Command
|
||||
{
|
||||
public CResetStats() : base("resetstats", "reset your stats to factory-new, !syntax !resetstats", "rs", Player.Permission.User, 0, false) { }
|
||||
|
||||
public override async Task ExecuteAsync(Event E)
|
||||
{
|
||||
var stats = Stats.statLists.Find(x => x.Port == E.Owner.getPort()).playerStats.GetStats(E.Origin);
|
||||
stats.Deaths = 0;
|
||||
stats.Kills = 0;
|
||||
stats.scorePerMinute = 1.0;
|
||||
stats.Skill = 1;
|
||||
stats.KDR = 0.0;
|
||||
await Task.Run(() => { Stats.statLists.Find(x => x.Port == E.Owner.getPort()).playerStats.UpdateStats(E.Origin, stats); });
|
||||
await E.Origin.Tell("Your stats have been reset");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Each server runs from the same plugin ( for easier reloading and reduced memory usage ).
|
||||
/// So, to have multiple stat tracking, we must store a stat struct for each server
|
||||
/// </summary>
|
||||
public class Stats : SharedLibrary.Interfaces.IPlugin
|
||||
{
|
||||
public static List<StatTracking> statLists;
|
||||
|
||||
public struct StatTracking
|
||||
{
|
||||
public StatsDB playerStats;
|
||||
public DateTime[] lastKill, connectionTime;
|
||||
public int[] inactiveMinutes, Kills, deathStreaks, killStreaks;
|
||||
public int Port;
|
||||
|
||||
public StatTracking(int port)
|
||||
{
|
||||
playerStats = new StatsDB("Database/stats_" + port + ".rm");
|
||||
inactiveMinutes = new int[18];
|
||||
Kills = new int[18];
|
||||
deathStreaks = new int[18];
|
||||
killStreaks = new int[18];
|
||||
lastKill = new DateTime[18];
|
||||
connectionTime = new DateTime[18];
|
||||
Port = port;
|
||||
}
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "Basic Stats"; }
|
||||
}
|
||||
|
||||
public float Version
|
||||
{
|
||||
get { return 1.1f; }
|
||||
}
|
||||
|
||||
public string Author
|
||||
{
|
||||
get { return "RaidMax"; }
|
||||
}
|
||||
|
||||
public async Task OnLoadAsync()
|
||||
{
|
||||
statLists = new List<StatTracking>();
|
||||
}
|
||||
|
||||
public async Task OnUnloadAsync()
|
||||
{
|
||||
statLists.Clear();
|
||||
}
|
||||
|
||||
public async Task OnTickAsync(Server S)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public async Task OnEventAsync(Event E, Server S)
|
||||
{
|
||||
if (E.Type == Event.GType.Start)
|
||||
{
|
||||
statLists.Add(new StatTracking(S.getPort()));
|
||||
if (statLists.Count == 1)
|
||||
{
|
||||
S.Manager.GetMessageTokens().Add(new MessageToken("TOTALKILLS", GetTotalKills));
|
||||
S.Manager.GetMessageTokens().Add(new MessageToken("TOTALPLAYTIME", GetTotalPlaytime));
|
||||
}
|
||||
}
|
||||
|
||||
if (E.Type == Event.GType.Stop)
|
||||
{
|
||||
statLists.RemoveAll(x => x.Port == S.getPort());
|
||||
}
|
||||
|
||||
if (E.Type == Event.GType.Connect)
|
||||
{
|
||||
ResetCounters(E.Origin.ClientID, S.getPort());
|
||||
|
||||
PlayerStats checkForTrusted = statLists.Find(x => x.Port == S.getPort()).playerStats.GetStats(E.Origin);
|
||||
if (checkForTrusted.TotalPlayTime >= 4320 && E.Origin.Level < Player.Permission.Trusted)
|
||||
{
|
||||
E.Origin.setLevel(Player.Permission.Trusted);
|
||||
E.Owner.Manager.GetClientDatabase().UpdatePlayer(E.Origin);
|
||||
await E.Origin.Tell("Congratulations, you are now a ^5trusted ^7player! Type ^5!help ^7to view new commands.");
|
||||
await E.Origin.Tell("You earned this by playing for ^53 ^7full days!");
|
||||
}
|
||||
}
|
||||
|
||||
if (E.Type == Event.GType.MapEnd || E.Type == Event.GType.Stop)
|
||||
{
|
||||
foreach (Player P in S.GetPlayersAsList())
|
||||
{
|
||||
|
||||
if (P == null)
|
||||
continue;
|
||||
|
||||
CalculateAndSaveSkill(P, statLists.Find(x =>x.Port == S.getPort()));
|
||||
ResetCounters(P.ClientID, S.getPort());
|
||||
|
||||
E.Owner.Logger.WriteInfo("Updated skill for client #" + P.DatabaseID);
|
||||
//E.Owner.Log.Write(String.Format("\r\nJoin: {0}\r\nInactive Minutes: {1}\r\nnewPlayTime: {2}\r\nnewSPM: {3}\r\nkdrWeight: {4}\r\nMultiplier: {5}\r\nscoreWeight: {6}\r\nnewSkillFactor: {7}\r\nprojectedNewSkill: {8}\r\nKills: {9}\r\nDeaths: {10}", connectionTime[P.clientID].ToShortTimeString(), inactiveMinutes[P.clientID], newPlayTime, newSPM, kdrWeight, Multiplier, scoreWeight, newSkillFactor, disconnectStats.Skill, disconnectStats.Kills, disconnectStats.Deaths));
|
||||
}
|
||||
}
|
||||
|
||||
if (E.Type == Event.GType.Disconnect)
|
||||
{
|
||||
CalculateAndSaveSkill(E.Origin, statLists.Find(x=>x.Port == S.getPort()));
|
||||
ResetCounters(E.Origin.ClientID, S.getPort());
|
||||
E.Owner.Logger.WriteInfo("Updated skill for disconnecting client #" + E.Origin.DatabaseID);
|
||||
}
|
||||
|
||||
if (E.Type == Event.GType.Kill)
|
||||
{
|
||||
if (E.Origin == E.Target || E.Origin == null)
|
||||
return;
|
||||
|
||||
Player Killer = E.Origin;
|
||||
StatTracking curServer = statLists.Find(x => x.Port == S.getPort());
|
||||
PlayerStats killerStats = curServer.playerStats.GetStats(Killer);
|
||||
|
||||
|
||||
curServer.lastKill[E.Origin.ClientID] = DateTime.Now;
|
||||
curServer.Kills[E.Origin.ClientID]++;
|
||||
|
||||
if ((DateTime.Now - curServer.lastKill[E.Origin.ClientID]).TotalSeconds > 120)
|
||||
curServer.inactiveMinutes[E.Origin.ClientID] += 2;
|
||||
|
||||
killerStats.Kills++;
|
||||
|
||||
killerStats.KDR = (killerStats.Deaths == 0) ? killerStats.Kills : killerStats.KDR = Math.Round((double)killerStats.Kills / (double)killerStats.Deaths, 2);
|
||||
|
||||
|
||||
curServer.playerStats.UpdateStats(Killer, killerStats);
|
||||
|
||||
curServer.killStreaks[Killer.ClientID] += 1;
|
||||
curServer.deathStreaks[Killer.ClientID] = 0;
|
||||
|
||||
await Killer.Tell(MessageOnStreak(curServer.killStreaks[Killer.ClientID], curServer.deathStreaks[Killer.ClientID]));
|
||||
}
|
||||
|
||||
if (E.Type == Event.GType.Death)
|
||||
{
|
||||
if (E.Origin == E.Target || E.Origin == null)
|
||||
return;
|
||||
|
||||
Player Victim = E.Origin;
|
||||
StatTracking curServer = statLists.Find(x => x.Port == S.getPort());
|
||||
PlayerStats victimStats = curServer.playerStats.GetStats(Victim);
|
||||
|
||||
victimStats.Deaths++;
|
||||
victimStats.KDR = Math.Round(victimStats.Kills / (double)victimStats.Deaths, 2);
|
||||
|
||||
curServer.playerStats.UpdateStats(Victim, victimStats);
|
||||
|
||||
curServer.deathStreaks[Victim.ClientID] += 1;
|
||||
curServer.killStreaks[Victim.ClientID] = 0;
|
||||
|
||||
await Victim.Tell(MessageOnStreak(curServer.killStreaks[Victim.ClientID], curServer.deathStreaks[Victim.ClientID]));
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetTotalKills()
|
||||
{
|
||||
long Kills = 0;
|
||||
foreach (var S in statLists)
|
||||
Kills += S.playerStats.GetTotalServerKills();
|
||||
return Kills.ToString("#,##0");
|
||||
}
|
||||
|
||||
public static string GetTotalPlaytime()
|
||||
{
|
||||
long Playtime = 0;
|
||||
foreach (var S in statLists)
|
||||
Playtime += S.playerStats.GetTotalServerPlaytime();
|
||||
return Playtime.ToString("#,##0");
|
||||
}
|
||||
|
||||
private void CalculateAndSaveSkill(Player P, StatTracking curServer)
|
||||
{
|
||||
if (P == null)
|
||||
return;
|
||||
|
||||
PlayerStats DisconnectingPlayerStats = curServer.playerStats.GetStats(P);
|
||||
if (curServer.Kills[P.ClientID] == 0)
|
||||
return;
|
||||
|
||||
else if (curServer.lastKill[P.ClientID] > curServer.connectionTime[P.ClientID])
|
||||
curServer.inactiveMinutes[P.ClientID] += (int)(DateTime.Now - curServer.lastKill[P.ClientID]).TotalMinutes;
|
||||
|
||||
int newPlayTime = (int)(DateTime.Now - curServer.connectionTime[P.ClientID]).TotalMinutes - curServer.inactiveMinutes[P.ClientID];
|
||||
|
||||
if (newPlayTime < 2)
|
||||
return;
|
||||
|
||||
// calculate the players Score Per Minute for the current session
|
||||
double SessionSPM = curServer.Kills[P.ClientID] * 100 / Math.Max(1, newPlayTime);
|
||||
// calculate how much the KDR should way
|
||||
// 0.81829 is a Eddie-Generated number that weights the KDR nicely
|
||||
double KDRWeight = Math.Round(Math.Pow(DisconnectingPlayerStats.KDR, 1.637 / Math.E), 3);
|
||||
double SPMWeightAgainstAverage;
|
||||
|
||||
// if no SPM, weight is 1 else the weight is the current sessions spm / lifetime average score per minute
|
||||
SPMWeightAgainstAverage = (DisconnectingPlayerStats.scorePerMinute == 1) ? 1 : SessionSPM / DisconnectingPlayerStats.scorePerMinute;
|
||||
|
||||
// calculate the weight of the new play time againmst lifetime playtime
|
||||
//
|
||||
double SPMAgainstPlayWeight = newPlayTime / Math.Min(600, DisconnectingPlayerStats.TotalPlayTime + newPlayTime);
|
||||
// calculate the new weight against average times the weight against play time
|
||||
double newSkillFactor = SPMWeightAgainstAverage * SPMAgainstPlayWeight * SessionSPM;
|
||||
|
||||
// if the weight is greater than 1, add, else subtract
|
||||
DisconnectingPlayerStats.scorePerMinute += (SPMWeightAgainstAverage >= 1) ? newSkillFactor : -newSkillFactor;
|
||||
|
||||
DisconnectingPlayerStats.Skill = DisconnectingPlayerStats.scorePerMinute * KDRWeight / 10;
|
||||
DisconnectingPlayerStats.TotalPlayTime += newPlayTime;
|
||||
|
||||
curServer.playerStats.UpdateStats(P, DisconnectingPlayerStats);
|
||||
}
|
||||
|
||||
private void ResetCounters(int cID, int serverPort)
|
||||
{
|
||||
StatTracking selectedPlayers = statLists.Find(x => x.Port == serverPort);
|
||||
|
||||
selectedPlayers.Kills[cID] = 0;
|
||||
selectedPlayers.connectionTime[cID] = DateTime.Now;
|
||||
selectedPlayers.inactiveMinutes[cID] = 0;
|
||||
selectedPlayers.deathStreaks[cID] = 0;
|
||||
selectedPlayers.killStreaks[cID] = 0;
|
||||
}
|
||||
|
||||
private String MessageOnStreak(int killStreak, int deathStreak)
|
||||
{
|
||||
String Message = "";
|
||||
switch (killStreak)
|
||||
{
|
||||
case 5:
|
||||
Message = "Great job! You're on a ^55 killstreak!";
|
||||
break;
|
||||
case 10:
|
||||
Message = "Amazing! ^510 kills ^7without dying!";
|
||||
break;
|
||||
}
|
||||
|
||||
switch (deathStreak)
|
||||
{
|
||||
case 5:
|
||||
Message = "Pick it up soldier, you've died ^55 times ^7in a row...";
|
||||
break;
|
||||
case 10:
|
||||
Message = "Seriously? ^510 deaths ^7without getting a kill?";
|
||||
break;
|
||||
}
|
||||
|
||||
return Message;
|
||||
}
|
||||
}
|
||||
|
||||
public class StatsDB : Database
|
||||
{
|
||||
public StatsDB(String FN) : base(FN) { }
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
if (!File.Exists(FileName))
|
||||
{
|
||||
String Create = "CREATE TABLE [STATS] ( [npID] TEXT, [KILLS] INTEGER DEFAULT 0, [DEATHS] INTEGER DEFAULT 0, [KDR] REAL DEFAULT 0, [SKILL] REAL DEFAULT 0, [MEAN] REAL DEFAULT 0, [DEV] REAL DEFAULT 0, [SPM] REAL DEFAULT 0, [PLAYTIME] INTEGER DEFAULT 0);";
|
||||
ExecuteNonQuery(Create);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddPlayer(Player P)
|
||||
{
|
||||
Dictionary<String, object> newPlayer = new Dictionary<String, object>
|
||||
{
|
||||
{ "npID", P.NetworkID },
|
||||
{ "KILLS", 0 },
|
||||
{ "DEATHS", 0 },
|
||||
{ "KDR", 0.0 },
|
||||
{ "SKILL", 1.0 },
|
||||
{ "SPM", 1.0 },
|
||||
{ "PLAYTIME", 1.0 }
|
||||
};
|
||||
Insert("STATS", newPlayer);
|
||||
}
|
||||
|
||||
public PlayerStats GetStats(Player P)
|
||||
{
|
||||
DataTable Result = GetDataTable("STATS", new KeyValuePair<string, object>("npID", P.NetworkID));
|
||||
|
||||
if (Result != null && Result.Rows.Count > 0)
|
||||
{
|
||||
DataRow ResponseRow = Result.Rows[0];
|
||||
return new PlayerStats(
|
||||
Convert.ToInt32(ResponseRow["KILLS"]),
|
||||
Convert.ToInt32(ResponseRow["DEATHS"]),
|
||||
Convert.ToDouble(ResponseRow["KDR"]),
|
||||
Convert.ToDouble(ResponseRow["SKILL"]),
|
||||
Convert.ToDouble(ResponseRow["SPM"]),
|
||||
Convert.ToInt32(ResponseRow["PLAYTIME"])
|
||||
);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
AddPlayer(P);
|
||||
return GetStats(P);
|
||||
}
|
||||
}
|
||||
|
||||
public long GetTotalServerKills()
|
||||
{
|
||||
var Result = GetDataTable("SELECT SUM(KILLS) FROM STATS");
|
||||
return Result.Rows[0][0].GetType() == typeof(DBNull) ? 0 : Convert.ToInt64(Result.Rows[0][0]);
|
||||
}
|
||||
|
||||
public long GetTotalServerPlaytime()
|
||||
{
|
||||
var Result = GetDataTable("SELECT SUM(PLAYTIME) FROM STATS");
|
||||
return Result.Rows[0][0].GetType() == typeof(DBNull) ? 0 : Convert.ToInt64(Result.Rows[0][0]) / 60;
|
||||
}
|
||||
|
||||
public void UpdateStats(Player P, PlayerStats S)
|
||||
{
|
||||
Dictionary<String, object> updatedPlayer = new Dictionary<String, object>
|
||||
{
|
||||
{ "KILLS", S.Kills },
|
||||
{ "DEATHS", S.Deaths },
|
||||
{ "KDR", Math.Round(S.KDR, 2) },
|
||||
{ "SKILL", Math.Round(S.Skill, 2) },
|
||||
{ "SPM", Math.Round(S.scorePerMinute, 2) },
|
||||
{ "PLAYTIME", S.TotalPlayTime }
|
||||
};
|
||||
Update("STATS", updatedPlayer, new KeyValuePair<string, object>("npID", P.NetworkID));
|
||||
}
|
||||
|
||||
public List<KeyValuePair<String, PlayerStats>> GetTopStats()
|
||||
{
|
||||
String Query = String.Format("SELECT * FROM STATS WHERE SKILL > 0 AND KDR < '{0}' AND KILLS > '{1}' AND PLAYTIME > '{2}' ORDER BY SKILL DESC LIMIT '{3}'", 10, 150, 60, 5);
|
||||
DataTable Result = GetDataTable(Query);
|
||||
List<KeyValuePair<String, PlayerStats>> pStats = new List<KeyValuePair<String, PlayerStats>>();
|
||||
|
||||
if (Result != null && Result.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow ResponseRow in Result.Rows)
|
||||
{
|
||||
pStats.Add( new KeyValuePair<String, PlayerStats>(ResponseRow["npID"].ToString(),
|
||||
new PlayerStats(
|
||||
Convert.ToInt32(ResponseRow["KILLS"]),
|
||||
Convert.ToInt32(ResponseRow["DEATHS"]),
|
||||
Convert.ToDouble(ResponseRow["KDR"]),
|
||||
Convert.ToDouble(ResponseRow["SKILL"]),
|
||||
Convert.ToDouble(ResponseRow["SPM"]),
|
||||
Convert.ToInt32(ResponseRow["PLAYTIME"])
|
||||
)
|
||||
));
|
||||
}
|
||||
}
|
||||
return pStats;
|
||||
}
|
||||
}
|
||||
|
||||
public struct PlayerStats
|
||||
{
|
||||
public PlayerStats(int K, int D, double DR, double S, double sc, int P)
|
||||
{
|
||||
Kills = K;
|
||||
Deaths = D;
|
||||
KDR = DR;
|
||||
Skill = S;
|
||||
scorePerMinute = sc;
|
||||
TotalPlayTime = P;
|
||||
}
|
||||
|
||||
public int Kills;
|
||||
public int Deaths;
|
||||
public double KDR;
|
||||
public double Skill;
|
||||
public double scorePerMinute;
|
||||
public int TotalPlayTime;
|
||||
}
|
||||
}
|
36
Plugins/SimpleStats/Properties/AssemblyInfo.cs
Normal file
36
Plugins/SimpleStats/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SamplePlugin")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SamplePlugin")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("1d848d36-bf25-4bc0-acdd-67db2d014d45")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
78
Plugins/SimpleStats/Stats Plugin.csproj
Normal file
78
Plugins/SimpleStats/Stats Plugin.csproj
Normal file
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{4785AB75-66F3-4391-985D-63A5A049A0FA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>StatsPlugin</RootNamespace>
|
||||
<AssemblyName>StatsPlugin</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-Stable|AnyCPU'">
|
||||
<OutputPath>bin\Release-Stable\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.SQLite">
|
||||
<HintPath>..\Admin\lib\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SharedLibrary\SharedLibrary.csproj">
|
||||
<Project>{d51eeceb-438a-47da-870f-7d7b41bc24d6}</Project>
|
||||
<Name>SharedLibrary</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)BUILD\plugins\"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
Reference in New Issue
Block a user