-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
293 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
Content.Server/_White/DespawnOnLandItem/DespawnOnLandItemComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Content.Server._White.DespawnOnLandItem; | ||
|
||
[RegisterComponent] | ||
public sealed partial class DespawnOnLandItemComponent : Component | ||
{ | ||
[DataField] | ||
public float TimeDespawnOnLand = 3f; | ||
} |
33 changes: 33 additions & 0 deletions
33
Content.Server/_White/DespawnOnLandItem/DespawnOnLandItemSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Content.Shared.Body.Components; | ||
using Content.Shared.Interaction.Events; | ||
using Content.Shared.OfferItem; | ||
using Robust.Shared.Containers; | ||
using Robust.Shared.Spawners; | ||
|
||
namespace Content.Server._White.DespawnOnLandItem; | ||
|
||
public sealed class DespawnOnLandItemSystem : EntitySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
SubscribeLocalEvent<DespawnOnLandItemComponent, DroppedEvent>(OnDrop); | ||
SubscribeLocalEvent<DespawnOnLandItemComponent, HandedEvent>(OnHanded); | ||
SubscribeLocalEvent<DespawnOnLandItemComponent, EntGotInsertedIntoContainerMessage>(OnInsert); | ||
} | ||
|
||
private void OnDrop(EntityUid uid, DespawnOnLandItemComponent component, DroppedEvent args) | ||
{ | ||
EnsureComp<TimedDespawnComponent>(uid).Lifetime = component.TimeDespawnOnLand; | ||
} | ||
|
||
private void OnHanded(EntityUid uid, DespawnOnLandItemComponent component, HandedEvent args) | ||
{ | ||
EnsureComp<TimedDespawnComponent>(uid).Lifetime = component.TimeDespawnOnLand; | ||
} | ||
|
||
private void OnInsert(EntityUid uid, DespawnOnLandItemComponent component, EntGotInsertedIntoContainerMessage args) | ||
{ | ||
if (!HasComp<BodyComponent>(args.Container.Owner)) | ||
EnsureComp<TimedDespawnComponent>(uid).Lifetime = component.TimeDespawnOnLand; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Content.Server/_White/Implants/Spawn/SpawnImplantComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Robust.Shared.Audio; | ||
|
||
namespace Content.Server._White.Implants.Spawn; | ||
|
||
[RegisterComponent] | ||
public sealed partial class SpawnImplantComponent : Component | ||
{ | ||
[DataField(required: true)] | ||
public string SpawnId = string.Empty; | ||
|
||
[DataField] | ||
public SoundSpecifier SoundOnSpawn = new SoundPathSpecifier("/Audio/Weapons/ebladeon.ogg"); | ||
} |
34 changes: 34 additions & 0 deletions
34
Content.Server/_White/Implants/Spawn/SpawnImplantSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Content.Shared.Hands.EntitySystems; | ||
using Content.Shared.Implants.Components; | ||
using Robust.Shared.Audio.Systems; | ||
|
||
namespace Content.Server._White.Implants.Spawn; | ||
|
||
public sealed class SpawnImplantSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedHandsSystem _hands = default!; | ||
[Dependency] private readonly SharedAudioSystem _audio = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
SubscribeLocalEvent<SubdermalImplantComponent, ActivateSpawnImplantEvent>(OnImplantActivate); | ||
} | ||
|
||
private void OnImplantActivate(EntityUid uid, SubdermalImplantComponent component, ActivateSpawnImplantEvent args) | ||
{ | ||
if (!TryComp(uid, out SpawnImplantComponent? implant) | ||
|| !TryComp(component.ImplantedEntity, out TransformComponent? transform)) | ||
return; | ||
|
||
var spear = EntityManager.SpawnEntity(implant.SpawnId, transform.Coordinates); | ||
|
||
if (_hands.TryPickupAnyHand(component.ImplantedEntity.Value, spear)) | ||
{ | ||
_audio.PlayPvs(implant.SoundOnSpawn, spear); | ||
args.Handled = true; | ||
return; | ||
} | ||
|
||
Del(spear); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
Content.Server/_White/Throwing/ThrowingItemModifierComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Content.Server._White.Throwing; | ||
|
||
[RegisterComponent] | ||
public sealed partial class ThrowingItemModifierComponent : Component | ||
{ | ||
[DataField] | ||
public float ThrowingMultiplier = 2.0f; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ent-ActivateHardlightSpearImplant = Создать световое копьё | ||
.desc = Создает световое копьё в ваших руках. |
3 changes: 3 additions & 0 deletions
3
Resources/Locale/ru-RU/_white/prototypes/entities/objects/misc/implanters.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ent-HardlightSpearImplanter = { ent-BaseImplanter } | ||
.desc = { ent-BaseImplanter.desc } | ||
.suffix = световое копьё |
2 changes: 2 additions & 0 deletions
2
Resources/Locale/ru-RU/_white/prototypes/entities/objects/misc/subdermal_implants.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ent-HardlightSpearImplant = имплант световое копьё | ||
.desc = Этот имплант создаёт световое копьё в ваших руках. |
2 changes: 2 additions & 0 deletions
2
Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/melee/spear.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ent-HardlightSpear = световое копьё | ||
.desc = Копьё из твердого света. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
- type: entity | ||
id: ActivateHardlightSpearImplant | ||
name: Create hardlight spear | ||
description: Creates hardlight spear in your hands. | ||
noSpawn: true | ||
components: | ||
- type: InstantAction | ||
useDelay: 1.5 | ||
itemIconStyle: BigAction | ||
priority: -20 | ||
icon: | ||
sprite: _White/Objects/Weapons/Melee/Spear/hardlight_spear.rsi | ||
state: spear | ||
event: !type:ActivateSpawnImplantEvent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Resources/Prototypes/_White/Entities/Objects/Misc/implanters.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- type: entity | ||
id: HardlightSpearImplanter | ||
name: hardlight spear implanter | ||
parent: BaseImplantOnlyImplanterSyndi | ||
components: | ||
- type: Implanter | ||
implant: HardlightSpearImplant |
11 changes: 11 additions & 0 deletions
11
Resources/Prototypes/_White/Entities/Objects/Misc/subdermal_implants.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- type: entity | ||
parent: BaseSubdermalImplant | ||
id: HardlightSpearImplant | ||
name: hardlight spear implant | ||
description: This implant creates hardlight spear in your hands. | ||
noSpawn: true | ||
components: | ||
- type: SubdermalImplant | ||
implantAction: ActivateHardlightSpearImplant | ||
- type: SpawnImplant | ||
spawnId: HardlightSpear |
57 changes: 57 additions & 0 deletions
57
Resources/Prototypes/_White/Entities/Objects/Weapons/Melee/spear.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
- type: entity | ||
name: hardlight spear | ||
parent: Spear | ||
id: HardlightSpear | ||
description: A spear made out of hardened light. | ||
components: | ||
- type: Sprite | ||
sprite: _White/Objects/Weapons/Melee/Spear/hardlight_spear.rsi | ||
- type: MeleeWeapon | ||
damage: | ||
types: | ||
Piercing: 18 | ||
Heat: 18 | ||
soundHit: | ||
path: /Audio/Weapons/smash.ogg | ||
- type: DamageOtherOnHit | ||
damage: | ||
types: | ||
Piercing: 20 | ||
Heat: 20 | ||
- type: Wieldable | ||
- type: IncreaseDamageOnWield | ||
damage: | ||
types: | ||
Piercing: 4 | ||
Heat: 4 | ||
- type: Destructible | ||
thresholds: | ||
- trigger: | ||
!type:DamageTrigger | ||
damage: 30 | ||
behaviors: | ||
- !type:DoActsBehavior | ||
acts: [ "Destruction" ] | ||
- type: EmbeddableProjectile | ||
offset: 0.15,0.15 | ||
deleteOnRemove: true | ||
- type: DespawnOnLandItem | ||
- type: ThrowingItemModifier | ||
- type: PointLight | ||
radius: 1.5 | ||
energy: 2 | ||
color: yellow | ||
- type: Fixtures | ||
fixtures: | ||
fix1: | ||
shape: !type:PolygonShape | ||
vertices: | ||
- -0.20,-0.10 | ||
- -0.10,-0.20 | ||
- 0.40,0.30 | ||
- 0.30,0.40 | ||
density: 20 | ||
mask: | ||
- Opaque | ||
restitution: 0.3 | ||
friction: 0.2 |
Binary file added
BIN
+324 Bytes
...es/_White/Objects/Weapons/Melee/Spear/hardlight_spear.rsi/equipped-BACKPACK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+640 Bytes
...Textures/_White/Objects/Weapons/Melee/Spear/hardlight_spear.rsi/inhand-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+649 Bytes
...extures/_White/Objects/Weapons/Melee/Spear/hardlight_spear.rsi/inhand-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.