This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BenchWindow : IGameWindow | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
public byte Id => 1; | |
public string TechnicalName => "Workbench"; | |
public short Length => 46; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (string.IsNullOrEmpty(newPassword)){ | |
validation.Add("Please choose a new password."); | |
} | |
else if (string.IsNullOrEmpty(confirmPassword)){ | |
validation.Add("Please confirm your password."); | |
} | |
else{ | |
// now we know that newPassword and confirmPassword have contents, lets check them. | |
if (newPassword != confirmPassword){ | |
validation.Add("Your new password and confirmed password do not match."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var position = new Position(); | |
var val = connection.ReadLong(); | |
position.X = (int) (val >> 38); | |
if (position.X >= (2 ^ 25)) position.X -= 2 ^ 26; | |
position.Y = (int) ((val >> 26) & 0xFFF); | |
if (position.Y >= (2 ^ 11)) position.Y -= 2 ^ 12; | |
position.Z = (int) (val << 38 >> 38); | |
if (position.Z >= (2 ^ 25)) position.Z -= 2 ^ 26; | |
return position; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Commit() | |
{ | |
foreach (var thread in Stack.Select(v => new Thread(() => | |
{ | |
using (var writer = File.OpenWrite(Location + "\\" + v.Key + ".vdb")) | |
{ | |
foreach ( | |
var s in | |
v.Value.GetType() | |
.GetProperties() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string JsonifyAnon(this object input){ | |
var model = input.ToString().Replace("=", ":"); | |
var builder = new StringBuilder(); | |
string[] keys; | |
object[] values; | |
foreach(var word in model.Split(' ')){ | |
if (keys.Length == values) keys.Concat(new [] {String.Format("\"{0}\"", word)}); | |
if (keys.Length >= values) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//HOPEFULLY this will allow for you to put something in like "5..10" and have the returning array | |
//replicate the Ruby method of int..int to get all methods in between. Sadly, the ints will have to be a string variable. | |
//EX: | |
//"2..12".GetInts(); will return [3,4,5,6,7,8,9,10,11] while (Gets all ints in between) | |
//"2...12".GetInts(); will return [2,3,4,5,6,7,8,9,10,11,12]. (Gets all ints in between INCLUDING BARRIERS) | |
//To be quite honest, the only reason for writing this is so that I can get all numbers in between for the simplicity. | |
//I'm really just fucking sick of the fact that .NET doesn't have the int implementations and should REALLY | |
//work on making their shit just work for once. If you see something another language implements, TRY TAKING A FCKING HINT AND | |
//USE IT TOO. |
NewerOlder