Icon smoothing for asteroid rocks (#8058)
Co-authored-by: Tomeno <tomeno@lulzsec.co.uk>
|
|
@ -1,39 +0,0 @@
|
|||
using Content.Shared.Mining;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Client.Mining
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class AsteroidRockVisualizer : AppearanceVisualizer
|
||||
{
|
||||
[DataField("layer")]
|
||||
private int Layer { get; } = 0;
|
||||
|
||||
public override void InitializeEntity(EntityUid entity)
|
||||
{
|
||||
base.InitializeEntity(entity);
|
||||
|
||||
IoCManager.Resolve<IEntityManager>().GetComponentOrNull<SpriteComponent>(entity)?.LayerMapReserveBlank(Layer);
|
||||
}
|
||||
|
||||
public override void OnChangeData(AppearanceComponent component)
|
||||
{
|
||||
base.OnChangeData(component);
|
||||
|
||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(component.Owner, out SpriteComponent? sprite))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.TryGetData(AsteroidRockVisuals.State, out string state))
|
||||
{
|
||||
sprite.LayerMapReserveBlank(Layer);
|
||||
sprite.LayerSetState(0, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
using System;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Mining
|
||||
{
|
||||
[Serializable, NetSerializable]
|
||||
public enum AsteroidRockVisuals
|
||||
{
|
||||
State
|
||||
}
|
||||
}
|
||||
|
|
@ -76,9 +76,6 @@
|
|||
- type: MovementSpeedModifier
|
||||
baseWalkSpeed : 7
|
||||
baseSprintSpeed : 7
|
||||
- type: RandomAppearance
|
||||
# relic
|
||||
key: enum.AsteroidRockVisuals.State
|
||||
- type: Sprite
|
||||
drawdepth: Mobs
|
||||
layers:
|
||||
|
|
@ -414,7 +411,6 @@
|
|||
normal: crab
|
||||
crit: dead
|
||||
dead: dead
|
||||
- type: AsteroidRockVisualizer
|
||||
- type: Butcherable
|
||||
spawned:
|
||||
- id: FoodMeatCrab
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
name: asteroid rock
|
||||
description: An asteroid.
|
||||
components:
|
||||
- type: RandomAppearance
|
||||
key: enum.AsteroidRockVisuals.State
|
||||
- type: Mineable
|
||||
ores:
|
||||
- id: SteelOre1
|
||||
|
|
@ -28,7 +26,7 @@
|
|||
orGroup: Asteroid
|
||||
- type: Sprite
|
||||
sprite: Structures/Walls/asteroid_rock.rsi
|
||||
state: 0
|
||||
state: full
|
||||
- type: Damageable
|
||||
damageContainer: Inorganic
|
||||
- type: Destructible
|
||||
|
|
@ -43,9 +41,6 @@
|
|||
sizeX: 32
|
||||
sizeY: 32
|
||||
- type: Airtight
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: AsteroidRockVisualizer
|
||||
- type: Fixtures
|
||||
fixtures:
|
||||
- shape:
|
||||
|
|
@ -59,3 +54,6 @@
|
|||
- Impassable
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
- type: IconSmooth
|
||||
key: rock
|
||||
base: rock_
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 947 B |
|
Before Width: | Height: | Size: 941 B |
|
Before Width: | Height: | Size: 899 B |
|
Before Width: | Height: | Size: 941 B |
|
Before Width: | Height: | Size: 923 B |
|
After Width: | Height: | Size: 924 B |
|
|
@ -1 +1 @@
|
|||
{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "0", "delays": [[1.0]]}, {"name": "1", "delays": [[1.0]]}, {"name": "2", "delays": [[1.0]]}, {"name": "3", "delays": [[1.0]]}, {"name": "4", "delays": [[1.0]]}]}
|
||||
{"version": 1, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/commit/a0c067f688288aeb167157203e2170b14cfa9d7f", "size": {"x": 32, "y": 32}, "states": [{"name": "rock_0", "directions": 4}, {"name": "rock_1", "directions": 4}, {"name": "rock_2", "directions": 4}, {"name": "rock_3", "directions": 4}, {"name": "rock_4", "directions": 4}, {"name": "rock_5", "directions": 4}, {"name": "rock_6", "directions": 4}, {"name": "rock_7", "directions": 4}, {"name": "full"}]}
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |