-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
806 changed files
with
258,350 additions
and
68,181 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build & Test Debug Windows | ||
|
||
on: | ||
# push: | ||
# branches: [ master, staging, trying ] | ||
# merge_group: | ||
# pull_request: | ||
# types: [ opened, reopened, synchronize, ready_for_review ] | ||
# branches: [ master ] | ||
workflow_dispatch: # ручной запуск | ||
|
||
jobs: | ||
build: | ||
if: github.actor != 'IanComradeBot' && github.event.pull_request.draft == false | ||
strategy: | ||
matrix: | ||
os: [ windows-latest ] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout Master | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Submodule | ||
run: | | ||
git submodule update --init --recursive | ||
- name: Pull engine updates | ||
uses: space-wizards/[email protected] | ||
|
||
- name: Update Engine Submodules | ||
run: | | ||
cd RobustToolbox/ | ||
git submodule update --init --recursive | ||
- name: Setup .NET Core | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Install dependencies | ||
run: dotnet restore | ||
|
||
- name: Build Project | ||
run: dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m | ||
|
||
- name: Run Content.Tests | ||
run: dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 | ||
|
||
- name: Run Content.IntegrationTests | ||
shell: pwsh | ||
run: | | ||
$env:DOTNET_gcServer=1 | ||
dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed | ||
ci-success: | ||
name: Build & Test Debug | ||
needs: | ||
- build | ||
runs-on: windows-latest | ||
steps: | ||
- name: CI succeeded | ||
run: exit 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build & Test Debug | ||
name: Build & Test Debug Linux # ADT-Tweak | ||
|
||
on: | ||
push: | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
using Robust.Client.Animations; | ||
using Robust.Client.GameObjects; | ||
using Robust.Shared.Animations; | ||
using Robust.Shared.Timing; | ||
using Content.Shared.Animations; | ||
|
||
namespace Content.Client.Animations; | ||
|
||
public sealed class FlipOnHitSystem : SharedFlipOnHitSystem | ||
{ | ||
[Dependency] private readonly AnimationPlayerSystem _animationSystem = default!; | ||
[Dependency] private readonly IGameTiming _timing = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<FlippingComponent, AnimationCompletedEvent>(OnAnimationComplete); | ||
SubscribeAllEvent<FlipOnHitEvent>(ev => PlayAnimation(GetEntity(ev.User))); | ||
} | ||
|
||
private void OnAnimationComplete(Entity<FlippingComponent> ent, ref AnimationCompletedEvent args) | ||
{ | ||
if (args.Key != FlippingComponent.AnimationKey) | ||
return; | ||
|
||
PlayAnimation(ent); | ||
} | ||
|
||
protected override void PlayAnimation(EntityUid user) | ||
{ | ||
if (!_timing.IsFirstTimePredicted) | ||
return; | ||
|
||
if (TerminatingOrDeleted(user)) | ||
return; | ||
|
||
if (_animationSystem.HasRunningAnimation(user, FlippingComponent.AnimationKey)) | ||
{ | ||
EnsureComp<FlippingComponent>(user); | ||
return; | ||
} | ||
|
||
RemComp<FlippingComponent>(user); | ||
|
||
var baseAngle = Angle.Zero; | ||
if (EntityManager.TryGetComponent(user, out SpriteComponent? sprite)) | ||
baseAngle = sprite.Rotation; | ||
|
||
var degrees = baseAngle.Degrees; | ||
|
||
var animation = new Animation | ||
{ | ||
Length = TimeSpan.FromMilliseconds(500), | ||
AnimationTracks = | ||
{ | ||
new AnimationTrackComponentProperty | ||
{ | ||
ComponentType = typeof(SpriteComponent), | ||
Property = nameof(SpriteComponent.Rotation), | ||
InterpolationMode = AnimationInterpolationMode.Linear, | ||
KeyFrames = | ||
{ | ||
new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(baseAngle.Degrees), 0f), | ||
new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(baseAngle.Degrees + 180), 0.25f), | ||
new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(baseAngle.Degrees + 360), 0.25f), | ||
new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(baseAngle.Degrees), 0f), | ||
} | ||
} | ||
} | ||
}; | ||
|
||
|
||
_animationSystem.Play(user, animation, FlippingComponent.AnimationKey); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Content.Client.Animations; | ||
|
||
[RegisterComponent] | ||
public sealed partial class FlippingComponent : Component | ||
{ | ||
public const string AnimationKey = "flip"; | ||
} |
2 changes: 2 additions & 0 deletions
2
Content.Client/ADT/BookPrinter/BookPrinterBoundUserInterface.cs
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
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
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
2 changes: 2 additions & 0 deletions
2
Content.Client/ADT/BookPrinter/Visualizers/BookPrinterlVisualizerSystem.cs
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<controls:FancyWindow xmlns="https://spacestation14.io" | ||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" | ||
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" | ||
SetSize="800 800" | ||
MinSize="800 128" | ||
Resizable="False"> | ||
<BoxContainer Orientation="Horizontal" VerticalExpand="True"> | ||
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" HScrollEnabled="False" Margin="5"> | ||
<PanelContainer VerticalExpand="True" HorizontalExpand="True"> | ||
<PanelContainer.PanelOverride> | ||
<graphics:StyleBoxFlat BackgroundColor="#1B1B1E" /> | ||
</PanelContainer.PanelOverride> | ||
<BoxContainer Name="SpeciesContainer" VerticalExpand="True" HorizontalExpand="True" Orientation="Vertical"/> | ||
</PanelContainer> | ||
</ScrollContainer> | ||
<BoxContainer Name="InfoContainer" Orientation="Vertical" VerticalExpand="True" Margin="5"> | ||
<BoxContainer Name="Showcase" Orientation="Horizontal" VerticalAlignment="Top"> | ||
<PanelContainer SetSize="200 200" MaxSize="200 200" VerticalAlignment="Top" Margin="5"> | ||
<PanelContainer.PanelOverride> | ||
<graphics:StyleBoxFlat BackgroundColor="#1B1B1E" /> | ||
</PanelContainer.PanelOverride> | ||
<SpriteView Name="Mob" Scale="4 4"/> | ||
</PanelContainer> | ||
<PanelContainer SetSize="200 200" MaxSize="200 200" VerticalAlignment="Top" Margin="5"> | ||
<PanelContainer.PanelOverride> | ||
<graphics:StyleBoxFlat BackgroundColor="#1B1B1E" /> | ||
</PanelContainer.PanelOverride> | ||
<SpriteView Name="JobLoadout" Scale="4 4"/> | ||
</PanelContainer> | ||
</BoxContainer> | ||
<Button Name="Select" Text="{ Loc 'ui-species-select-button' }" SetWidth="410" MinWidth="410"/> | ||
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" HScrollEnabled="False" Margin="5"> | ||
<PanelContainer VerticalExpand="True" HorizontalExpand="True"> | ||
<PanelContainer.PanelOverride> | ||
<graphics:StyleBoxFlat BackgroundColor="#1B1B1E" /> | ||
</PanelContainer.PanelOverride> | ||
<BoxContainer Name="DetailInfoContainer" VerticalExpand="True" MaxWidth="380" Orientation="Vertical"> | ||
|
||
</BoxContainer> | ||
</PanelContainer> | ||
</ScrollContainer> | ||
</BoxContainer> | ||
</BoxContainer> | ||
</controls:FancyWindow> |
Oops, something went wrong.