Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -121,7 +121,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
|
|
||||||
DebugTools.AssertNotNull(_currentPopup);
|
DebugTools.AssertNotNull(_currentPopup);
|
||||||
|
|
||||||
var buttons = new List<Button>();
|
var buttons = new Dictionary<string, List<Button>>();
|
||||||
|
|
||||||
var vBox = _currentPopup.List;
|
var vBox = _currentPopup.List;
|
||||||
vBox.DisposeAllChildren();
|
vBox.DisposeAllChildren();
|
||||||
@@ -137,7 +137,10 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
buttons.Add(button);
|
if(!buttons.ContainsKey(data.Category))
|
||||||
|
buttons[data.Category] = new List<Button>();
|
||||||
|
|
||||||
|
buttons[data.Category].Add(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
var user = GetUserEntity();
|
var user = GetUserEntity();
|
||||||
@@ -148,7 +151,13 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
var disabled = verb.GetVisibility(user, component) != VerbVisibility.Visible;
|
var disabled = verb.GetVisibility(user, component) != VerbVisibility.Visible;
|
||||||
buttons.Add(CreateVerbButton(verb.GetText(user, component), disabled, verb.ToString(),
|
var category = verb.GetCategory(user, component);
|
||||||
|
|
||||||
|
|
||||||
|
if(!buttons.ContainsKey(category))
|
||||||
|
buttons[category] = new List<Button>();
|
||||||
|
|
||||||
|
buttons[category].Add(CreateVerbButton(verb.GetText(user, component), disabled, verb.ToString(),
|
||||||
entity.ToString(), () => verb.Activate(user, component)));
|
entity.ToString(), () => verb.Activate(user, component)));
|
||||||
}
|
}
|
||||||
//Get global verbs. Visible for all entities regardless of their components.
|
//Get global verbs. Visible for all entities regardless of their components.
|
||||||
@@ -158,17 +167,33 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
var disabled = globalVerb.GetVisibility(user, entity) != VerbVisibility.Visible;
|
var disabled = globalVerb.GetVisibility(user, entity) != VerbVisibility.Visible;
|
||||||
buttons.Add(CreateVerbButton(globalVerb.GetText(user, entity), disabled, globalVerb.ToString(),
|
var category = globalVerb.GetCategory(user, entity);
|
||||||
|
|
||||||
|
if(!buttons.ContainsKey(category))
|
||||||
|
buttons[category] = new List<Button>();
|
||||||
|
|
||||||
|
buttons[category].Add(CreateVerbButton(globalVerb.GetText(user, entity), disabled, globalVerb.ToString(),
|
||||||
entity.ToString(), () => globalVerb.Activate(user, entity)));
|
entity.ToString(), () => globalVerb.Activate(user, entity)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buttons.Count > 0)
|
if (buttons.Count > 0)
|
||||||
{
|
{
|
||||||
buttons.Sort((a, b) => string.Compare(a.Text, b.Text, StringComparison.Ordinal));
|
foreach (var (category, verbs) in buttons)
|
||||||
|
|
||||||
foreach (var button in buttons)
|
|
||||||
{
|
{
|
||||||
vBox.AddChild(button);
|
if (string.IsNullOrEmpty(category))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
vBox.AddChild(CreateCategoryButton(category, verbs));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buttons.ContainsKey(""))
|
||||||
|
{
|
||||||
|
buttons[""].Sort((a, b) => string.Compare(a.Text, b.Text, StringComparison.Ordinal));
|
||||||
|
|
||||||
|
foreach (var verb in buttons[""])
|
||||||
|
{
|
||||||
|
vBox.AddChild(verb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -204,6 +229,25 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Button CreateCategoryButton(string text, List<Button> verbButtons)
|
||||||
|
{
|
||||||
|
verbButtons.Sort((a, b) => string.Compare(a.Text, b.Text, StringComparison.Ordinal));
|
||||||
|
|
||||||
|
var button = new Button
|
||||||
|
{
|
||||||
|
Text = $"{text}...",
|
||||||
|
};
|
||||||
|
button.OnPressed += _ =>
|
||||||
|
{
|
||||||
|
_currentPopup.List.DisposeAllChildren();
|
||||||
|
foreach (var verb in verbButtons)
|
||||||
|
{
|
||||||
|
_currentPopup.List.AddChild(verb);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return button;
|
||||||
|
}
|
||||||
|
|
||||||
private void CloseContextMenu()
|
private void CloseContextMenu()
|
||||||
{
|
{
|
||||||
_currentPopup?.Dispose();
|
_currentPopup?.Dispose();
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ namespace Content.Client.GlobalVerbs
|
|||||||
class ViewVariablesVerb : GlobalVerb
|
class ViewVariablesVerb : GlobalVerb
|
||||||
{
|
{
|
||||||
public override string GetText(IEntity user, IEntity target) => "View variables";
|
public override string GetText(IEntity user, IEntity target) => "View variables";
|
||||||
|
public override string GetCategory(IEntity user, IEntity target) => "Debug";
|
||||||
|
|
||||||
public override bool RequireInteractionRange => false;
|
public override bool RequireInteractionRange => false;
|
||||||
|
|
||||||
public override VerbVisibility GetVisibility(IEntity user, IEntity target)
|
public override VerbVisibility GetVisibility(IEntity user, IEntity target)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using Content.Server.GameObjects.Components.Interactable.Tools;
|
using Content.Server.GameObjects.Components.Interactable.Tools;
|
||||||
using Content.Server.GameObjects.Components.Stack;
|
using Content.Server.GameObjects.Components.Stack;
|
||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
|
using Content.Server.Interfaces;
|
||||||
using Content.Shared.Construction;
|
using Content.Shared.Construction;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.GameObjects.EntitySystems;
|
using Robust.Server.GameObjects.EntitySystems;
|
||||||
@@ -12,6 +13,7 @@ using Robust.Shared.Interfaces.GameObjects;
|
|||||||
using Robust.Shared.Interfaces.GameObjects.Components;
|
using Robust.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Shared.Interfaces.Random;
|
using Robust.Shared.Interfaces.Random;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
using static Content.Shared.Construction.ConstructionStepMaterial;
|
using static Content.Shared.Construction.ConstructionStepMaterial;
|
||||||
@@ -34,6 +36,8 @@ namespace Content.Server.GameObjects.Components.Construction
|
|||||||
#pragma warning disable 649
|
#pragma warning disable 649
|
||||||
[Dependency] private IRobustRandom _random;
|
[Dependency] private IRobustRandom _random;
|
||||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
|
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
|
||||||
|
[Dependency] private readonly IServerNotifyManager _notifyManager;
|
||||||
|
[Dependency] private readonly ILocalizationManager _localizationManager;
|
||||||
#pragma warning restore 649
|
#pragma warning restore 649
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
@@ -49,8 +53,10 @@ namespace Content.Server.GameObjects.Components.Construction
|
|||||||
{
|
{
|
||||||
var playerEntity = eventArgs.User;
|
var playerEntity = eventArgs.User;
|
||||||
var interactionSystem = _entitySystemManager.GetEntitySystem<InteractionSystem>();
|
var interactionSystem = _entitySystemManager.GetEntitySystem<InteractionSystem>();
|
||||||
if (!interactionSystem.InRangeUnobstructed(playerEntity.Transform.MapPosition, Owner.Transform.WorldPosition, ignoredEnt: Owner, insideBlockerValid: true))
|
if (!interactionSystem.InRangeUnobstructed(playerEntity.Transform.MapPosition, Owner.Transform.WorldPosition, ignoredEnt: Owner, insideBlockerValid: Prototype.CanBuildInImpassable))
|
||||||
{
|
{
|
||||||
|
_notifyManager.PopupMessage(Owner.Transform.GridPosition, playerEntity,
|
||||||
|
_localizationManager.GetString("You can't reach there!"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Stack;
|
|||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
using Content.Shared.Construction;
|
using Content.Shared.Construction;
|
||||||
using Content.Shared.GameObjects.Components.Construction;
|
using Content.Shared.GameObjects.Components.Construction;
|
||||||
|
using Content.Shared.Interfaces;
|
||||||
using Robust.Server.GameObjects.EntitySystems;
|
using Robust.Server.GameObjects.EntitySystems;
|
||||||
using Robust.Server.Interfaces.GameObjects;
|
using Robust.Server.Interfaces.GameObjects;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
@@ -10,6 +11,7 @@ using Robust.Shared.Interfaces.GameObjects;
|
|||||||
using Robust.Shared.Interfaces.Map;
|
using Robust.Shared.Interfaces.Map;
|
||||||
using Robust.Shared.Interfaces.Network;
|
using Robust.Shared.Interfaces.Network;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
@@ -24,6 +26,8 @@ namespace Content.Server.GameObjects.Components.Construction
|
|||||||
[Dependency] private readonly IMapManager _mapManager;
|
[Dependency] private readonly IMapManager _mapManager;
|
||||||
[Dependency] private readonly IServerEntityManager _serverEntityManager;
|
[Dependency] private readonly IServerEntityManager _serverEntityManager;
|
||||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
|
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
|
||||||
|
[Dependency] private readonly ISharedNotifyManager _notifyManager;
|
||||||
|
[Dependency] private readonly ILocalizationManager _localizationManager;
|
||||||
#pragma warning restore 649
|
#pragma warning restore 649
|
||||||
|
|
||||||
public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, IComponent component = null)
|
public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, IComponent component = null)
|
||||||
@@ -44,8 +48,10 @@ namespace Content.Server.GameObjects.Components.Construction
|
|||||||
var transform = Owner.Transform;
|
var transform = Owner.Transform;
|
||||||
|
|
||||||
var interactionSystem = _entitySystemManager.GetEntitySystem<InteractionSystem>();
|
var interactionSystem = _entitySystemManager.GetEntitySystem<InteractionSystem>();
|
||||||
if (!interactionSystem.InRangeUnobstructed(loc.ToMap(_mapManager), Owner.Transform.WorldPosition, ignoredEnt: Owner, insideBlockerValid: true))
|
if (!interactionSystem.InRangeUnobstructed(loc.ToMap(_mapManager), Owner.Transform.WorldPosition, ignoredEnt: Owner, insideBlockerValid: prototype.CanBuildInImpassable))
|
||||||
{
|
{
|
||||||
|
_notifyManager.PopupMessage(transform.GridPosition, Owner,
|
||||||
|
_localizationManager.GetString("You can't reach there!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ namespace Content.Server.GameObjects.Components
|
|||||||
return "Rotate clockwise";
|
return "Rotate clockwise";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string GetCategory(IEntity user, RotatableComponent component) => "Rotate";
|
||||||
|
|
||||||
protected override VerbVisibility GetVisibility(IEntity user, RotatableComponent component)
|
protected override VerbVisibility GetVisibility(IEntity user, RotatableComponent component)
|
||||||
{
|
{
|
||||||
return VerbVisibility.Visible;
|
return VerbVisibility.Visible;
|
||||||
@@ -59,6 +61,8 @@ namespace Content.Server.GameObjects.Components
|
|||||||
return "Rotate counter-clockwise";
|
return "Rotate counter-clockwise";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string GetCategory(IEntity user, RotatableComponent component) => "Rotate";
|
||||||
|
|
||||||
protected override VerbVisibility GetVisibility(IEntity user, RotatableComponent component)
|
protected override VerbVisibility GetVisibility(IEntity user, RotatableComponent component)
|
||||||
{
|
{
|
||||||
return VerbVisibility.Visible;
|
return VerbVisibility.Visible;
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
|
|
||||||
// TODO: These keys being giant strings is inefficient as hell.
|
// TODO: These keys being giant strings is inefficient as hell.
|
||||||
data.Add(new VerbsResponseMessage.VerbData(verb.GetText(userEntity, component),
|
data.Add(new VerbsResponseMessage.VerbData(verb.GetText(userEntity, component),
|
||||||
$"{component.GetType()}:{verb.GetType()}",
|
$"{component.GetType()}:{verb.GetType()}", verb.GetCategory(userEntity, component),
|
||||||
vis == VerbVisibility.Visible));
|
vis == VerbVisibility.Visible));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
data.Add(new VerbsResponseMessage.VerbData(globalVerb.GetText(userEntity, entity),
|
data.Add(new VerbsResponseMessage.VerbData(globalVerb.GetText(userEntity, entity),
|
||||||
globalVerb.GetType().ToString(), vis == VerbVisibility.Visible));
|
globalVerb.GetType().ToString(), globalVerb.GetCategory(userEntity, entity), vis == VerbVisibility.Visible));
|
||||||
}
|
}
|
||||||
|
|
||||||
var response = new VerbsResponseMessage(data, req.EntityUid);
|
var response = new VerbsResponseMessage(data, req.EntityUid);
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ namespace Content.Server.GlobalVerbs
|
|||||||
public class ControlMobVerb : GlobalVerb
|
public class ControlMobVerb : GlobalVerb
|
||||||
{
|
{
|
||||||
public override string GetText(IEntity user, IEntity target) => "Control Mob";
|
public override string GetText(IEntity user, IEntity target) => "Control Mob";
|
||||||
|
public override string GetCategory(IEntity user, IEntity target) => "Debug";
|
||||||
|
|
||||||
public override bool RequireInteractionRange => false;
|
public override bool RequireInteractionRange => false;
|
||||||
|
|
||||||
public override VerbVisibility GetVisibility(IEntity user, IEntity target)
|
public override VerbVisibility GetVisibility(IEntity user, IEntity target)
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ namespace Content.Server.GlobalVerbs
|
|||||||
class RejuvenateVerb : GlobalVerb
|
class RejuvenateVerb : GlobalVerb
|
||||||
{
|
{
|
||||||
public override string GetText(IEntity user, IEntity target) => "Rejuvenate";
|
public override string GetText(IEntity user, IEntity target) => "Rejuvenate";
|
||||||
|
public override string GetCategory(IEntity user, IEntity target) => "Debug";
|
||||||
|
|
||||||
public override bool RequireInteractionRange => false;
|
public override bool RequireInteractionRange => false;
|
||||||
|
|
||||||
public override VerbVisibility GetVisibility(IEntity user, IEntity target)
|
public override VerbVisibility GetVisibility(IEntity user, IEntity target)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ namespace Content.Shared.Construction
|
|||||||
private string _id;
|
private string _id;
|
||||||
private string _result;
|
private string _result;
|
||||||
private string _placementMode;
|
private string _placementMode;
|
||||||
|
private bool _canBuildInImpassable;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Friendly name displayed in the construction GUI.
|
/// Friendly name displayed in the construction GUI.
|
||||||
@@ -37,6 +38,11 @@ namespace Content.Shared.Construction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public SpriteSpecifier Icon => _icon;
|
public SpriteSpecifier Icon => _icon;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If you can start building or complete steps on impassable terrain.
|
||||||
|
/// </summary>
|
||||||
|
public bool CanBuildInImpassable => _canBuildInImpassable;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A list of keywords that are used for searching.
|
/// A list of keywords that are used for searching.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -81,6 +87,7 @@ namespace Content.Shared.Construction
|
|||||||
ser.DataField(ref _type, "objecttype", ConstructionType.Structure);
|
ser.DataField(ref _type, "objecttype", ConstructionType.Structure);
|
||||||
ser.DataField(ref _result, "result", null);
|
ser.DataField(ref _result, "result", null);
|
||||||
ser.DataField(ref _placementMode, "placementmode", "PlaceFree");
|
ser.DataField(ref _placementMode, "placementmode", "PlaceFree");
|
||||||
|
ser.DataField(ref _canBuildInImpassable, "canbuildinimpassable", false);
|
||||||
|
|
||||||
_keywords = ser.ReadDataField<List<string>>("keywords", new List<string>());
|
_keywords = ser.ReadDataField<List<string>>("keywords", new List<string>());
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,12 +35,14 @@ namespace Content.Shared.GameObjects.EntitySystemMessages
|
|||||||
{
|
{
|
||||||
public readonly string Text;
|
public readonly string Text;
|
||||||
public readonly string Key;
|
public readonly string Key;
|
||||||
|
public readonly string Category;
|
||||||
public readonly bool Available;
|
public readonly bool Available;
|
||||||
|
|
||||||
public VerbData(string text, string key, bool available)
|
public VerbData(string text, string key, string category, bool available)
|
||||||
{
|
{
|
||||||
Text = text;
|
Text = text;
|
||||||
Key = key;
|
Key = key;
|
||||||
|
Category = category;
|
||||||
Available = available;
|
Available = available;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ namespace Content.Shared.GameObjects
|
|||||||
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
|
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
|
||||||
public abstract string GetText(IEntity user, IEntity target);
|
public abstract string GetText(IEntity user, IEntity target);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the category of this verb.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">The entity of the user opening this menu.</param>
|
||||||
|
/// <returns>The category of this verb.</returns>
|
||||||
|
public virtual string GetCategory(IEntity user, IEntity target) => "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the visibility level of this verb in the right click menu.
|
/// Gets the visibility level of this verb in the right click menu.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -31,6 +31,14 @@ namespace Content.Shared.GameObjects
|
|||||||
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
|
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
|
||||||
public abstract string GetText(IEntity user, IComponent component);
|
public abstract string GetText(IEntity user, IComponent component);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the category of this verb.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">The entity of the user opening this menu.</param>
|
||||||
|
/// <param name="component">The component instance for which this verb is being loaded.</param>
|
||||||
|
/// <returns>The category of this verb.</returns>
|
||||||
|
public virtual string GetCategory(IEntity user, IComponent component) => "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the visibility level of this verb in the right click menu.
|
/// Gets the visibility level of this verb in the right click menu.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -63,6 +71,14 @@ namespace Content.Shared.GameObjects
|
|||||||
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
|
/// <returns>The text string that is shown in the right click menu for this verb.</returns>
|
||||||
protected abstract string GetText(IEntity user, T component);
|
protected abstract string GetText(IEntity user, T component);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the category of this verb.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">The entity of the user opening this menu.</param>
|
||||||
|
/// <param name="component">The component instance for which this verb is being loaded.</param>
|
||||||
|
/// <returns>The category of this verb.</returns>
|
||||||
|
protected virtual string GetCategory(IEntity user, T component) => "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the visibility level of this verb in the right click menu.
|
/// Gets the visibility level of this verb in the right click menu.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -84,6 +100,12 @@ namespace Content.Shared.GameObjects
|
|||||||
return GetText(user, (T) component);
|
return GetText(user, (T) component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public sealed override string GetCategory(IEntity user, IComponent component)
|
||||||
|
{
|
||||||
|
return GetCategory(user, (T) component);
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public sealed override VerbVisibility GetVisibility(IEntity user, IComponent component)
|
public sealed override VerbVisibility GetVisibility(IEntity user, IComponent component)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
category: Machines
|
category: Machines
|
||||||
description: A simple wall-mounted light fixture.
|
description: A simple wall-mounted light fixture.
|
||||||
placementmode: SnapgridBorder
|
placementmode: SnapgridBorder
|
||||||
|
canbuildinimpassable: true
|
||||||
icon:
|
icon:
|
||||||
sprite: Objects/Lighting/lighting.rsi
|
sprite: Objects/Lighting/lighting.rsi
|
||||||
state: on
|
state: on
|
||||||
@@ -17,6 +18,7 @@
|
|||||||
sprite: Objects/Lighting/lighting.rsi
|
sprite: Objects/Lighting/lighting.rsi
|
||||||
state: construct
|
state: construct
|
||||||
|
|
||||||
|
|
||||||
- material: Cable
|
- material: Cable
|
||||||
amount: 1
|
amount: 1
|
||||||
icon:
|
icon:
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
category: Machines/Power
|
category: Machines/Power
|
||||||
placementmode: SnapgridCenter
|
placementmode: SnapgridCenter
|
||||||
description: Provides power from the grid wirelessly to other machines in the area.
|
description: Provides power from the grid wirelessly to other machines in the area.
|
||||||
|
canbuildinimpassable: true
|
||||||
icon:
|
icon:
|
||||||
sprite: Buildings/apc.rsi
|
sprite: Buildings/apc.rsi
|
||||||
state: apc0
|
state: apc0
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
- material: Metal
|
- material: Metal
|
||||||
amount: 2
|
amount: 2
|
||||||
reverse:
|
reverse:
|
||||||
tool: Welder
|
tool: Wrench
|
||||||
|
|
||||||
- type: construction
|
- type: construction
|
||||||
name: Table
|
name: Table
|
||||||
@@ -33,3 +33,65 @@
|
|||||||
steps:
|
steps:
|
||||||
- material: Metal
|
- material: Metal
|
||||||
amount: 2
|
amount: 2
|
||||||
|
|
||||||
|
- type: construction
|
||||||
|
name: Window
|
||||||
|
id: window
|
||||||
|
category: Structures
|
||||||
|
description: Clear.
|
||||||
|
icon:
|
||||||
|
sprite: Buildings/window.rsi
|
||||||
|
state: full
|
||||||
|
objecttype: Structure
|
||||||
|
result: window
|
||||||
|
placementmode: SnapgridCenter
|
||||||
|
steps:
|
||||||
|
- material: Glass
|
||||||
|
amount: 2
|
||||||
|
|
||||||
|
- type: construction
|
||||||
|
name: Low Wall
|
||||||
|
id: low_wall
|
||||||
|
category: Structures
|
||||||
|
description: A low wall used for mounting windows.
|
||||||
|
icon:
|
||||||
|
sprite: Buildings/low_wall.rsi
|
||||||
|
state: metal
|
||||||
|
objecttype: Structure
|
||||||
|
result: low_wall
|
||||||
|
placementmode: SnapgridCenter
|
||||||
|
steps:
|
||||||
|
- material: Metal
|
||||||
|
amount: 2
|
||||||
|
icon: Buildings/wall_girder.png
|
||||||
|
reverse:
|
||||||
|
tool: Wrench
|
||||||
|
|
||||||
|
- material: Metal
|
||||||
|
amount: 2
|
||||||
|
reverse:
|
||||||
|
tool: Wrench
|
||||||
|
|
||||||
|
- type: construction
|
||||||
|
name: Rein Window
|
||||||
|
id: rwindow
|
||||||
|
category: Structures
|
||||||
|
description: Clear but tough.
|
||||||
|
icon:
|
||||||
|
sprite: Buildings/rwindow.rsi
|
||||||
|
state: full
|
||||||
|
objecttype: Structure
|
||||||
|
result: rwindow
|
||||||
|
placementmode: SnapgridCenter
|
||||||
|
steps:
|
||||||
|
- material: Glass
|
||||||
|
amount: 2
|
||||||
|
reverse:
|
||||||
|
tool: Wrench
|
||||||
|
|
||||||
|
# Should be replaced with Metal Rods when someone puts them in.
|
||||||
|
- material: Metal
|
||||||
|
amount: 2
|
||||||
|
reverse:
|
||||||
|
# Should be replaced with Wirecutter when someone makes it work.
|
||||||
|
tool: Wrench
|
||||||
|
|||||||
@@ -13,8 +13,10 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
netsync: false
|
netsync: false
|
||||||
drawdepth: Walls
|
drawdepth: Walls
|
||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
state: full
|
state: full
|
||||||
|
|
||||||
- type: Collidable
|
- type: Collidable
|
||||||
shapes:
|
shapes:
|
||||||
- !type:PhysShapeAabb
|
- !type:PhysShapeAabb
|
||||||
@@ -26,6 +28,7 @@
|
|||||||
- type: Occluder
|
- type: Occluder
|
||||||
sizeX: 32
|
sizeX: 32
|
||||||
sizeY: 32
|
sizeY: 32
|
||||||
|
|
||||||
- type: SnapGrid
|
- type: SnapGrid
|
||||||
offset: Center
|
offset: Center
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
id: window
|
id: window
|
||||||
name: Window
|
name: Window
|
||||||
description: Don't smudge up the glass down there.
|
description: Don't smudge up the glass down there.
|
||||||
|
placement:
|
||||||
|
mode: SnapgridCenter
|
||||||
|
snap:
|
||||||
|
- Window
|
||||||
components:
|
components:
|
||||||
- type: Clickable
|
- type: Clickable
|
||||||
- type: InteractionOutline
|
- type: InteractionOutline
|
||||||
@@ -13,7 +17,7 @@
|
|||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Buildings/window.rsi
|
sprite: Buildings/window.rsi
|
||||||
state: window0
|
state: full
|
||||||
|
|
||||||
- type: Collidable
|
- type: Collidable
|
||||||
shapes:
|
shapes:
|
||||||
@@ -30,10 +34,6 @@
|
|||||||
- type: Window
|
- type: Window
|
||||||
base: window
|
base: window
|
||||||
|
|
||||||
placement:
|
|
||||||
snap:
|
|
||||||
- Wall
|
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: rwindow
|
id: rwindow
|
||||||
name: Reinforced Window
|
name: Reinforced Window
|
||||||
@@ -48,4 +48,4 @@
|
|||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Buildings/rwindow.rsi
|
sprite: Buildings/rwindow.rsi
|
||||||
state: rwindow0
|
state: full
|
||||||
|
|||||||
@@ -456,8 +456,8 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
parent: GlovesBase
|
parent: GlovesBase
|
||||||
id: GlovesLeather
|
id: GlovesLeather
|
||||||
name: Leather gloves
|
name: 'Botanist''s leather gloves'
|
||||||
description: ''
|
description: 'These leather gloves protect against thorns, barbs, prickles, spikes and other harmful objects of floral origin. They''re also quite warm.'
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/Gloves/leather.rsi
|
sprite: Clothing/Gloves/leather.rsi
|
||||||
@@ -465,6 +465,7 @@
|
|||||||
sprite: Clothing/Gloves/leather.rsi
|
sprite: Clothing/Gloves/leather.rsi
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/Gloves/leather.rsi
|
sprite: Clothing/Gloves/leather.rsi
|
||||||
|
HeatResistance: 1400
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: GlovesBase
|
parent: GlovesBase
|
||||||
@@ -776,5 +777,4 @@
|
|||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Clothing/Gloves/yellow.rsi
|
sprite: Clothing/Gloves/yellow.rsi
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
HeatResistance: 1500
|
|
||||||
sprite: Clothing/Gloves/yellow.rsi
|
sprite: Clothing/Gloves/yellow.rsi
|
||||||
|
|||||||
BIN
Resources/Textures/Buildings/rwindow.rsi/full.png
Normal file
BIN
Resources/Textures/Buildings/rwindow.rsi/full.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 575 B |
@@ -1 +1,164 @@
|
|||||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/c0293684320e7b70cbcac932b8dddeee35f3a51f/icons/obj/structures/windows.dmi", "states": [{"name": "rwindow0", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow1", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow2", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow3", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow4", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow5", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow6", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "rwindow7", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}]}
|
{
|
||||||
|
"version": 1,
|
||||||
|
"size": {
|
||||||
|
"x": 32,
|
||||||
|
"y": 32
|
||||||
|
},
|
||||||
|
"license": "CC-BY-SA-3.0",
|
||||||
|
"copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/c0293684320e7b70cbcac932b8dddeee35f3a51f/icons/obj/structures/windows.dmi",
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "full",
|
||||||
|
"directions": 1,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rwindow0",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rwindow1",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rwindow2",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rwindow3",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rwindow4",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rwindow5",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rwindow6",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rwindow7",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|||||||
BIN
Resources/Textures/Buildings/window.rsi/full.png
Normal file
BIN
Resources/Textures/Buildings/window.rsi/full.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 366 B |
@@ -1 +1,164 @@
|
|||||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/c0293684320e7b70cbcac932b8dddeee35f3a51f/icons/obj/structures/windows.dmi", "states": [{"name": "window0", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window1", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window2", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window3", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window4", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window5", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window6", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "window7", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}]}
|
{
|
||||||
|
"version": 1,
|
||||||
|
"size": {
|
||||||
|
"x": 32,
|
||||||
|
"y": 32
|
||||||
|
},
|
||||||
|
"license": "CC-BY-SA-3.0",
|
||||||
|
"copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/c0293684320e7b70cbcac932b8dddeee35f3a51f/icons/obj/structures/windows.dmi",
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "full",
|
||||||
|
"directions": 1,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "window0",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "window1",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "window2",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "window3",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "window4",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "window5",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "window6",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "window7",
|
||||||
|
"directions": 4,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user