Sprite refactor (#63)
* Sprite refactor compatibility. * Sprite-level rotation. * Dude it works. Welder now has an unshaded flame toggle! Door component no longer on client! * Remove debug text. * Update.
This commit is contained in:
committed by
clusterfack
parent
2ba705ffe9
commit
61a1e769d7
@@ -73,7 +73,6 @@
|
|||||||
<Compile Include="GameObjects\Components\Storage\ClientStorageComponent.cs" />
|
<Compile Include="GameObjects\Components\Storage\ClientStorageComponent.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="GameObjects\Components\Items\ClientHandsComponent.cs" />
|
<Compile Include="GameObjects\Components\Items\ClientHandsComponent.cs" />
|
||||||
<Compile Include="GameObjects\Components\Doors\ClientDoorComponent.cs" />
|
|
||||||
<Compile Include="Interfaces\GameObjects\Components\Items\IHandsComponent.cs" />
|
<Compile Include="Interfaces\GameObjects\Components\Items\IHandsComponent.cs" />
|
||||||
<Compile Include="UserInterface\HandsGui.cs" />
|
<Compile Include="UserInterface\HandsGui.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ namespace Content.Client
|
|||||||
factory.Register<HandsComponent>();
|
factory.Register<HandsComponent>();
|
||||||
factory.RegisterReference<HandsComponent, IHandsComponent>();
|
factory.RegisterReference<HandsComponent, IHandsComponent>();
|
||||||
factory.Register<ClientStorageComponent>();
|
factory.Register<ClientStorageComponent>();
|
||||||
|
|
||||||
factory.Register<ClientDoorComponent>();
|
|
||||||
factory.Register<ClientInventoryComponent>();
|
factory.Register<ClientInventoryComponent>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
using Content.Shared.GameObjects;
|
|
||||||
using Lidgren.Network;
|
|
||||||
using SS14.Client.GameObjects;
|
|
||||||
using SS14.Shared.GameObjects;
|
|
||||||
using SS14.Shared.Utility;
|
|
||||||
using YamlDotNet.RepresentationModel;
|
|
||||||
|
|
||||||
namespace Content.Client.GameObjects
|
|
||||||
{
|
|
||||||
public class ClientDoorComponent : SharedDoorComponent
|
|
||||||
{
|
|
||||||
public bool Opened { get; private set; }
|
|
||||||
private SpriteComponent spriteComponent;
|
|
||||||
|
|
||||||
private string OpenSprite = "Objects/door_ewo.png";
|
|
||||||
private string CloseSprite = "Objects/door_ew.png";
|
|
||||||
|
|
||||||
public override void Initialize()
|
|
||||||
{
|
|
||||||
base.Initialize();
|
|
||||||
|
|
||||||
spriteComponent = Owner.GetComponent<SpriteComponent>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Open()
|
|
||||||
{
|
|
||||||
Opened = true;
|
|
||||||
spriteComponent.SetSpriteByKey(OpenSprite);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Close()
|
|
||||||
{
|
|
||||||
Opened = false;
|
|
||||||
spriteComponent.SetSpriteByKey(CloseSprite);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void HandleComponentState(ComponentState state)
|
|
||||||
{
|
|
||||||
var castState = (DoorComponentState)state;
|
|
||||||
if (castState.Opened == Opened)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (castState.Opened)
|
|
||||||
{
|
|
||||||
Open();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LoadParameters(YamlMappingNode mapping)
|
|
||||||
{
|
|
||||||
base.LoadParameters(mapping);
|
|
||||||
|
|
||||||
YamlNode node;
|
|
||||||
if (mapping.TryGetNode("openstate", out node))
|
|
||||||
{
|
|
||||||
OpenSprite = node.AsString();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mapping.TryGetNode("closestate", out node))
|
|
||||||
{
|
|
||||||
CloseSprite = node.AsString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -71,7 +71,7 @@ namespace Content.Client.GameObjects
|
|||||||
/// <param name="message"></param>
|
/// <param name="message"></param>
|
||||||
private void OpenMenu(object sender, BoundKeyChangedMessage message)
|
private void OpenMenu(object sender, BoundKeyChangedMessage message)
|
||||||
{
|
{
|
||||||
if(message.Function == BoundKeyFunctions.OpenCharacterMenu && message.State == BoundKeyState.Down)
|
if (message.Function == BoundKeyFunctions.OpenCharacterMenu && message.State == BoundKeyState.Down)
|
||||||
{
|
{
|
||||||
Window.AddToScreen();
|
Window.AddToScreen();
|
||||||
Window.Open();
|
Window.Open();
|
||||||
@@ -126,7 +126,7 @@ namespace Content.Client.GameObjects
|
|||||||
GridContainer.Columns = elements_x;
|
GridContainer.Columns = elements_x;
|
||||||
IndexedSlots = new List<Slots>(inventory.SlotMasks);
|
IndexedSlots = new List<Slots>(inventory.SlotMasks);
|
||||||
|
|
||||||
foreach(Slots slot in IndexedSlots)
|
foreach (Slots slot in IndexedSlots)
|
||||||
{
|
{
|
||||||
InventoryButton newbutton = new InventoryButton(slot);
|
InventoryButton newbutton = new InventoryButton(slot);
|
||||||
|
|
||||||
@@ -166,9 +166,9 @@ namespace Content.Client.GameObjects
|
|||||||
button.GetChild<Button>("Button").OnPressed -= AddToInventory;
|
button.GetChild<Button>("Button").OnPressed -= AddToInventory;
|
||||||
|
|
||||||
//Gets entity sprite and assigns it to button texture
|
//Gets entity sprite and assigns it to button texture
|
||||||
if (entity.TryGetComponent(out SpriteComponent sprite))
|
if (entity.TryGetComponent(out IconComponent sprite))
|
||||||
{
|
{
|
||||||
var tex = sprite.CurrentSprite;
|
var tex = sprite.Icon.Default;
|
||||||
|
|
||||||
var rect = button.GetChild("CenterContainer").GetChild<TextureRect>("TextureRect");
|
var rect = button.GetChild("CenterContainer").GetChild<TextureRect>("TextureRect");
|
||||||
|
|
||||||
@@ -214,7 +214,6 @@ namespace Content.Client.GameObjects
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private class InventoryButton : Control
|
private class InventoryButton : Control
|
||||||
{
|
{
|
||||||
public Slots Slot;
|
public Slots Slot;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
base.OnAdd();
|
base.OnAdd();
|
||||||
|
|
||||||
Window = new StorageWindow()
|
Window = new StorageWindow()
|
||||||
{ StorageEntity = this};
|
{ StorageEntity = this };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnRemove()
|
public override void OnRemove()
|
||||||
@@ -100,7 +100,6 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
|
|
||||||
protected override void Initialize()
|
protected override void Initialize()
|
||||||
{
|
{
|
||||||
|
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
HideOnClose = true;
|
HideOnClose = true;
|
||||||
@@ -122,7 +121,6 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
|
|
||||||
foreach (var entityuid in storagelist)
|
foreach (var entityuid in storagelist)
|
||||||
{
|
{
|
||||||
|
|
||||||
var entity = IoCManager.Resolve<IEntityManager>().GetEntity(entityuid.Key);
|
var entity = IoCManager.Resolve<IEntityManager>().GetEntity(entityuid.Key);
|
||||||
|
|
||||||
var button = new EntityButton()
|
var button = new EntityButton()
|
||||||
@@ -136,9 +134,9 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
container.GetChild<Control>("Control").GetChild<Label>("Size").Text = string.Format("{0}", entityuid.Value);
|
container.GetChild<Control>("Control").GetChild<Label>("Size").Text = string.Format("{0}", entityuid.Value);
|
||||||
|
|
||||||
//Gets entity sprite and assigns it to button texture
|
//Gets entity sprite and assigns it to button texture
|
||||||
if (entity.TryGetComponent(out SpriteComponent sprite))
|
if (entity.TryGetComponent(out IconComponent icon))
|
||||||
{
|
{
|
||||||
var tex = sprite.CurrentSprite;
|
var tex = icon.Icon.Default;
|
||||||
var rect = container.GetChild("TextureWrap").GetChild<TextureRect>("TextureRect");
|
var rect = container.GetChild("TextureWrap").GetChild<TextureRect>("TextureRect");
|
||||||
|
|
||||||
if (tex != null)
|
if (tex != null)
|
||||||
@@ -158,7 +156,7 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Sets information about entire storage container current capacity
|
//Sets information about entire storage container current capacity
|
||||||
if(StorageEntity.StorageCapacityMax != 0)
|
if (StorageEntity.StorageCapacityMax != 0)
|
||||||
{
|
{
|
||||||
Information.Text = String.Format("Items: {0}, Stored: {1}/{2}", storagelist.Count, StorageEntity.StorageSizeUsed, StorageEntity.StorageCapacityMax);
|
Information.Text = String.Format("Items: {0}, Stored: {1}/{2}", storagelist.Count, StorageEntity.StorageSizeUsed, StorageEntity.StorageCapacityMax);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ namespace Content.Client.UserInterface
|
|||||||
{
|
{
|
||||||
if (entity.TryGetComponent<IconComponent>(out var component) && component.Icon != null)
|
if (entity.TryGetComponent<IconComponent>(out var component) && component.Icon != null)
|
||||||
{
|
{
|
||||||
return component.Icon;
|
return component.Icon.Default;
|
||||||
}
|
}
|
||||||
return IoCManager.Resolve<IResourceCache>().GetFallback<TextureResource>();
|
return IoCManager.Resolve<IResourceCache>().GetFallback<TextureResource>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Content.Server.Interfaces.GameObjects;
|
|||||||
using Content.Shared.GameObjects;
|
using Content.Shared.GameObjects;
|
||||||
using SS14.Server.GameObjects;
|
using SS14.Server.GameObjects;
|
||||||
using SS14.Shared.GameObjects;
|
using SS14.Shared.GameObjects;
|
||||||
|
using SS14.Shared.GameObjects.Serialization;
|
||||||
using SS14.Shared.Interfaces.GameObjects;
|
using SS14.Shared.Interfaces.GameObjects;
|
||||||
using SS14.Shared.Interfaces.GameObjects.Components;
|
using SS14.Shared.Interfaces.GameObjects.Components;
|
||||||
using SS14.Shared.Log;
|
using SS14.Shared.Log;
|
||||||
@@ -12,13 +13,26 @@ using Content.Server.GameObjects.EntitySystems;
|
|||||||
|
|
||||||
namespace Content.Server.GameObjects
|
namespace Content.Server.GameObjects
|
||||||
{
|
{
|
||||||
public class ServerDoorComponent : SharedDoorComponent, IAttackHand
|
public class ServerDoorComponent : Component, IAttackHand
|
||||||
{
|
{
|
||||||
|
public override string Name => "Door";
|
||||||
public bool Opened { get; private set; }
|
public bool Opened { get; private set; }
|
||||||
|
|
||||||
private float OpenTimeCounter;
|
private float OpenTimeCounter;
|
||||||
|
|
||||||
private CollidableComponent collidableComponent;
|
private CollidableComponent collidableComponent;
|
||||||
|
private SpriteComponent spriteComponent;
|
||||||
|
|
||||||
|
private string OpenSprite;
|
||||||
|
private string CloseSprite;
|
||||||
|
|
||||||
|
public override void ExposeData(EntitySerializer serializer)
|
||||||
|
{
|
||||||
|
base.ExposeData(serializer);
|
||||||
|
|
||||||
|
serializer.DataField(ref OpenSprite, "openstate", "Objects/door_ewo.png");
|
||||||
|
serializer.DataField(ref CloseSprite, "closestate", "Objects/door_ew.png");
|
||||||
|
}
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -26,12 +40,14 @@ namespace Content.Server.GameObjects
|
|||||||
|
|
||||||
collidableComponent = Owner.GetComponent<CollidableComponent>();
|
collidableComponent = Owner.GetComponent<CollidableComponent>();
|
||||||
collidableComponent.OnBump += OnBump;
|
collidableComponent.OnBump += OnBump;
|
||||||
|
spriteComponent = Owner.GetComponent<SpriteComponent>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnRemove()
|
public override void OnRemove()
|
||||||
{
|
{
|
||||||
collidableComponent.OnBump -= OnBump;
|
collidableComponent.OnBump -= OnBump;
|
||||||
collidableComponent = null;
|
collidableComponent = null;
|
||||||
|
spriteComponent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Attackhand(IEntity user)
|
public bool Attackhand(IEntity user)
|
||||||
@@ -62,6 +78,7 @@ namespace Content.Server.GameObjects
|
|||||||
{
|
{
|
||||||
Opened = true;
|
Opened = true;
|
||||||
collidableComponent.IsHardCollidable = false;
|
collidableComponent.IsHardCollidable = false;
|
||||||
|
spriteComponent.LayerSetTexture(0, OpenSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Close()
|
public bool Close()
|
||||||
@@ -74,14 +91,10 @@ namespace Content.Server.GameObjects
|
|||||||
Opened = false;
|
Opened = false;
|
||||||
OpenTimeCounter = 0;
|
OpenTimeCounter = 0;
|
||||||
collidableComponent.IsHardCollidable = true;
|
collidableComponent.IsHardCollidable = true;
|
||||||
|
spriteComponent.LayerSetTexture(0, CloseSprite);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ComponentState GetComponentState()
|
|
||||||
{
|
|
||||||
return new DoorComponentState(Opened);
|
|
||||||
}
|
|
||||||
|
|
||||||
private const float AUTO_CLOSE_DELAY = 5;
|
private const float AUTO_CLOSE_DELAY = 5;
|
||||||
public override void Update(float frameTime)
|
public override void Update(float frameTime)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class WelderComponent : ToolComponent, EntitySystems.IUse
|
class WelderComponent : ToolComponent, EntitySystems.IUse
|
||||||
{
|
{
|
||||||
|
SpriteComponent spriteComponent;
|
||||||
|
|
||||||
public override string Name => "Welder";
|
public override string Name => "Welder";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -41,6 +43,13 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools
|
|||||||
//private string OnSprite { get; set; }
|
//private string OnSprite { get; set; }
|
||||||
//private string OffSprite { get; set; }
|
//private string OffSprite { get; set; }
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
|
||||||
|
spriteComponent = Owner.GetComponent<SpriteComponent>();
|
||||||
|
}
|
||||||
|
|
||||||
public override void LoadParameters(YamlMappingNode mapping)
|
public override void LoadParameters(YamlMappingNode mapping)
|
||||||
{
|
{
|
||||||
base.LoadParameters(mapping);
|
base.LoadParameters(mapping);
|
||||||
@@ -72,9 +81,14 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools
|
|||||||
|
|
||||||
public override void Update(float frameTime)
|
public override void Update(float frameTime)
|
||||||
{
|
{
|
||||||
Fuel = Math.Min(Fuel - FuelLossRate, 0);
|
if (!Activated)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(Activated && Fuel == 0)
|
Fuel = Math.Max(Fuel - (FuelLossRate * frameTime), 0);
|
||||||
|
|
||||||
|
if (Fuel == 0)
|
||||||
{
|
{
|
||||||
ToggleStatus();
|
ToggleStatus();
|
||||||
}
|
}
|
||||||
@@ -106,18 +120,17 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool ToggleStatus()
|
public bool ToggleStatus()
|
||||||
{
|
{
|
||||||
if(Activated)
|
if (Activated)
|
||||||
{
|
{
|
||||||
Activated = false;
|
Activated = false;
|
||||||
|
// Layer 1 is the flame.
|
||||||
//TODO : Change sprite on deactivation
|
spriteComponent.LayerSetVisible(1, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if(CanActivate())
|
else if (CanActivate())
|
||||||
{
|
{
|
||||||
Activated = true;
|
Activated = true;
|
||||||
|
spriteComponent.LayerSetVisible(1, true);
|
||||||
//TODO : Change sprite on activation
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -64,7 +64,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="EntryPoint.cs" />
|
<Compile Include="EntryPoint.cs" />
|
||||||
<Compile Include="GameObjects\Components\Doors\SharedDoorComponent.cs" />
|
|
||||||
<Compile Include="GameObjects\Components\Inventory\EquipmentSlotDefinitions.cs" />
|
<Compile Include="GameObjects\Components\Inventory\EquipmentSlotDefinitions.cs" />
|
||||||
<Compile Include="GameObjects\Components\Inventory\InventoryTemplates.cs" />
|
<Compile Include="GameObjects\Components\Inventory\InventoryTemplates.cs" />
|
||||||
<Compile Include="GameObjects\Components\Inventory\SharedInventoryComponent.cs" />
|
<Compile Include="GameObjects\Components\Inventory\SharedInventoryComponent.cs" />
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
using System;
|
|
||||||
using SS14.Shared.GameObjects;
|
|
||||||
|
|
||||||
namespace Content.Shared.GameObjects
|
|
||||||
{
|
|
||||||
public abstract class SharedDoorComponent : Component
|
|
||||||
{
|
|
||||||
public override string Name => "Door";
|
|
||||||
public override uint? NetID => ContentNetIDs.DOOR;
|
|
||||||
public override Type StateType => typeof(DoorComponentState);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable]
|
|
||||||
public class DoorComponentState : ComponentState
|
|
||||||
{
|
|
||||||
public readonly bool Opened;
|
|
||||||
|
|
||||||
public DoorComponentState(bool opened) : base(ContentNetIDs.DOOR)
|
|
||||||
{
|
|
||||||
Opened = opened;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
public const uint DESTRUCTIBLE = 1001;
|
public const uint DESTRUCTIBLE = 1001;
|
||||||
public const uint TEMPERATURE = 1002;
|
public const uint TEMPERATURE = 1002;
|
||||||
public const uint HANDS = 1003;
|
public const uint HANDS = 1003;
|
||||||
public const uint DOOR = 1004;
|
|
||||||
public const uint STORAGE = 1005;
|
public const uint STORAGE = 1005;
|
||||||
public const uint INVENTORY = 1006;
|
public const uint INVENTORY = 1006;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,10 @@
|
|||||||
- type: Transform
|
- type: Transform
|
||||||
- type: Clickable
|
- type: Clickable
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprites:
|
texture: Items/shoes.png
|
||||||
- Items/shoes.png
|
|
||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Items/shoes.png
|
texture: Items/shoes.png
|
||||||
|
|
||||||
- type: Damageable
|
- type: Damageable
|
||||||
resistanceset: Standard
|
resistanceset: Standard
|
||||||
|
|||||||
@@ -16,9 +16,11 @@
|
|||||||
name: Shoes
|
name: Shoes
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Items/shoes.png
|
texture: Items/shoes.png
|
||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Items/shoes.png
|
texture: Items/shoes.png
|
||||||
|
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
- shoes
|
- shoes
|
||||||
@@ -29,9 +31,11 @@
|
|||||||
name: Janitor Jumpsuit
|
name: Janitor Jumpsuit
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Items/janitorsuit.png
|
texture: Items/janitorsuit.png
|
||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Items/janitorsuit.png
|
texture: Items/janitorsuit.png
|
||||||
|
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
- innerclothing
|
- innerclothing
|
||||||
@@ -42,9 +46,9 @@
|
|||||||
name: Security Vest
|
name: Security Vest
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/armorvest.png
|
texture: Clothing/armorvest.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Clothing/armorvest.png
|
texture: Clothing/armorvest.png
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
- outerclothing
|
- outerclothing
|
||||||
@@ -55,9 +59,9 @@
|
|||||||
name: Utility Belt
|
name: Utility Belt
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/belt_utility.png
|
texture: Clothing/belt_utility.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Clothing/belt_utility.png
|
texture: Clothing/belt_utility.png
|
||||||
Size: 30
|
Size: 30
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
@@ -71,9 +75,9 @@
|
|||||||
name: Backpack
|
name: Backpack
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/backpack.png
|
texture: Clothing/backpack.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Clothing/backpack.png
|
texture: Clothing/backpack.png
|
||||||
Size: 9999
|
Size: 9999
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
@@ -87,9 +91,9 @@
|
|||||||
name: Mesons
|
name: Mesons
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/glasses_meson.png
|
texture: Clothing/glasses_meson.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Clothing/glasses_meson.png
|
texture: Clothing/glasses_meson.png
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
- eyes
|
- eyes
|
||||||
@@ -100,9 +104,9 @@
|
|||||||
name: Insulated Gloves
|
name: Insulated Gloves
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/gloves_yellow.png
|
texture: Clothing/gloves_yellow.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Clothing/gloves_yellow.png
|
texture: Clothing/gloves_yellow.png
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
- gloves
|
- gloves
|
||||||
@@ -113,9 +117,9 @@
|
|||||||
name: Security Helmet
|
name: Security Helmet
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/helmet_sec.png
|
texture: Clothing/helmet_sec.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Clothing/helmet_sec.png
|
texture: Clothing/helmet_sec.png
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
- head
|
- head
|
||||||
@@ -126,9 +130,9 @@
|
|||||||
name: Gas Mask
|
name: Gas Mask
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/gasmask.png
|
texture: Clothing/gasmask.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Clothing/gasmask.png
|
texture: Clothing/gasmask.png
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
- mask
|
- mask
|
||||||
@@ -139,9 +143,9 @@
|
|||||||
name: Identification Card
|
name: Identification Card
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/idcard_standard.png
|
texture: Clothing/idcard_standard.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Clothing/idcard_standard.png
|
texture: Clothing/idcard_standard.png
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
- idcard
|
- idcard
|
||||||
@@ -152,9 +156,9 @@
|
|||||||
name: Headset Radio
|
name: Headset Radio
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/ears_headset.png
|
texture: Clothing/ears_headset.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Clothing/ears_headset.png
|
texture: Clothing/ears_headset.png
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Slots:
|
Slots:
|
||||||
- ears
|
- ears
|
||||||
@@ -6,12 +6,10 @@
|
|||||||
- type: Clickable
|
- type: Clickable
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: FloorPlaceable
|
drawdepth: FloorPlaceable
|
||||||
sprites:
|
texture: Objects/door_ew.png
|
||||||
- Objects/door_ew.png
|
|
||||||
- Objects/door_ewo.png
|
|
||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/door_ew.png
|
texture: Objects/door_ew.png
|
||||||
|
|
||||||
- type: BoundingBox
|
- type: BoundingBox
|
||||||
aabb: "1,-0.75,2,0.75"
|
aabb: "1,-0.75,2,0.75"
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
id: RedToolboxItem
|
id: RedToolboxItem
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Items/toolbox_r.png
|
texture: Items/toolbox_r.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Items/toolbox_r.png
|
texture: Items/toolbox_r.png
|
||||||
- type: Storage
|
- type: Storage
|
||||||
Capacity: 60
|
Capacity: 60
|
||||||
- type: Item
|
- type: Item
|
||||||
@@ -30,9 +30,9 @@
|
|||||||
id: BlueToolboxItem
|
id: BlueToolboxItem
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Items/toolbox_b.png
|
texture: Items/toolbox_b.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Items/toolbox_b.png
|
texture: Items/toolbox_b.png
|
||||||
- type: Storage
|
- type: Storage
|
||||||
Capacity: 60
|
Capacity: 60
|
||||||
- type: Item
|
- type: Item
|
||||||
@@ -44,9 +44,9 @@
|
|||||||
id: YellowToolboxItem
|
id: YellowToolboxItem
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Items/toolbox_y.png
|
texture: Items/toolbox_y.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Items/toolbox_y.png
|
texture: Items/toolbox_y.png
|
||||||
- type: Storage
|
- type: Storage
|
||||||
Capacity: 60
|
Capacity: 60
|
||||||
- type: Item
|
- type: Item
|
||||||
@@ -58,9 +58,9 @@
|
|||||||
id: MopItem
|
id: MopItem
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Items/mop.png
|
texture: Items/mop.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Items/mop.png
|
texture: Items/mop.png
|
||||||
- type: Item
|
- type: Item
|
||||||
Size: 10
|
Size: 10
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
id: FlashlightLantern
|
id: FlashlightLantern
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Items/Flashlight.png
|
texture: Items/Flashlight.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Items/Flashlight.png
|
texture: Items/Flashlight.png
|
||||||
- type: PointLight
|
- type: PointLight
|
||||||
|
|||||||
@@ -8,10 +8,9 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: FloorPlaceable
|
drawdepth: FloorPlaceable
|
||||||
color: Red
|
color: Red
|
||||||
sprites:
|
texture: Objects/eightdirwire.png
|
||||||
- Objects/eightdirwire.png
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/eightdirwire.png
|
texture: Objects/eightdirwire.png
|
||||||
- type: PowerTransfer
|
- type: PowerTransfer
|
||||||
|
|
||||||
snap:
|
snap:
|
||||||
@@ -34,10 +33,9 @@
|
|||||||
- type: BoundingBox
|
- type: BoundingBox
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: FloorPlaceable
|
drawdepth: FloorPlaceable
|
||||||
sprites:
|
texture: Objects/generator.png
|
||||||
- Objects/generator.png
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/generator.png
|
texture: Objects/generator.png
|
||||||
- type: PowerGenerator
|
- type: PowerGenerator
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -49,10 +47,9 @@
|
|||||||
- type: BoundingBox
|
- type: BoundingBox
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: FloorPlaceable
|
drawdepth: FloorPlaceable
|
||||||
sprites:
|
texture: Objects/provider.png
|
||||||
- Objects/provider.png
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/provider.png
|
texture: Objects/provider.png
|
||||||
- type: PowerProvider
|
- type: PowerProvider
|
||||||
Range: 5
|
Range: 5
|
||||||
Priority: Provider
|
Priority: Provider
|
||||||
@@ -78,10 +75,9 @@
|
|||||||
- type: BoundingBox
|
- type: BoundingBox
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: FloorPlaceable
|
drawdepth: FloorPlaceable
|
||||||
sprites:
|
texture: Objects/storage.png
|
||||||
- Objects/storage.png
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/storage.png
|
texture: Objects/storage.png
|
||||||
- type: PowerStorage
|
- type: PowerStorage
|
||||||
Capacity: 3000
|
Capacity: 3000
|
||||||
Charge: 1000
|
Charge: 1000
|
||||||
@@ -98,10 +94,9 @@
|
|||||||
- type: BoundingBox
|
- type: BoundingBox
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: FloorPlaceable
|
drawdepth: FloorPlaceable
|
||||||
sprites:
|
texture: Objects/wiredmachine.png
|
||||||
- Objects/wiredmachine.png
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/wiredmachine.png
|
texture: Objects/wiredmachine.png
|
||||||
- type: PowerDevice
|
- type: PowerDevice
|
||||||
Drawtype: Node
|
Drawtype: Node
|
||||||
Load: 100
|
Load: 100
|
||||||
@@ -116,10 +111,9 @@
|
|||||||
- type: BoundingBox
|
- type: BoundingBox
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: FloorPlaceable
|
drawdepth: FloorPlaceable
|
||||||
sprites:
|
texture: Objects/wirelessmachine.png
|
||||||
- Objects/wirelessmachine.png
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/wirelessmachine.png
|
texture: Objects/wirelessmachine.png
|
||||||
- type: PowerDevice
|
- type: PowerDevice
|
||||||
Drawtype: Both
|
Drawtype: Both
|
||||||
Load: 200
|
Load: 200
|
||||||
|
|||||||
@@ -4,10 +4,13 @@
|
|||||||
components:
|
components:
|
||||||
- type: Transform
|
- type: Transform
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
|
directional: false
|
||||||
drawdepth: FloorPlaceable
|
drawdepth: FloorPlaceable
|
||||||
sprite: Objects/projectilebullet.png
|
texture: Objects/projectilebullet.png
|
||||||
|
rotation: 180
|
||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/projectilebullet.png
|
texture: Objects/projectilebullet.png
|
||||||
- type: BoundingBox
|
- type: BoundingBox
|
||||||
- type: Physics
|
- type: Physics
|
||||||
edgeslide: false
|
edgeslide: false
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
components:
|
components:
|
||||||
- type: Wirecutter
|
- type: Wirecutter
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/wirecutter.png
|
texture: Objects/wirecutter.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/wirecutter.png
|
texture: Objects/wirecutter.png
|
||||||
- type: MeleeWeapon
|
- type: MeleeWeapon
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -17,9 +17,9 @@
|
|||||||
components:
|
components:
|
||||||
- type: Screwdriver
|
- type: Screwdriver
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/screwdriver.png
|
texture: Objects/screwdriver.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/screwdriver.png
|
texture: Objects/screwdriver.png
|
||||||
- type: MeleeWeapon
|
- type: MeleeWeapon
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -29,9 +29,16 @@
|
|||||||
components:
|
components:
|
||||||
- type: Welder
|
- type: Welder
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/welder.png
|
sprite: Objects/tools.rsi
|
||||||
|
layers:
|
||||||
|
- state: welder
|
||||||
|
- state: welder_flame
|
||||||
|
shader: unshaded
|
||||||
|
visible: false
|
||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/welder.png
|
sprite: Objects/tools.rsi
|
||||||
|
state: welder
|
||||||
- type: MeleeWeapon
|
- type: MeleeWeapon
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -41,9 +48,9 @@
|
|||||||
components:
|
components:
|
||||||
- type: Wrench
|
- type: Wrench
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/wrench.png
|
texture: Objects/wrench.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/wrench.png
|
texture: Objects/wrench.png
|
||||||
- type: MeleeWeapon
|
- type: MeleeWeapon
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -53,9 +60,9 @@
|
|||||||
components:
|
components:
|
||||||
- type: Crowbar
|
- type: Crowbar
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/crowbar.png
|
texture: Objects/crowbar.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/crowbar.png
|
texture: Objects/crowbar.png
|
||||||
- type: MeleeWeapon
|
- type: MeleeWeapon
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -65,6 +72,6 @@
|
|||||||
components:
|
components:
|
||||||
- type: Multitool
|
- type: Multitool
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/multitool.png
|
texture: Objects/multitool.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/multitool.png
|
texture: Objects/multitool.png
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
- type: BoundingBox
|
- type: BoundingBox
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: FloorPlaceable
|
drawdepth: FloorPlaceable
|
||||||
sprites:
|
texture: Buildings/TurrBase.png
|
||||||
- TurrBase
|
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: TurretTopGun
|
id: TurretTopGun
|
||||||
@@ -19,8 +18,7 @@
|
|||||||
- type: BoundingBox
|
- type: BoundingBox
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: WallMountedItems
|
drawdepth: WallMountedItems
|
||||||
sprites:
|
texture: Buildings/TurrTop.png
|
||||||
- TurrTop
|
|
||||||
- type: AiController
|
- type: AiController
|
||||||
logic: AimShootLife
|
logic: AimShootLife
|
||||||
vision: 6.0
|
vision: 6.0
|
||||||
@@ -34,8 +32,7 @@
|
|||||||
- type: BoundingBox
|
- type: BoundingBox
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: WallMountedItems
|
drawdepth: WallMountedItems
|
||||||
sprites:
|
texture: Buildings/TurrLamp.png
|
||||||
- TurrLamp
|
|
||||||
- type: AiController
|
- type: AiController
|
||||||
logic: AimShootLife
|
logic: AimShootLife
|
||||||
vision: 6.0
|
vision: 6.0
|
||||||
@@ -43,4 +40,3 @@
|
|||||||
radius: 512
|
radius: 512
|
||||||
mask: flashlight_mask
|
mask: flashlight_mask
|
||||||
autoRot: true
|
autoRot: true
|
||||||
|
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
id: LaserItem
|
id: LaserItem
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/gun.png
|
texture: Objects/gun.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/gun.png
|
texture: Objects/gun.png
|
||||||
- type: HitscanWeapon
|
- type: HitscanWeapon
|
||||||
- type: Item
|
- type: Item
|
||||||
Size: 24
|
Size: 24
|
||||||
@@ -17,9 +17,9 @@
|
|||||||
id: GUNITEM
|
id: GUNITEM
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/projectileweapon.png
|
texture: Objects/projectileweapon.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Objects/projectileweapon.png
|
texture: Objects/projectileweapon.png
|
||||||
- type: ProjectileWeapon
|
- type: ProjectileWeapon
|
||||||
- type: Item
|
- type: Item
|
||||||
Size: 24
|
Size: 24
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
- type: Transform
|
- type: Transform
|
||||||
- type: Clickable
|
- type: Clickable
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Items/medkit_r.png
|
texture: Items/medkit_r.png
|
||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
icon: Items/medkit_r.png
|
texture: Items/medkit_r.png
|
||||||
|
|
||||||
|
|||||||
32
Resources/Textures/Objects/tools.rsi/meta.json
Normal file
32
Resources/Textures/Objects/tools.rsi/meta.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"size": {
|
||||||
|
"x": 32,
|
||||||
|
"y": 32
|
||||||
|
},
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "welder",
|
||||||
|
"select": [],
|
||||||
|
"flags": {},
|
||||||
|
"directions": 1,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
1.0
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "welder_flame",
|
||||||
|
"select": [],
|
||||||
|
"flags": {},
|
||||||
|
"directions": 1,
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
0.2,
|
||||||
|
0.1
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
Resources/Textures/Objects/tools.rsi/welder.png
Normal file
BIN
Resources/Textures/Objects/tools.rsi/welder.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 527 B |
BIN
Resources/Textures/Objects/tools.rsi/welder_flame.png
Normal file
BIN
Resources/Textures/Objects/tools.rsi/welder_flame.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 181 B |
2
engine
2
engine
Submodule engine updated: 9aed85b4c7...4471e0ccca
Reference in New Issue
Block a user