-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Pious trait, blessing water/blood requires faith (#1486)
* faith injector, holywater reaction needs BibleUser * Curly brace on newline, not same line * Remove suffix from faith implanter * BibleUserImplantComponent: newline at EOF, comment * Add Pious trait, remove vendor/loadout faith impl. * Cleanup, remove PacifiedUser variable * Add bible to Contractor tools * tools.yml: fix faith implanter location * Bible: T2 contractor gear * tools.yml: add name, description, bible preview * Bible: name, description, preview, 5k spesos
- Loading branch information
Showing
12 changed files
with
155 additions
and
6 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
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,38 @@ | ||
using Content.Shared.Implants; | ||
using Content.Shared.Implants.Components; | ||
using Content.Server.Bible.Components; | ||
using Robust.Shared.Containers; | ||
|
||
namespace Content.Server.Implants; | ||
|
||
public sealed class BibleUserImplantSystem : EntitySystem | ||
{ | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<BibleUserImplantComponent, ImplantImplantedEvent>(OnInsert); | ||
// We need to remove the BibleUserComponent from the owner before the implant | ||
// is removed, so we need to execute before the SubdermalImplantSystem. | ||
SubscribeLocalEvent<BibleUserImplantComponent, EntGotRemovedFromContainerMessage>(OnRemove, before: new[] { typeof(SubdermalImplantSystem) }); | ||
} | ||
|
||
private void OnInsert(EntityUid uid, BibleUserImplantComponent component, ImplantImplantedEvent args) | ||
{ | ||
if (!args.Implanted.HasValue) | ||
return; | ||
|
||
var bibleUserComp = EnsureComp<BibleUserComponent>(args.Implanted.Value); | ||
Dirty(args.Implanted.Value, bibleUserComp); | ||
} | ||
|
||
// Currently permanent, but should support removal if/when a viable solution is found. | ||
private void OnRemove(EntityUid uid, BibleUserImplantComponent component, EntGotRemovedFromContainerMessage args) | ||
{ | ||
if (!TryComp<SubdermalImplantComponent>(uid, out var implanted) || implanted.ImplantedEntity == null) | ||
return; | ||
|
||
RemComp<BibleUserComponent>(implanted.ImplantedEntity.Value); | ||
} | ||
} |
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 @@ | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.Implants.Components; | ||
|
||
/// <summary> | ||
/// Implant to get BibleUser status (to pray, summon familiars, bless with bibles) | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class BibleUserImplantComponent : Component | ||
{ | ||
} |
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 @@ | ||
bible-summon-request-failed = You don't feel worthy enough... | ||
bible-bless-solution-failed = You don't feel worthy enough... |
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
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 @@ | ||
- type: trait | ||
id: Pious | ||
name: trait-pious-name | ||
description: trait-pious-desc | ||
traitGear: Bible | ||
components: | ||
- type: BibleUser | ||
- type: Pacified # if this wasn't so debilitating, this trait would be elsewhere |