-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from Evgencheg/master
важное
- Loading branch information
Showing
28 changed files
with
295 additions
and
189 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Content.Shared.Chemistry.Reagent; | ||
using Content.Shared.Mood; | ||
using JetBrains.Annotations; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Server.Chemistry.ReagentEffects; | ||
|
||
/// <summary> | ||
/// Adds a moodlet to an entity. | ||
/// </summary> | ||
[UsedImplicitly] | ||
public sealed partial class ChemAddMoodlet : ReagentEffect | ||
{ | ||
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) | ||
{ | ||
var protoMan = IoCManager.Resolve<IPrototypeManager>(); | ||
return Loc.GetString("reagent-effect-guidebook-add-moodlet", | ||
("amount", protoMan.Index<MoodEffectPrototype>(MoodPrototype.Id).MoodChange), | ||
("timeout", protoMan.Index<MoodEffectPrototype>(MoodPrototype.Id).Timeout)); | ||
} | ||
|
||
/// <summary> | ||
/// The mood prototype to be applied to the using entity. | ||
/// </summary> | ||
[DataField(required: true)] | ||
public ProtoId<MoodEffectPrototype> MoodPrototype = default!; | ||
|
||
public override void Effect(ReagentEffectArgs args) | ||
{ | ||
var entityManager = IoCManager.Resolve<EntityManager>(); | ||
var ev = new MoodEffectEvent(MoodPrototype); | ||
entityManager.EventBus.RaiseLocalEvent(args.SolutionEntity, ev); | ||
} | ||
} |
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,7 @@ | ||
using Content.Shared.Containers.ItemSlots; | ||
using Content.Shared.Power; | ||
|
||
namespace Content.Server.Power.Components; | ||
|
||
[RegisterComponent] | ||
public sealed partial class ActiveChargerComponent : Component { } |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.