Борги при смене типа меняют роль в манифесте экипажа и отправляют оповещения в бинарный и научный канал. (#675)

This commit is contained in:
Vigers Ray 2024-11-20 17:39:46 +03:00 committed by GitHub
parent 82bb9039ea
commit 3e09e890ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 176 additions and 20 deletions

View file

@ -89,10 +89,11 @@ public sealed class StationRecordsSystem : SharedStationRecordsSystem
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

View file

@ -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;
@ -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
}

View file

@ -45,6 +45,9 @@ public sealed partial class BorgSwitchableTypeComponent : Component
/// </summary>
[DataField]
public ProtoId<RadioChannelPrototype>[] InherentRadioChannels = [];
[DataField]
public ProtoId<RadioChannelPrototype>[] NotifyChannels = [];
}
/// <summary>

View file

@ -85,5 +85,7 @@ namespace Content.Shared.Verbs
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);
}
}

View file

@ -0,0 +1 @@
borg-switch-type-notify = Юнит { $name } был трансформирован в { $type }

View file

@ -335,6 +335,7 @@
instantActions:
- HandheldStationMapUnpowered
- type: BorgCrewManifestViewer
- type: StationRecordKeyStorage
# Sunrise-End
- type: entity

View file

@ -31,6 +31,9 @@
inherentRadioChannels:
- Common
- Binary
notifyChannels:
- Binary
- Science
- type: entity
id: BorgChassisGeneric

View file

@ -122,7 +122,6 @@
- Warden
- Brigmedic # Sunrise-Brigmedic
- SecurityPilot # Sunrise-SecurityPilot
- SecurityCombatBorg # Sunrise-Edit
- type: department
id: Science
@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -2,6 +2,10 @@
- type: borgType
id: generic
# Sunrise-Start
job: Borg
# Sunrise-End
# Description
dummyPrototype: BorgChassisGeneric
@ -17,6 +21,13 @@
radioChannels:
- Science
# Sunrise-Start
footstepCollection:
collection: FootstepCyborgSpider
params:
volume: -15
# Sunrise-End
# Visual
inventoryTemplateId: borgShort
spriteBodyState: robot
@ -33,6 +44,10 @@
- type: borgType
id: engineering
# Sunrise-Start
job: EngineerBorg
# Sunrise-End
# Description
dummyPrototype: BorgChassisEngineer
@ -54,11 +69,12 @@
- Engineering
- Science
# Sounds
# Sunrise-Start
footstepCollection:
collection: FootstepCyborgSpider
params:
volume: -15
# Sunrise-End
# Visual
inventoryTemplateId: borgShort
@ -76,6 +92,10 @@
- type: borgType
id: mining
# Sunrise-Start
job: MinerBorg
# Sunrise-End
# Description
dummyPrototype: BorgChassisMining
@ -90,17 +110,18 @@
- BorgModuleStandart
- BorgModuleMining
- BorgModuleGPS
- BorgModuleJetpack
- BorgModuleJetpack # Sunrise-Edit
radioChannels:
- Supply
- Science
# Sounds
# Sunrise-Start
footstepCollection:
collection: FootstepCyborgSpider
params:
volume: -15
# Sunrise-End
# Visual
inventoryTemplateId: borgTall
@ -119,6 +140,10 @@
- type: borgType
id: janitor
# Sunrise-Start
job: JanitorBorg
# Sunrise-End
# Description
dummyPrototype: BorgChassisJanitor
@ -132,15 +157,16 @@
defaultModules:
- BorgModuleStandart
- BorgModuleLightReplacer
- BorgModuleCleaning
- BorgModuleAdvancedCleaning # Sunrise-Edit
radioChannels:
- Science
- Service
# Sounds
# Sunrise-Start
footstepCollection:
collection: FootstepJanitorBorg
# Sunrise-Start
# Visual
inventoryTemplateId: borgShort
@ -159,6 +185,10 @@
- type: borgType
id: medical
# Sunrise-Start
job: MedicalBorg
# Sunrise-End
# Description
dummyPrototype: BorgChassisMedical
@ -171,9 +201,9 @@
defaultModules:
- BorgModuleStandart
- BorgModuleAdvancedTreatment
- BorgModuleAdvancedTreatment # Sunrise-Edit
- BorgModuleTreatment
- BorgModuleDefibrillator
- BorgModuleDefibrillator # Sunrise-Edit
radioChannels:
- Science
@ -187,6 +217,7 @@
- type: ShowHealthIcons
damageContainers:
- Biological
# Sunrise-Start
- type: TTS
voice: TurretFloor
- type: MovementSpeedModifier
@ -198,6 +229,7 @@
- HandheldCrewMonitorBorg
worldTargetActions:
- HandheldHealthAnalyzerUnpowered
# Sunrise-End
# Visual
inventoryTemplateId: borgDutch
@ -220,6 +252,10 @@
- type: borgType
id: service
# Sunrise-Start
job: ServiceBorg
# Sunrise-End
# Description
dummyPrototype: BorgChassisService
@ -255,6 +291,8 @@
- type: borgType
id: peace
job: PeaceBorg
# Description
dummyPrototype: BorgChassisPeace
@ -338,6 +376,8 @@
- type: borgType
id: clown
job: ClownBorg
# Description
dummyPrototype: BorgChassisClown
@ -405,6 +445,19 @@
- Science
- Security
# Visual
inventoryTemplateId: borgTall
spriteBodyState: sec
spriteHasMindState: sec_e
spriteNoMindState: sec_e_r
spriteToggleLightState: sec_l
# Pet
petSuccessString: petting-success-sec-cyborg
petFailureString: petting-failure-sec-cyborg
job: SecurityBorg
addComponents:
- type: TTS
voice: Sentrybot
@ -443,14 +496,3 @@
- Atmospherics
- type: AccessReader
access: [ [ "Command" ], [ "Security" ] ]
# Visual
inventoryTemplateId: borgTall
spriteBodyState: sec
spriteHasMindState: sec_e
spriteNoMindState: sec_e_r
spriteToggleLightState: sec_l
# Pet
petSuccessString: petting-success-sec-cyborg
petFailureString: petting-failure-sec-cyborg