Merge branch 'master' of https://github.com/frosty-dev/ss14-core
@@ -29,18 +29,6 @@ public sealed class SingletonDeviceNetServerSystem : EntitySystem
|
||||
return Resolve(serverId, ref serverComponent) && serverComponent.Active;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set server active. WD EDIT
|
||||
/// </summary>
|
||||
public bool SetServerActive(EntityUid serverId, bool active, SingletonDeviceNetServerComponent? serverComponent = default)
|
||||
{
|
||||
if (!Resolve(serverId, ref serverComponent))
|
||||
return false;
|
||||
|
||||
serverComponent.Active = active;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the address of the currently active server for the given station id if there is one.<br/>
|
||||
/// What kind of server you're trying to get the active instance of is determined by the component type parameter TComp.<br/>
|
||||
|
||||
@@ -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<MessagesCartridgeComponent, CartridgeDeactivatedEvent>(OnCartDeactivation);
|
||||
SubscribeLocalEvent<MessagesCartridgeComponent, CartridgeAddedEvent>(OnCartInsertion);
|
||||
SubscribeLocalEvent<MessagesCartridgeComponent, ComponentRemove>(OnRemove);
|
||||
|
||||
SubscribeLocalEvent<PlayerSpawnCompleteEvent>(OnPlayerSpawned);
|
||||
}
|
||||
|
||||
public void Send(EntityUid uid, MessagesCartridgeComponent component)
|
||||
private void OnPlayerSpawned(PlayerSpawnCompleteEvent ev)
|
||||
{
|
||||
var stationId = _stationSystem.GetOwningStation(uid);
|
||||
if (!stationId.HasValue ||
|
||||
!_singletonServerSystem.TryGetActiveServerAddress<MessagesServerComponent>(stationId.Value,
|
||||
out var address) || !TryComp(uid, out CartridgeComponent? cartComponent))
|
||||
if (!_inventorySystem.TryGetSlotEntity(ev.Mob, "id", out var pdaUid) || !HasComp<MindContainerComponent>(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<MessagesServerComponent>(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,
|
||||
|
||||
@@ -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<MessagesServerComponent, DeviceNetworkPacketEvent>(OnPacketReceived);
|
||||
SubscribeLocalEvent<MessagesServerComponent, MapInitEvent>(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<MessagesCartridgeComponent>();
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,7 +13,7 @@ ent-HandHeldMassScanner = ручной сканер массы
|
||||
.desc = Ручной сканер массы.
|
||||
ent-Lantern = фонарь
|
||||
.desc = Священный свет освещает путь.
|
||||
ent-FlippoLighter = зажигалку "Флиппо"
|
||||
ent-FlippoLighter = зажигалка "Флиппо"
|
||||
.desc = Прочная металлическая зажигалка, служит довольно долго.
|
||||
ent-FlippoEngravedLighter = гравированная зажигалка "Флиппо"
|
||||
.desc = Прочная золотая зажигалка, служит довольно долго. Гравировка не дает никаких тактических преимуществ.
|
||||
|
||||
@@ -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. Невероятно прочный сплав внутри, обычная плоть снаружи.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -169,6 +169,7 @@
|
||||
path: /Audio/Announcements/attention.ogg
|
||||
startDelay: 10
|
||||
earliestStart: 15
|
||||
minimumPlayers: 15 # WD
|
||||
weight: 6
|
||||
duration: 50
|
||||
- type: VentCrittersRule
|
||||
|
||||
@@ -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
|
||||
receiveFrequencyId: SyndicateMessagesClient
|
||||
BIN
Resources/Textures/White/Cult/culthood.rsi/equipped-HELMET.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Resources/Textures/White/Cult/culthood.rsi/icon.png
Normal file
|
After Width: | Height: | Size: 367 B |
BIN
Resources/Textures/White/Cult/culthood.rsi/inhand-left.png
Normal file
|
After Width: | Height: | Size: 923 B |
BIN
Resources/Textures/White/Cult/culthood.rsi/inhand-right.png
Normal file
|
After Width: | Height: | Size: 958 B |
26
Resources/Textures/White/Cult/culthood.rsi/meta.json
Normal file
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
BIN
Resources/Textures/White/Cult/cultrobes.rsi/icon.png
Normal file
|
After Width: | Height: | Size: 963 B |
BIN
Resources/Textures/White/Cult/cultrobes.rsi/inhand-left.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Resources/Textures/White/Cult/cultrobes.rsi/inhand-right.png
Normal file
|
After Width: | Height: | Size: 795 B |
30
Resources/Textures/White/Cult/cultrobes.rsi/meta.json
Normal file
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 324 B |
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||