Skip to content

Commit

Permalink
upstream update
Browse files Browse the repository at this point in the history
Update animals.yml

Update TGMC_xeno.yml

maps

maps

fix
  • Loading branch information
Rxup committed Jan 4, 2025
1 parent 6e6b806 commit 850a876
Show file tree
Hide file tree
Showing 24 changed files with 212 additions and 146 deletions.
80 changes: 80 additions & 0 deletions Content.IntegrationTests/Tests/Backmen/Body/HandsTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
using System.Linq;
using Content.Server.Body.Systems;
using Content.Server.Hands.Systems;
using Content.Shared.Body.Part;
using Content.Shared.Humanoid.Prototypes;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;

namespace Content.IntegrationTests.Tests.Backmen.Body;

[TestFixture]
public sealed class HandsTest
{
[Test]
public async Task AllSpeciesHaveLegs()
{
await using var pair = await PoolManager.GetServerClient(new PoolSettings
{
Dirty = true,
Connected = true,
InLobby = false,
});

var server = pair.Server;
var bodySys = server.EntMan.System<BodySystem>();

foreach (var speciesPrototype in server.ProtoMan.EnumeratePrototypes<SpeciesPrototype>())
{
var dummy = EntityUid.Invalid;
await server.WaitAssertion(() =>
{
dummy = server.EntMan.Spawn(speciesPrototype.Prototype);
});
await server.WaitIdleAsync();
await server.WaitRunTicks(2);
await server.WaitAssertion(() =>
{
Assert.That(dummy, Is.Not.EqualTo(EntityUid.Invalid));
var handCount = bodySys.GetBodyPartCount(dummy, BodyPartType.Leg);
Assert.That(handCount, Is.GreaterThanOrEqualTo(2), $"legs {speciesPrototype.ID}({speciesPrototype.Prototype})");
});

}

await pair.CleanReturnAsync();
}
[Test]
public async Task AllSpeciesHaveHands()
{
await using var pair = await PoolManager.GetServerClient(new PoolSettings
{
Dirty = true,
Connected = true,
InLobby = false,
});

var server = pair.Server;
var handsSys = server.EntMan.System<HandsSystem>();

foreach (var speciesPrototype in server.ProtoMan.EnumeratePrototypes<SpeciesPrototype>())
{
var dummy = EntityUid.Invalid;
await server.WaitAssertion(() =>
{
dummy = server.EntMan.Spawn(speciesPrototype.Prototype);
});
await server.WaitIdleAsync();
await server.WaitRunTicks(2);
await server.WaitAssertion(() =>
{
Assert.That(dummy, Is.Not.EqualTo(EntityUid.Invalid));
var handCount = handsSys.EnumerateHands(dummy).Count();
Assert.That(handCount, Is.GreaterThanOrEqualTo(2), $"hands {speciesPrototype.ID}({speciesPrototype.Prototype})");
});

}

await pair.CleanReturnAsync();
}
}
15 changes: 9 additions & 6 deletions Content.Server/Telephone/TelephoneSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using Robust.Shared.Replays;
using System.Linq;
using Content.Shared.Backmen.Chat;
using Content.Shared.Backmen.Language;
using Content.Shared.Silicons.StationAi;
using Content.Shared.Silicons.Borgs.Components;

Expand Down Expand Up @@ -93,7 +94,7 @@ private void OnListen(Entity<TelephoneComponent> entity, ref ListenEvent args)
if (!_recentChatMessages.Add((args.Source, args.Message, entity)))
return;

SendTelephoneMessage(args.Source, args.Message, entity);
SendTelephoneMessage(args.Source, args.Message, entity, language: args.Language); // backmen: language
}

private void OnTelephoneMessageReceived(Entity<TelephoneComponent> entity, ref TelephoneMessageReceivedEvent args)
Expand Down Expand Up @@ -122,16 +123,16 @@ private void OnTelephoneMessageReceived(Entity<TelephoneComponent> entity, ref T
// If speaker entity has TTS, the telephone will speak with the same voice
if(TryComp<TTSComponent>(args.MessageSource, out var ttsSpeaker))
{
EntityManager.EnsureComponent<TTSComponent>(entity, out var ttsTelephone);
EnsureComp<TTSComponent>(speaker, out var ttsTelephone);
ttsTelephone.VoicePrototypeId = ttsSpeaker.VoicePrototypeId;
}
else // Remove TTS if the speaker has no TTS
{
EntityManager.RemoveComponent<TTSComponent>(entity);
RemComp<TTSComponent>(speaker);
}
// Corvax-TTS-End

_chat.TrySendInGameICMessage(speaker, args.Message, volume, range, nameOverride: name, checkRadioPrefix: false);
_chat.TrySendInGameICMessage(speaker, args.Message, volume, range, nameOverride: name, checkRadioPrefix: false, languageOverride: args.Language);
}

#endregion
Expand Down Expand Up @@ -344,7 +345,9 @@ private void HandleEndingTelephoneCalls(Entity<TelephoneComponent> entity, Telep
SetTelephoneMicrophoneState(entity, false);
}

private void SendTelephoneMessage(EntityUid messageSource, string message, Entity<TelephoneComponent> source, bool escapeMarkup = true)
private void SendTelephoneMessage(EntityUid messageSource, string message, Entity<TelephoneComponent> source, bool escapeMarkup = true,
LanguagePrototype? language = null // backmen: language
)
{
// This method assumes that you've already checked that this
// telephone is able to transmit messages and that it can
Expand Down Expand Up @@ -387,7 +390,7 @@ private void SendTelephoneMessage(EntityUid messageSource, string message, Entit
RaiseLocalEvent(source, ref evSentMessage);
source.Comp.StateStartTime = _timing.CurTime;

var evReceivedMessage = new TelephoneMessageReceivedEvent(message, chatMsg, messageSource, source);
var evReceivedMessage = new TelephoneMessageReceivedEvent(message, chatMsg, messageSource, source, language); // backmen: language

foreach (var receiver in source.Comp.LinkedTelephones)
{
Expand Down
5 changes: 4 additions & 1 deletion Content.Shared/Telephone/TelephoneComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Shared.Backmen.Language;
using Content.Shared.Chat;
using Content.Shared.Speech;
using Robust.Shared.Audio;
Expand Down Expand Up @@ -179,7 +180,9 @@ public record struct TelephoneCallEndedEvent();
/// Raised when a chat message is received by a telephone from another
/// </summary>
[ByRefEvent]
public readonly record struct TelephoneMessageReceivedEvent(string Message, MsgChatMessage ChatMsg, EntityUid MessageSource, Entity<TelephoneComponent> TelephoneSource);
public readonly record struct TelephoneMessageReceivedEvent(string Message, MsgChatMessage ChatMsg, EntityUid MessageSource, Entity<TelephoneComponent> TelephoneSource,
LanguagePrototype? Language // backmen: language
);

#endregion

Expand Down
4 changes: 2 additions & 2 deletions Resources/ConfigPresets/Backmen/main.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[game]
hostname = "[RU][TTS]🌆Backmen - Ataraxia [MRP] (Doll Update)"
hostname = "[RU][TTS]🌆Backmen - Ataraxia [MRP]"
maxplayers = 70
soft_max_players = 60
desc="""📣 Наш личный модовый не коммерческий проект, который мы ведем и разрабатываем уже более года
Expand All @@ -23,7 +23,7 @@ defaultpreset="secret"
lobbyenabled = true
cryo_sleep_rejoining = true
lobbyduration=300
contraband_examine = false
contraband_examine = true

[infolinks]
website="https://backmen.ru"
Expand Down
12 changes: 10 additions & 2 deletions Resources/Prototypes/Corvax/Entities/Objects/Devices/pda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
name: internal affairs agent PDA
description: Corporation and profit are best friends.
components:
- type: Appearance
appearanceDataInit:
enum.PdaVisuals.PdaType:
!type:String
pda-lawyer
- type: Pda
id: IAAIDCard
state: pda-lawyer
- type: PdaBorderColor
borderColor: "#6f6192"
- type: Icon
Expand All @@ -18,9 +22,13 @@
name: pilot PDA
description: Нas protection from cosmic radiation.
components:
- type: Appearance
appearanceDataInit:
enum.PdaVisuals.PdaType:
!type:String
pda-seniorofficer
- type: Pda
id: PilotIDCard
state: pda-seniorofficer
- type: PdaBorderColor
borderColor: "#A32D26"
accentVColor: "#DFDFDF"
Expand Down
1 change: 0 additions & 1 deletion Resources/Prototypes/Corvax/Maps/Pools/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
- CorvaxAvrite
- CorvaxAstra
- CorvaxPilgrim
- CorvaxGlacier
- Bagel
- Box
# Midpop
Expand Down
91 changes: 0 additions & 91 deletions Resources/Prototypes/Corvax/Maps/glacier.yml

This file was deleted.

25 changes: 16 additions & 9 deletions Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2437,16 +2437,16 @@
- type: Sprite
drawdepth: Mobs
layers:
- map: [ "enum.DamageStateVisualLayers.Base" ]
- map: ["enum.DamageStateVisualLayers.Base", "movement"]
state: tarantula
sprite: Mobs/Animals/spider.rsi
# - type: SpriteMovement
# movementLayers:
# movement:
# state: tarantula-moving
# noMovementLayers:
# movement:
# state: tarantula
- type: SpriteMovement
movementLayers:
movement:
state: tarantula-moving
noMovementLayers:
movement:
state: tarantula
- type: Physics
- type: Arachne
- type: Cocooner
Expand Down Expand Up @@ -2618,9 +2618,16 @@
- type: Sprite
drawdepth: Mobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
- map: ["enum.DamageStateVisualLayers.Base", "movement"]
state: clown
sprite: Mobs/Animals/clownspider.rsi
- type: SpriteMovement
movementLayers:
movement:
state: clown
noMovementLayers:
movement:
state: clown
- type: Butcherable
spawned:
- id: MaterialBananium1
Expand Down
4 changes: 3 additions & 1 deletion Resources/Prototypes/Maps/amber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mapName: 'Amber'
mapPath: /Maps/amber.yml
# Corvax-start
minPlayers: 25
minPlayers: 15
maxPlayers: 55
# Corvax-end
stations:
Expand Down Expand Up @@ -66,3 +66,5 @@
#silicon
StationAi: [ 1, 1 ]
Borg: [ 2, 2 ]
#backmen
Prisoner: [ 1, 2]
4 changes: 3 additions & 1 deletion Resources/Prototypes/Maps/elkridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
SecurityOfficer: [ 3, 4 ]
Detective: [ 1, 1 ]
SecurityCadet: [ 2, 2 ]
Lawyer: [ 1, 1 ]
IAA: [ 1, 1 ]
#supply
Quartermaster: [ 1, 1 ]
SalvageSpecialist: [ 2, 2 ]
Expand All @@ -65,3 +65,5 @@
#silicon
StationAi: [ 1, 1 ]
Borg: [ 2, 2 ]
#backmen
Prisoner: [ 1, 2]
6 changes: 3 additions & 3 deletions Resources/Prototypes/_Backmen/Body/Parts/spider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- type: entity
id: ThoraxSpider
name: "spider thorax" #for ArachneClassic, actual spiders should get a cephalothorax that combines with head.
parent: PartSpider
parent: [PartSpider, BaseTorso]
components:
- type: Sprite
netsync: false
Expand All @@ -29,7 +29,7 @@
- type: entity
id: RightLegSpider
name: "right spider leg"
parent: PartSpider
parent: [PartSpider, BaseRightLeg]
components:
- type: Sprite
netsync: false
Expand All @@ -48,7 +48,7 @@
- type: entity
id: LeftLegSpider
name: "left spider leg"
parent: PartSpider
parent: [PartSpider, BaseLeftLeg]
components:
- type: Sprite
netsync: false
Expand Down
Loading

0 comments on commit 850a876

Please sign in to comment.