Fixes all the rotation bugs. (#3365)
This commit is contained in:
committed by
GitHub
parent
6d48154617
commit
63947a6d35
47
Content.Server/HardRotateVerbs.cs
Normal file
47
Content.Server/HardRotateVerbs.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using Content.Shared.GameObjects.Verbs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
namespace Content.Server
|
||||
{
|
||||
// Mapping tools
|
||||
// Uncomment if you need them, I guess.
|
||||
|
||||
/*
|
||||
[GlobalVerb]
|
||||
public sealed class HardRotateCcwVerb : GlobalVerb
|
||||
{
|
||||
public override bool RequireInteractionRange => false;
|
||||
|
||||
public override void GetData(IEntity user, IEntity target, VerbData data)
|
||||
{
|
||||
data.Visibility = VerbVisibility.Visible;
|
||||
data.Text = "Rotate CCW";
|
||||
data.IconTexture = "/Textures/Interface/VerbIcons/rotate_ccw.svg.96dpi.png";
|
||||
}
|
||||
|
||||
public override void Activate(IEntity user, IEntity target)
|
||||
{
|
||||
target.Transform.LocalRotation += Math.PI / 2;
|
||||
}
|
||||
}
|
||||
|
||||
[GlobalVerb]
|
||||
public sealed class HardRotateCwVerb : GlobalVerb
|
||||
{
|
||||
public override bool RequireInteractionRange => false;
|
||||
|
||||
public override void GetData(IEntity user, IEntity target, VerbData data)
|
||||
{
|
||||
data.Visibility = VerbVisibility.Visible;
|
||||
data.Text = "Rotate CW";
|
||||
data.IconTexture = "/Textures/Interface/VerbIcons/rotate_cw.svg.96dpi.png";
|
||||
}
|
||||
|
||||
public override void Activate(IEntity user, IEntity target)
|
||||
{
|
||||
target.Transform.LocalRotation -= Math.PI / 2;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
Reference in New Issue
Block a user