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

Chameleon controller implant (Clothing fast switch) #33887

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

beck-thompson
Copy link
Contributor

About the PR

Added a chameleon controller implant that you can get in the standard chameleon bundle!

Why / Balance

Right now it takes a very long time to switch all the clothing one by one. This will allow you to still have fine grained control, but also quickly switch entire jobs in a matter of seconds. With the AI ever watching hopefully this lets antags using the chameleon clothing get a little more of an edge. It also uses your loadout from your profile, so you can make a decent amount of customization changes!

I'm planning on adding more stuff to this implant as well (E.g chameleon ID icon change) but wanted to keep it simple for the first PR.

Technical details

It is a lot... Most of the file changes are just UI stuff, the thing that you should probably focus on is ChameleonControllerSystem.cs and SharedStationSpawningSystem.cs. The loadout system is confusing so there is a lot of odd logic. Basically, I get the users profile, try to find if they have a loadout for a given job, if they do, use that as the clothing, if they don't and if they don't create a new one with the default!

profile.Loadouts.TryGetValue(jobProtoId, out var loadout);
loadout ??= new RoleLoadout(jobProtoId);
loadout.SetDefault(profile, session, _proto);

Then, I got through every slot and try to get the item stored for that slot with the new GetGearForSlot function.

var proto = _stationSpawningSystem.GetGearForSlot(loadout, slot.Name) ?? ((IEquipmentLoadout) startingGearPrototype).GetGear(slot.Name);

If their profile doesn't have anything for that slot, I see if there is any "starting gear" for that goes in the slot.

Media

2024-12-15.21-00-54.mp4

Requirements

Breaking changes

Changelog

🆑 Beck

  • add: A chameleon controller implant that allows you to quickly switch between jobs clothing! Comes packaged in the chameleon kit.

@github-actions github-actions bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/L Denotes a PR that changes 100-1000 lines. Changes: UI Changes: Might require knowledge of UI design or code. Changes: Sprites Changes: Might require knowledge of spriting or visual design. labels Dec 16, 2024
Copy link
Contributor

RSI Diff Bot; head commit 236c7a0 merging into 5958801
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Actions/Implants/implants.rsi

State Old New Status
chameleon Added

@Everturning
Copy link

The UI looks really good. it seems to work well in the video too.

Copy link
Contributor

@Aeshus Aeshus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

It looks pretty good, though I just have some stylistic issues, you should probably be using FancyWindow, and you should see if you can just use the SetOutfitCommand code or maybe integrate the two to share implementations.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed there's a lot of shared/duplicate code between this and the SetOutfitCommand

https://github.com/space-wizards/space-station-14/blob/782a2978f0b34f9c74b209a072a175e84e645b24/Content.Server/Administration/Commands/SetOutfitCommand.cs

It might be useful to look or even directly integrate the two as they do a very similar job.

@southbridge-fur
Copy link
Contributor

southbridge-fur commented Dec 16, 2024

I love this. My one issue would be folks meta gaming people with default outfits, but that remains to be seen.

@beck-thompson
Copy link
Contributor Author

I love this. My one issue would be folks meta gaming people with default outfits, but that remains to be seen.

I actually did think of this! It will use your loadout that you have for the job so everyone can customize it. Hopefully it wont be too much of an issue

@ArtisticRoomba
Copy link
Contributor

I love this. My one issue would be folks meta gaming people with default outfits, but that remains to be seen.

Absolutely hilarious how absurd metagaming can be sometimes.

"You've been going in and out of maints with the most basic fit of all time. I'm arresting you"

@Aeshus Aeshus added P3: Standard Priority: Default priority for repository items. T: New Feature Type: New feature or content, or extending existing content D2: Medium Difficulty: A good amount of codebase knowledge required. A: Roundflow/Antag Area: Roundflow - "What happens in the game", including antagonist roles and their capabilities and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Roundflow/Antag Area: Roundflow - "What happens in the game", including antagonist roles and their capabilities Changes: Sprites Changes: Might require knowledge of spriting or visual design. Changes: UI Changes: Might require knowledge of UI design or code. D2: Medium Difficulty: A good amount of codebase knowledge required. P3: Standard Priority: Default priority for repository items. size/L Denotes a PR that changes 100-1000 lines. T: New Feature Type: New feature or content, or extending existing content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants