-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into chinalake2
- Loading branch information
Showing
35 changed files
with
372 additions
and
89 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
Content.Server/DeltaV/Objectives/Components/TeachLessonConditionComponent.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,10 @@ | ||
using Content.Server.Objectives.Systems; | ||
|
||
namespace Content.Server.Objectives.Components; | ||
|
||
/// <summary> | ||
/// Requires that a target dies once and only once. | ||
/// Depends on <see cref="TargetObjectiveComponent"/> to function. | ||
/// </summary> | ||
[RegisterComponent, Access(typeof(TeachLessonConditionSystem))] | ||
public sealed partial class TeachLessonConditionComponent : Component; |
48 changes: 48 additions & 0 deletions
48
Content.Server/DeltaV/Objectives/Systems/TeachLessonConditionSystem.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,48 @@ | ||
using Content.Server.Objectives.Components; | ||
using Content.Shared.GameTicking; | ||
using Content.Shared.Mind; | ||
using Content.Shared.Objectives.Components; | ||
|
||
namespace Content.Server.Objectives.Systems; | ||
|
||
/// <summary> | ||
/// Handles teach a lesson condition logic, does not assign target. | ||
/// </summary> | ||
public sealed class TeachLessonConditionSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedMindSystem _mind = default!; | ||
[Dependency] private readonly TargetObjectiveSystem _target = default!; | ||
|
||
private readonly List<EntityUid> _wasKilled = []; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<TeachLessonConditionComponent, ObjectiveGetProgressEvent>(OnGetProgress); | ||
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundEnd); | ||
} | ||
|
||
private void OnGetProgress(Entity<TeachLessonConditionComponent> ent, ref ObjectiveGetProgressEvent args) | ||
{ | ||
if (!_target.GetTarget(ent, out var target)) | ||
return; | ||
|
||
args.Progress = GetProgress(target.Value); | ||
} | ||
|
||
private float GetProgress(EntityUid target) | ||
{ | ||
if (TryComp<MindComponent>(target, out var mind) && mind.OwnedEntity != null && !_mind.IsCharacterDeadIc(mind)) | ||
return _wasKilled.Contains(target) ? 1f : 0f; | ||
|
||
_wasKilled.Add(target); | ||
return 1f; | ||
} | ||
|
||
// Clear the wasKilled list on round end | ||
private void OnRoundEnd(RoundRestartCleanupEvent ev) | ||
{ | ||
_wasKilled.Clear(); | ||
} | ||
} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
Resources/Locale/en-US/deltav/objectives/conditions/teach-person.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 @@ | ||
objective-condition-teach-person-title = Teach {$targetName}, {CAPITALIZE($job)} a lesson |
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
10 changes: 10 additions & 0 deletions
10
Resources/Prototypes/DeltaV/Catalog/Fills/Crates/medical.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,10 @@ | ||
- type: entity | ||
id: CrateGenericRadioImplants | ||
parent: CrateMedical | ||
name: radio implant crate | ||
description: Communicate without having a pesky headset on your ear. | ||
components: | ||
- type: StorageFill | ||
contents: | ||
- id: GenericRadioImplanter | ||
amount: 3 |
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
50 changes: 50 additions & 0 deletions
50
Resources/Prototypes/DeltaV/Loadouts/Jobs/Security/detective.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,50 @@ | ||
- type: loadout | ||
id: SecurityRevolverWeaponRevolverLucky | ||
storage: | ||
belt: | ||
- WeaponRevolverLucky | ||
|
||
- type: loadout | ||
id: SecurityRevolverInspector | ||
storage: | ||
belt: | ||
- WeaponRevolverInspector | ||
|
||
- type: loadout | ||
id: SecurityFirearmSpeedLoaderMagnumRubber | ||
storage: | ||
back: | ||
- SpeedLoaderMagnumRubber | ||
|
||
- type: loadout | ||
id: SecurityFirearmSpeedLoaderMagnum | ||
storage: | ||
back: | ||
- SpeedLoaderMagnum | ||
|
||
- type: loadout | ||
id: SecurityFirearmSpeedLoaderSpecialRubber | ||
storage: | ||
back: | ||
- SpeedLoaderSpecialRubber | ||
|
||
- type: loadout | ||
id: SecurityFirearmSpeedLoaderSpecial | ||
storage: | ||
back: | ||
- SpeedLoaderSpecial | ||
|
||
- type: loadout | ||
id: SecurityFirearmWeaponRevolverFitz | ||
equipment: | ||
pocket1: WeaponRevolverFitz | ||
|
||
- type: loadout | ||
id: SecurityFirearmWeaponRevolverK38Master | ||
equipment: | ||
pocket1: WeaponRevolverK38Master | ||
|
||
- type: loadout | ||
id: SecurityFirearmWeaponRevolverDeckard | ||
equipment: | ||
pocket1: WeaponRevolverDeckard |
31 changes: 31 additions & 0 deletions
31
Resources/Prototypes/DeltaV/Loadouts/Jobs/Security/security_officer.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,31 @@ | ||
- type: loadout | ||
id: SecurityFirearmWeaponPistolPollock | ||
equipment: | ||
pocket1: WeaponPistolPollock | ||
|
||
- type: loadout | ||
id: SecurityFirearmWeaponPistolSLP57 | ||
equipment: | ||
pocket1: WeaponPistolSLP57 | ||
|
||
- type: loadout | ||
id: SecurityFirearmWeaponPistolMk58 | ||
equipment: | ||
pocket1: WeaponPistolMk58 | ||
|
||
- type: loadout | ||
id: SecurityFirearmWeaponDisabler | ||
equipment: | ||
pocket1: WeaponDisabler | ||
|
||
- type: loadout | ||
id: SecurityFirearmMagazinePistolRubber | ||
storage: | ||
back: | ||
- MagazinePistolRubber | ||
|
||
- type: loadout | ||
id: SecurityFirearmMagazinePistol | ||
storage: | ||
back: | ||
- MagazinePistol |
Oops, something went wrong.