Merge pull request #112 from frosty-dev/ups

Ups
This commit is contained in:
Jabak
2024-08-13 22:19:16 +03:00
committed by GitHub
28 changed files with 32303 additions and 31023 deletions

View File

@@ -132,7 +132,7 @@ public sealed class ChargeActionSystem : SharedChargingSystem
{
if (_chargeLevel > 0 && _charging)
{
RaiseNetworkEvent(new AddWizardChargeEvent(action.ChargeProto));
RaiseNetworkEvent(new AddWizardChargeEvent(GetNetEntity(actionId)));
}
_prevChargeLevel = _chargeLevel;
}

View File

@@ -29,6 +29,18 @@ 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/>

View File

@@ -44,8 +44,8 @@ public sealed class MessagesCartridgeSystem : EntitySystem
out var address) || !TryComp(uid, out CartridgeComponent? cartComponent))
return;
SendName(uid, component, cartComponent, address);
component.UserUid = cartComponent.LoaderUid?.Id;
SendName(uid, component, cartComponent, address);
}
private void OnRemove(EntityUid uid, MessagesCartridgeComponent component, ComponentRemove args)
@@ -179,6 +179,7 @@ public sealed class MessagesCartridgeSystem : EntitySystem
[MessagesNetworkKeys.UserId] = component.UserUid,
[MessagesNetworkKeys.NewUser] = messagesUser
};
_deviceNetworkSystem.QueuePacket(uid, address, packet);
}
@@ -199,7 +200,7 @@ public sealed class MessagesCartridgeSystem : EntitySystem
/// <summary>
/// Returns the user's name, job title and job department
/// </summary>
public bool TryGetMessagesUser(MessagesCartridgeComponent component, CartridgeComponent cartridgeComponent, out MessagesUserData messagesUserData)
private bool TryGetMessagesUser(MessagesCartridgeComponent component, CartridgeComponent cartridgeComponent, out MessagesUserData messagesUserData)
{
messagesUserData = new MessagesUserData();

View File

@@ -3,6 +3,7 @@ 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;
@@ -26,18 +27,27 @@ public sealed class MessagesServerSystem : EntitySystem
{
base.Initialize();
SubscribeLocalEvent<MessagesServerComponent, DeviceNetworkPacketEvent>(OnPacketReceived);
SubscribeLocalEvent<MessagesServerComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<MessagesServerComponent, MapInitEvent>(OnInit);
}
private void OnInit(EntityUid uid, MessagesServerComponent component, ComponentInit args)
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>();
var stationId = _stationSystem.GetOwningStation(uid);
while (query.MoveNext(out var entityUid, out var cartridge))
{
if (stationId.HasValue && _singletonServerSystem.TryGetActiveServerAddress<MessagesServerComponent>(stationId.Value, out var address) && TryComp(entityUid, out CartridgeComponent? cartComponent))
_messagesSystem.SendName(entityUid, cartridge, cartComponent, address);
var stationId = _stationSystem.GetOwningStation(entityUid);
if (stationId.HasValue && stationIdServer == stationId && TryComp(entityUid, out CartridgeComponent? cartComponent))
_messagesSystem.SendName(entityUid, cartridge, cartComponent, device.Address);
}
}

View File

@@ -1,5 +1,7 @@
using Content.Shared._White.Wizard;
using Content.Server.Actions;
using Content.Shared._White.Wizard;
using Content.Shared._White.Wizard.Charging;
using Content.Shared.Actions;
using Content.Shared.Follower;
using Content.Shared.Mobs;
using Robust.Shared.Audio;
@@ -12,6 +14,7 @@ public sealed class ChargingSystem : SharedChargingSystem
{
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly FollowerSystem _followerSystem = default!;
[Dependency] private readonly ActionsSystem _actionsSystem = default!;
private readonly Dictionary<EntityUid, List<EntityUid>> _charges = new();
@@ -132,8 +135,15 @@ public sealed class ChargingSystem : SharedChargingSystem
private void Add(AddWizardChargeEvent msg, EntitySessionEventArgs args)
{
var spell = GetEntity(msg.Spell);
if (!_actionsSystem.TryGetActionData(spell, out var baseAction) ||
baseAction is not BaseTargetActionComponent action || !action.IsChargeEnabled)
{
return;
}
if (args.SenderSession.AttachedEntity != null)
AddCharge(args.SenderSession.AttachedEntity.Value, msg.ChargeProto);
AddCharge(args.SenderSession.AttachedEntity.Value, action.ChargeProto);
}
private void Remove(RemoveWizardChargeEvent msg, EntitySessionEventArgs args)

View File

@@ -31,11 +31,11 @@ public struct BeforeCastSpellEvent
[Serializable, NetSerializable]
public sealed partial class AddWizardChargeEvent : EntityEventArgs
{
public string ChargeProto;
public NetEntity Spell;
public AddWizardChargeEvent(string chargeProto)
public AddWizardChargeEvent(NetEntity spell)
{
ChargeProto = chargeProto;
Spell = spell;
}
}

View File

@@ -8097,3 +8097,57 @@
id: 482
time: '2024-08-11T14:52:30.0000000+00:00'
url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/609
- author: keslik
changes:
- message: "\u042D\u043C\u043E\u0446\u0438\u044F \"\u043E\u0442\u0434\u0430\u0451\
\u0442 \u0447\u0435\u0441\u0442\u044C\" \u0437\u0430\u043C\u0435\u043D\u0435\
\u043D\u0430 \u043D\u0430 \"\u0441\u0430\u043B\u044E\u0442\u0443\u0435\u0442\
\". \u0417\u0432\u0443\u043A \u0441\u043D\u043E\u0432\u0430 \u0440\u0430\u0431\
\u043E\u0442\u0430\u0435\u0442"
type: Fix
id: 483
time: '2024-08-11T21:28:56.0000000+00:00'
url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/610
- author: Spatison
changes:
- message: "\u0421\u0435\u0440\u0432\u0435\u0440 \u0441\u043E\u043E\u0431\u0449\u0435\
\u043D\u0438\u0439 \u0442\u0435\u043F\u0435\u0440\u044C \u0432\u0438\u0434\u0438\
\u0442 \u043D\u043E\u0432\u044B\u0445 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\
\u0430\u0442\u0435\u043B\u0435\u0439"
type: Fix
id: 484
time: '2024-08-12T10:29:49.0000000+00:00'
url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/611
- author: Warete
changes:
- message: "Triumph \u0443\u0434\u0430\u043B\u0451\u043D \u0438\u0437 \u0440\u043E\
\u0442\u0430\u0446\u0438\u0438"
type: Remove
id: 485
time: '2024-08-12T19:22:49.0000000+00:00'
url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/615
- author: PointPNG
changes:
- message: "\u0411\u044B\u043B\u0438 \u043F\u043E\u0447\u0438\u0449\u0435\u043D\u044B\
\ invalid entity \u0443 \u0422\u0440\u0438\u0443\u043C\u0444\u0430, \u0412\u0430\
\u0439\u0442\u0411\u043E\u043A\u0441\u0430, \u0414\u0440\u0430\u0439\u0434\u043E\
\u043A\u0430 \u0438 \u0412\u0430\u0439\u0442\u041C\u0443\u0441\u0430."
type: Fix
- message: "\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0412\u0430\
\u0439\u0442\u041C\u0443\u0441\u0430."
type: Add
- message: "\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0414\u0440\
\u0430\u0439\u0414\u043E\u043A\u0430."
type: Add
id: 486
time: '2024-08-12T19:22:33.0000000+00:00'
url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/614
- author: keslik
changes:
- message: "\u0417\u0430\u0449\u0438\u0442\u0430 \u043E\u0442 \u0445\u043E\u043B\
\u043E\u0434\u0430 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\
\u0441\u044F \u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u043E"
type: Fix
id: 487
time: '2024-08-12T22:34:10.0000000+00:00'
url: https://api.github.com/repos/frosty-dev/ss14-core/pulls/616

View File

@@ -4,21 +4,23 @@ armor-examinable-verb-message = Изучить показатели брони.
armor-examine = Обеспечивает следующую защиту:
armor-coefficient-value =
- [color=yellow]{ $type ->
*[other] Неизвестный
*[other] Другой
[Blunt] Тупой
[Slash] Рубящий
[Piercing] Проникающий
[Heat] Тепловой
[Radiation] Радиационный
[Caustic] Кислотный
[Cold] Морозный
}[/color] урон снижается на [color=lightblue]{ $value }%[/color].
armor-reduction-value =
- [color=yellow]{ $type ->
*[other] Неизвестный
*[other] Другой
[Blunt] Тупой
[Slash] Рубящий
[Piercing] Проникающий
[Heat] Тепловой
[Radiation] Радиационный
[Caustic] Кислотный
[Cold] Морозный
}[/color] урон снижается на [color=lightblue]{ $value }[/color].

File diff suppressed because it is too large Load Diff

View File

@@ -24356,8 +24356,6 @@ entities:
pos: -105.5,107.5
parent: 2
- type: DeviceList
configurators:
- invalid
devices:
- 29693
- 30062
@@ -24500,8 +24498,6 @@ entities:
pos: -78.5,36.5
parent: 2
- type: DeviceList
configurators:
- invalid
devices:
- 22972
- 29649
@@ -25200,8 +25196,6 @@ entities:
pos: 64.5,82.5
parent: 2
- type: DeviceList
configurators:
- invalid
devices:
- 1172
- 1171
@@ -151791,8 +151785,6 @@ entities:
pos: -119.5,56.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 124
- uid: 23085

File diff suppressed because it is too large Load Diff

View File

@@ -17906,8 +17906,6 @@ entities:
pos: -13.5,16.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 27391
- uid: 18056
@@ -90021,8 +90019,6 @@ entities:
pos: 65.5,-37.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 481
- uid: 13057
@@ -90031,8 +90027,6 @@ entities:
pos: 66.5,-37.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 481
- uid: 13058
@@ -90066,8 +90060,6 @@ entities:
pos: 67.5,-37.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 481
- uid: 13069
@@ -90076,8 +90068,6 @@ entities:
pos: 65.5,-42.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 481
- uid: 13070
@@ -90086,8 +90076,6 @@ entities:
pos: 66.5,-42.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 481
- uid: 13071
@@ -90096,8 +90084,6 @@ entities:
pos: 67.5,-42.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 481
- uid: 13072
@@ -90266,8 +90252,6 @@ entities:
pos: 39.5,-37.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
- uid: 13105
components:
- type: Transform
@@ -118354,8 +118338,6 @@ entities:
pos: -10.5,15.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 27391
- type: AtmosPipeColor
@@ -118463,8 +118445,6 @@ entities:
pos: -4.5,28.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
- type: AtmosPipeColor
color: '#0055CCFF'
- uid: 16718
@@ -118659,8 +118639,6 @@ entities:
pos: -16.5,31.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 78
- type: AtmosPipeColor
@@ -119912,8 +119890,6 @@ entities:
pos: -11.5,15.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 27391
- type: AtmosPipeColor
@@ -120180,8 +120156,6 @@ entities:
pos: -17.5,31.5
parent: 2
- type: DeviceNetwork
configurators:
- invalid
deviceLists:
- 78
- type: AtmosPipeColor

View File

@@ -86,69 +86,3 @@
- EncryptionKeySecurity
- EncryptionKeyService
- EncryptionKeyCommand
- type: entity
id: MessagesServer
parent: BaseMachinePowered
name: PDA messaging server
description: Server that allows PDA messaging to function on the station.
components:
- type: Sprite
sprite: Structures/Machines/server.rsi
layers:
- state: server
- state: variant-research
- type: ApcPowerReceiver
powerLoad: 200
- type: ExtensionCableReceiver
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 600
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 300
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound:
collection: MetalBreak
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 2
- type: Appearance
- type: AmbientSound
volume: -9
range: 5
sound:
path: /Audio/Ambience/Objects/server_fans.ogg
- type: MessagesServer
- type: SingletonDeviceNetServer
- type: DeviceNetwork
deviceNetId: Wireless
transmitFrequencyId: NTMessagesServer
receiveFrequencyId: NTMessagesClient
autoConnect: false
- type: StationLimitedNetwork
- type: entity
id: SyndicateMessagesServer
parent: MessagesServer
name: Syndicate PDA messaging server
description: Server that allows PDA messaging between Syndicate operatives to function.
components:
- type: MessagesServer
- type: StationLimitedNetwork
- type: SingletonDeviceNetServer
- type: DeviceNetwork
deviceNetId: Wireless
transmitFrequencyId: SyndicateMessagesServer
receiveFrequencyId: SyndicateMessagesClient
autoConnect: false

View File

@@ -94,8 +94,8 @@
- type: ApcPowerReceiver
powerLoad: 200
- type: Actions
- type: SentienceTarget
flavorKind: station-event-random-sentience-flavor-mechanical
# - type: SentienceTarget # В пизду, за это говно никто не садится и занимает место.
# flavorKind: station-event-random-sentience-flavor-mechanical
- type: StaticPrice
price: 100
- type: Appearance

View File

@@ -160,11 +160,12 @@
- type: emote
id: Salute
category: Hands
buttonText: Отдать честь
chatMessages: [ отдает честь ]
buttonText: Приветствие
chatMessages: [ салютует ]
chatTriggers:
- салютует
- отдаёт честь
- отдает честь
allowMenu: true
- type: emote

View File

@@ -0,0 +1,63 @@
- type: entity
id: MessagesServer
parent: BaseMachinePowered
name: PDA messaging server
description: Server that allows PDA messaging to function on the station.
components:
- type: Sprite
sprite: Structures/Machines/server.rsi
layers:
- state: server
- state: variant-research
- type: ApcPowerReceiver
powerLoad: 200
- type: ExtensionCableReceiver
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 600
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 300
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound:
collection: MetalBreak
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 2
- type: Appearance
- type: AmbientSound
volume: -9
range: 5
sound:
path: /Audio/Ambience/Objects/server_fans.ogg
- type: AmbientOnPowered
- type: MessagesServer
- type: SingletonDeviceNetServer
- type: DeviceNetwork
deviceNetId: Wireless
transmitFrequencyId: NTMessagesServer
receiveFrequencyId: NTMessagesClient
autoConnect: false
- type: StationLimitedNetwork
- type: entity
id: SyndicateMessagesServer
parent: MessagesServer
name: Syndicate PDA messaging server
description: Server that allows PDA messaging between Syndicate operatives to function.
components:
- type: DeviceNetwork
deviceNetId: Wireless
transmitFrequencyId: SyndicateMessagesServer
receiveFrequencyId: SyndicateMessagesClient
autoConnect: false

View File

@@ -434,7 +434,7 @@
#Hskveez Atmospherics Hardsuit
- type: entity
parent: ClothingOuterHardsuitBase
parent: ClothingOuterHardsuitAtmos
id: ClothingOuterHardsuitHskveezAtmos
name: "старый скафандр атмос-техника"
suffix: fluff
@@ -444,32 +444,13 @@
sprite: White/Fluff/HSKveez/hardsuit.rsi
- type: Clothing
sprite: White/Fluff/HSKveez/hardsuit.rsi
- type: PressureProtection
highPressureMultiplier: 0.02
lowPressureMultiplier: 10000
- type: ClothingSpeedModifier
walkModifier: 0.8
sprintModifier: 0.8
- type: Armor
modifiers:
coefficients:
Blunt: 0.95
Slash: 0.95
Piercing: 0.95
Heat: 0.35
Radiation: 0.8
Caustic: 0.85
- type: TemperatureProtection
coefficient: 0.001
- type: ExplosionResistance
damageCoefficient: 0.90
- type: ToggleableClothing
clothingPrototype: ClothingHeadHelmetHardsuitHskveezAtmos
- type: GiftIgnore
#Hskveez Atmospherics Hardsuit
- type: entity
parent: ClothingHeadHardsuitWithLightBase
parent: ClothingHeadHelmetHardsuitAtmos
id: ClothingHeadHelmetHardsuitHskveezAtmos
suffix: fluff
noSpawn: true
@@ -478,35 +459,10 @@
components:
- type: Sprite
sprite: White/Fluff/HSKveez/helmet.rsi
layers:
- state: icon
- state: icon-unshaded
shader: unshaded
- state: light-overlay
visible: false
shader: unshaded
map: ["light"]
- type: HandheldLight
addPrefix: false
- type: ToggleableLightVisuals
spriteLayer: light
clothingVisuals:
head:
- state: equipped-head-light
shader: unshaded
- type: Clothing
clothingVisuals:
head:
- state: equipped-head
- state: equipped-head-unshaded
shader: unshaded
sprite: White/Fluff/HSKveez/hardsuit.rsi
- type: PointLight
color: "#ffffff"
- type: PressureProtection
highPressureMultiplier: 0.08
lowPressureMultiplier: 10000
- type: TemperatureProtection
coefficient: 0.005
#koitorra
- type: entity

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 797 B

After

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 942 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 B

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 334 B