Icon smoothing for asteroid rocks (#8058)

Co-authored-by: Tomeno <tomeno@lulzsec.co.uk>
This commit is contained in:
Tomeno 2022-05-10 02:41:28 +02:00 committed by GitHub
parent 7f09c1ef1e
commit 73d2e9043f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 5 additions and 61 deletions

View File

@ -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);
}
}
}
}

View File

@ -1,11 +0,0 @@
using System;
using Robust.Shared.Serialization;
namespace Content.Shared.Mining
{
[Serializable, NetSerializable]
public enum AsteroidRockVisuals
{
State
}
}

View File

@ -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

View File

@ -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_

Binary file not shown.

Before

Width:  |  Height:  |  Size: 947 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

View File

@ -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"}]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB