- fix: engine update fix
Some checks failed
Build & Test Map Renderer / build (ubuntu-latest) (push) Has been cancelled
Build & Test Debug / build (ubuntu-latest) (push) Has been cancelled
Check Merge Conflicts / Label (push) Has been cancelled
Test Packaging / Test Packaging (push) Has been cancelled
RGA schema validator / YAML RGA schema validator (push) Has been cancelled
Map file schema validator / YAML map schema validator (push) Has been cancelled
YAML Linter / YAML Linter (push) Has been cancelled
Build & Test Map Renderer / Build & Test Debug (push) Has been cancelled
Build & Test Debug / Build & Test Debug (push) Has been cancelled
Benchmarks / Run Benchmarks (push) Has been cancelled
Update Contrib and Patreons in credits / get_credits (push) Has been cancelled
Build & Publish Docfx / docfx (push) Has been cancelled
Some checks failed
Build & Test Map Renderer / build (ubuntu-latest) (push) Has been cancelled
Build & Test Debug / build (ubuntu-latest) (push) Has been cancelled
Check Merge Conflicts / Label (push) Has been cancelled
Test Packaging / Test Packaging (push) Has been cancelled
RGA schema validator / YAML RGA schema validator (push) Has been cancelled
Map file schema validator / YAML map schema validator (push) Has been cancelled
YAML Linter / YAML Linter (push) Has been cancelled
Build & Test Map Renderer / Build & Test Debug (push) Has been cancelled
Build & Test Debug / Build & Test Debug (push) Has been cancelled
Benchmarks / Run Benchmarks (push) Has been cancelled
Update Contrib and Patreons in credits / get_credits (push) Has been cancelled
Build & Publish Docfx / docfx (push) Has been cancelled
This commit is contained in:
@@ -182,7 +182,7 @@ public sealed class BodyPrototypeSerializer : ITypeReader<BodyPrototype, Mapping
|
||||
|
||||
foreach (var (slotId, (part, connections, organs)) in allConnections)
|
||||
{
|
||||
var slot = new BodyPrototypeSlot(part != null ? new EntProtoId(part) : null!, connections ?? new HashSet<string>(), organs ?? new Dictionary<string, string>());
|
||||
var slot = new BodyPrototypeSlot(part != null ? new EntProtoId(part) : default!, connections ?? new HashSet<string>(), organs ?? new Dictionary<string, string>());
|
||||
slots.Add(slotId, slot);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,4 +12,5 @@ global using Robust.Shared.Maths;
|
||||
global using Robust.Shared.ViewVariables;
|
||||
global using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
|
||||
global using Content.Shared._Amour.ContentMath;
|
||||
global using Matrix3 = System.Numerics.Matrix3x2;
|
||||
|
||||
@@ -192,7 +192,7 @@ public abstract class SharedItemSystem : EntitySystem
|
||||
var shapes = GetItemShape(entity);
|
||||
var boundingShape = shapes.GetBoundingBox();
|
||||
var boundingCenter = ((Box2) boundingShape).Center;
|
||||
var matty = Matrix3.CreateTransform(boundingCenter, rotation);
|
||||
var matty = Matrix3Helpers.CreateTransform(boundingCenter, rotation);
|
||||
var drift = boundingShape.BottomLeft - matty.TransformBox(boundingShape).BottomLeft;
|
||||
|
||||
var adjustedShapes = new List<Box2i>();
|
||||
|
||||
@@ -137,8 +137,12 @@ public abstract class SharedNavMapSystem : EntitySystem
|
||||
|
||||
public void ApplyToFullState(IComponentState fullState)
|
||||
{
|
||||
return;
|
||||
|
||||
if(fullState is not NavMapComponentState state)
|
||||
return;
|
||||
|
||||
DebugTools.Assert(!FullState);
|
||||
var state = (NavMapComponentState) fullState;
|
||||
DebugTools.Assert(state.FullState);
|
||||
|
||||
foreach (var key in state.Chunks.Keys)
|
||||
|
||||
22
Content.Shared/_Amour/ContentMath/ContentMathHelper.cs
Normal file
22
Content.Shared/_Amour/ContentMath/ContentMathHelper.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Numerics;
|
||||
|
||||
namespace Content.Shared._Amour.ContentMath;
|
||||
|
||||
public static class ContentMathHelper
|
||||
{
|
||||
public static Vector2 Transform(this Matrix3x2 matrix, Vector2 vector)
|
||||
{
|
||||
return Vector2.Transform(vector, matrix);
|
||||
}
|
||||
|
||||
public static void Multiply(Matrix3x2 scaleMatrix, Matrix3x2 worldMatrix, out Matrix3x2 p2)
|
||||
{
|
||||
p2 = scaleMatrix * worldMatrix;
|
||||
}
|
||||
|
||||
public static Matrix3x2 Invert(this Matrix3x2 matrix)
|
||||
{
|
||||
Matrix3x2.Invert(matrix, out Matrix3x2 result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Shared._White.Cult.Systems;
|
||||
@@ -34,7 +35,7 @@ public sealed class CultistWordGeneratorManager
|
||||
if (length <= 0)
|
||||
throw new ArgumentException("Word length must be greater than zero.");
|
||||
|
||||
var word = "";
|
||||
var word = new StringBuilder();
|
||||
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
@@ -42,10 +43,10 @@ public sealed class CultistWordGeneratorManager
|
||||
|
||||
var randomChar = GetRandomChar(isVowel ? Vowels : Consonants);
|
||||
|
||||
word += randomChar;
|
||||
word.Append(randomChar);
|
||||
}
|
||||
|
||||
return word;
|
||||
return word.ToString();
|
||||
}
|
||||
|
||||
private char GetRandomChar(string characters)
|
||||
|
||||
Reference in New Issue
Block a user