Skip to content

Commit

Permalink
Merge branch 'master' into chinalake2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyndomen authored Nov 18, 2024
2 parents 9c2a80c + 39d9ea8 commit 6c88889
Show file tree
Hide file tree
Showing 35 changed files with 372 additions and 89 deletions.
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;
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();
}
}
94 changes: 50 additions & 44 deletions Resources/Changelog/DeltaVChangelog.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,4 @@
Entries:
- author: Loonessia
changes:
- message: Deep fried burned food items should now have a description
type: Fix
id: 177
time: '2023-12-21T02:15:30.0000000+00:00'
- author: Adrian16199
changes:
- message: Head of personel has gotten back their armoured coat.
type: Add
id: 178
time: '2023-12-21T02:17:25.0000000+00:00'
- author: DebugOk
changes:
- message: Merged wizden. The upstream changelog may contain incorrect entries.
type: Add
- message: The random client freezes/crashes should be mostly gone.
type: Fix
id: 179
time: '2023-12-22T23:46:32.0000000+00:00'
- author: ps3moira
changes:
- message: Reverted in-hand E-Sword sprites.
type: Tweak
id: 180
time: '2023-12-24T02:56:01.0000000+00:00'
- author: deltanedas
changes:
- message: Ore Bags of Holding now use bluespace crystals instead of uranium.
type: Tweak
id: 181
time: '2023-12-24T19:58:23.0000000+00:00'
- author: Adrian16199
changes:
- message: Fixes cyborgs spawning with nearsighted trait.
type: Fix
id: 182
time: '2023-12-27T17:55:07.0000000+00:00'
- author: Adrian16199
changes:
- message: 'Added 3 classic hairstyles: Long hair, Long hair 2, Long hair 3.'
type: Add
id: 183
time: '2023-12-27T18:23:39.0000000+00:00'
- author: BramvanZijp
changes:
- message: Security dogs now can wear an id card and radio, are able to drag things,
Expand Down Expand Up @@ -3733,3 +3689,53 @@
id: 676
time: '2024-11-16T14:09:13.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2209
- author: JustAnOrange, Lyndomen
changes:
- message: Syndicate recruiters arrive with more swagger
type: Add
id: 677
time: '2024-11-17T00:46:38.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2217
- author: DisposableCrewmember42
changes:
- message: Prosecutors now get the towels they deserve.
type: Tweak
id: 678
time: '2024-11-17T00:48:14.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2215
- author: Radezolid
changes:
- message: Beanbags hits hard again, bartenders rejoice!
type: Tweak
id: 679
time: '2024-11-17T04:45:10.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2219
- author: Stop-Signs
changes:
- message: Heads of Security will now have an energy shotgun in their locker.
type: Add
id: 680
time: '2024-11-17T13:10:01.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2182
- author: Radezolid
changes:
- message: Removed the Chief Justice cloak from the uniform printer.
type: Remove
id: 681
time: '2024-11-17T13:24:04.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2180
- author: Beck Thompson
changes:
- message: Generic radio implants are no longer syndicate branded.
type: Tweak
id: 682
time: '2024-11-17T19:06:47.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2159
- author: Lyndomen
changes:
- message: Security roles may select their service weapon in loadouts, along with
their ammunition of choice
type: Add
id: 683
time: '2024-11-18T02:08:58.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2214
2 changes: 1 addition & 1 deletion Resources/Credits/GitHub.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
objective-condition-teach-person-title = Teach {$targetName}, {CAPITALIZE($job)} a lesson
7 changes: 7 additions & 0 deletions Resources/Locale/en-US/deltav/preferences/loadout-groups.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ loadout-group-brig-medic-outerclothing = Corpsman outer clothing
loadout-group-prison-guard-head = Prison Guard head
loadout-group-prison-guard-jumpsuit = Prison Guard jumpsuit
loadout-group-security-gun = Security Sidearm
loadout-group-revolver-gun = Security Revolver
loadout-group-all-gun = Security Sidearm
loadout-group-security-gun-ammo = Ammunition
loadout-group-revolver-ammo = Ammunition
loadout-group-all-ammo = Ammunition
# Justice
loadout-group-chiefjustice-head = Chief Justice head
loadout-group-chiefjustice-jumpsuit = Chief Justice jumpsuit
Expand Down
3 changes: 0 additions & 3 deletions Resources/Locale/en-US/deltav/store/uplink-catalog.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ uplink-syndicate-radio-implanter-desc = A cranial implant that lets you talk on
uplink-syndicate-radio-implanter-bundle-name = Syndicate Radio Implanter Bundle
uplink-syndicate-radio-implanter-bundle-desc = Two implanters for the price of one and a half! Share one with your Syndicate friend.
uplink-generic-radio-implanter-name = Generic Radio Implanter
uplink-generic-radio-implanter-desc = A cranial implant with a bluespace compartment for a single encryption key (not included). Put in a key of your choice, and you can talk using it like you would with any headset.
uplink-doorjack-name = Airlock Access Override
uplink-doorjack-desc = A specialized cryptographic sequencer, designed solely to doorjack NanoTrasen's updated airlocks. Does not tamper with anything else.
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Catalog/Fills/Lockers/heads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
- !type:NestedSelector # DeltaV
tableId: LockerFillHeadOfSecurityDeltaV
- id: BookSecretDocuments
#- id: WeaponEnergyShotgun # DeltaV - replaced by X-01
- id: WeaponEnergyShotgun
- id: BookSpaceLaw
- id: BoxEncryptionKeySecurity
- id: CigarGoldCase
Expand Down
10 changes: 10 additions & 0 deletions Resources/Prototypes/DeltaV/Catalog/Cargo/cargo_medical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@
cost: 500
category: Medical
group: market

- type: cargoProduct
id: RadioImplantCrate
icon:
sprite: Objects/Specific/Medical/implanter.rsi
state: implanter0
product: CrateGenericRadioImplants
cost: 1500
category: Medical
group: market
10 changes: 10 additions & 0 deletions Resources/Prototypes/DeltaV/Catalog/Fills/Crates/medical.yml
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
15 changes: 0 additions & 15 deletions Resources/Prototypes/DeltaV/Catalog/uplink_catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,6 @@
categories:
- UplinkImplants


- type: listing
id: UplinkGenericRadioImplanter
name: uplink-generic-radio-implanter-name
description: uplink-generic-radio-implanter-desc
icon: { sprite: /Textures/Objects/Devices/encryption_keys.rsi, state: crypt_rusted }
productEntity: GenericRadioImplanter
discountCategory: usualDiscounts
discountDownTo:
Telecrystal: 1
cost:
Telecrystal: 2
categories:
- UplinkImplants

- type: listing
id: UplinkDoorjack
name: uplink-doorjack-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,3 +407,14 @@
sprite: DeltaV/Clothing/Uniforms/Jumpsuit/black_turtleneck.rsi
- type: Clothing
sprite: DeltaV/Clothing/Uniforms/Jumpsuit/black_turtleneck.rsi

- type: entity
parent: ClothingUniformBase
id: ClothingUniformCybersunAttorney
name: cybersun attorney suit
description: This durable Suit Jacket and Turtleneck Combo doubles as an Accounting suit, and includes an extra button. Take that, Nerd-otrasen!
components:
- type: Sprite
sprite: DeltaV/Clothing/Uniforms/Jumpsuit/cybersunattorney.rsi
- type: Clothing
sprite: DeltaV/Clothing/Uniforms/Jumpsuit/cybersunattorney.rsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
implant: BionicSyrinxImplant

- type: entity
parent: BaseImplantOnlyImplanterSyndi
parent: BaseImplantOnlyImplanter
id: GenericRadioImplanter
suffix: generic radio
components:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
parent: StorageImplant
id: RadioImplant
name: generic radio implant
description: This implant contains a radio augmentation with a bluespace compartment for an encryption key. It allows its user to communicate on the key's channels.
description: This implant contains a radio augmentation with a hidden compartment for an encryption key. It allows its user to communicate on the key's channels.
components:
- type: SubdermalImplant
implantAction: ActionOpenRadioImplant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
tags:
- CartridgeSpecial
- SpeedLoaderSpecial
proto: CartridgeSpecialRubber
proto: CartridgeSpecial
capacity: 6
chambers: [ True, True, True, True, True, True ]
ammoSlots: [ null, null, null, null, null, null ]
Expand All @@ -67,7 +67,7 @@
tags:
- CartridgeSpecial
- SpeedLoaderSpecial
proto: CartridgeSpecialRubber
proto: CartridgeSpecial
capacity: 6
chambers: [ True, True, True, True, True, True ]
ammoSlots: [ null, null, null, null, null, null ]
Expand Down
50 changes: 50 additions & 0 deletions Resources/Prototypes/DeltaV/Loadouts/Jobs/Security/detective.yml
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
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
Loading

0 comments on commit 6c88889

Please sign in to comment.