Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Minor races tweaks #49

Merged
merged 8 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Content.Server/GameTicking/GameTicker.Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ async void AddPlayerToDb(Guid id)

public HumanoidCharacterProfile GetPlayerProfile(ICommonSession p)
{
return (HumanoidCharacterProfile) _prefsManager.GetPreferences(p.UserId).SelectedCharacter;
var profile = (HumanoidCharacterProfile) _prefsManager.GetPreferences(p.UserId).SelectedCharacter;
profile.EnsureValid(p, IoCManager.Instance!);
return profile;
}

public void PlayerJoinGame(ICommonSession session, bool silent = false)
Expand Down
8 changes: 4 additions & 4 deletions Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public sealed partial class SpeciesPrototype : IPrototype
/// The minimum height for this species
/// </summary>
[DataField]
public float MinHeight = 0.75f;
public float MinHeight = 0.9f;

/// <summary>
/// The default height for this species
Expand All @@ -137,13 +137,13 @@ public sealed partial class SpeciesPrototype : IPrototype
/// The maximum height for this species
/// </summary>
[DataField]
public float MaxHeight = 1.25f;
public float MaxHeight = 1.1f;

/// <summary>
/// The minimum width for this species
/// </summary>
[DataField]
public float MinWidth = 0.7f;
public float MinWidth = 0.9f;

/// <summary>
/// The default width for this species
Expand All @@ -155,7 +155,7 @@ public sealed partial class SpeciesPrototype : IPrototype
/// The maximum width for this species
/// </summary>
[DataField]
public float MaxWidth = 1.3f;
public float MaxWidth = 1.1f;

/// <summary>
/// The average height in centimeters for this species, used to calculate player facing height values in UI elements
Expand Down
8 changes: 2 additions & 6 deletions Content.Shared/Preferences/HumanoidCharacterProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -532,13 +532,9 @@ public void EnsureValid(ICommonSession session, IDependencyCollection collection
flavortext = FormattedMessage.RemoveMarkup(FlavorText);
}

var height = Height;
if (speciesPrototype != null)
height = Math.Clamp(Height, speciesPrototype.MinHeight, speciesPrototype.MaxHeight);
var height = Math.Clamp(Height, speciesPrototype.MinHeight, speciesPrototype.MaxHeight);

var width = Width;
if (speciesPrototype != null)
width = Math.Clamp(Width, speciesPrototype.MinWidth, speciesPrototype.MaxWidth);
var width = Math.Clamp(Width, speciesPrototype.MinWidth, speciesPrototype.MaxWidth);

var appearance = HumanoidCharacterAppearance.EnsureValid(Appearance, Species, Sex);

Expand Down
4 changes: 4 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Species/arachnid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
sprite: "Effects/creampie.rsi"
state: "creampie_arachnid"
visible: false
# White Dream Start - transfer features from Arachne
- type: Spider
- type: IgnoreSpiderWeb
# White Dream End

- type: entity
parent: BaseSpeciesDummy
Expand Down
8 changes: 4 additions & 4 deletions Resources/Prototypes/Nyanotrasen/Species/felinid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
markingLimits: MobFelinidMarkingLimits
dollPrototype: MobFelinidDummy
skinColoration: HumanToned
minHeight: 0.65
minHeight: 0.8
Remuchi marked this conversation as resolved.
Show resolved Hide resolved
defaultHeight: 0.8
maxHeight: 1.1
minWidth: 0.6
maxHeight: 1
minWidth: 0.8
Remuchi marked this conversation as resolved.
Show resolved Hide resolved
defaultWidth: 0.8
maxWidth: 1.15
maxWidth: 1

- type: markingPoints
id: MobFelinidMarkingLimits
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Species/arachne.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- type: species
id: Arachne
name: species-name-arachne
roundStart: true
roundStart: false # White Dream - disable arachne for missing textures.
prototype: MobArachne
sprites: MobArachneSprites
markingLimits: MobArachneMarkingLimits
Expand Down
10 changes: 5 additions & 5 deletions Resources/Prototypes/Species/dwarf.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- type: species
id: Dwarf
name: species-name-dwarf
roundStart: false # DeltaV - Disable dwarf
roundStart: true
prototype: MobDwarf
sprites: MobHumanSprites
markingLimits: MobHumanMarkingLimits
dollPrototype: MobDwarfDummy
skinColoration: HumanToned
minHeight: 0.6
minHeight: 0.7
defaultHeight: 0.8
maxHeight: 0.8
minWidth: 0.55
maxHeight: 0.9
minWidth: 0.7
defaultWidth: 0.8
maxWidth: 0.85
maxWidth: 0.9
8 changes: 4 additions & 4 deletions Resources/Prototypes/Species/harpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
markingLimits: MobHarpyMarkingLimits
dollPrototype: MobHarpyDummy
skinColoration: HumanToned
minHeight: 0.6
minHeight: 0.8
defaultHeight: 0.8
maxHeight: 1.1
minWidth: 0.55
maxHeight: 1
minWidth: 0.8
defaultWidth: 0.8
maxWidth: 1.15
maxWidth: 1

- type: speciesBaseSprites
id: MobHarpySprites
Expand Down
12 changes: 6 additions & 6 deletions Resources/Prototypes/Species/reptilian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
maleFirstNames: names_reptilian_male
femaleFirstNames: names_reptilian_female
naming: FirstDashFirst
minHeight: 0.7
defaultHeight: 0.95
maxHeight: 1.25
minWidth: 0.65
defaultWidth: 0.95
maxWidth: 1.3
minHeight: 0.9
defaultHeight: 1.1
maxHeight: 1.2
minWidth: 0.9
defaultWidth: 1.1
maxWidth: 1.2

- type: speciesBaseSprites
id: MobReptilianSprites
Expand Down
Loading