Merge remote-tracking branch 'upstream/master' into upstream-sync

This commit is contained in:
Morbo
2023-01-27 21:05:54 +03:00
50 changed files with 20914 additions and 15587 deletions

View File

@@ -14,6 +14,7 @@ on:
- 'RobustToolbox'
- 'RobustToolbox/**'
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
branches: [ master ]
paths:
- '**.cs'
@@ -26,7 +27,7 @@ on:
jobs:
build:
if: github.actor != 'PJBot'
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

View File

@@ -14,6 +14,7 @@ on:
- 'RobustToolbox'
- 'RobustToolbox/**'
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
branches: [ master ]
paths:
- '**.cs'
@@ -26,7 +27,7 @@ on:
jobs:
build:
if: github.actor != 'PJBot'
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

View File

@@ -14,6 +14,7 @@ on:
- 'RobustToolbox'
- 'RobustToolbox/**'
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
branches: [ master ]
paths:
- '**.cs'
@@ -26,7 +27,7 @@ on:
jobs:
build:
if: github.actor != 'PJBot'
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:

View File

@@ -1,9 +1,12 @@
name: YAML schema validator
on: [pull_request, push]
on:
push:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
jobs:
yaml-schema-validation:
if: github.actor != 'PJBot'
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

View File

@@ -1,8 +1,12 @@
name: YAML schema validator
on: [pull_request, push]
on:
push:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
jobs:
yaml-schema-validation:
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

View File

@@ -1,10 +1,13 @@
name: YAML Linter
on: [pull_request, push]
on:
push:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
jobs:
build:
if: github.actor != 'PJBot'
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

View File

@@ -1,3 +1,4 @@
using Content.Shared.Ghost;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Markings;
using Content.Shared.Humanoid.Prototypes;
@@ -86,28 +87,31 @@ public sealed class HumanoidAppearanceSystem : SharedHumanoidAppearanceSystem
HumanoidAppearanceComponent component,
SpriteComponent sprite,
HumanoidVisualLayers key,
string protoId,
string? protoId,
bool sexMorph = false,
Color? color = null)
{
var layerIndex = sprite.LayerMapReserveBlank(key);
var layer = sprite[layerIndex];
layer.Visible = !IsHidden(component, key);
if (color != null)
layer.Color = color.Value;
if (protoId == null)
return;
if (sexMorph)
protoId = HumanoidVisualLayersExtension.GetSexMorph(key, component.Sex, protoId);
var proto = _prototypeManager.Index<HumanoidSpeciesSpriteLayer>(protoId);
component.BaseLayers[key] = proto;
var layerIndex = sprite.LayerMapReserveBlank(key);
var layer = sprite[layerIndex];
if (color != null)
layer.Color = color.Value;
else if (proto.MatchSkin)
layer.Color = proto.MatchSkin ? component.SkinColor.WithAlpha(proto.LayerAlpha) : Color.White;
if (proto.MatchSkin)
layer.Color = component.SkinColor.WithAlpha(proto.LayerAlpha);
if (proto.BaseSprite != null)
sprite.LayerSetSprite(layerIndex, proto.BaseSprite);
layer.Visible = !IsHidden(component, key);
}
/// <summary>

View File

@@ -1,9 +1,11 @@
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Markings;
using Content.Shared.Humanoid.Prototypes;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Prototypes;
using static Content.Shared.Humanoid.HumanoidAppearanceState;
namespace Content.Client.Humanoid;
@@ -18,12 +20,14 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
public Action<MarkingSet>? OnMarkingColorChange;
public Action<MarkingSet>? OnMarkingRankChange;
public Action<HumanoidVisualLayers, CustomBaseLayerInfo?>? OnLayerInfoModified;
private readonly IPrototypeManager _protoMan = default!;
private readonly Dictionary<HumanoidVisualLayers, HumanoidBaseLayerModifier> _modifiers = new();
public HumanoidMarkingModifierWindow()
{
RobustXamlLoader.Load(this);
_protoMan = IoCManager.Resolve<IPrototypeManager>();
foreach (var layer in Enum.GetValues<HumanoidVisualLayers>())
{
@@ -31,14 +35,7 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
BaseLayersContainer.AddChild(modifier);
_modifiers.Add(layer, modifier);
modifier.OnStateChanged += delegate
{
OnLayerInfoModified!(
layer,
modifier.Enabled
? new CustomBaseLayerInfo(modifier.State, modifier.Color)
: null);
};
modifier.OnStateChanged += () => OnStateChanged(layer, modifier);
}
MarkingPickerWidget.OnMarkingAdded += set => OnMarkingAdded!(set);
@@ -52,6 +49,18 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
MarkingPickerWidget.IgnoreSpecies = MarkingForced.Pressed;
}
private void OnStateChanged(HumanoidVisualLayers layer, HumanoidBaseLayerModifier modifier)
{
if (!modifier.Enabled)
{
OnLayerInfoModified?.Invoke(layer, null);
return;
}
string? state = _protoMan.HasIndex<HumanoidSpeciesSpriteLayer>(modifier.Text) ? modifier.Text : null;
OnLayerInfoModified?.Invoke(layer, new CustomBaseLayerInfo(state, modifier.Color));
}
public void SetState(MarkingSet markings, string species, Color skinColor, Dictionary<HumanoidVisualLayers, CustomBaseLayerInfo> info)
{
MarkingPickerWidget.SetData(markings, species, skinColor);
@@ -64,7 +73,7 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
continue;
}
modifier.SetState(true, layerInfo.ID, layerInfo.Color ?? Color.White);
modifier.SetState(true, layerInfo.ID ?? string.Empty, layerInfo.Color ?? Color.White);
}
}
@@ -76,7 +85,7 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
private BoxContainer _infoBox;
public bool Enabled => _enable.Pressed;
public string State => _lineEdit.Text;
public string Text => _lineEdit.Text;
public Color Color => _colorSliders.Color;
public Action? OnStateChanged;
@@ -117,7 +126,9 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
var lineEditBox = new BoxContainer();
lineEditBox.AddChild(new Label { Text = "Prototype id: "});
_lineEdit = new();
// TODO: This line edit should really be an options / dropdown selector, not text.
_lineEdit = new() { MinWidth = 200 };
_lineEdit.OnTextEntered += args => OnStateChanged!();
lineEditBox.AddChild(_lineEdit);
_infoBox.AddChild(lineEditBox);

View File

@@ -18,19 +18,19 @@ namespace Content.Client.IconSmoothing
/// <summary>
/// We will smooth with other objects with the same key.
/// </summary>
[DataField("key")]
[ViewVariables(VVAccess.ReadWrite), DataField("key")]
public string? SmoothKey { get; }
/// <summary>
/// Prepended to the RSI state.
/// </summary>
[DataField("base")]
[ViewVariables(VVAccess.ReadWrite), DataField("base")]
public string StateBase { get; } = string.Empty;
/// <summary>
/// Mode that controls how the icon should be selected.
/// </summary>
[DataField("mode")]
[ViewVariables(VVAccess.ReadWrite), DataField("mode")]
public IconSmoothingMode Mode = IconSmoothingMode.Corners;
/// <summary>
@@ -57,6 +57,11 @@ namespace Content.Client.IconSmoothing
/// </summary>
CardinalFlags,
/// <summary>
/// The icon represents a triangular sprite with only 2 states, representing South / East being occupied or not.
/// </summary>
Diagonal,
/// <summary>
/// Where this component contributes to our neighbors being calculated but we do not update our own sprite.
/// </summary>

View File

@@ -129,12 +129,12 @@ namespace Content.Client.IconSmoothing
}
// Yes, we updates ALL smoothing entities surrounding us even if they would never smooth with us.
DirtyEntities(grid.GetAnchoredEntities(pos + new Vector2i(1, 0)));
DirtyEntities(grid.GetAnchoredEntities(pos + new Vector2i(-1, 0)));
DirtyEntities(grid.GetAnchoredEntities(pos + new Vector2i(0, 1)));
DirtyEntities(grid.GetAnchoredEntities(pos + new Vector2i(0, -1)));
if (comp.Mode == IconSmoothingMode.Corners)
if (comp.Mode is IconSmoothingMode.Corners or IconSmoothingMode.NoSprite or IconSmoothingMode.Diagonal)
{
DirtyEntities(grid.GetAnchoredEntities(pos + new Vector2i(1, 1)));
DirtyEntities(grid.GetAnchoredEntities(pos + new Vector2i(-1, -1)));
@@ -205,11 +205,49 @@ namespace Content.Client.IconSmoothing
case IconSmoothingMode.CardinalFlags:
CalculateNewSpriteCardinal(grid, smooth, sprite, xform, smoothQuery);
break;
case IconSmoothingMode.Diagonal:
CalculateNewSpriteDiagonal(grid, smooth, sprite, xform, smoothQuery);
break;
default:
throw new ArgumentOutOfRangeException();
}
}
private void CalculateNewSpriteDiagonal(MapGridComponent? grid, IconSmoothComponent smooth,
SpriteComponent sprite, TransformComponent xform, EntityQuery<IconSmoothComponent> smoothQuery)
{
if (grid == null)
{
sprite.LayerSetState(0, $"{smooth.StateBase}0");
return;
}
var neighbors = new Vector2[]
{
new(1, 0),
new(1, -1),
new(0, -1),
};
var pos = grid.TileIndicesFor(xform.Coordinates);
var rotation = xform.LocalRotation;
var matching = true;
for (var i = 0; i < neighbors.Length; i++)
{
var neighbor = (Vector2i) rotation.RotateVec(neighbors[i]);
matching = matching && MatchingEntity(smooth, grid.GetAnchoredEntities(pos + neighbor), smoothQuery);
}
if (matching)
{
sprite.LayerSetState(0, $"{smooth.StateBase}1");
return;
}
sprite.LayerSetState(0, $"{smooth.StateBase}0");
}
private void CalculateNewSpriteCardinal(MapGridComponent? grid, IconSmoothComponent smooth, SpriteComponent sprite, TransformComponent xform, EntityQuery<IconSmoothComponent> smoothQuery)
{
var dirs = CardinalConnectDirs.None;

View File

@@ -15,7 +15,7 @@
<BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Horizontal" VerticalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-name-label'}" />
<LineEdit Name="CNameEdit" MinSize="270 0" VerticalAlignment="Center" />
<LineEdit Name="CNameEdit" MinSize="270 0" VerticalAlignment="Center" Margin="5 0 0 0" />
<Button Name="CNameRandomize" Text="{Loc 'humanoid-profile-editor-name-random-button'}" />
</BoxContainer>
<Button Name="CRandomizeEverything" HorizontalAlignment="Center"

View File

@@ -420,7 +420,8 @@ namespace Content.Client.Preferences.UI
new Label
{
Text = Loc.GetString("humanoid-profile-editor-department-jobs-label",
("departmentName", departmentName))
("departmentName", departmentName)),
Margin = new Thickness(5f, 0, 0, 0)
}
}
});
@@ -1131,7 +1132,8 @@ namespace Content.Client.Preferences.UI
ButtonStyle = StyleBase.ButtonOpenBoth,
LastButtonStyle = StyleBase.ButtonOpenLeft
};
//Override default radio option button width
_optionButton.GenerateItem = GenerateButton;
// Text, Value
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-high-button"), (int) JobPriority.High);
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-medium-button"), (int) JobPriority.Medium);
@@ -1179,8 +1181,9 @@ namespace Content.Client.Preferences.UI
_jobTitle = new Label()
{
Margin = new Thickness(5f,0,5f,0),
Text = job.LocalizedName,
MinSize = (175, 0),
MinSize = (180, 0),
MouseFilter = MouseFilterMode.Stop
};
@@ -1217,6 +1220,16 @@ namespace Content.Client.Preferences.UI
_lockStripe.Visible = false;
_optionButton.Visible = true;
}
private Button GenerateButton(string text, int value)
{
var btn = new Button
{
Text = text,
MinWidth = 90
};
return btn;
}
}
private void UpdateAntagPreferences()

View File

@@ -200,7 +200,7 @@ public sealed class RadarControl : Control
foreach (var grid in _mapManager.FindGridsIntersecting(mapPosition.MapId,
new Box2(mapPosition.Position - MaxRadarRange, mapPosition.Position + MaxRadarRange)))
{
if (grid.Owner == ourGridId)
if (grid.Owner == ourGridId || !fixturesQuery.TryGetComponent(grid.Owner, out var gridFixtures))
continue;
var gridBody = bodyQuery.GetComponent(grid.Owner);
@@ -226,7 +226,6 @@ public sealed class RadarControl : Control
name = Loc.GetString("shuttle-console-unknown");
var gridXform = xformQuery.GetComponent(grid.Owner);
var gridFixtures = fixturesQuery.GetComponent(grid.Owner);
var gridMatrix = gridXform.WorldMatrix;
Matrix3.Multiply(in gridMatrix, in offsetMatrix, out var matty);
var color = iff?.Color ?? IFFComponent.IFFColor;
@@ -350,7 +349,7 @@ public sealed class RadarControl : Control
private void DrawGrid(DrawingHandleScreen handle, Matrix3 matrix, FixturesComponent component, Color color)
{
foreach (var (_, fixture) in component.Fixtures)
foreach (var fixture in component.Fixtures.Values)
{
// If the fixture has any points out of range we won't draw any of it.
var invalid = false;

View File

@@ -35,9 +35,12 @@ public sealed class DecalPainter
decals.Sort(Comparer<DecalData>.Create((x, y) => x.Decal.ZIndex.CompareTo(y.Decal.ZIndex)));
foreach (var proto in _sPrototypeManager.EnumeratePrototypes<DecalPrototype>())
if (_decalTextures.Count == 0)
{
_decalTextures.Add(proto.ID, proto.Sprite);
foreach (var proto in _sPrototypeManager.EnumeratePrototypes<DecalPrototype>())
{
_decalTextures.Add(proto.ID, proto.Sprite);
}
}
foreach (var decal in decals)

View File

@@ -21,7 +21,7 @@ namespace Content.Server.Storage.EntitySystems
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<DumpableComponent, AfterInteractEvent>(OnAfterInteract);
SubscribeLocalEvent<DumpableComponent, AfterInteractEvent>(OnAfterInteract, after: new[]{ typeof(StorageSystem) });
SubscribeLocalEvent<DumpableComponent, GetVerbsEvent<AlternativeVerb>>(AddDumpVerb);
SubscribeLocalEvent<DumpableComponent, GetVerbsEvent<UtilityVerb>>(AddUtilityVerbs);
SubscribeLocalEvent<DumpCompletedEvent>(OnDumpCompleted);
@@ -36,7 +36,7 @@ namespace Content.Server.Storage.EntitySystems
if (!TryComp<ServerStorageComponent>(args.Used, out var storage))
return;
if (storage.StoredEntities == null || storage.StoredEntities.Count == 0)
if (storage.StoredEntities == null || storage.StoredEntities.Count == 0 || storage.CancelToken != null)
return;
if (HasComp<DisposalUnitComponent>(args.Target) || HasComp<PlaceableSurfaceComponent>(args.Target))

View File

@@ -316,6 +316,7 @@ namespace Content.Server.Storage.EntitySystems
{
if (entity == args.User
|| !itemQuery.HasComponent(entity)
|| !CanInsert(uid, entity, out _, storageComp)
|| !_interactionSystem.InRangeUnobstructed(args.User, entity))
continue;

View File

@@ -123,9 +123,9 @@ public sealed class HumanoidAppearanceState : ComponentState
[Serializable, NetSerializable]
public readonly struct CustomBaseLayerInfo
{
public CustomBaseLayerInfo(string id, Color? color = null)
public CustomBaseLayerInfo(string? id, Color? color = null)
{
DebugTools.Assert(IoCManager.Resolve<IPrototypeManager>().HasIndex<HumanoidSpeciesSpriteLayer>(id));
DebugTools.Assert(id == null || IoCManager.Resolve<IPrototypeManager>().HasIndex<HumanoidSpeciesSpriteLayer>(id));
ID = id;
Color = color;
}
@@ -133,11 +133,11 @@ public sealed class HumanoidAppearanceState : ComponentState
/// <summary>
/// ID of this custom base layer. Must be a <see cref="HumanoidSpeciesSpriteLayer"/>.
/// </summary>
[DataField("id", customTypeSerializer: typeof(PrototypeIdSerializer<HumanoidSpeciesSpriteLayer>), required: true)]
public string ID { init; get; }
[DataField("id", customTypeSerializer: typeof(PrototypeIdSerializer<HumanoidSpeciesSpriteLayer>))]
public string? ID { init; get; }
/// <summary>
/// Color of this custom base layer. Null implies skin colour.
/// Color of this custom base layer. Null implies skin colour if the corresponding <see cref="HumanoidSpeciesSpriteLayer"/> is set to match skin.
/// </summary>
[DataField("color")]
public Color? Color { init; get; }

View File

@@ -174,7 +174,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
/// <param name="id">The ID of the sprite to use. See <see cref="HumanoidSpeciesSpriteLayer"/>.</param>
/// <param name="sync">Whether to synchronize this to the humanoid mob, or not.</param>
/// <param name="humanoid">Humanoid component of the entity</param>
public void SetBaseLayerId(EntityUid uid, HumanoidVisualLayers layer, string id, bool sync = true,
public void SetBaseLayerId(EntityUid uid, HumanoidVisualLayers layer, string? id, bool sync = true,
HumanoidAppearanceComponent? humanoid = null)
{
if (!Resolve(uid, ref humanoid))
@@ -201,7 +201,10 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
if (!Resolve(uid, ref humanoid))
return;
humanoid.CustomBaseLayers[layer] = humanoid.CustomBaseLayers[layer] with { Color = color };
if (humanoid.CustomBaseLayers.TryGetValue(layer, out var info))
humanoid.CustomBaseLayers[layer] = info with { Color = color };
else
humanoid.CustomBaseLayers[layer] = new(null, color);
if (sync)
Dirty(humanoid);

View File

@@ -29,6 +29,12 @@ public sealed class MeleeWeaponComponent : Component
[ViewVariables(VVAccess.ReadWrite), DataField("nextAttack", customTypeSerializer:typeof(TimeOffsetSerializer))]
public TimeSpan NextAttack;
/// <summary>
/// Starts attack cooldown when equipped if true.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("resetOnHandSelected")]
public bool ResetOnHandSelected = true;
/*
* Melee combat works based around 2 types of attacks:
* 1. Click attacks with left-click. This attacks whatever is under your mnouse

View File

@@ -75,6 +75,9 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
if (component.AttackRate.Equals(0f))
return;
if (!component.ResetOnHandSelected)
return;
// If someone swaps to this weapon then reset its cd.
var curTime = Timing.CurTime;
var minimum = curTime + TimeSpan.FromSeconds(1 / component.AttackRate);

View File

@@ -15,7 +15,7 @@ public abstract partial class SharedGunSystem
protected virtual void InitializeChamberMagazine()
{
SubscribeLocalEvent<ChamberMagazineAmmoProviderComponent, TakeAmmoEvent>(OnChamberMagazineTakeAmmo);
SubscribeLocalEvent<ChamberMagazineAmmoProviderComponent, GetVerbsEvent<Verb>>(OnMagazineVerb);
SubscribeLocalEvent<ChamberMagazineAmmoProviderComponent, GetVerbsEvent<AlternativeVerb>>(OnMagazineVerb);
SubscribeLocalEvent<ChamberMagazineAmmoProviderComponent, EntInsertedIntoContainerMessage>(OnMagazineSlotChange);
SubscribeLocalEvent<ChamberMagazineAmmoProviderComponent, EntRemovedFromContainerMessage>(OnMagazineSlotChange);
SubscribeLocalEvent<ChamberMagazineAmmoProviderComponent, UseInHandEvent>(OnMagazineUse);

View File

@@ -14,7 +14,7 @@ public abstract partial class SharedGunSystem
protected virtual void InitializeMagazine()
{
SubscribeLocalEvent<MagazineAmmoProviderComponent, TakeAmmoEvent>(OnMagazineTakeAmmo);
SubscribeLocalEvent<MagazineAmmoProviderComponent, GetVerbsEvent<Verb>>(OnMagazineVerb);
SubscribeLocalEvent<MagazineAmmoProviderComponent, GetVerbsEvent<AlternativeVerb>>(OnMagazineVerb);
SubscribeLocalEvent<MagazineAmmoProviderComponent, EntInsertedIntoContainerMessage>(OnMagazineSlotChange);
SubscribeLocalEvent<MagazineAmmoProviderComponent, EntRemovedFromContainerMessage>(OnMagazineSlotChange);
SubscribeLocalEvent<MagazineAmmoProviderComponent, UseInHandEvent>(OnMagazineUse);
@@ -41,7 +41,7 @@ public abstract partial class SharedGunSystem
UpdateMagazineAppearance(component, magEnt.Value);
}
private void OnMagazineVerb(EntityUid uid, MagazineAmmoProviderComponent component, GetVerbsEvent<Verb> args)
private void OnMagazineVerb(EntityUid uid, MagazineAmmoProviderComponent component, GetVerbsEvent<AlternativeVerb> args)
{
if (!args.CanInteract || !args.CanAccess) return;

View File

@@ -21,7 +21,7 @@ public partial class SharedGunSystem
SubscribeLocalEvent<RevolverAmmoProviderComponent, ComponentHandleState>(OnRevolverHandleState);
SubscribeLocalEvent<RevolverAmmoProviderComponent, ComponentInit>(OnRevolverInit);
SubscribeLocalEvent<RevolverAmmoProviderComponent, TakeAmmoEvent>(OnRevolverTakeAmmo);
SubscribeLocalEvent<RevolverAmmoProviderComponent, GetVerbsEvent<Verb>>(OnRevolverVerbs);
SubscribeLocalEvent<RevolverAmmoProviderComponent, GetVerbsEvent<AlternativeVerb>>(OnRevolverVerbs);
SubscribeLocalEvent<RevolverAmmoProviderComponent, InteractUsingEvent>(OnRevolverInteractUsing);
SubscribeLocalEvent<RevolverAmmoProviderComponent, GetAmmoCountEvent>(OnRevolverGetAmmoCount);
}
@@ -166,18 +166,19 @@ public partial class SharedGunSystem
return false;
}
private void OnRevolverVerbs(EntityUid uid, RevolverAmmoProviderComponent component, GetVerbsEvent<Verb> args)
private void OnRevolverVerbs(EntityUid uid, RevolverAmmoProviderComponent component, GetVerbsEvent<AlternativeVerb> args)
{
if (!args.CanAccess || !args.CanInteract || args.Hands == null) return;
args.Verbs.Add(new Verb()
args.Verbs.Add(new AlternativeVerb()
{
Text = Loc.GetString("gun-revolver-empty"),
Disabled = !AnyRevolverCartridges(component),
Act = () => EmptyRevolver(component, args.User)
Act = () => EmptyRevolver(component, args.User),
Priority = 1
});
args.Verbs.Add(new Verb()
args.Verbs.Add(new AlternativeVerb()
{
Text = Loc.GetString("gun-revolver-spin"),
// Category = VerbCategory.G,

View File

@@ -1,69 +1,4 @@
Entries:
- author: metalgearsloth
changes:
- {message: Fixed gloves slot being used for melee., type: Fix}
id: 2453
time: '2022-10-15T20:20:05.0000000+00:00'
- author: BurninDreamer
changes:
- {message: 'Nanotrasen has finally invested into better drills for their miners,
rock and stone!', type: Tweak}
id: 2454
time: '2022-10-15T20:40:40.0000000+00:00'
- author: corentt
changes:
- {message: 'Selling prices of SMES, substations and power-cells now depends on
their filling level', type: Add}
id: 2455
time: '2022-10-15T21:10:48.0000000+00:00'
- author: Morb0
changes:
- {message: Librarian & Lawyer now spawn with briefcase in hand, type: Tweak}
id: 2456
time: '2022-10-15T21:22:27.0000000+00:00'
- author: EmoGarbage404
changes:
- {message: Certain machines can now have their power load reduced via machine part
upgrading. Experiment and find out., type: Add}
- {message: Fixed not being able to deconstruct stasis beds., type: Fix}
id: 2457
time: '2022-10-15T21:28:12.0000000+00:00'
- author: EmoGarbage404
changes:
- {message: Stasis beds can now be upgraded with manipulators., type: Add}
id: 2458
time: '2022-10-15T21:39:30.0000000+00:00'
- author: Rane
changes:
- {message: 'Random names now select based on gender, rather than sex.', type: Fix}
- {message: Humanoids will no longer default to an inanimate pronoun when their
gender is unknown., type: Fix}
- {message: 'Slimes have no physical sex, only gender.', type: Tweak}
id: 2459
time: '2022-10-15T21:45:47.0000000+00:00'
- author: Mervill
changes:
- {message: The PDA light and the Hardsuit light have been nerfed, type: Tweak}
- {message: The Blue Flashlight and the Seclite have been buffed, type: Tweak}
id: 2460
time: '2022-10-15T21:58:33.0000000+00:00'
- author: EmoGarbage404
changes:
- {message: Dying as a skeleton now makes you a skull again., type: Fix}
id: 2461
time: '2022-10-15T22:06:01.0000000+00:00'
- author: ElectroJr
changes:
- {message: Fixed crew monitor directional icons sometimes pointing in the wrong
direction., type: Fix}
id: 2462
time: '2022-10-16T00:07:43.0000000+00:00'
- author: Scribbles0
changes:
- {message: 'Added Cluster, a new low-pop station!', type: Add}
- {message: Removed Packed, type: Remove}
id: 2463
time: '2022-10-16T00:28:22.0000000+00:00'
- author: ElectroJr
changes:
- {message: Fixed a bug that was preventing the inventory UI from properly updating
@@ -2935,3 +2870,66 @@ Entries:
clap or snap.', type: Add}
id: 2952
time: '2023-01-25T16:29:42.0000000+00:00'
- author: lapatison
changes:
- {message: diagnoser now properly displays no-cure text, type: Fix}
id: 2953
time: '2023-01-26T00:31:20.0000000+00:00'
- author: PixelTK
changes:
- {message: Adjusted the speed loaders of light rifles so they can both transfer
bullets easily between each other and actually work, type: Tweak}
id: 2954
time: '2023-01-26T00:49:07.0000000+00:00'
- author: Scribbles0
changes:
- {message: Two new turret types added for misc use., type: Add}
id: 2955
time: '2023-01-26T04:03:31.0000000+00:00'
- author: Bhijn and Myr
changes:
- {message: 'Leather satchels have been added, with sprites from various parts of
/TG/Station''s history! Every clothesmate comes with two of them.', type: Add}
- {message: 'To make room for the leather satchels, clothesmates now only carry
three normal satchels.', type: Tweak}
id: 2956
time: '2023-01-26T18:14:31.0000000+00:00'
- author: Scribbles0
changes:
- {message: Detectives get a speedloader for their revolver. It can be found in
their cabinet., type: Add}
- {message: Revolvers can now be alt-clicked to be emptied., type: Tweak}
id: 2957
time: '2023-01-26T18:15:20.0000000+00:00'
- author: ElectroJr
changes:
- {message: Fixed a bug that was causing issues when cloning zombies., type: Fix}
id: 2958
time: '2023-01-26T22:04:58.0000000+00:00'
- author: jamessimo
changes:
- {message: Updated Jobs and Departments to be case-correct, type: Tweak}
- {message: Character job preferences pages UX improvements, type: Tweak}
id: 2959
time: '2023-01-26T22:32:15.0000000+00:00'
- author: jicksaw
changes:
- {message: Handcuffing in combat mode should feel more responsive, type: Fix}
id: 2960
time: '2023-01-27T01:04:26.0000000+00:00'
- author: metalgearsloth
changes:
- {message: Fix mass scanner on planet maps., type: Fix}
id: 2961
time: '2023-01-27T01:13:49.0000000+00:00'
- author: metalgearsloth
changes:
- {message: Diagonal walls now partially support smoothing., type: Add}
id: 2962
time: '2023-01-27T04:03:42.0000000+00:00'
- author: joelhed
changes:
- {message: Fixed weird behaviour when clicking on a table using a dumpable storage
item., type: Fix}
id: 2963
time: '2023-01-27T16:25:08.0000000+00:00'

View File

@@ -10,7 +10,7 @@ diagnoser-disease-report-cureresist-none = Spaceacillin Resistance: [color=green
diagnoser-disease-report-cureresist-low = Spaceacillin Resistance: [color=yellow]Low[/color]
diagnoser-disease-report-cureresist-medium = Spaceacillin Resistance: [color=orange]Medium[/color]
diagnoser-disease-report-cureresist-high = Spaceacillin Resistance: [color=red]High[/color]
diagnoser-cure-none = The disease has no specific cures.
diagnoser-no-cures = The disease has no specific cures.
diagnoser-cure-has = The disease has the following cures:
diagnoser-cure-bedrest = Rest in bed for {$time} seconds, or {$sleep} seconds if sleeping.
diagnoser-cure-reagent = Consume at least {$units}u of {$reagent}.

View File

@@ -1,7 +1,7 @@
department-Cargo = cargo
department-Civilian = civilian
department-Command = command
department-Engineering = engineering
department-Medical = medical
department-Security = security
department-Science = science
department-Cargo = Cargo
department-Civilian = Civilian
department-Command = Command
department-Engineering = Engineering
department-Medical = Medical
department-Security = Security
department-Science = Science

View File

@@ -1,86 +1,86 @@
job-name-warden = warden
job-name-security = security officer
job-name-cadet = security cadet
job-name-hos = head of security
job-name-detective = detective
job-name-scientist = scientist
job-name-rd = research director
job-name-psychologist = psychologist
job-name-intern = medical intern
job-name-doctor = medical doctor
job-name-cmo = chief medical officer
job-name-chemist = chemist
job-name-technical-assistant = technical assistant
job-name-engineer = station engineer
job-name-atmostech = atmospheric technician
job-name-hop = head of personnel
job-name-captain = captain
job-name-serviceworker = service worker
job-name-centcomoff = CentCom official
job-name-reporter = reporter
job-name-musician = musician
job-name-librarian = librarian
job-name-lawyer = lawyer
job-name-mime = mime
job-name-ce = chief engineer
job-name-janitor = janitor
job-name-chaplain = chaplain
job-name-botanist = botanist
job-name-bartender = bartender
job-name-passenger = passenger
job-name-salvagespec = salvage specialist
job-name-qm = quartermaster
job-name-cargotech = cargo technician
job-name-chef = chef
job-name-clown = clown
job-name-ertleader = ERT leader
job-name-ertengineer = ERT engineer
job-name-ertsecurity = ERT security
job-name-ertmedic = ERT medic
job-name-ertjanitor = ERT janitor
job-name-boxer = boxer
job-name-zookeeper = zookeeper
job-name-warden = Warden
job-name-security = Security Officer
job-name-cadet = Security Cadet
job-name-hos = Head of Security
job-name-detective = Detective
job-name-scientist = Scientist
job-name-rd = Research Director
job-name-psychologist = Psychologist
job-name-intern = Medical Intern
job-name-doctor = Medical Doctor
job-name-cmo = Chief Medical Officer
job-name-chemist = Chemist
job-name-technical-assistant = Technical Assistant
job-name-engineer = Station Engineer
job-name-atmostech = Atmospheric Technician
job-name-hop = Head of Personnel
job-name-captain = Captain
job-name-serviceworker = Service Worker
job-name-centcomoff = CentCom Official
job-name-reporter = Reporter
job-name-musician = Musician
job-name-librarian = Librarian
job-name-lawyer = Lawyer
job-name-mime = Mime
job-name-ce = Chief Engineer
job-name-janitor = Janitor
job-name-chaplain = Chaplain
job-name-botanist = Botanist
job-name-bartender = Bartender
job-name-passenger = Passenger
job-name-salvagespec = Salvage specialist
job-name-qm = Quartermaster
job-name-cargotech = Cargo Technician
job-name-chef = Chef
job-name-clown = Clown
job-name-ertleader = ERT Leader
job-name-ertengineer = ERT Engineer
job-name-ertsecurity = ERT Security
job-name-ertmedic = ERT Medic
job-name-ertjanitor = ERT Janitor
job-name-boxer = Boxer
job-name-zookeeper = Zookeeper
# Role timers - Make these alphabetical or I cut you
JobAtmosphericTechnician = atmospheric technician
JobBartender = bartender
JobBotanist = botanist
JobCaptain = captain
JobCargoTechnician = cargo technician
JobCentralCommandOfficial = central command official
JobChaplain = chaplain
JobChef = chef
JobChemist = chemist
JobChiefEngineer = chief engineer
JobChiefMedicalOfficer = chief medical officer
JobClown = clown
JobDetective = detective
JobERTEngineer = ERT engineer
JobERTJanitor = ERT janitor
JobERTLeader = ERT leader
JobERTMedical = ERT medical
JobERTSecurity = ERT security
JobHeadOfPersonnel = head of personnel
JobHeadOfSecurity = head of security
JobJanitor = janitor
JobLawyer = lawyer
JobLibrarian = librarian
JobMedicalDoctor = medical doctor
JobMedicalIntern = medical intern
JobMime = mime
JobMusician = musician
JobPassenger = passenger
JobPsychologist = psychologist
JobQuartermaster = quartermaster
JobReporter = reporter
JobResearchDirector = research director
JobSalvageSpecialist = salvage specialist
JobScientist = scientist
JobSecurityCadet = security cadet
JobSecurityOfficer = security officer
JobServiceWorker = service worker
JobStationEngineer = station engineer
JobTechnicalAssistant = technical assistant
JobWarden = warden
JobBoxer = boxer
JobZookeeper = zookeeper
JobAtmosphericTechnician = Atmospheric Technician
JobBartender = Bartender
JobBotanist = Botanist
JobBoxer = Boxer
JobCaptain = Captain
JobCargoTechnician = Cargo Technician
JobCentralCommandOfficial = Central Command Official
JobChaplain = Chaplain
JobChef = Chef
JobChemist = Chemist
JobChiefEngineer = Chief Engineer
JobChiefMedicalOfficer = Chief Medical Officer
JobClown = Clown
JobDetective = Detective
JobERTEngineer = ERT Engineer
JobERTJanitor = ERT Janitor
JobERTLeader = ERT Leader
JobERTMedical = ERT Medical
JobERTSecurity = ERT Security
JobHeadOfPersonnel = Head of Personnel
JobHeadOfSecurity = Head of Security
JobJanitor = Janitor
JobLawyer = Lawyer
JobLibrarian = Librarian
JobMedicalDoctor = Medical doctor
JobMedicalIntern = edical intern
JobMime = Mime
JobMusician = Musician
JobPassenger = Passenger
JobPsychologist = Psychologist
JobQuartermaster = Quartermaster
JobReporter = Reporter
JobResearchDirector = Research Director
JobSalvageSpecialist = Salvage Specialist
JobScientist = Scientist
JobSecurityCadet = Security Cadet
JobSecurityOfficer = Security Officer
JobServiceWorker = Service Worker
JobStationEngineer = Station Engineer
JobTechnicalAssistant = Technical Assistant
JobWarden = Warden
JobZookeeper = Zookeeper

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -24202,7 +24202,7 @@ entities:
34,-44: 0
34,-43: 0
34,-42: 0
34,-41: 5
34,-41: 4
34,-40: 11
34,-39: 5
34,-38: 0
@@ -24268,7 +24268,7 @@ entities:
38,-42: 0
38,-41: 0
38,-40: 0
38,-39: 5
38,-39: 4
38,-38: 0
38,-37: 0
38,-36: 0
@@ -24279,8 +24279,8 @@ entities:
39,-44: 0
39,-43: 0
39,-42: 0
39,-41: 5
39,-40: 5
39,-41: 4
39,-40: 4
39,-39: 0
39,-38: 0
39,-37: 0
@@ -25190,7 +25190,7 @@ entities:
21,-55: 0
21,-54: 0
21,-53: 0
21,-52: 5
21,-52: 4
21,-51: 0
21,-50: 0
21,-49: 0
@@ -27421,8 +27421,8 @@ entities:
- volume: 2500
temperature: 293.15
moles:
- 20.04244
- 75.39776
- 19.481253
- 73.28662
- 0
- 0
- 0
@@ -27451,23 +27451,8 @@ entities:
- volume: 2500
temperature: 235
moles:
- 20.04244
- 75.39776
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- volume: 2500
temperature: 293.15
moles:
- 21.213781
- 79.80423
- 19.481253
- 73.28662
- 0
- 0
- 0
@@ -27493,6 +27478,21 @@ entities:
- 0
- 0
- 0
- volume: 2500
temperature: 293.15
moles:
- 20.04244
- 75.39776
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- volume: 2500
temperature: 293.15
moles:
@@ -27556,8 +27556,8 @@ entities:
- volume: 2500
temperature: 293.15
moles:
- 18.405577
- 69.24003
- 17.389294
- 65.41687
- 0
- 0
- 0
@@ -27571,8 +27571,8 @@ entities:
- volume: 2500
temperature: 293.15
moles:
- 19.481253
- 73.28662
- 18.935778
- 71.2346
- 0
- 0
- 0
@@ -34693,7 +34693,7 @@ entities:
components:
- type: MetaData
- type: Transform
- index: 8
- index: 4
type: Map
- type: PhysicsMap
- type: Broadphase
@@ -159104,7 +159104,7 @@ entities:
- pos: 9.5,-47.5
parent: 0
type: Transform
- SecondsUntilStateChange: -12527.021
- SecondsUntilStateChange: -12543.773
state: Closing
type: Door
- inputs:
@@ -159120,7 +159120,7 @@ entities:
- pos: 10.5,-47.5
parent: 0
type: Transform
- SecondsUntilStateChange: -12527.021
- SecondsUntilStateChange: -12543.773
state: Closing
type: Door
- inputs:
@@ -159136,7 +159136,7 @@ entities:
- pos: 11.5,-47.5
parent: 0
type: Transform
- SecondsUntilStateChange: -12527.021
- SecondsUntilStateChange: -12543.773
state: Closing
type: Door
- inputs:
@@ -159152,7 +159152,7 @@ entities:
- pos: 13.5,-47.5
parent: 0
type: Transform
- SecondsUntilStateChange: -12527.021
- SecondsUntilStateChange: -12543.773
state: Closing
type: Door
- inputs:
@@ -159168,7 +159168,7 @@ entities:
- pos: 14.5,-47.5
parent: 0
type: Transform
- SecondsUntilStateChange: -12527.021
- SecondsUntilStateChange: -12543.773
state: Closing
type: Door
- inputs:
@@ -159184,7 +159184,7 @@ entities:
- pos: 15.5,-47.5
parent: 0
type: Transform
- SecondsUntilStateChange: -12527.021
- SecondsUntilStateChange: -12543.773
state: Closing
type: Door
- inputs:
@@ -207703,4 +207703,16 @@ entities:
- pos: 108.5,-7.5
parent: 0
type: Transform
- uid: 26529
type: CableApcExtension
components:
- pos: -32.5,7.5
parent: 0
type: Transform
- uid: 26530
type: CableApcExtension
components:
- pos: -32.5,8.5
parent: 0
type: Transform
...

File diff suppressed because it is too large Load Diff

View File

@@ -58,6 +58,7 @@
- id: BoxForensicPad
- id: WeaponRevolverInspector
- id: DrinkDetFlask
- id: SpeedLoaderMagnum
- type: entity
id: ClosetBombFilled

View File

@@ -3,7 +3,8 @@
startingInventory:
ClothingBackpack: 5
ClothingBackpackDuffel: 5
ClothingBackpackSatchel: 5
ClothingBackpackSatchel: 3
ClothingBackpackSatchelLeather: 2
HatBandBlack: 2
HatBandBlue: 2
HatBandGreen: 2

View File

@@ -24,6 +24,15 @@
- key: enum.StorageUiKey.Key
type: StorageBoundUserInterface
- type: entity
parent: ClothingBackpackSatchel
id: ClothingBackpackSatchelLeather
name: leather satchel
description: A trend-setting satchel from a bygone era.
components:
- type: Sprite
sprite: Clothing/Back/Satchels/leather.rsi
- type: entity
parent: ClothingBackpackSatchel
id: ClothingBackpackSatchelEngineering

View File

@@ -43,13 +43,14 @@
sprite: Objects/Decoration/Flora/flora_trees.rsi
netsync: false
drawdepth: Overdoors
offset: 0,0.9
- type: Physics
bodyType: Static
- type: Fixtures
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.35,-1.3,0.35,-0.5"
bounds: "-0.35,-0.4,0.35,0.4"
density: 1000
layer:
- WallLayer
@@ -83,11 +84,12 @@
components:
- type: Sprite
sprite: Objects/Decoration/Flora/flora_treessnow.rsi
offset: 0,0.7
- type: Fixtures
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.1,-1.0,0.1,-0.4"
bounds: "-0.1,-0.3,0.1,0.3"
density: 4000
layer:
- WallLayer
@@ -99,11 +101,12 @@
components:
- type: Sprite
sprite: Objects/Decoration/Flora/flora_treeslarge.rsi
offset: 0,1.55
- type: Fixtures
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.18,-1.9,0.18,-1.2"
bounds: "-0.18,-0.35,0.18,0.35"
density: 2000
layer:
- WallLayer
@@ -115,11 +118,12 @@
components:
- type: Sprite
sprite: Objects/Decoration/Flora/flora_treesconifer.rsi
offset: 0,1.15
- type: Fixtures
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.1,-1.5,0.1,-0.8"
bounds: "-0.1,-0.35,0.1,0.35"
density: 3500
layer:
- WallLayer

View File

@@ -16,6 +16,7 @@
tags:
- Handcuffs
- type: MeleeWeapon
resetOnHandSelected: false
animation: WeaponArcDisarm
damage:
types:

View File

@@ -8,6 +8,7 @@
- SpeedLoaderRifle
- type: SpeedLoader
- type: BallisticAmmoProvider
mayTransfer: true
whitelist:
tags:
- CartridgeLightRifle

View File

@@ -1,8 +1,7 @@
- type: entity
parent: BaseStructure
id: WeaponTurretSyndicateBroken
name: ballistic turret (broken)
suffix: Syndicate
parent: BaseStructure
description: A ballistic machine gun auto-turret.
components:
- type: Clickable
@@ -15,15 +14,21 @@
- state: syndie_broken
- type: entity
id: WeaponTurretSyndicate
parent: BaseStructure
id: BaseWeaponTurret
name: ballistic turret
parent: WeaponTurretSyndicateBroken
abstract: true
components:
- type: Clickable
- type: InteractionOutline
- type: Actions
- type: ContainerContainer
containers:
ballistic-ammo: !type:Container
- type: Sprite
netsync: false
sprite: Objects/Weapons/Guns/turrets.rsi
drawdepth: WallMountedItems
layers:
- state: syndie_lethal
- type: InteractionPopup
@@ -72,6 +77,30 @@
blackboard:
SoundTargetInLOS: !type:SoundPathSpecifier
path: /Audio/Effects/double_beep.ogg
- type: entity
parent: BaseWeaponTurret
id: WeaponTurretSyndicate
suffix: Syndicate
components:
- type: Faction
factions:
- Syndicate
- type: entity
parent: BaseWeaponTurret
id: WeaponTurretNanoTrasen
suffix: NanoTrasen
components:
- type: Faction
factions:
- NanoTrasen
- type: entity
parent: BaseWeaponTurret
id: WeaponTurretHostile
suffix: Hostile
components:
- type: Faction
factions:
- SimpleHostile

View File

@@ -588,9 +588,12 @@
- type: Sprite
netsync: false
drawdepth: Walls
# TODO: Icon smoothing support
sprite: Structures/Walls/shuttle_diagonal.rsi
state: state0
- type: IconSmooth
mode: Diagonal
key: walls
base: state
- type: Icon
sprite: Structures/Walls/shuttle_diagonal.rsi
state: state0

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

View File

@@ -0,0 +1,26 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from tgstation. icon from https://github.com/tgstation/tgstation/commit/c4ce2e965d33f3491173964fcbee3e43c0839bae , inhand-left and inhand-right from https://github.com/tgstation/tgstation/commit/a340fbac628722955b98c7d082bb8a3bb3ef664b , equipped-BACKPACK from https://github.com/tgstation/tgstation/commit/f13f1fba5350c90d1f09476471bb1cc296f0ad3b",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
},
{
"name": "equipped-BACKPACK",
"directions": 4
},
{
"name": "inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"directions": 4
}
]
}

View File

@@ -9,6 +9,9 @@
"states": [
{
"name": "state0"
},
{
"name": "state1"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -29,6 +29,7 @@
- resetallents
- cvar
- fuckrules
- midipanic
- Flags: DEBUG
Commands: