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
<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="clr-namespace:SeaRisen.SFFv2" | |
xmlns:c="clr-namespace:SeaRisen.SFFv2.Converters" | |
xmlns:misc="clr-namespace:SeaRisen.SFFv2.Misc" | |
xmlns:zoom="clr-namespace:ZoomAndPan;assembly=ZoomAndPan" | |
xmlns:settings="clr-namespace:SeaRisen.SFFv2.Files.Xml" | |
xmlns:sys="clr-namespace:System;assembly=mscorlib" | |
xmlns:imaging="clr-namespace:SeaRisenLib2.Imaging;assembly=SeaRisenLib2" |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Numerics; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace SeaRisenLib2.Text; |
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
// Script written by Rich_27, Designed by Splitsie | |
// Modified by Dune to check for no antenna, and to echo antenna name & radius | |
// CHANGE ME: Name of the antenna responsible for spawning drones in the pirate base | |
const string ANTENNA_NAME = "Antenna name"; | |
// CHANGE ME: The time interval between antenna increments, in seconds | |
const float TIME_INTERVAL = 120.0f; | |
// CHANGE ME: The minimum and maximum antenna distances |
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
// Written by steam handle "Dune__" aka Chuck Savage | |
// - Gist link: https://gist.github.com/ChuckSavage/fd5777417b802bf59a07a60688f84a94 | |
// Feel free to use and modify. It'd be great if you list any | |
// changes here on this gist page so I can keep this up to date if they are important changes. | |
// Todo: handle multiple stone dusters. I'm not sure how to go about finding the type "Stone Duster" that | |
// the mod has listed for itself. | |
// Some code borrowed from the Space Engineers Visual Script Builder - http://dco.pe/vsb/ | |
// Set name of Stone Duster to this name, or change this name to your stone duster's name |
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
// dco.pe/vsb | |
const float MinValueToActivateRedLights = 5000f; | |
const float VolumeOfDrills = 33750f; // small ship drill (large is 234375f) | |
public Program() | |
{ | |
Runtime.UpdateFrequency = UpdateFrequency.Update100; | |
} |
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
// Includes a mini-program for checking and fixing files that have no extension | |
// Only checks for the most common types | |
// If you create a better version, please upload it here. | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
namespace AppendJPG | |
{ |
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
/* | |
* Modified this guys code - http://www.zedia.net/2013/ngui-unity3d-getting-screen-size/comment-page-1/ | |
*/ | |
public static class DisplaySize | |
{ | |
public static float ScreenHeight(this Transform t) | |
{ | |
UIRoot root = t.root.GetComponent<UIRoot>() ?? NGUITools.FindInParents<UIRoot>(t); | |
float ratio = (float)root.activeHeight / Screen.height; | |
return Mathf.Ceil(Screen.height * ratio); |
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
Edit MapMagicWindow.cs | |
Make the following method static, it doesn't reference internal class data, so it is ok. | |
private static Generator[] SmartCopyGenerators(Generator gen) | |
Then refactor the SaveGenerator method, extracting the file saving to a public static ExportToFile method | |
void SaveGenerator(Generator gen, Vector2 pos) | |
{ |
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 ObservableValue<T> : INotifyPropertyChanged | |
{ | |
public class MyArgs : PropertyChangedEventArgs | |
{ | |
public MyArgs(string propertyName, T old, T @new) | |
: base(propertyName) | |
{ | |
Old = old; | |
New = @new; | |
} |
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
using System; | |
using System.Collections.Generic; | |
namespace ZipMany | |
{ | |
/// <summary> | |
/// Zip multiple arrays (more than 2 since there is a built in Zip for 2 with .Net 4.0) | |
/// </summary> | |
public static class ZipMultiple | |
{ |
NewerOlder