Skip to content

Commit

Permalink
Merge remote-tracking branch 'EE_Upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Peptide90 committed May 3, 2024
2 parents 57f2414 + b68ed3c commit cc041fd
Show file tree
Hide file tree
Showing 104 changed files with 1,763 additions and 210 deletions.
3 changes: 3 additions & 0 deletions Content.Client/Clothing/ClientClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ private void RenderEquipment(EntityUid equipee, EntityUid equipment, string slot
// note that every insertion requires reshuffling & remapping all the existing layers.
sprite.AddBlankLayer(index);
sprite.LayerMapSet(key, index);

if (layerData.Color != null)
sprite.LayerSetColor(key, layerData.Color.Value);
}
else
index = sprite.LayerMapReserveBlank(key);
Expand Down
27 changes: 24 additions & 3 deletions Content.Client/Sprite/RandomSpriteSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using Content.Client.Clothing;
using Content.Shared.Clothing.Components;
using Content.Shared.Sprite;
using Robust.Client.GameObjects;
using Robust.Shared.GameStates;
Expand All @@ -8,6 +10,7 @@ namespace Content.Client.Sprite;
public sealed class RandomSpriteSystem : SharedRandomSpriteSystem
{
[Dependency] private readonly IReflectionManager _reflection = default!;
[Dependency] private readonly ClientClothingSystem _clothing = default!;

public override void Initialize()
{
Expand All @@ -31,10 +34,29 @@ private void OnHandleState(EntityUid uid, RandomSpriteComponent component, ref C
component.Selected.Add(layer.Key, layer.Value);
}

UpdateAppearance(uid, component);
UpdateSpriteComponentAppearance(uid, component);
UpdateClothingComponentAppearance(uid, component);
}

private void UpdateAppearance(EntityUid uid, RandomSpriteComponent component, SpriteComponent? sprite = null)
private void UpdateClothingComponentAppearance(EntityUid uid, RandomSpriteComponent component, ClothingComponent? clothing = null)
{
if (!Resolve(uid, ref clothing, false))
return;

if (clothing.ClothingVisuals == null)
return;

foreach (var slotPair in clothing.ClothingVisuals)
{
foreach (var keyColorPair in component.Selected)
{
_clothing.SetLayerColor(clothing, slotPair.Key, keyColorPair.Key, keyColorPair.Value.Color);
_clothing.SetLayerState(clothing, slotPair.Key, keyColorPair.Key, keyColorPair.Value.State);
}
}
}

private void UpdateSpriteComponentAppearance(EntityUid uid, RandomSpriteComponent component, SpriteComponent? sprite = null)
{
if (!Resolve(uid, ref sprite, false))
return;
Expand All @@ -55,7 +77,6 @@ private void UpdateAppearance(EntityUid uid, RandomSpriteComponent component, Sp
continue;
}
}

sprite.LayerSetState(index, layer.Value.State);
sprite.LayerSetColor(index, layer.Value.Color ?? Color.White);
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private bool CanDock(

foreach (var config in configs)
{
if (config.Coordinates.Equals(coordinates) && config.Angle.EqualsApprox(angle, 0.01))
if (config.Coordinates.Equals(coordinates) && config.Angle.EqualsApprox(angle, 0.15))
{
return config;
}
Expand Down
3 changes: 1 addition & 2 deletions Content.Server/Zombies/PendingZombieComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public sealed partial class PendingZombieComponent : Component
{
DamageDict = new ()
{
{ "Blunt", 0.25 },
{ "Poison", 0.1 },
{ "Poison", 0.3 },
}
};

Expand Down
33 changes: 33 additions & 0 deletions Content.Shared/Clothing/EntitySystems/ClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,5 +217,38 @@ public void CopyVisuals(EntityUid uid, ClothingComponent otherClothing, Clothing
Dirty(uid, clothing);
}

public void SetLayerColor(ClothingComponent clothing, string slot, string mapKey, Color? color)
{
if (clothing.ClothingVisuals == null)
return;

foreach (var layer in clothing.ClothingVisuals[slot])
{
if (layer.MapKeys == null)
return;

if (!layer.MapKeys.Contains(mapKey))
continue;

layer.Color = color;
}
}
public void SetLayerState(ClothingComponent clothing, string slot, string mapKey, string state)
{
if (clothing.ClothingVisuals == null)
return;

foreach (var layer in clothing.ClothingVisuals[slot])
{
if (layer.MapKeys == null)
return;

if (!layer.MapKeys.Contains(mapKey))
continue;

layer.State = state;
}
}

#endregion
}
4 changes: 2 additions & 2 deletions Content.Shared/Zombies/ZombieComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ public sealed partial class ZombieComponent : Component, IAntagStatusIconCompone
/// The baseline infection chance you have if you are completely nude
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public float MaxZombieInfectionChance = 0.50f;
public float MaxZombieInfectionChance = 0.80f;

/// <summary>
/// The minimum infection chance possible. This is simply to prevent
/// being invincible by bundling up.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public float MinZombieInfectionChance = 0.20f;
public float MinZombieInfectionChance = 0.50f;

[ViewVariables(VVAccess.ReadWrite)]
public float ZombieMovementSpeedDebuff = 0.70f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ advertisement-courierdrobe-2 = A great investment for your survival!
advertisement-courierdrobe-3 = Wear your brown with pride!
advertisement-courierdrobe-4 = These shorts are comfy and easy to wear, get yours now!
advertisement-courierdrobe-5 = Outrun every danger with our stylish clothes!
thankyou-courierdrobe-1 = Now get out there and deliver that mail!
thankyou-courierdrobe-1 = Those parcels aren't going to deliver themselves!
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
advertisement-pride-1 = Be gay do crime!
advertisement-pride-2 = Full of colors!
advertisement-pride-3 = You are valid!
thankyou-pride-1 = Go, do some crime!
thankyou-pride-1 = Have a colorful day!
50 changes: 10 additions & 40 deletions Resources/Prototypes/Catalog/Fills/Lockers/wardrobe_colors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,46 +24,6 @@
components:
- type: StorageFill
contents:
- id: ClothingUniformJumpsuitColorWhite
prob: 0.25
- id: ClothingUniformJumpskirtColorWhite
prob: 0.25
- id: ClothingUniformJumpsuitColorBlue
prob: 0.25
- id: ClothingUniformJumpskirtColorBlue
prob: 0.25
- id: ClothingUniformJumpsuitColorYellow
prob: 0.25
- id: ClothingUniformJumpskirtColorYellow
prob: 0.25
- id: ClothingUniformJumpsuitColorGreen
prob: 0.25
- id: ClothingUniformJumpskirtColorGreen
prob: 0.25
- id: ClothingUniformJumpsuitColorOrange
prob: 0.25
- id: ClothingUniformJumpskirtColorOrange
prob: 0.25
- id: ClothingUniformJumpsuitColorPink
prob: 0.25
- id: ClothingUniformJumpskirtColorPink
prob: 0.25
- id: ClothingUniformJumpsuitColorRed
prob: 0.25
- id: ClothingUniformJumpskirtColorRed
prob: 0.25
- id: ClothingUniformJumpsuitColorDarkBlue
prob: 0.25
- id: ClothingUniformJumpskirtColorDarkBlue
prob: 0.25
- id: ClothingUniformJumpsuitColorTeal
prob: 0.25
- id: ClothingUniformJumpskirtColorTeal
prob: 0.25
- id: ClothingUniformJumpsuitColorPurple
prob: 0.25
- id: ClothingUniformJumpskirtColorPurple
prob: 0.25
- id: ClothingShoesColorBlack
amount: 1
- id: ClothingShoesColorBrown
Expand All @@ -74,6 +34,16 @@
prob: 0.4
- id: ClothingOuterCoatGentle
prob: 0.3
- id: ClothingUniformRandomShorts
amount: 3
- id: ClothingUniformRandomArmless
amount: 5
- id: ClothingUniformRandomStandart
amount: 5
- id: ClothingUniformRandomBra
amount: 5
- id: ClothingUniformRandomShirt
amount: 4

- type: entity
id: WardrobeYellowFilled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ClothingBackpackDuffel: 5
ClothingBackpackSatchel: 3
ClothingBackpackSatchelLeather: 2
ClothingRandomSpawner: 8
ClothingHeadHatBeret: 4
ClothingHeadBandBlack: 2
ClothingHeadBandBlue: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
- advertisement-courierdrobe-3
- advertisement-courierdrobe-4
- advertisement-courierdrobe-5
thankyous:
- thankyou-courierdrobe-1
- thankyou-courierdrobe-2
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
advertisements:
- advertisement-pride-1
- advertisement-pride-2
- advertisement-pride-3
- advertisement-pride-3
thankyous:
- thankyou-pride-1
- thankyou-pride-2
46 changes: 33 additions & 13 deletions Resources/Prototypes/DeltaV/Voice/speech_emote_sounds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@
collection: HarpyGrowls
Purr:
collection: HarpyPurrs
Ring:
HarpyRing:
collection: HarpyRings
HonkHarpy:
HarpyHonk:
collection: HarpyHonks
Pew:
HarpyPew:
collection: HarpyPews
Bang:
HarpyBang:
collection: HarpyBangs
Beep:
HarpyBeep:
collection: HarpyBeeps
Rev:
HarpyRev:
collection: HarpyRevs
# Click:
# collection: HarpyClicks
Click:
collection: HarpyClicks
Chitter:
collection: HarpyChitter
Squeak:
collection: HarpySqueak
Caw:
HarpyCaw:
collection: HarpyCaws
Chirp:
collection: HarpyChirps
Expand All @@ -58,6 +58,10 @@
collection: VulpkaninWhines
Howl:
collection: VulpkaninHowls
Honk:
collection: BikeHorn
Weh:
collection: Weh

- type: emoteSounds
id: MaleVulpkanin
Expand All @@ -72,12 +76,20 @@
collection: MaleSneezes
Cough:
collection: MaleCoughs
Yawn:
collection: MaleYawn
Snore:
collection: Snores
Honk:
collection: BikeHorn
Sigh:
collection: MaleSigh
Crying:
collection: MaleCry
Whistle:
collection: Whistles
Sigh:
collection: MaleSigh
Weh:
collection: Weh
Growl:
collection: VulpkaninGrowls
Snarl:
Expand All @@ -102,12 +114,20 @@
collection: FemaleSneezes
Cough:
collection: FemaleCoughs
Yawn:
collection: FemaleYawn
Snore:
collection: Snores
Honk:
collection: CluwneHorn
Sigh:
collection: FemaleSigh
Crying:
collection: FemaleCry
Whistle:
collection: Whistles
Sigh:
collection: FemaleSigh
Weh:
collection: Weh
Growl:
collection: VulpkaninGrowls
Snarl:
Expand Down
Loading

0 comments on commit cc041fd

Please sign in to comment.