Skip to content

Commit

Permalink
Борги при смене типа меняют роль в манифесте экипажа и отправляют опо…
Browse files Browse the repository at this point in the history
…вещения в бинарный и научный канал. (#675)
  • Loading branch information
VigersRay authored Nov 20, 2024
1 parent 82bb903 commit 3e09e89
Show file tree
Hide file tree
Showing 17 changed files with 176 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@ private void CreateGeneralRecord(EntityUid station, EntityUid player, HumanoidCh
return;

// Sunrise-Start
// Чтобы борги отображались в манифесте экипажа.
var name = profile.Name;
if (!_inventory.TryGetSlotEntity(player, "id", out var idUid))
{
idUid = null;
idUid = player;
name = MetaData(player).EntityName;
}
// Sunrise-End
Expand Down
7 changes: 7 additions & 0 deletions Content.Shared/Silicons/Borgs/BorgTypePrototype.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using Content.Shared.Interaction.Components;
using Content.Shared.Inventory;
using Content.Shared.Radio;
using Content.Shared.Roles;
using Content.Shared.Silicons.Borgs.Components;
using Content.Shared.Whitelist;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

namespace Content.Shared.Silicons.Borgs;

Expand Down Expand Up @@ -152,4 +154,9 @@ public sealed partial class BorgTypePrototype : IPrototype
/// </summary>
[DataField]
public SoundSpecifier FootstepCollection { get; set; } = new SoundCollectionSpecifier(DefaultFootsteps);

// Sunrise-Start
[DataField(required: true, customTypeSerializer: typeof(PrototypeIdSerializer<JobPrototype>))]
public string Job = string.Empty;
// Sunrise-End
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public sealed partial class BorgSwitchableTypeComponent : Component
/// </summary>
[DataField]
public ProtoId<RadioChannelPrototype>[] InherentRadioChannels = [];

[DataField]
public ProtoId<RadioChannelPrototype>[] NotifyChannels = [];
}

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Content.Shared/Verbs/VerbCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,7 @@ public VerbCategory(string text, string? icon, bool iconsOnly = false)
public static readonly VerbCategory SelectType = new("verb-categories-select-type", null);

public static readonly VerbCategory PowerLevel = new("verb-categories-power-level", null);

public static readonly VerbCategory ReagentSwitch = new("solution-regeneration-switcher-switch-verb", null);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
borg-switch-type-notify = Юнит { $name } был трансформирован в { $type }
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@
instantActions:
- HandheldStationMapUnpowered
- type: BorgCrewManifestViewer
- type: StationRecordKeyStorage
# Sunrise-End

- type: entity
Expand Down
3 changes: 3 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Cyborgs/borg_chassis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
inherentRadioChannels:
- Common
- Binary
notifyChannels:
- Binary
- Science

- type: entity
id: BorgChassisGeneric
Expand Down
10 changes: 9 additions & 1 deletion Resources/Prototypes/Roles/Jobs/departments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
- Warden
- Brigmedic # Sunrise-Brigmedic
- SecurityPilot # Sunrise-SecurityPilot
- SecurityCombatBorg # Sunrise-Edit

- type: department
id: Science
Expand All @@ -145,6 +144,15 @@
roles:
- StationAi
- Borg
- MedicalBorg # Sunrise-Edit
- EngineerBorg # Sunrise-Edit
- MinerBorg # Sunrise-Edit
- JanitorBorg # Sunrise-Edit
- ServiceBorg # Sunrise-Edit
- ClownBorg # Sunrise-Edit
- PeaceBorg # Sunrise-Edit
- SecurityBorg # Sunrise-Edit
- SecurityCombatBorg # Sunrise-Edit
primary: false

- type: department
Expand Down
11 changes: 11 additions & 0 deletions Resources/Prototypes/_Sunrise/Roles/Jobs/Silicons/clown_borg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- type: job
id: ClownBorg
name: job-name-clown-borg
description: job-description-clown-borg
playTimeTracker: JobClownBorg
icon: JobIconClownBorg
supervisors: job-supervisors-human
canBeAntag: false
setPreference: false
displayWeight: -10 # Sunrise
jobEntity: PlayerBorgBattery
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- type: job
id: EngineerBorg
name: job-name-engineer-borg
description: job-description-engineer-borg
playTimeTracker: JobEngineerBorg
icon: JobIconEngineerBorg
supervisors: job-supervisors-human
canBeAntag: false
setPreference: false
displayWeight: -10 # Sunrise
jobEntity: PlayerBorgBattery
11 changes: 11 additions & 0 deletions Resources/Prototypes/_Sunrise/Roles/Jobs/Silicons/janitor_borg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- type: job
id: JanitorBorg
name: job-name-janitor-borg
description: job-description-janitor-borg
playTimeTracker: JobJanitorBorg
icon: JobIconJanitorBorg
supervisors: job-supervisors-human
canBeAntag: false
setPreference: false
displayWeight: -10 # Sunrise
jobEntity: PlayerBorgBattery
11 changes: 11 additions & 0 deletions Resources/Prototypes/_Sunrise/Roles/Jobs/Silicons/medical_borg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- type: job
id: MedicalBorg
name: job-name-medical-borg
description: job-description-medical-borg
playTimeTracker: JobMedicalBorg
icon: JobIconMedicalBorg
supervisors: job-supervisors-human
canBeAntag: false
setPreference: false
displayWeight: -10 # Sunrise
jobEntity: PlayerBorgBattery
11 changes: 11 additions & 0 deletions Resources/Prototypes/_Sunrise/Roles/Jobs/Silicons/mining_borg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- type: job
id: MinerBorg
name: job-name-miner-borg
description: job-description-miner-borg
playTimeTracker: JobMiningBorg
icon: JobIconMinerBorg
supervisors: job-supervisors-human
canBeAntag: false
setPreference: false
displayWeight: -10 # Sunrise
jobEntity: PlayerBorgBattery
11 changes: 11 additions & 0 deletions Resources/Prototypes/_Sunrise/Roles/Jobs/Silicons/peace_borg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- type: job
id: BorgChassisPeace
name: job-name-peace-borg
description: job-description-peace-borg
playTimeTracker: JobPeaceBorg
icon: JobIconPeaceBorg
supervisors: job-supervisors-hos
canBeAntag: false
setPreference: false
displayWeight: -10 # Sunrise
jobEntity: PlayerBorgBattery
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- type: job
id: SecurityBorg
name: job-name-sec-borg
description: job-description-sec-borg
playTimeTracker: JobSecurityBorg
icon: JobIconSecurityBorg
supervisors: job-supervisors-hos
canBeAntag: false
setPreference: false
displayWeight: -10 # Sunrise
jobEntity: PlayerBorgBattery
11 changes: 11 additions & 0 deletions Resources/Prototypes/_Sunrise/Roles/Jobs/Silicons/service_borg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- type: job
id: ServiceBorg
name: job-name-service-borg
description: job-description-service-borg
playTimeTracker: JobServiceBorg
icon: JobIconServiceBorg
supervisors: job-supervisors-human
canBeAntag: false
setPreference: false
displayWeight: -10 # Sunrise
jobEntity: PlayerBorgBattery
Loading

0 comments on commit 3e09e89

Please sign in to comment.