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 HarmonyLib; | |
using System.Runtime.CompilerServices; | |
namespace HarmonyTestbed; | |
public struct Class6Struct | |
{ | |
public double d1; | |
public double d2; | |
public double d3; |
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
<Personality> | |
<azureVoice>en-US-AnaNeural</azureVoice> | |
<azureVoiceStyle>default</azureVoiceStyle> | |
<azureVoiceStyleDegree>0</azureVoiceStyleDegree> | |
<speechRate>0</speechRate> | |
<speechPitch>0</speechPitch> | |
<phrasesLimit>40</phrasesLimit> | |
<phraseBatchSize>20</phraseBatchSize> | |
<phraseDelayMin>1</phraseDelayMin> | |
<phraseDelayMax>1</phraseDelayMax> |
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
<Personality> | |
<azureVoiceLanguage>English</azureVoiceLanguage> | |
<azureVoice>en-US-JasonNeural</azureVoice> | |
<azureVoiceStyle>default</azureVoiceStyle> | |
<azureVoiceStyleDegree>2</azureVoiceStyleDegree> | |
<speechLanguage></speechLanguage> | |
<speechRate>-0.12</speechRate> | |
<speechPitch>-0.269999981</speechPitch> | |
<phrasesLimit>40</phrasesLimit> | |
<phraseBatchSize>20</phraseBatchSize> |
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
<Personality> | |
<azureVoice>en-US-DavisNeural</azureVoice> | |
<azureVoiceStyle>unfriendly</azureVoiceStyle> | |
<azureVoiceStyleDegree>1.19999993</azureVoiceStyleDegree> | |
<speechRate>-0.049999997</speechRate> | |
<speechPitch>-0.149999991</speechPitch> | |
<phrasesLimit>40</phrasesLimit> | |
<phraseBatchSize>20</phraseBatchSize> | |
<phraseDelayMin>1</phraseDelayMin> | |
<phraseDelayMax>1</phraseDelayMax> |
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
<Personality> | |
<azureVoice>en-US-AriaNeural</azureVoice> | |
<azureVoiceStyle>whispering</azureVoiceStyle> | |
<azureVoiceStyleDegree>1.13</azureVoiceStyleDegree> | |
<speechRate>0</speechRate> | |
<speechPitch>0</speechPitch> | |
<phrasesLimit>40</phrasesLimit> | |
<phraseBatchSize>20</phraseBatchSize> | |
<phraseDelayMin>1.75427425</phraseDelayMin> | |
<phraseDelayMax>1</phraseDelayMax> |
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 allMax = Mathf.Max(0.04f, suicideBomberChance, toxicSplasherChance, tankyOperatorChance, minerChance, electrifierChance, albinoChance, darkSlimerChance, healerChance); | |
var max = Mathf.Min(1f, 2f * allMax); | |
list.Dialog_FloatSlider("SuicideBomberChance", _ => "{0:0.00%}", false, ref suicideBomberChance, 0f, Mathf.Min(max, 1f - toxicSplasherChance - tankyOperatorChance - minerChance - electrifierChance - albinoChance - darkSlimerChance - healerChance)); | |
list.Dialog_FloatSlider("ToxicSplasherChance", _ => "{0:0.00%}", false, ref toxicSplasherChance, 0f, Mathf.Min(max, 1f - suicideBomberChance - tankyOperatorChance - minerChance - electrifierChance - albinoChance - darkSlimerChance - healerChance)); | |
list.Dialog_FloatSlider("TankyOperatorChance", _ => "{0:0.00%}", false, ref tankyOperatorChance, 0f, Mathf.Min(max, 1f - suicideBomberChance - toxicSplasherChance - minerChance - electrifierChance - albinoChance - darkSlimerChance - healerChance)); | |
list.Dialog_FloatSlider("MinerChance", _ => "{0:0.00%}", false, ref |
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
import Foundation | |
var allValves = [String: Valve]() | |
var allTunnels = [String: [Tunnel]]() | |
var maxScore = 0 | |
var maxPaths = [([String], [String])]() | |
struct Valve: CustomStringConvertible { | |
let name: String | |
let rate: Int |
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
import Foundation | |
var allValves = [String: Valve]() | |
var allTunnels = [String: [Tunnel]]() | |
var maxScore = 0 | |
var maxPaths = [[String]]() | |
struct Valve: CustomStringConvertible { | |
let name: String | |
let rate: Int |
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
let lowerCaseStart = Int("a".first!.asciiValue!) | |
struct XY: CustomStringConvertible { | |
var x: Int | |
var y: Int | |
var description: String { "\(x),\(y)" } | |
} | |
extension XY { | |
static func + (left: XY, right: XY) -> XY { |
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
import RegexBuilder | |
let monkey = Reference(Int.self) | |
let monkeyRegex = Regex { | |
"Monkey " | |
Capture(as: monkey) { | |
OneOrMore(.digit) | |
} transform: { Int($0)! } | |
":" | |
} |