Ice bow artifact (#1200)

* pvs

* fix tradepost

* ice bow artifact
This commit is contained in:
Ed
2025-04-19 17:24:57 +03:00
committed by GitHub
parent 000a064140
commit f787bb5ea4
23 changed files with 103 additions and 36 deletions

View File

@@ -16,7 +16,7 @@ public sealed class CP14EdSystem : EntitySystem
_cfg.SetCVar(CVars.EntitiesCategoryFilter, "ForkFiltered");
_cfg.OnValueChanged(CCVars.Language, OnLanguageChange, true);
_cfg.SetCVar(CVars.LocCultureName, _cfg.GetCVar(CCVars.Language));
}

View File

@@ -1,6 +0,0 @@
namespace Content.Server._CP14.Lighthouse;
[RegisterComponent]
public sealed partial class CP14LighthouseComponent : Component
{
}

View File

@@ -1,23 +0,0 @@
using Robust.Server.GameStates;
namespace Content.Server._CP14.Lighthouse;
public sealed partial class CP14LighthouseSystem : EntitySystem
{
[Dependency] private readonly PvsOverrideSystem _pvs = default!;
public override void Initialize()
{
SubscribeLocalEvent<CP14LighthouseComponent, ComponentStartup>(OnLighthouseStartup);
SubscribeLocalEvent<CP14LighthouseComponent, ComponentShutdown>(OnLighthouseShutdown);
}
private void OnLighthouseShutdown(Entity<CP14LighthouseComponent> ent, ref ComponentShutdown args)
{
_pvs.RemoveGlobalOverride(ent);
}
private void OnLighthouseStartup(Entity<CP14LighthouseComponent> ent, ref ComponentStartup args)
{
_pvs.AddGlobalOverride(ent);
}
}

View File

@@ -0,0 +1,6 @@
namespace Content.Server._CP14.PVS;
[RegisterComponent]
public sealed partial class CP14PvsOverrideComponent : Component
{
}

View File

@@ -0,0 +1,23 @@
using Robust.Server.GameStates;
namespace Content.Server._CP14.PVS;
public sealed partial class CP14PvsOverrideSystem : EntitySystem
{
[Dependency] private readonly PvsOverrideSystem _pvs = default!;
public override void Initialize()
{
SubscribeLocalEvent<CP14PvsOverrideComponent, ComponentStartup>(OnLighthouseStartup);
SubscribeLocalEvent<CP14PvsOverrideComponent, ComponentShutdown>(OnLighthouseShutdown);
}
private void OnLighthouseShutdown(Entity<CP14PvsOverrideComponent> ent, ref ComponentShutdown args)
{
_pvs.RemoveGlobalOverride(ent);
}
private void OnLighthouseStartup(Entity<CP14PvsOverrideComponent> ent, ref ComponentStartup args)
{
_pvs.AddGlobalOverride(ent);
}
}

View File

@@ -2,6 +2,7 @@ using System.Linq;
using Content.Shared._CP14.UniqueLoot;
using Content.Shared.GameTicking;
using Content.Shared.Tag;
using Robust.Client.GameObjects;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
@@ -11,6 +12,7 @@ public sealed partial class CP14UniqueLootSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
private readonly Dictionary<CP14UniqueLootPrototype, int> _uniqueLootCount = new();
@@ -37,7 +39,8 @@ public sealed partial class CP14UniqueLootSystem : EntitySystem
var coords = Transform(ent).Coordinates;
EntityManager.SpawnEntity(loot, coords);
var spawned = Spawn(loot, coords);
_transform.SetWorldRotation(spawned, _transform.GetWorldRotation(ent));
}

View File

@@ -2,7 +2,7 @@
enabled = true
[localization]
language = "ru-RU"
language = "en-US"
[log]
path = "logs"

View File

@@ -7,7 +7,7 @@
sprite: _CP14/Actions/Spells/water.rsi
state: ice_arrow
- type: CP14MagicEffectManaCost
manaCost: 20
manaCost: 15
- type: CP14MagicEffect
effects:
- !type:CP14SpellSpawnEntityOnTarget

View File

@@ -26,7 +26,7 @@
netsync: false
- type: LightFade
duration: 1
- type: CP14Lighthouse
- type: CP14PvsOverride
- type: CP14AreaEntityEffect
range: 1
effects:

View File

@@ -122,7 +122,7 @@
name: wendigo ritual far sound
categories: [ ForkFiltered ]
components:
- type: CP14Lighthouse
- type: CP14PvsOverride
- type: TriggerOnSpawn
- type: CP14FarSound
closeSound:

View File

@@ -78,3 +78,18 @@
base:
True: { state: wielded }
False: { state: unwielded }
- type: entity
name: ice bow
description: A magic bow that needs no ammunition.
id: CP14BowIceArtifact
parent: CP14BowCombat
categories: [ DoNotMap ]
suffix: Artifact
components:
- type: Sprite
sprite: _CP14/Objects/Weapons/Ranged/ice_bow.rsi
- type: CP14SpellStorage
spells:
- CP14ActionSpellIceArrow
- type: CP14SpellStorageAccessHolding

View File

@@ -5,7 +5,7 @@
description: Light in the darkness.
categories: [ ForkFiltered ]
components:
- type: CP14Lighthouse
- type: CP14PvsOverride
- type: Sprite
noRot: true
sprite: Structures/Decoration/bonfire.rsi

View File

@@ -41,4 +41,10 @@
id: CP14ClothingShoesArtifactFrogs
entity: CP14ClothingShoesArtifactFrogs
tags:
- CP14UniqueSpawnDemiplanetLoot
- type: uniqueSpawn
id: CP14BowIceArtifact
entity: CP14BowIceArtifact
tags:
- CP14UniqueSpawnDemiplanetLoot

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

View File

@@ -0,0 +1,43 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Sprited by discord: odlieerr, recolored into Ice variant by TheShuEd",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "unwielded"
},
{
"name": "unwielded-arrow"
},
{
"name": "wielded"
},
{
"name": "wielded-arrow"
},
{
"name": "equipped-NECK",
"directions": 4
},
{
"name": "inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"directions": 4
},
{
"name": "wielded-inhand-left",
"directions": 4
},
{
"name": "wielded-inhand-right",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B