Skip to content

Commit

Permalink
Guess what time it is? It's EE update time!
Browse files Browse the repository at this point in the history
  • Loading branch information
Erisfiregamer1 committed Dec 22, 2024
2 parents 464ecd4 + 18a751d commit b8e2838
Show file tree
Hide file tree
Showing 85 changed files with 20,805 additions and 22,256 deletions.
30 changes: 30 additions & 0 deletions Content.Server/Clothing/Systems/LoadoutSystem.Functions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using JetBrains.Annotations;
using Robust.Shared.Serialization.Manager;
using Content.Shared.Clothing.Loadouts.Prototypes;
using Content.Server.NPC.Components;
using Content.Server.NPC.Systems;
using Content.Server.NPC.HTN;
using Content.Server.NPC;
using Robust.Shared.Map;
using System.Numerics;

namespace Content.Server.Clothing.Systems;

[UsedImplicitly]
public sealed partial class LoadoutMakeFollower : LoadoutFunction
{
public override void OnPlayerSpawn(EntityUid character,
EntityUid loadoutEntity,
IComponentFactory factory,
IEntityManager entityManager,
ISerializationManager serializationManager)
{
var npc = entityManager.System<NPCSystem>();
var htn = entityManager.System<HTNSystem>();
if (!entityManager.TryGetComponent<HTNComponent>(loadoutEntity, out var hTNComponent))
return;

npc.SetBlackboard(loadoutEntity, NPCBlackboard.FollowTarget, new EntityCoordinates(character, Vector2.Zero), hTNComponent);
htn.Replan(hTNComponent);
}
}
5 changes: 4 additions & 1 deletion Content.Server/Clothing/Systems/LoadoutSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
using Content.Shared.Storage;
using Content.Shared.Storage.EntitySystems;
using Content.Shared.Traits.Assorted.Components;
using Content.Shared.Whitelist;
using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
Expand All @@ -33,6 +32,7 @@ public sealed class LoadoutSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _protoMan = default!;
[Dependency] private readonly ISerializationManager _serialization = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IComponentFactory _componentFactory = default!;


public override void Initialize()
Expand Down Expand Up @@ -103,6 +103,9 @@ public void ApplyCharacterLoadout(
comp.Owner = loadout.Item1;
EntityManager.AddComponent(loadout.Item1, comp);
}

foreach (var function in loadoutProto.Functions)
function.OnPlayerSpawn(uid, loadout.Item1, _componentFactory, EntityManager, _serialization);
}


Expand Down
16 changes: 16 additions & 0 deletions Content.Shared/Clothing/Loadouts/Prototypes/LoadoutPrototype.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Content.Shared.Customization.Systems;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager;

namespace Content.Shared.Clothing.Loadouts.Prototypes;

Expand Down Expand Up @@ -45,4 +46,19 @@ public sealed partial class LoadoutPrototype : IPrototype

[DataField]
public string GuideEntry { get; } = "";

[DataField(serverOnly: true)]
public LoadoutFunction[] Functions { get; private set; } = Array.Empty<LoadoutFunction>();
}

/// This serves as a hook for loadout functions to modify one or more entities upon spawning in.
[ImplicitDataDefinitionForInheritors]
public abstract partial class LoadoutFunction
{
public abstract void OnPlayerSpawn(
EntityUid character,
EntityUid loadoutEntity,
IComponentFactory factory,
IEntityManager entityManager,
ISerializationManager serializationManager);
}
51 changes: 51 additions & 0 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8706,3 +8706,54 @@ Entries:
id: 6582
time: '2024-12-16T17:55:06.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1342
- author: SiN Mapping Team
changes:
- type: Add
message: Saltern has been fully reworked!
id: 6583
time: '2024-12-18T01:32:32.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1357
- author: VMSolidus
changes:
- type: Fix
message: Fixed the Saltern bridge being a hard vacuum at roundstart.
id: 6584
time: '2024-12-19T22:52:32.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1359
- author: VMSolidus
changes:
- type: Add
message: >-
Added labels to all generic colorable items in loadouts, so that players
can see which items have custom colors as customization options.
- type: Remove
message: >-
Removed all 'specific color' variants of colorable items from Loadouts,
such as "Blue Jumpsuit" when a colorable jumpsuit exists.
id: 6585
time: '2024-12-21T18:02:28.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1364
- author: VMSolidus
changes:
- type: Add
message: >-
Added colorable variants of fingerless gloves, headbands, berets,
hairflowers, cloth masks, and the neck gaiter.
id: 6586
time: '2024-12-21T19:25:13.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1365
- author: VMSolidus
changes:
- type: Add
message: Loadouts can now apply modular functions to items upon spawning in.
- type: Add
message: >-
A new LoadoutMakeFollower function, which lets you buy NPC followers in
loadouts.
- type: Add
message: >-
added Pet Mice, Cockroach, Mothroach, and Hamster to Loadouts. All of
which use the new LoadoutMakeFollower function.
id: 6587
time: '2024-12-22T10:26:41.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1366
1 change: 1 addition & 0 deletions Resources/Locale/en-US/forensics/fibers.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ fibers-white = white
fibers-yellow = yellow
fibers-regal-blue = regal blue
fibers-olive = olive
fibers-dyed = dyed fibers
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/loadouts/generic/back.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
loadout-name-LoadoutBackpack = grey backpack (colorable)
loadout-name-LoadoutBackpackDuffel = grey duffelbag (colorable)
loadout-name-LoadoutBackpackSatchel = grey satchel (colorable)
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ loadout-description-LoadoutEyesBlindfold = Why would you want this?
loadout-name-LoadoutItemBlindfoldFake = "blind"fold
loadout-description-LoadoutItemBlindfoldFake = This product may not work as advertised.
loadout-name-LoadoutEyesGlasses = glasses (colorable)
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/loadouts/generic/hands.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
loadout-name-LoadoutHandsColorWhite = gloves (colorable)
loadout-name-LoadoutHandsGlovesFingerlessWhite = fingerless gloves (colorable)
15 changes: 15 additions & 0 deletions Resources/Locale/en-US/loadouts/generic/head.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
loadout-description-LoadoutHeadBeaverHat = Gentlemen.
loadout-description-LoadoutHeadTophat = A stylish black tophat.
loadout-name-LoadoutHeadFedoraWhite = fedora (colorable)
loadout-name-LoadoutHeadHatCowboyWhite = cowboy hat (colorable)
loadout-name-LoadoutHeadHatMimesoft = baseball cap (colorable)
loadout-name-LoadoutHeadHatMimesoftFlipped = baseball cap (colorable, flipped)
loadout-name-LoadoutHeadHijabColorable = hijab (colorable)
loadout-name-LoadoutHeadTurbanColorable = turban (colorable)
loadout-name-LoadoutHeadKippahColorable = kippah (colorable)
loadout-name-LoadoutHeadTinfoil = tinfoil hat (colorable)
loadout-name-LoadoutHeadHatCowboyBountyHunter = bounty hunter hat (colorable)
loadout-name-LoadoutHeadBandWhite = headband (colorable)
loadout-name-LoadoutHeadBeretWhite = beret (colorable)
loadout-name-LoadoutHeadPoppyWhite = hair flower (colorable)
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,15 @@ loadout-name-LoadoutItemBoxSurvivalSecurity = survival box (security)
loadout-name-LoadoutItemBoxSurvivalBrigmedic = survival box (corpsman)
loadout-name-LoadoutItemBoxSurvivalMedical = survival box (medical)
loadout-name-LoadoutItemBoxHug = box of hugs (clown)
loadout-name-LoadoutItemLighter = lighter (colorable)
loadout-name-LoadoutItemLighterCheap = cheap lighter (colorable)
loadout-name-LoadoutItemLighterFlippo = flippo lighter (colorable)
loadout-name-LoadoutItemDrinkShinyFlask = shiny flask (colorable)
loadout-name-LoadoutItemDrinkLithiumFlask = lithium flask (colorable)
loadout-name-LoadoutItemDrinkVacuumFlask = vacuum flask (colorable)
loadout-name-LoadoutItemPetMouse = pet mouse
loadout-name-LoadoutItemPetHamster = pet hamster
loadout-name-LoadoutItemPetMothroach = pet mothroach
loadout-name-LoadoutItemPetCockroach = pet cockroach
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/loadouts/generic/mask.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
loadout-name-LoadoutMaskBandWhite = cloth mask (colorable)
loadout-name-LoadoutMaskNeckGaiterWhite = neck gaiter (colorable)
loadout-name-LoadoutMaskSterile = sterile mask (colorable)
4 changes: 4 additions & 0 deletions Resources/Locale/en-US/loadouts/generic/neck.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
loadout-name-LoadoutNeckOldMantle = old mantle (colorable)
loadout-name-LoadoutNeckUnathiMantle = unathi mantle (colorable)
loadout-name-LoadoutNeckTieWhite = suit tie (colorable)
loadout-name-LoadoutNeckBedsheetWhite = bedsheet (colorable)
11 changes: 11 additions & 0 deletions Resources/Locale/en-US/loadouts/generic/outerClothing.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
loadout-description-LoadoutOuterGhostSheet = Spooky...
loadout-description-LoadoutOuterCoatBomberjacket = A sleek bomber jacket.
loadout-description-LoadoutOuterCoatHoodieBlack = A warm hoodie.
loadout-description-LoadoutOuterCoatHoodieGrey = A warm hoodie.
loadout-description-LoadoutOuterCoatWinterCoat = For keeping nice and snug.
loadout-name-LoadoutOuterCoatHoodieGrey = grey hoodie (colorable)
loadout-name-LoadoutOuterCoatWinterCoat = winter coat (colorable)
loadout-name-LoadoutOuterCoatHyenhSweater = sweater (colorable)
loadout-name-LoadoutOuterWinterCoatLong = long winter coat (colorable)
loadout-name-LoadoutOuterCoatMNKWhiteHoodie = MNK hoodie (colorable)
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ loadout-description-LoadoutShoesRed = Embrace the spirit of exploration with the
loadout-description-LoadoutShoesWhite = Elevate your style with these pristine white shoes, a symbol of innovation and progress.
loadout-description-LoadoutShoesYellow = Light up the space station with these radiant yellow shoes, bringing a burst of energy to your every step.
loadout-description-LoadoutShoesSlippersDuck = Quack up your downtime with these adorable duck slippers that waddle the line between comfort and quirkiness.
loadout-name-LoadoutShoesWhite = shoes (colorable)
loadout-name-LoadoutShoesBootsCowboyWhite = cowboy boots (colorable)
loadout-name-LoadoutShoesBootsCowboyFancy = fancy cowboy boots (colorable)
loadout-name-LoadoutShoesMiscWhite = misc shoes (colorable)
loadout-name-LoadoutShoesClothWrap = cloth foot wraps (colorable)
12 changes: 12 additions & 0 deletions Resources/Locale/en-US/loadouts/generic/uniform.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
loadout-description-LoadoutUniformAncientJumpsuit = The legend of the Greytide.
loadout-name-LoadoutUniformJumpsuitColorWhite = jumpsuit (colorable)
loadout-name-LoadoutUniformJumpskirtColorWhite = jumpskirt (colorable)
loadout-name-LoadoutUniformMartialGi = gi (colorable)
loadout-name-LoadoutClothingJumpsuitKimono = kimono (colorable)
loadout-name-LoadoutClothingMNKOfficeSkirt = MNK office skirt (colorable)
loadout-name-LoadoutClothingMNKUnderGarment = MNK under garment (colorable)
loadout-name-LoadoutClothingMNKGymBra = MNK gym bra (colorable)
loadout-name-LoadoutClothingJumpsuitSuitWhite = business suit (colorable)
loadout-name-LoadoutClothingJumpsuitSuitWhiteAlt = business suit (alt, colorable)
loadout-name-LoadoutClothingJumpsuitSuitWhiteMob = mob suit (colorable)
2 changes: 0 additions & 2 deletions Resources/Locale/en-US/loadouts/head.ftl

This file was deleted.

1 change: 1 addition & 0 deletions Resources/Locale/en-US/loadouts/itemgroups.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ character-item-group-LoadoutInstrumentsAny = Musical Instruments (Non-Musician)
character-item-group-LoadoutSmokes = Smokeables
character-item-group-LoadoutBoxKits = Survival Kits
character-item-group-LoadoutWritables = Writing Tools
character-item-group-LoadoutPets = Pets
# Job Specific Template
character-item-group-LoadoutJOBBackpacks = JOB Backpacks
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
loadout-name-LoadoutEngineeringHeadHardhatWhite = hardhat (colorable)
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/loadouts/jobs/heads/captain.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ loadout-description-LoadoutCommandCapHatCapcap = The Captain's cap, pretty nice.
loadout-description-LoadoutCommandCapHatBeret = The Captain's beret, very nice.
loadout-description-LoadoutCommandCapMaskGas = Why would the captain need this? I don't know, but it looks cool.
loadout-description-LoadoutCommandCapItemDrinkFlask = The finest of flasks, for the finest of drinks.
loadout-name-LoadoutCaptainDrinkFlask = captain's drink flask (colorable)
loadout-name-LoadoutCaptainGlovesInspection = inspection gloves (colorable)
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ loadout-description-LoadoutCommandHOPNeckMantle = To show who has the authority
loadout-description-LoadoutCommandHOPNeckCloak = To really show who has the authority around here.
loadout-description-LoadoutCommandHOPBackIan = A backpack that looks like Ian, how cute!
loadout-description-LoadoutCommandHOPHatCap = The HOP's cap, pretty nice.
loadout-name-LoadoutHeadOfPersonnelGlovesInspection = inspection gloves (colorable)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
loadout-name-LoadoutSalvageBackpackBackpack = salvage backpack (colorable)
loadout-name-LoadoutSalvageBackpackSatchel = salvage satchel (colorable)
loadout-name-LoadoutSalvageBackpackDuffel = salvage duffelbag (colorable)
loadout-name-LoadoutSalvageBeltMilitaryWebbing = military webbing (colorable)
loadout-name-LoadoutSalvageWeaponsCombatKnife = combat knife (colorable)
loadout-name-LoadoutSalvageWeaponsKitchenKnife = kitchen knife (colorable)
loadout-name-LoadoutSalvageWeaponsSurvivalKnife = survival knife (colorable)
loadout-name-LoadoutSalvageWeaponsKukriKnife = kukri (colorable)
loadout-name-LoadoutSalvageWeaponsCleaver = cleaver (colorable)
loadout-name-LoadoutSalvageWeaponsThrowingKnife = throwing knives (x3, colorable)
loadout-name-LoadoutSalvageWeaponsMachete = machete (colorable)
loadout-name-LoadoutSalvageWeaponsCutlass = cutlass (colorable)
loadout-name-LoadoutSalvageWeaponsKatana = katana (colorable)
loadout-name-LoadoutSalvageWeaponsWakizashi = wakizashi (colorable)
Empty file.
5 changes: 0 additions & 5 deletions Resources/Locale/en-US/loadouts/outerClothing.ftl

This file was deleted.

1 change: 0 additions & 1 deletion Resources/Locale/en-US/loadouts/uniform.ftl

This file was deleted.

Loading

0 comments on commit b8e2838

Please sign in to comment.