Skip to content

Commit

Permalink
[Feature] Minor races tweaks (#49)
Browse files Browse the repository at this point in the history
* feat: remove arachne, reintroduce dwarfs

* feat: rebance most races height/width

* fix: validate player character before joining

* feat: transfer arachne components to arachnid

* remove: disable roundstart oni

* feat: перевод названий рас

* feat: make dwarfs have a bit more stamina

* docs: marked changes as white dream
  • Loading branch information
Remuchi authored Sep 12, 2024
1 parent 958b24f commit eae3633
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 37 deletions.
6 changes: 5 additions & 1 deletion Content.Server/GameTicking/GameTicker.Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ async void AddPlayerToDb(Guid id)

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

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

/// <summary>
/// The default height for this species
/// </summary>
[DataField]
public float DefaultHeight = 1f;
public float DefaultHeight = 1f; // White Dream Edit

/// <summary>
/// The maximum height for this species
/// </summary>
[DataField]
public float MaxHeight = 1.25f;
public float MaxHeight = 1.1f; // White Dream Edit

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

/// <summary>
/// The default width for this species
/// </summary>
[DataField]
public float DefaultWidth = 1f;
public float DefaultWidth = 1f; // White Dream Edit

/// <summary>
/// The maximum width for this species
/// </summary>
[DataField]
public float MaxWidth = 1.3f;
public float MaxWidth = 1.1f; // White Dream Edit

/// <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
7 changes: 6 additions & 1 deletion Resources/Locale/ru-RU/species/species.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ species-name-reptilian = Ящер
species-name-slime = Слаймолюд
species-name-diona = Диона
species-name-arachnid = Арахнид
species-name-skrell = Скрелл
species-name-arachne = Арахне
species-name-moth = Моль
species-name-skeleton = Скелет
species-name-vox = Вокс
species-name-ipc = КПБ
# Nyanocode
species-name-felinid = Фелинид
species-name-oni = Они
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
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Species/dwarf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
- SolCommon
- type: LightweightDrunk
boozeStrengthMultiplier: 0.5
- type: Stamina # White Dream: Make dwarfs a bit more durable.
critThreshold: 115

- type: entity
parent: BaseSpeciesDummy
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Nyanotrasen/Species/Oni.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- type: species
id: Oni
name: species-name-oni
roundStart: true
roundStart: false # White Dream - Disable roundstart oni
prototype: MobOni
dollPrototype: MobOniDummy
markingLimits: MobOniMarkingLimits
Expand Down
10 changes: 5 additions & 5 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
defaultHeight: 0.8
maxHeight: 1.1
minWidth: 0.6
minHeight: 0.8 # White Dream: Changed sizes of all species to be less extreme.
defaultHeight: 0.85
maxHeight: 1
minWidth: 0.8
defaultWidth: 0.8
maxWidth: 1.15
maxWidth: 1 # White Dream: End of changes

- 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 # White Dream: Changed sizes of all species to be less extreme.
defaultHeight: 0.8
maxHeight: 0.8
minWidth: 0.55
maxHeight: 0.9
minWidth: 0.7
defaultWidth: 0.8
maxWidth: 0.85
maxWidth: 0.9 # White Dream: End of changes
10 changes: 5 additions & 5 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
defaultHeight: 0.8
maxHeight: 1.1
minWidth: 0.55
minHeight: 0.8 # White Dream: Changed sizes of all species to be less extreme.
defaultHeight: 0.85
maxHeight: 1
minWidth: 0.8
defaultWidth: 0.8
maxWidth: 1.15
maxWidth: 1 # White Dream: End of changes

- 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 # White Dream: Changed sizes of all species to be less extreme.
defaultHeight: 1.1
maxHeight: 1.2
minWidth: 0.9
defaultWidth: 1.1
maxWidth: 1.2 # White Dream: End of changes.

- type: speciesBaseSprites
id: MobReptilianSprites
Expand Down

0 comments on commit eae3633

Please sign in to comment.