Skip to content

Commit

Permalink
Language Traits and some fixes (#782)
Browse files Browse the repository at this point in the history
* ghoul max age is now 250 from 120

* disable scavenger and musician, use loadouts.

* tribal elder can be telepathic

* disable christmas music

* disable unused traits

* adds new language traits and a new special job datafield for giving traits to jobs.

* adds the language and trait localisations

* disable more traits

* hide more unused antags

* disable more traits to fix lint
  • Loading branch information
Peptide90 authored Jan 13, 2025
1 parent 14a2e06 commit 3d2d12a
Show file tree
Hide file tree
Showing 22 changed files with 698 additions and 609 deletions.
30 changes: 30 additions & 0 deletions Content.Server/Jobs/AddTraitSpecial.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Content.Server.Traits;
using Content.Shared.Roles;
using Content.Shared.Traits;
using JetBrains.Annotations;
using Robust.Shared.Prototypes;

namespace Content.Server.Jobs;


[UsedImplicitly]
public sealed partial class AddTraitSpecial : JobSpecial
{
// Datafield for storing multiple trait prototype IDs as strings
[DataField(required: true)]
public HashSet<string> Traits { get; private set; } = new();

public override void AfterEquip(EntityUid mob)
{
// Resolve the necessary systems
var entityManager = IoCManager.Resolve<IEntityManager>();
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
var traitSystem = entityManager.System<TraitSystem>();

// Iterate through each trait and add it to the entity
foreach (var traitId in Traits)
if (prototypeManager.TryIndex<TraitPrototype>(traitId, out var traitPrototype))

traitSystem.AddTrait(mob, traitPrototype);
}
}
2 changes: 2 additions & 0 deletions Resources/IgnoredPrototypes/ignoredPrototypes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
- /Prototypes/Catalog/Jukebox
- /Prototypes/DeltaV/Catalog/Jukebox
- /Prototypes/WhiteDream/Entities/Objects/Runes/cult.yml
- /Prototypes/Traits/species.yml
- /Prototypes/Traits/mental.yml
# Loadouts
- /Prototypes/Loadouts/eyes.yml
- /Prototypes/Loadouts/hands.yml
Expand Down
11 changes: 11 additions & 0 deletions Resources/Locale/en-US/_Nuclear14/traits.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
trait-name-LanguageTribal = Tribal Language
trait-description-LanguageTribal = You can understand and speak the local Tribal language. Whether through learning or backstory.
trait-name-LanguageChinese = Chinese Language
trait-description-Chinese = You can understand and speak the Chinese language. Whether through learning or backstory.
language-English-name = English
language-English-description = The common language of the Wasteland.
language-Chinese-name = Chinese
language-Chinese-description = You can understand and speak the Chinese language. Whether through learning or backstory.
language-Tribal-name = Tribal
language-Tribal-description = You can understand and speak the local Tribal language. Whether through learning or backstory.
6 changes: 2 additions & 4 deletions Resources/Prototypes/Entities/Mobs/Species/human.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
- Snout
- type: LanguageKnowledge
speaks:
- TauCetiBasic
- SolCommon
- English
understands:
- TauCetiBasic
- SolCommon
- English
- type: FootPrints
- type: PsionicInsulation

Expand Down
4 changes: 2 additions & 2 deletions Resources/Prototypes/Roles/Antags/traitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
id: Traitor
name: roles-antag-syndicate-agent-name
antagonist: true
setPreference: true
setPreference: false
objective: roles-antag-syndicate-agent-objective

- type: antag
id: TraitorSleeper
name: roles-antag-syndicate-agent-sleeper-name
antagonist: true
setPreference: true
setPreference: false
objective: roles-antag-syndicate-agent-sleeper-objective

# Syndicate Operative Outfit - Monkey
Expand Down
78 changes: 39 additions & 39 deletions Resources/Prototypes/Traits/inconveniences.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,43 +43,43 @@
threeRandomProb: 0
cutRandomProb: 0

- type: trait
id: ForeignerLight
category: TraitsSpeechLanguages
points: 2
requirements:
- !type:CharacterTraitRequirement
inverted: true
traits:
- Foreigner
- Muted
- !type:CharacterJobRequirement
inverted: true
jobs:
- Mime
functions:
- !type:TraitAddComponent
components:
- type: ForeignerTrait
cantUnderstand: false
baseTranslator: TranslatorForeigner
# - type: trait
# id: ForeignerLight
# category: TraitsSpeechLanguages
# points: 2
# requirements:
# - !type:CharacterTraitRequirement
# inverted: true
# traits:
# - Foreigner
# - Muted
# - !type:CharacterJobRequirement
# inverted: true
# jobs:
# - Mime
# functions:
# - !type:TraitAddComponent
# components:
# - type: ForeignerTrait
# cantUnderstand: false
# baseTranslator: TranslatorForeigner

- type: trait
id: Foreigner
category: TraitsSpeechLanguages
points: 4
requirements: # TODO: Add a requirement to know at least 1 non-gc language
- !type:CharacterTraitRequirement
inverted: true
traits:
- ForeignerLight
- Muted
- !type:CharacterJobRequirement
inverted: true
jobs:
- Mime
functions:
- !type:TraitAddComponent
components:
- type: ForeignerTrait
baseTranslator: TranslatorForeigner
# - type: trait
# id: Foreigner
# category: TraitsSpeechLanguages
# points: 4
# requirements: # TODO: Add a requirement to know at least 1 non-gc language
# - !type:CharacterTraitRequirement
# inverted: true
# traits:
# - ForeignerLight
# - Muted
# - !type:CharacterJobRequirement
# inverted: true
# jobs:
# - Mime
# functions:
# - !type:TraitAddComponent
# components:
# - type: ForeignerTrait
# baseTranslator: TranslatorForeigner
178 changes: 89 additions & 89 deletions Resources/Prototypes/Traits/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,97 +12,97 @@
languagesUnderstood:
- Sign

- type: trait
id: SolCommon
category: TraitsSpeechLanguages
points: 0
requirements:
- !type:CharacterItemGroupRequirement
group: TraitsLanguagesBasic
- !type:CharacterSpeciesRequirement
inverted: true
species:
- Human
functions:
- !type:TraitModifyLanguages
languagesSpoken:
- SolCommon
languagesUnderstood:
- SolCommon
# - type: trait
# id: SolCommon
# category: TraitsSpeechLanguages
# points: 0
# requirements:
# - !type:CharacterItemGroupRequirement
# group: TraitsLanguagesBasic
# - !type:CharacterSpeciesRequirement
# inverted: true
# species:
# - Human
# functions:
# - !type:TraitModifyLanguages
# languagesSpoken:
# - SolCommon
# languagesUnderstood:
# - SolCommon

- type: trait
id: Tradeband
category: TraitsSpeechLanguages
points: 0
requirements:
- !type:CharacterItemGroupRequirement
group: TraitsLanguagesBasic
- !type:CharacterSpeciesRequirement
inverted: true
species:
- Harpy
functions:
- !type:TraitModifyLanguages
languagesSpoken:
- Tradeband
languagesUnderstood:
- Tradeband
# - type: trait
# id: Tradeband
# category: TraitsSpeechLanguages
# points: 0
# requirements:
# - !type:CharacterItemGroupRequirement
# group: TraitsLanguagesBasic
# - !type:CharacterSpeciesRequirement
# inverted: true
# species:
# - Harpy
# functions:
# - !type:TraitModifyLanguages
# languagesSpoken:
# - Tradeband
# languagesUnderstood:
# - Tradeband

- type: trait
id: Freespeak
category: TraitsSpeechLanguages
points: 0
requirements:
- !type:CharacterItemGroupRequirement
group: TraitsLanguagesBasic
functions:
- !type:TraitModifyLanguages
languagesSpoken:
- Freespeak
languagesUnderstood:
- Freespeak
# - type: trait
# id: Freespeak
# category: TraitsSpeechLanguages
# points: 0
# requirements:
# - !type:CharacterItemGroupRequirement
# group: TraitsLanguagesBasic
# functions:
# - !type:TraitModifyLanguages
# languagesSpoken:
# - Freespeak
# languagesUnderstood:
# - Freespeak

- type: trait
id: Elyran
category: TraitsSpeechLanguages
points: 0
requirements:
- !type:CharacterItemGroupRequirement
group: TraitsLanguagesBasic
functions:
- !type:TraitModifyLanguages
languagesSpoken:
- Elyran
languagesUnderstood:
- Elyran
# - type: trait
# id: Elyran
# category: TraitsSpeechLanguages
# points: 0
# requirements:
# - !type:CharacterItemGroupRequirement
# group: TraitsLanguagesBasic
# functions:
# - !type:TraitModifyLanguages
# languagesSpoken:
# - Elyran
# languagesUnderstood:
# - Elyran

- type: trait
id: ValyrianStandard
category: TraitsSpeechLanguages
points: -1
requirements:
- !type:CharacterItemGroupRequirement
group: TraitsLanguagesBasic
functions:
- !type:TraitModifyLanguages
languagesSpoken:
- ValyrianStandard
languagesUnderstood:
- ValyrianStandard
# - type: trait
# id: ValyrianStandard
# category: TraitsSpeechLanguages
# points: -1
# requirements:
# - !type:CharacterItemGroupRequirement
# group: TraitsLanguagesBasic
# functions:
# - !type:TraitModifyLanguages
# languagesSpoken:
# - ValyrianStandard
# languagesUnderstood:
# - ValyrianStandard

- type: trait
id: Azaziba
category: TraitsSpeechLanguages
points: -1
requirements:
- !type:CharacterSpeciesRequirement
species:
- Reptilian
- !type:CharacterItemGroupRequirement
group: TraitsLanguagesBasic
functions:
- !type:TraitModifyLanguages
languagesSpoken:
- Azaziba
languagesUnderstood:
- Azaziba
# - type: trait
# id: Azaziba
# category: TraitsSpeechLanguages
# points: -1
# requirements:
# - !type:CharacterSpeciesRequirement
# species:
# - Reptilian
# - !type:CharacterItemGroupRequirement
# group: TraitsLanguagesBasic
# functions:
# - !type:TraitModifyLanguages
# languagesSpoken:
# - Azaziba
# languagesUnderstood:
# - Azaziba
Loading

0 comments on commit 3d2d12a

Please sign in to comment.