demiplane hints (#1011)

* demiplane hints

* lava update

* water resprite

* Update demiplane_hint.yml
This commit is contained in:
Ed
2025-03-12 15:22:14 +03:00
committed by GitHub
parent 93ed28d34c
commit 0616d552f2
26 changed files with 131 additions and 2 deletions

View File

@@ -2,7 +2,6 @@ using Content.Shared._CP14.Demiplane.Components;
using Content.Shared._CP14.DemiplaneTraveling;
using Content.Shared.DoAfter;
using Content.Shared.Interaction;
using Robust.Shared.Player;
using Robust.Shared.Serialization;
namespace Content.Shared._CP14.Demiplane;
@@ -10,11 +9,35 @@ namespace Content.Shared._CP14.Demiplane;
public abstract partial class CP14SharedDemiplaneSystem : EntitySystem
{
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<CP14DemiplaneRiftOpenedComponent, InteractHandEvent>(OnDemiplanePasswayInteract);
SubscribeLocalEvent<CP14DemiplaneHintComponent, MapInitEvent>(OnDemiplaneHintMapInit);
}
private void OnDemiplaneHintMapInit(Entity<CP14DemiplaneHintComponent> ent, ref MapInitEvent args)
{
var query = EntityQueryEnumerator<CP14DemiplaneRiftOpenedComponent, TransformComponent>();
var xformHint = Transform(ent);
var hintPos = _transform.GetWorldPosition(xformHint);
while (query.MoveNext(out _, out _, out var xformRift))
{
if (xformRift.MapUid != xformHint.MapUid)
continue;
var riftPos = _transform.GetWorldPosition(xformRift);
//Calculate the rotation
Angle angle = new(riftPos - hintPos);
_transform.SetWorldRotation(ent, angle + Angle.FromDegrees(90));
break;
}
}
private void OnDemiplanePasswayInteract(Entity<CP14DemiplaneRiftOpenedComponent> passway, ref InteractHandEvent args)

View File

@@ -0,0 +1,11 @@
namespace Content.Shared._CP14.Demiplane.Components;
using Demiplane;
/// <summary>
/// A very small and silly component that simply turns the entity toward the nearest demiplane rift
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedDemiplaneSystem))]
public sealed partial class CP14DemiplaneHintComponent : Component
{
}

View File

@@ -0,0 +1,30 @@
- type: entity
id: CP14DemiplaneHint
name: astral crack
description: Those cracks always lead to a way out of the damn place
categories: [ ForkFiltered ]
placement:
mode: SnapgridCenter
components:
- type: Clickable
- type: Sprite
sprite: /Textures/_CP14/Structures/Flora/demiplane_cracks.rsi
layers:
- state: crack3
shader: unshaded
drawdepth: LowFloors
- type: SyncSprite
- type: RequiresTile
- type: CP14DemiplaneHint
- type: RandomSprite
available:
- 0:
crack: ""
crack2: ""
crack3: ""
crack4: ""
- type: PointLight
netSync: false
radius: 1.3
color: "#c6529f"
energy: 1

View File

@@ -14,9 +14,19 @@
layers:
- !type:OreDunGen
entity: CP14DemiplanePassway
count: 2
count: 1
minGroupSize: 1
maxGroupSize: 1
- !type:OreDunGen
entity: CP14DemiplaneHint
count: 20
minGroupSize: 1
maxGroupSize: 1
- !type:OreDunGen
entity: CP14AstralCorrosion
count: 15
minGroupSize: 3
maxGroupSize: 10
- type: cp14DemiplaneModifier
id: TimeLimit10

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

View File

@@ -0,0 +1,55 @@
{
"version": 1,
"license": "CC-BY-SA-4.0",
"copyright": "Created by TheShuEd (Github) ",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "crack",
"delays": [
[
2,
2,
2,
2
]
]
},
{
"name": "crack2",
"delays": [
[
2,
2,
2,
2
]
]
},
{
"name": "crack3",
"delays": [
[
2,
2,
2,
2
]
]
},
{
"name": "crack4",
"delays": [
[
2,
2,
2,
2
]
]
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB