diff --git a/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs b/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs index 930de16052..ef7ab5ab5f 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs +++ b/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs @@ -17,12 +17,12 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls private List _playerWarps = new(); private List _placeWarps = new(); - private List _globalAntoginists = new(); + private List _globalAntagonists = new(); - private List _alivePlayers = new(); - private List _leftPlayers = new(); - private List _deadPlayers = new(); - private List _ghostPlayers = new(); + private readonly List _alivePlayers = new(); + private readonly List _leftPlayers = new(); + private readonly List _deadPlayers = new(); + private readonly List _ghostPlayers = new(); public event Action? WarpClicked; @@ -37,7 +37,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls GhostTeleportContainter.DisposeAllChildren(); _playerWarps = GetSortedPlayers(_playerWarps); _placeWarps = GetSortedPlaces(_placeWarps); - _globalAntoginists = GetSortedAntagonists(_globalAntoginists); + _globalAntagonists = GetSortedAntagonists(_globalAntagonists); PlayersAllocation(); AddButtons(); @@ -47,12 +47,12 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls { _playerWarps = players; _placeWarps = places; - _globalAntoginists = antagonists; + _globalAntagonists = antagonists; } private void AddButtons() { - AddAntagButtons(_globalAntoginists, "ghost-teleport-menu-antagonists-label", "ButtonColorAntagonistDepartment"); + AddAntagButtons(_globalAntagonists, "ghost-teleport-menu-antagonists-label", "ButtonColorAntagonistDepartment"); AddPlayerButtons(_alivePlayers, "ghost-teleport-menu-alive-label", string.Empty, true); // Alive AddPlayerButtons(_deadPlayers, "ghost-teleport-menu-dead-label", string.Empty, true); // Dead AddPlayerButtons(_ghostPlayers, "ghost-teleport-menu-ghosts-label", string.Empty, true); // Ghost @@ -239,7 +239,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls GhostTeleportContainter.AddChild(bigGrid); } - public List> SortPlayersByDepartment(List players) + private List> SortPlayersByDepartment(List players) { var sortedPlayers = new List>(); @@ -271,7 +271,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls return sortedPlayers; } - public List> SortAntagsByWeight(List antagonists) + private List> SortAntagsByWeight(List antagonists) { var sortedAntags = new List>(); diff --git a/Content.Server/Ghost/GhostSystem.cs b/Content.Server/Ghost/GhostSystem.cs index fe81f86a78..f34137c006 100644 --- a/Content.Server/Ghost/GhostSystem.cs +++ b/Content.Server/Ghost/GhostSystem.cs @@ -380,7 +380,7 @@ namespace Content.Server.Ghost return; } - var response = new GhostWarpsResponseEvent(GetPlayerWarps(), GetLocationWarps(), GetAntagonistWarps()); + var response = new GhostWarpsResponseEvent(GetPlayerWarps(), GetLocationWarps(), GetAntagonistWarps()); // WD edit RaiseNetworkEvent(response, args.SenderSession.Channel); } @@ -432,7 +432,7 @@ namespace Content.Server.Ghost } - private List GetLocationWarps() + private List GetLocationWarps() // WD added { var warps = new List { }; var allQuery = AllEntityQuery(); @@ -448,7 +448,7 @@ namespace Content.Server.Ghost return warps; } - private List GetPlayerWarps() + private List GetPlayerWarps() // WD added { var warps = new List { }; @@ -499,7 +499,7 @@ namespace Content.Server.Ghost return warps; } - private List GetAntagonistWarps() + private List GetAntagonistWarps() // WD added { var warps = new List { }; diff --git a/Content.Server/_White/Announcement/ArrivalNotificationSystem.cs b/Content.Server/_White/Announcement/ArrivalNotificationSystem.cs index a70a2bedba..f362ba94fa 100644 --- a/Content.Server/_White/Announcement/ArrivalNotificationSystem.cs +++ b/Content.Server/_White/Announcement/ArrivalNotificationSystem.cs @@ -30,10 +30,10 @@ public sealed class ArrivalNotificationSystem : EntitySystem if (!_prototypeManager.TryIndex(args.JobId, out var jobPrototype)) return; - if (jobPrototype.AnnouncementPrototype == null) + if (jobPrototype.ArrivalNotificationPrototype == null) return; - if (!_prototypeManager.TryIndex(jobPrototype.AnnouncementPrototype, out var notification)) + if (!_prototypeManager.TryIndex(jobPrototype.ArrivalNotificationPrototype, out var notification)) return; var message = GetMessage(args.Mob, diff --git a/Content.Shared/Ghost/SharedGhostSystem.cs b/Content.Shared/Ghost/SharedGhostSystem.cs index 17e226dc69..7d92852f4f 100644 --- a/Content.Shared/Ghost/SharedGhostSystem.cs +++ b/Content.Shared/Ghost/SharedGhostSystem.cs @@ -204,7 +204,7 @@ namespace Content.Shared.Ghost /// Contains players, and locations a ghost can warp to /// [Serializable, NetSerializable] - public sealed class GhostWarpsResponseEvent : EntityEventArgs + public sealed class GhostWarpsResponseEvent : EntityEventArgs // WD edit { public GhostWarpsResponseEvent(List players, List places, List antagonists) { diff --git a/Content.Shared/Roles/JobPrototype.cs b/Content.Shared/Roles/JobPrototype.cs index bd40d0803f..64ed0310b4 100644 --- a/Content.Shared/Roles/JobPrototype.cs +++ b/Content.Shared/Roles/JobPrototype.cs @@ -50,7 +50,7 @@ namespace Content.Shared.Roles public bool JoinNotifyCrew { get; private set; } = false; [DataField] - public string? AnnouncementPrototype; + public string? ArrivalNotificationPrototype; [DataField] public bool RequireAdminNotify { get; private set; } = false; diff --git a/Content.Shared/Roles/Jobs/SharedJobSystem.cs b/Content.Shared/Roles/Jobs/SharedJobSystem.cs index 04ac45c4c5..3390f81394 100644 --- a/Content.Shared/Roles/Jobs/SharedJobSystem.cs +++ b/Content.Shared/Roles/Jobs/SharedJobSystem.cs @@ -61,15 +61,15 @@ public abstract class SharedJobSystem : EntitySystem { // Not that many departments so we can just eat the cost instead of storing the inverse lookup. var departmentProtos = _protoManager.EnumeratePrototypes().ToList(); - departmentProtos.Sort((x, y) => string.Compare(x.ID, y.ID, StringComparison.Ordinal)); + departmentProtos = departmentProtos.OrderByDescending(d => d.Weight).ToList(); foreach (var department in departmentProtos) { - if (department.Roles.Contains(jobProto)) - { - departmentPrototype = department; - return true; - } + if (!department.Roles.Contains(jobProto)) + continue; + + departmentPrototype = department; + return true; } departmentPrototype = null; diff --git a/Content.Shared/_White/Knockdown/KnockdownOnCollideComponent.cs b/Content.Shared/_White/Knockdown/KnockdownOnCollideComponent.cs index 5e33cac2e4..475788eb80 100644 --- a/Content.Shared/_White/Knockdown/KnockdownOnCollideComponent.cs +++ b/Content.Shared/_White/Knockdown/KnockdownOnCollideComponent.cs @@ -5,4 +5,7 @@ public sealed partial class KnockdownOnCollideComponent : Component { [DataField] public float BlurTime = 20f; + + [DataField] + public bool UseBlur; } diff --git a/Content.Shared/_White/Knockdown/KnockdownOnCollideSystem.cs b/Content.Shared/_White/Knockdown/KnockdownOnCollideSystem.cs index b344c45626..748130f4d4 100644 --- a/Content.Shared/_White/Knockdown/KnockdownOnCollideSystem.cs +++ b/Content.Shared/_White/Knockdown/KnockdownOnCollideSystem.cs @@ -2,6 +2,7 @@ using Content.Shared.Eye.Blinding.Components; using Content.Shared.Projectiles; using Content.Shared.Standing.Systems; using Content.Shared.StatusEffect; +using Content.Shared.Throwing; namespace Content.Shared._White.Knockdown; @@ -15,16 +16,24 @@ public sealed class KnockdownOnCollideSystem : EntitySystem base.Initialize(); SubscribeLocalEvent(OnProjectileHit); + SubscribeLocalEvent(OnEntityHit); + } + + private void OnEntityHit(Entity ent, ref ThrowDoHitEvent args) + { + ApplyEffects(args.Target, ent.Comp); } private void OnProjectileHit(Entity ent, ref ProjectileHitEvent args) { - _standing.TryLieDown(args.Target, null, SharedStandingStateSystem.DropHeldItemsBehavior.AlwaysDrop); + ApplyEffects(args.Target, ent.Comp); + } - if (ent.Comp.BlurTime <= 0f) - return; + private void ApplyEffects(EntityUid target, KnockdownOnCollideComponent component) + { + _standing.TryLieDown(target, null, SharedStandingStateSystem.DropHeldItemsBehavior.AlwaysDrop); - _statusEffects.TryAddStatusEffect(args.Target, "BlurryVision", - TimeSpan.FromSeconds(ent.Comp.BlurTime), true); + if (component.UseBlur) + _statusEffects.TryAddStatusEffect(target, "BlurryVision", TimeSpan.FromSeconds(component.BlurTime), true); } } diff --git a/Resources/Locale/ru-RU/_white/white-shit.ftl b/Resources/Locale/ru-RU/_white/white-shit.ftl index b84f4dfb14..56c9d5ff0b 100644 --- a/Resources/Locale/ru-RU/_white/white-shit.ftl +++ b/Resources/Locale/ru-RU/_white/white-shit.ftl @@ -50,4 +50,13 @@ salvage-expedition-difficulty-Minor = Незначительная ent-ToySwordDouble = двойной игрушечный меч +# Cult +ent-CultBola = магическая { ent-Bola } + .desc = { ent-Bola.desc } + .suffic = культ + +# Energy bola + +ent-EnergyBola = энергобола + .desc = Соверешенное слияние технологии и справедливости для отлова преступников. diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/sec.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/sec.yml index ac33e90ac3..224014c8b8 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/sec.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/sec.yml @@ -7,7 +7,7 @@ SmokeGrenade: 6 GrenadeStinger: 4 Flash: 7 - Bola: 7 + EnergyBola: 7 Tourniquet: 7 FlashlightSeclite: 5 ClothingEyesGlassesSunglasses: 2 diff --git a/Resources/Prototypes/Entities/Clothing/Belt/belts.yml b/Resources/Prototypes/Entities/Clothing/Belt/belts.yml index dd823827da..1faa9f6572 100644 --- a/Resources/Prototypes/Entities/Clothing/Belt/belts.yml +++ b/Resources/Prototypes/Entities/Clothing/Belt/belts.yml @@ -519,6 +519,7 @@ - SmokeOnTrigger - Flash - Handcuff + - Ensnaring - type: ItemMapper mapLayers: flashbang: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/bolts.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/bolts.yml index 7a6ded12ea..35f2450e09 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/bolts.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/bolts.yml @@ -26,4 +26,3 @@ hard: false mask: - Opaque - - type: KnockdownOnCollide diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/mini_ebow.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/mini_ebow.yml index 9e058ee512..3402f57bdc 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/mini_ebow.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/mini_ebow.yml @@ -34,3 +34,4 @@ True: { state: icon } False: { state: empty } - type: Appearance + useBlur: true diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/bola.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/bola.yml index a488524b05..4bece7e24f 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/bola.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/bola.yml @@ -44,9 +44,12 @@ breakoutTime: 3.5 #all bola should generally be fast to remove walkSpeed: 0.7 #makeshift bola shouldn't slow too much sprintSpeed: 0.7 - staminaDamage: 55 # Sudden weight increase sapping stamina + staminaDamage: 33 # Sudden weight increase sapping stamina canThrowTrigger: true canMoveBreakout: true + - type: KnockdownOnCollide + +# WD added - type: entity parent: Bola @@ -54,9 +57,42 @@ name: Bola description: Linked together with some spare cuffs and metal. components: + - type: Sprite + sprite: White/Cult/bola.rsi - type: Ensnaring freeTime: 2.0 breakoutTime: 3.5 #all bola should generally be fast to remove walkSpeed: 0.5 sprintSpeed: 0.5 canThrowTrigger: true + +- type: entity + parent: Bola + id: EnergyBola + name: Bola + description: Linked together with some spare cuffs and metal. + components: + - type: Item + size: Small + - type: Sprite + sprite: White/Objects/Weapons/Throwable/energybola.rsi + - type: Ensnaring + freeTime: 1 + breakoutTime: 2 + walkSpeed: 0.8 + sprintSpeed: 0.8 + staminaDamage: 33 + - type: EmitSoundOnLand + collection: sparks + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 10 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: EnergyMiss + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: KnockdownOnCollide diff --git a/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml b/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml index 1806692ac5..8d4ae773d9 100644 --- a/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml +++ b/Resources/Prototypes/Roles/Jobs/Cargo/quartermaster.yml @@ -15,7 +15,7 @@ weight: 10 startingGear: QuartermasterGear icon: "JobIconQuarterMaster" - announcementPrototype: QuartermasterArrivalNotification + arrivalNotificationPrototype: QuartermasterArrivalNotification supervisors: job-supervisors-captain whitelistedSpecies: - Human diff --git a/Resources/Prototypes/Roles/Jobs/Command/captain.yml b/Resources/Prototypes/Roles/Jobs/Command/captain.yml index 7fe051a305..4dc4e1d6ac 100644 --- a/Resources/Prototypes/Roles/Jobs/Command/captain.yml +++ b/Resources/Prototypes/Roles/Jobs/Command/captain.yml @@ -20,7 +20,7 @@ icon: "JobIconCaptain" requireAdminNotify: true joinNotifyCrew: true - announcementPrototype: CaptainArrivalNotification + arrivalNotificationPrototype: CaptainArrivalNotification supervisors: job-supervisors-centcom whitelistedSpecies: - Human diff --git a/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml b/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml index cde2a2a738..6dee5b319c 100644 --- a/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml +++ b/Resources/Prototypes/Roles/Jobs/Command/head_of_personnel.yml @@ -19,7 +19,7 @@ startingGear: HoPGear icon: "JobIconHeadOfPersonnel" requireAdminNotify: true - announcementPrototype: HeadOfPersonnelArrivalNotification + arrivalNotificationPrototype: HeadOfPersonnelArrivalNotification supervisors: job-supervisors-captain whitelistedSpecies: - Human diff --git a/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml b/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml index 2be4b76c18..72100e9fd0 100644 --- a/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml +++ b/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml @@ -16,7 +16,7 @@ startingGear: ChiefEngineerGear icon: "JobIconChiefEngineer" requireAdminNotify: true - announcementPrototype: ChiefEngineerArrivalNotification + arrivalNotificationPrototype: ChiefEngineerArrivalNotification supervisors: job-supervisors-captain whitelistedSpecies: - Human diff --git a/Resources/Prototypes/Roles/Jobs/Justice/inspector.yml b/Resources/Prototypes/Roles/Jobs/Justice/inspector.yml index 3176d34bfd..b6ad4043c3 100644 --- a/Resources/Prototypes/Roles/Jobs/Justice/inspector.yml +++ b/Resources/Prototypes/Roles/Jobs/Justice/inspector.yml @@ -14,7 +14,7 @@ time: 36000 #10 hrs startingGear: InspectorGear icon: "JobIconInspector" - announcementPrototype: InspectorArrivalNotification + arrivalNotificationPrototype: InspectorArrivalNotification supervisors: job-supervisors-captain access: - Service diff --git a/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml b/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml index 009c294984..c5e429c6fb 100644 --- a/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml +++ b/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml @@ -14,7 +14,7 @@ weight: 10 startingGear: CMOGear icon: "JobIconChiefMedicalOfficer" - announcementPrototype: ChiefMedicalOfficerArrivalNotification + arrivalNotificationPrototype: ChiefMedicalOfficerArrivalNotification requireAdminNotify: true supervisors: job-supervisors-captain whitelistedSpecies: diff --git a/Resources/Prototypes/Roles/Jobs/Science/research_director.yml b/Resources/Prototypes/Roles/Jobs/Science/research_director.yml index 918c9cb993..127a0a06c9 100644 --- a/Resources/Prototypes/Roles/Jobs/Science/research_director.yml +++ b/Resources/Prototypes/Roles/Jobs/Science/research_director.yml @@ -13,7 +13,7 @@ startingGear: ResearchDirectorGear icon: "JobIconResearchDirector" requireAdminNotify: true - announcementPrototype: ResearchDirectorArrivalNotification + arrivalNotificationPrototype: ResearchDirectorArrivalNotification supervisors: job-supervisors-captain whitelistedSpecies: - Human diff --git a/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml b/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml index be693bb9f4..a9f65e7d63 100644 --- a/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml +++ b/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml @@ -16,7 +16,7 @@ startingGear: HoSGear icon: "JobIconHeadOfSecurity" requireAdminNotify: true - announcementPrototype: HeadOfSecurityArrivalNotification + arrivalNotificationPrototype: HeadOfSecurityArrivalNotification supervisors: job-supervisors-captain whitelistedSpecies: - Human diff --git a/Resources/Prototypes/_White/Entities/Cult/constructs.yml b/Resources/Prototypes/_White/Entities/Cult/constructs.yml index 74f50b6b8f..e1ac802ef4 100644 --- a/Resources/Prototypes/_White/Entities/Cult/constructs.yml +++ b/Resources/Prototypes/_White/Entities/Cult/constructs.yml @@ -79,6 +79,8 @@ - DoorBumpOpener - type: NameIdentifier group: Construct + - type: GlobalAntagonist + antagonistPrototype: globalAntagonistCult - type: entity id: JuggernautConstruct diff --git a/Resources/Textures/White/Cult/bola.rsi/icon.png b/Resources/Textures/White/Cult/bola.rsi/icon.png new file mode 100644 index 0000000000..a0a1a79221 Binary files /dev/null and b/Resources/Textures/White/Cult/bola.rsi/icon.png differ diff --git a/Resources/Textures/White/Cult/bola.rsi/meta.json b/Resources/Textures/White/Cult/bola.rsi/meta.json new file mode 100644 index 0000000000..9efc29f585 --- /dev/null +++ b/Resources/Textures/White/Cult/bola.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from Citadel Station at https://github.com/Citadel-Station-13/Citadel-Station-13/commit/3cfea7eb92246d311de8b531347795bc76d6dab6", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + } + ] +} diff --git a/Resources/Textures/White/Objects/Weapons/Throwable/energybola.rsi/icon.png b/Resources/Textures/White/Objects/Weapons/Throwable/energybola.rsi/icon.png new file mode 100644 index 0000000000..500b7034bb Binary files /dev/null and b/Resources/Textures/White/Objects/Weapons/Throwable/energybola.rsi/icon.png differ diff --git a/Resources/Textures/White/Objects/Weapons/Throwable/energybola.rsi/meta.json b/Resources/Textures/White/Objects/Weapons/Throwable/energybola.rsi/meta.json new file mode 100644 index 0000000000..5fb2da41d5 --- /dev/null +++ b/Resources/Textures/White/Objects/Weapons/Throwable/energybola.rsi/meta.json @@ -0,0 +1,20 @@ +{ + "version": 1, + "license": null, + "copyright": null, + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon", + "delays": [ + [ + 0.1, + 0.1 + ] + ] + } + ] +}