Compare commits
8 Commits
42b0b0acf9
...
0.4.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e885847a8 | |||
|
0ca6b27a11
|
|||
| 9b8900d7a7 | |||
|
792bba4875
|
|||
|
1c39e146fb
|
|||
|
47bcd0be34
|
|||
|
445f731170
|
|||
|
c7aa30581d
|
@@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
[0.4.3]
|
||||
|
||||
- Removed references to the `Mod` class from SLP. This was the root of the multiplayer
|
||||
connectivity issues. Multiplayer should now work with Slang installed.
|
||||
|
||||
[0.4.2]
|
||||
|
||||
- Removed all harmony patches as most functionality as been added into the
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ModMetadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Name>Slang</Name>
|
||||
<Author>JoeDiertay</Author>
|
||||
<Version>0.4.2</Version>
|
||||
<Version>0.4.3</Version>
|
||||
<Description>
|
||||
[h1]Slang: High-Level Programming for Stationeers[/h1]
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public class SlangFormatter : ICodeFormatter
|
||||
private CancellationTokenSource? _lspCancellationToken;
|
||||
private object _tokenLock = new();
|
||||
|
||||
protected static Editor? Ic10Editor = null;
|
||||
protected Editor? Ic10Editor = null;
|
||||
private IC10CodeFormatter iC10CodeFormatter = new IC10CodeFormatter();
|
||||
private string ic10CompilationResult = "";
|
||||
private List<SourceMapEntry> ic10SourceMap = new();
|
||||
@@ -194,13 +194,17 @@ public class SlangFormatter : ICodeFormatter
|
||||
|
||||
private void UpdateIc10Formatter()
|
||||
{
|
||||
if (Ic10Editor is null)
|
||||
var tab = Editor.ParentTab;
|
||||
if (Ic10Editor == null)
|
||||
{
|
||||
var tab = Editor.ParentTab;
|
||||
iC10CodeFormatter = new IC10CodeFormatter();
|
||||
Ic10Editor = new Editor(Editor.KeyHandler);
|
||||
Ic10Editor.IsReadOnly = true;
|
||||
iC10CodeFormatter.Editor = Ic10Editor;
|
||||
}
|
||||
|
||||
if (tab.Editors.Count < 2)
|
||||
{
|
||||
tab.AddEditor(Ic10Editor);
|
||||
}
|
||||
|
||||
@@ -219,33 +223,26 @@ public class SlangFormatter : ICodeFormatter
|
||||
|
||||
if (lines.Count() < 1)
|
||||
{
|
||||
Ic10Editor.Selection = new TextRange
|
||||
{
|
||||
End = new TextPosition { Col = 0, Line = 0 },
|
||||
Start = new TextPosition { Col = 0, Line = 0 },
|
||||
};
|
||||
return;
|
||||
}
|
||||
// get the total range of the IC10 source for the selected Slang line
|
||||
var max = lines.Max(line => line.Ic10Line);
|
||||
var min = lines.Min(line => line.Ic10Line);
|
||||
|
||||
Ic10Editor.CaretPos = new TextPosition { Col = 0, Line = (int)max };
|
||||
|
||||
// highlight all the IC10 lines that are within the specified range
|
||||
foreach (var index in Enumerable.Range((int)min, (int)(max - min) + 1))
|
||||
Ic10Editor.Selection.Start = new TextPosition { Col = 0, Line = (int)min };
|
||||
Ic10Editor.Selection.End = new TextPosition
|
||||
{
|
||||
var lineText = Ic10Editor.Lines[index].Text;
|
||||
|
||||
var newLine = new StyledLine(
|
||||
lineText,
|
||||
[
|
||||
new SemanticToken
|
||||
{
|
||||
Column = 0,
|
||||
Length = lineText.Length,
|
||||
Line = index,
|
||||
Background = ColorIdentifier,
|
||||
Color = ColorFromHTML("black"),
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
Ic10Editor.Lines[index] = newLine;
|
||||
}
|
||||
Col = Ic10Editor.Lines[(int)max].Text.Length,
|
||||
Line = (int)max,
|
||||
};
|
||||
}
|
||||
|
||||
// This runs on the Main Thread
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
|
||||
namespace Slang;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using BepInEx;
|
||||
using HarmonyLib;
|
||||
using LaunchPadBooster;
|
||||
|
||||
namespace Slang
|
||||
{
|
||||
@@ -41,9 +40,7 @@ namespace Slang
|
||||
{
|
||||
public const string PluginGuid = "com.biddydev.slang";
|
||||
public const string PluginName = "Slang";
|
||||
public const string PluginVersion = "0.4.2";
|
||||
|
||||
public static Mod MOD = new Mod(PluginName, PluginVersion);
|
||||
public const string PluginVersion = "0.4.3";
|
||||
|
||||
private Harmony? _harmony;
|
||||
|
||||
|
||||
2
rust_compiler/Cargo.lock
generated
2
rust_compiler/Cargo.lock
generated
@@ -930,7 +930,7 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
|
||||
|
||||
[[package]]
|
||||
name = "slang"
|
||||
version = "0.4.2"
|
||||
version = "0.4.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "slang"
|
||||
version = "0.4.2"
|
||||
version = "0.4.3"
|
||||
edition = "2021"
|
||||
|
||||
[workspace]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use crate::compile;
|
||||
use anyhow::Result;
|
||||
use indoc::indoc;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use crate::compile;
|
||||
use indoc::indoc;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use crate::compile;
|
||||
use indoc::indoc;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use crate::compile;
|
||||
use indoc::indoc;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use crate::compile;
|
||||
use indoc::indoc;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use crate::compile;
|
||||
use anyhow::Result;
|
||||
use indoc::indoc;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use crate::compile;
|
||||
use indoc::indoc;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user