diff --git a/Content.Server/DeviceNetwork/Systems/SingletonDeviceNetServerSystem.cs b/Content.Server/DeviceNetwork/Systems/SingletonDeviceNetServerSystem.cs index 8d1291b76d..5fdcad7697 100644 --- a/Content.Server/DeviceNetwork/Systems/SingletonDeviceNetServerSystem.cs +++ b/Content.Server/DeviceNetwork/Systems/SingletonDeviceNetServerSystem.cs @@ -29,18 +29,6 @@ public sealed class SingletonDeviceNetServerSystem : EntitySystem return Resolve(serverId, ref serverComponent) && serverComponent.Active; } - /// - /// Set server active. WD EDIT - /// - public bool SetServerActive(EntityUid serverId, bool active, SingletonDeviceNetServerComponent? serverComponent = default) - { - if (!Resolve(serverId, ref serverComponent)) - return false; - - serverComponent.Active = active; - return true; - } - /// /// Returns the address of the currently active server for the given station id if there is one.
/// What kind of server you're trying to get the active instance of is determined by the component type parameter TComp.
diff --git a/Content.Server/_White/CartridgeLoader/Cartridges/MessagesCartridgeSystem.cs b/Content.Server/_White/CartridgeLoader/Cartridges/MessagesCartridgeSystem.cs index b99c19b88b..b636d83962 100644 --- a/Content.Server/_White/CartridgeLoader/Cartridges/MessagesCartridgeSystem.cs +++ b/Content.Server/_White/CartridgeLoader/Cartridges/MessagesCartridgeSystem.cs @@ -10,6 +10,8 @@ using Content.Server.DeviceNetwork.Systems; using Content.Shared.DeviceNetwork; using Content.Server.Station.Systems; using Content.Shared._White.CartridgeLoader.Cartridges; +using Content.Shared.Inventory; +using Content.Shared.Mind.Components; namespace Content.Server._White.CartridgeLoader.Cartridges; @@ -22,6 +24,7 @@ public sealed class MessagesCartridgeSystem : EntitySystem [Dependency] private readonly DeviceNetworkSystem _deviceNetworkSystem = default!; [Dependency] private readonly SingletonDeviceNetServerSystem _singletonServerSystem = default!; [Dependency] private readonly StationSystem _stationSystem = default!; + [Dependency] private readonly InventorySystem _inventorySystem = default!; public override void Initialize() { @@ -33,18 +36,30 @@ public sealed class MessagesCartridgeSystem : EntitySystem SubscribeLocalEvent(OnCartDeactivation); SubscribeLocalEvent(OnCartInsertion); SubscribeLocalEvent(OnRemove); + + SubscribeLocalEvent(OnPlayerSpawned); } - public void Send(EntityUid uid, MessagesCartridgeComponent component) + private void OnPlayerSpawned(PlayerSpawnCompleteEvent ev) { - var stationId = _stationSystem.GetOwningStation(uid); - if (!stationId.HasValue || - !_singletonServerSystem.TryGetActiveServerAddress(stationId.Value, - out var address) || !TryComp(uid, out CartridgeComponent? cartComponent)) + if (!_inventorySystem.TryGetSlotEntity(ev.Mob, "id", out var pdaUid) || !HasComp(ev.Mob)) + return; + MessagesCartridgeComponent? comp = null; + + var programs = _cartridgeLoaderSystem.GetInstalled(pdaUid.Value); + var program = programs.ToList().Find(program => TryComp(program, out comp)); + + if (comp == null) return; - component.UserUid = cartComponent.LoaderUid?.Id; - SendName(uid, component, cartComponent, address); + if (!TryComp(program, out CartridgeComponent? cartComponent)) + return; + + var stationId = _stationSystem.GetOwningStation(pdaUid); + if (!stationId.HasValue || !_singletonServerSystem.TryGetActiveServerAddress(stationId.Value, out var address)) + return; + + SendName(pdaUid.Value, comp, cartComponent, address); } private void OnRemove(EntityUid uid, MessagesCartridgeComponent component, ComponentRemove args) @@ -172,7 +187,7 @@ public sealed class MessagesCartridgeSystem : EntitySystem public void SendName(EntityUid uid, MessagesCartridgeComponent component, CartridgeComponent cartComponent, string? address) { TryGetMessagesUser(component, cartComponent, out var messagesUser); - +; var packet = new NetworkPayload() { [MessagesNetworkKeys.UserId] = component.UserUid, diff --git a/Content.Server/_White/Radio/EntitySystems/MessagesServerSystem.cs b/Content.Server/_White/Radio/EntitySystems/MessagesServerSystem.cs index 27967e3049..87a1022624 100644 --- a/Content.Server/_White/Radio/EntitySystems/MessagesServerSystem.cs +++ b/Content.Server/_White/Radio/EntitySystems/MessagesServerSystem.cs @@ -1,13 +1,9 @@ using System.Linq; -using Content.Server._White.CartridgeLoader.Cartridges; using Content.Server._White.Radio.Components; using Content.Server.Administration.Logs; using Content.Server.Chat.Systems; -using Content.Server.DeviceNetwork.Components; using Content.Server.DeviceNetwork.Systems; -using Content.Server.Station.Systems; using Content.Shared._White.CartridgeLoader.Cartridges; -using Content.Shared.CartridgeLoader; using Content.Shared.Database; using Content.Shared.DeviceNetwork; @@ -18,37 +14,13 @@ public sealed class MessagesServerSystem : EntitySystem { [Dependency] private readonly DeviceNetworkSystem _deviceNetworkSystem = default!; [Dependency] private readonly SingletonDeviceNetServerSystem _singletonServerSystem = default!; - [Dependency] private readonly MessagesCartridgeSystem _messagesSystem = default!; [Dependency] private readonly IAdminLogManager _adminLogger = default!; [Dependency] private readonly ChatSystem _chat = default!; - [Dependency] private readonly StationSystem _stationSystem = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnPacketReceived); - SubscribeLocalEvent(OnInit); - } - - private void OnInit(EntityUid uid, MessagesServerComponent component, MapInitEvent args) - { - if (!TryComp(uid, out DeviceNetworkComponent? device) || !_singletonServerSystem.SetServerActive(uid, true)) - return; - - _deviceNetworkSystem.ConnectDevice(uid, device); - - var stationIdServer = _stationSystem.GetOwningStation(uid); - if (!stationIdServer.HasValue) - return; - - var query = EntityQueryEnumerator(); - - while (query.MoveNext(out var entityUid, out var cartridge)) - { - var stationId = _stationSystem.GetOwningStation(entityUid); - if (stationId.HasValue && stationIdServer == stationId && TryComp(entityUid, out CartridgeComponent? cartComponent)) - _messagesSystem.SendName(entityUid, cartridge, cartComponent, device.Address); - } } /// diff --git a/Resources/Changelog/ChangelogWhite.yml b/Resources/Changelog/ChangelogWhite.yml index 9fa122ebf4..d8ccd6cac4 100644 --- a/Resources/Changelog/ChangelogWhite.yml +++ b/Resources/Changelog/ChangelogWhite.yml @@ -1,18 +1,4 @@ Entries: -- author: HitPanda - changes: - - message: "\u0411\u043E\u043B\u044C\u0448\u0435 \u043A\u043D\u043E\u043F\u043E\u043A\ - \ \u043F\u0435\u0434\u0430\u043B\u044F\u043C." - type: Add - id: 37 - time: '2023-01-20T23:43:59.0000000+00:00' -- author: HitPanda - changes: - - message: "\u0424\u0438\u043A\u0441 \u0430\u0434\u043C\u0438\u043D \u0434\u043E\ - \u0441\u0442\u0443\u043F\u043E\u0432" - type: Fix - id: 38 - time: '2023-01-21T11:40:56.0000000+00:00' - author: HitPanda changes: - message: "\u0424\u0438\u043A\u0441 \u0430\u0434\u043C\u0438\u043D-\u0434\u043E\ @@ -8685,3 +8671,41 @@ id: 536 time: '2024-09-04T18:47:35.0000000+00:00' url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/685 +- author: BIG_Zi_348 + changes: + - message: "\u041D\u043E\u0432\u044B\u0439 \u0441\u043F\u0440\u0430\u0439\u0442\ + \ \u0440\u043E\u0431\u044B \u0438 \u043A\u0430\u043F\u044E\u0448\u043E\u043D\ + \u0430 \u043A\u0443\u043B\u044C\u0442\u0430." + type: Add + - message: "\u0421\u043F\u0430\u0432\u043D \u041A\u043E\u0440\u043E\u043B\u044F\ + \ \u041A\u0440\u044B\u0441 \u0442\u0435\u043F\u0435\u0440\u044C \u0442\u043E\ + \u043B\u044C\u043A\u043E \u043F\u0440\u0438 >15 \u0438\u0433\u0440\u043E\u043A\ + \u0430\u0445 \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435." + type: Tweak + - message: "\u0418\u0437\u043C\u0435\u043D\u0435\u043D \u0440\u0430\u0437\u043C\u0435\ + \u0440 \u0438 \u0432\u043D\u0435\u0448\u043D\u0438\u0439 \u0432\u0438\u0434\ + \ \u0434\u0438\u0441\u043A\u0430 \u043E\u0447\u043A\u043E\u0432 \u0434\u043B\ + \u044F \u0420\u041D\u0414." + type: Tweak + - message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u0440\u0430\u0437\ + \u043C\u0435\u0440 \u0444\u0430\u043B\u044C\u0448\u0438\u0432\u043E\u0433\u043E\ + \ \u0434\u0438\u0441\u043A\u0430 \u044F\u0434\u0435\u0440\u043D\u043E\u0439\ + \ \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438." + type: Fix + - message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u044B \u043F\u0435\ + \u0440\u0435\u0432\u043E\u0434\u044B \u0440\u0430\u0437\u043B\u0438\u0447\u043D\ + \u043E\u0439 \u043C\u0435\u043B\u043E\u0447\u0438." + type: Fix + id: 537 + time: '2024-09-06T03:56:42.0000000+00:00' + url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/686 +- author: Spatison + changes: + - message: "\u0422\u0435\u043F\u0435\u0440\u044C \u0441 \u043D\u0430\u0447\u0430\ + \u043B\u0430 \u0440\u0430\u0443\u043D\u0434\u0430 \u043C\u043E\u0436\u043D\u043E\ + \ \u043D\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u043A\u043E\u043C\u0443\ + \ \u0443\u0433\u043E\u0434\u043D\u043E" + type: Fix + id: 538 + time: '2024-09-06T17:18:36.0000000+00:00' + url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/687 diff --git a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-108.ftl b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-108.ftl index 087d9c2af5..d2b955634d 100644 --- a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-108.ftl +++ b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-108.ftl @@ -13,7 +13,7 @@ ent-HandHeldMassScanner = ручной сканер массы .desc = Ручной сканер массы. ent-Lantern = фонарь .desc = Священный свет освещает путь. -ent-FlippoLighter = зажигалку "Флиппо" +ent-FlippoLighter = зажигалка "Флиппо" .desc = Прочная металлическая зажигалка, служит довольно долго. ent-FlippoEngravedLighter = гравированная зажигалка "Флиппо" .desc = Прочная золотая зажигалка, служит довольно долго. Гравировка не дает никаких тактических преимуществ. diff --git a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-74.ftl b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-74.ftl index 71fb9d7476..2bee19c60b 100644 --- a/Resources/Locale/ru-RU/_white/locales-new/autotranslate-74.ftl +++ b/Resources/Locale/ru-RU/_white/locales-new/autotranslate-74.ftl @@ -38,6 +38,5 @@ ent-MobMoth = Ури́ст МакФлафф ent-MobSkeletonCloset = скелет в шкафу .desc = "скелет в шкафу" ent-MobHumanTerminator = exterminator - .desc = "exterminator" -ent-MobTerminatorEndoskeleton = эндоскелет nt-800 "exterminator" +ent-MobTerminatorEndoskeleton = эндоскелет nt-800 "Экстерминатор" .desc = Внутренняя движущая сила инфильтрационного андроида Susnet. Невероятно прочный сплав внутри, обычная плоть снаружи. diff --git a/Resources/Prototypes/Entities/Clothing/Head/hoods.yml b/Resources/Prototypes/Entities/Clothing/Head/hoods.yml index b62834dd98..9b0482476f 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hoods.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hoods.yml @@ -110,9 +110,9 @@ description: There's no cult without cult hoods. components: - type: Sprite - sprite: Clothing/Head/Hoods/cult.rsi + sprite: White/Cult/culthood.rsi # WD - type: Clothing - sprite: Clothing/Head/Hoods/cult.rsi + sprite: White/Cult/culthood.rsi # WD - type: Tag tags: - WhitelistChameleon diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml index 441920c250..0102a79c2c 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/misc.yml @@ -144,9 +144,9 @@ description: There's no cult without classic red/crimson cult robes. components: - type: Sprite - sprite: Clothing/OuterClothing/Misc/cultrobes.rsi + sprite: White/Cult/cultrobes.rsi # WD - type: Clothing - sprite: Clothing/OuterClothing/Misc/cultrobes.rsi + sprite: White/Cult/cultrobes.rsi # WD - type: entity parent: ClothingOuterMiscBase # WD edit diff --git a/Resources/Prototypes/Entities/Objects/Misc/cds.yml b/Resources/Prototypes/Entities/Objects/Misc/cds.yml index a80a7d1d58..7320fcd5cd 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/cds.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/cds.yml @@ -4,6 +4,10 @@ id: CoordinatesDisk description: A disk containing the coordinates to a location in space. Necessary for any FTL-traversing vessel to reach their destination. Fits inside shuttle consoles. components: + - type: Item # WD + size: Small + shape: + - 0, 0, 0, 0 - type: Sprite sprite: Objects/Misc/cd.rsi state: icon diff --git a/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml b/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml index fdcd8455bf..98bf2982fb 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml @@ -46,6 +46,8 @@ - type: Sprite sprite: Objects/Misc/nukedisk.rsi state: icon + - type: Item # WD + size: Tiny - type: StaticPrice price: 1 # it's worth even less than normal items. Perfection. # WD edit sounds start diff --git a/Resources/Prototypes/Entities/Objects/Specific/Research/disk.yml b/Resources/Prototypes/Entities/Objects/Specific/Research/disk.yml index ff12975c6c..1426f8c2e0 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Research/disk.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Research/disk.yml @@ -7,9 +7,9 @@ - type: Item size: Small shape: - - 0, 0, 1, 1 + - 0, 0, 0, 0 # WD - type: Sprite - sprite: Objects/Specific/Research/researchdisk.rsi + sprite: White/Objects/Specific/Research/researchdisk.rsi # WD state: icon - type: ResearchDisk - type: GuideHelp @@ -61,6 +61,10 @@ name: technology disk description: A disk for the R&D server containing research technology. components: + - type: Item # WD + size: Small + shape: + - 0, 0, 0, 0 - type: Sprite sprite: Objects/Misc/module.rsi layers: diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index 7281063c49..fe73962252 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -169,6 +169,7 @@ path: /Audio/Announcements/attention.ogg startDelay: 10 earliestStart: 15 + minimumPlayers: 15 # WD weight: 6 duration: 50 - type: VentCrittersRule diff --git a/Resources/Prototypes/_White/Entities/Structures/Machine/messege_server.yml b/Resources/Prototypes/_White/Entities/Structures/Machine/messege_server.yml index 534a6cb2d6..732731c512 100644 --- a/Resources/Prototypes/_White/Entities/Structures/Machine/messege_server.yml +++ b/Resources/Prototypes/_White/Entities/Structures/Machine/messege_server.yml @@ -1,6 +1,6 @@ - type: entity id: MessagesServer - parent: BaseMachinePowered + parent: BaseMachine name: PDA messaging server description: Server that allows PDA messaging to function on the station. components: @@ -9,9 +9,6 @@ layers: - state: server - state: variant-research - - type: ApcPowerReceiver - powerLoad: 200 - - type: ExtensionCableReceiver - type: Destructible thresholds: - trigger: @@ -43,11 +40,11 @@ - type: AmbientOnPowered - type: MessagesServer - type: SingletonDeviceNetServer + available: true - type: DeviceNetwork deviceNetId: Wireless transmitFrequencyId: NTMessagesServer receiveFrequencyId: NTMessagesClient - autoConnect: false - type: StationLimitedNetwork - type: entity @@ -59,5 +56,4 @@ - type: DeviceNetwork deviceNetId: Wireless transmitFrequencyId: SyndicateMessagesServer - receiveFrequencyId: SyndicateMessagesClient - autoConnect: false \ No newline at end of file + receiveFrequencyId: SyndicateMessagesClient \ No newline at end of file diff --git a/Resources/Textures/White/Cult/culthood.rsi/equipped-HELMET.png b/Resources/Textures/White/Cult/culthood.rsi/equipped-HELMET.png new file mode 100644 index 0000000000..54f688d3bc Binary files /dev/null and b/Resources/Textures/White/Cult/culthood.rsi/equipped-HELMET.png differ diff --git a/Resources/Textures/White/Cult/culthood.rsi/icon.png b/Resources/Textures/White/Cult/culthood.rsi/icon.png new file mode 100644 index 0000000000..b88272cceb Binary files /dev/null and b/Resources/Textures/White/Cult/culthood.rsi/icon.png differ diff --git a/Resources/Textures/White/Cult/culthood.rsi/inhand-left.png b/Resources/Textures/White/Cult/culthood.rsi/inhand-left.png new file mode 100644 index 0000000000..aa3d43df17 Binary files /dev/null and b/Resources/Textures/White/Cult/culthood.rsi/inhand-left.png differ diff --git a/Resources/Textures/White/Cult/culthood.rsi/inhand-right.png b/Resources/Textures/White/Cult/culthood.rsi/inhand-right.png new file mode 100644 index 0000000000..9b7997973b Binary files /dev/null and b/Resources/Textures/White/Cult/culthood.rsi/inhand-right.png differ diff --git a/Resources/Textures/White/Cult/culthood.rsi/meta.json b/Resources/Textures/White/Cult/culthood.rsi/meta.json new file mode 100644 index 0000000000..0635ca5b3b --- /dev/null +++ b/Resources/Textures/White/Cult/culthood.rsi/meta.json @@ -0,0 +1,26 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "theredrd", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "equipped-HELMET", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/White/Cult/cultrobes.rsi/equipped-OUTERCLOTHING-body-slim.png b/Resources/Textures/White/Cult/cultrobes.rsi/equipped-OUTERCLOTHING-body-slim.png new file mode 100644 index 0000000000..ea4da88ec8 Binary files /dev/null and b/Resources/Textures/White/Cult/cultrobes.rsi/equipped-OUTERCLOTHING-body-slim.png differ diff --git a/Resources/Textures/White/Cult/cultrobes.rsi/equipped-OUTERCLOTHING.png b/Resources/Textures/White/Cult/cultrobes.rsi/equipped-OUTERCLOTHING.png new file mode 100644 index 0000000000..ea4da88ec8 Binary files /dev/null and b/Resources/Textures/White/Cult/cultrobes.rsi/equipped-OUTERCLOTHING.png differ diff --git a/Resources/Textures/White/Cult/cultrobes.rsi/icon.png b/Resources/Textures/White/Cult/cultrobes.rsi/icon.png new file mode 100644 index 0000000000..5b10cf1728 Binary files /dev/null and b/Resources/Textures/White/Cult/cultrobes.rsi/icon.png differ diff --git a/Resources/Textures/White/Cult/cultrobes.rsi/inhand-left.png b/Resources/Textures/White/Cult/cultrobes.rsi/inhand-left.png new file mode 100644 index 0000000000..099fb41690 Binary files /dev/null and b/Resources/Textures/White/Cult/cultrobes.rsi/inhand-left.png differ diff --git a/Resources/Textures/White/Cult/cultrobes.rsi/inhand-right.png b/Resources/Textures/White/Cult/cultrobes.rsi/inhand-right.png new file mode 100644 index 0000000000..69f1a29518 Binary files /dev/null and b/Resources/Textures/White/Cult/cultrobes.rsi/inhand-right.png differ diff --git a/Resources/Textures/White/Cult/cultrobes.rsi/meta.json b/Resources/Textures/White/Cult/cultrobes.rsi/meta.json new file mode 100644 index 0000000000..53d014ce38 --- /dev/null +++ b/Resources/Textures/White/Cult/cultrobes.rsi/meta.json @@ -0,0 +1,30 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "theredrd", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "equipped-OUTERCLOTHING", + "directions": 4 + }, + { + "name": "equipped-OUTERCLOTHING-body-slim", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/White/Objects/Specific/Research/researchdisk.rsi/icon.png b/Resources/Textures/White/Objects/Specific/Research/researchdisk.rsi/icon.png new file mode 100644 index 0000000000..2fb631c049 Binary files /dev/null and b/Resources/Textures/White/Objects/Specific/Research/researchdisk.rsi/icon.png differ diff --git a/Resources/Textures/White/Objects/Specific/Research/researchdisk.rsi/meta.json b/Resources/Textures/White/Objects/Specific/Research/researchdisk.rsi/meta.json new file mode 100644 index 0000000000..9b51a6cc1e --- /dev/null +++ b/Resources/Textures/White/Objects/Specific/Research/researchdisk.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + } + ] +} \ No newline at end of file