Commit Graph

28 Commits

Author SHA1 Message Date
paige404
2e7f01b99e Fix broken layer hiding on clothes with multiple equipment slots (#34080)
* Fix broken layer hiding on clothes with multiple equipment slots

* Refactor ToggleVisualLayers, HideLayerClothingComponent, and ClothingComponent to allow more
precise layer hide behavior and more CPU efficient layer toggling.

* Adjust HumanoidAppearaceSystem to track which slots are hiding a given layer (e.g. gas mask and welding mask)
Add documentation
Change gas masks to use the new HideLayerClothingComponent structure as an example of its usage

* Fix the delayed snout bug

* Misc cleanup

* Make `bool permanent` implicit from SlotFlags

any non-permanent visibility toggle with `SlotFlags.None` isn't supported with how its set up. And similarly, the slot flags argument does nothing if permanent = true. So IMO it makes more sense to infer it from a nullable arg.

* Split into separate system

Too much pasta

* Remove (hopefully unnecessary) refresh

* Fisk mask networking

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* Keep old behaviour, use clearer names?

I'm just guessing at what this was meant to do

* english

* Separate slot name & flag

* dirty = true

* fix comment

* Improved SetLayerVisibility with dirtying logic suggested by @ElectroJr

* Only set mask toggled if DisableOnFold is true

* FoldableClothingSystem fixes

* fix bandana state

* Better comment

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2025-03-21 00:30:47 +11:00
Pieter-Jan Briers
1bebb3390c Borg type switching. (#32586)
* Borg type switching.

This allows borgs (new spawn or constructed) to select their chassis type on creation, like in SS13. This removes the need for the many different chassis types, and means round-start borgs can actually play the game immediately instead of waiting for science to unlock everything.

New borgs have an additional action that allows them to select their type. This opens a nice window with basic information about the borgs and a select button. Once a type has been selected it is permanent for that borg chassis.

These borg types also immediately start the borg with specific modules, so they do not need to be printed. Additional modules can still be inserted for upgrades, though this is now less critical. The built-in modules cannot be removed, but are shown in the UI.

The modules that each borg type starts with:

* Generic: tools
* Engineering: advanced tools, construction, RCD, cable
* Salvage: Grappling gun, appraisal, mining
* Janitor: cleaning, light replacer
* Medical: treatment
* Service: music, service, clowning

Specialized borgs have 3 additional module slots available on top of the ones listed above, generic borgs have 5.

Borg types are specified in a new BorgTypePrototype. These prototypes specify all information about the borg type. It is assigned to the borg entity through a mix of client side, server, and shared code. Some of the involved components were made networked, others are just ensured they're set on both sides of the wire.

The most gnarly change is the inventory template prototype, which needs to change purely to modify the borg hat offset. I managed to bodge this in with an API that *probably* won't explode for specifically for this use case, but it's still not the most clean of API designs.

Parts for specific borg chassis have been removed (so much deleted YAML) and specialized borg modules that are in the base set of a type have been removed from the exosuit fab as there's no point to printing those.

The ability to "downgrade" a borg so it can select a new chassis, like in SS13, is something that would be nice, but was not high enough priority for me to block the feature on. I did keep it in mind with some of the code, so it may be possible in the future.

There is no fancy animation when selecting borg types like in SS13, because I didn't think it was high priority, and it would add a lot of complex code.

* Fix sandbox failure due to collection expression.

* Module tweak

Fix salvage borg modules still having research/lathe recipes

Engie borg has regular tool module, not advanced.

* Fix inventory system breakage

* Fix migrations

Some things were missing

* Guidebook rewordings & review

* MinWidth on confirm selection button
2024-11-14 11:08:35 -06:00
Charlie
55ae02f320 fix index stepping to avoid pushing front layers into back layers (#32553)
Co-authored-by: charlie <charlie.sc.wong@veiwsonic.com>
2024-09-30 22:27:33 +03:00
Mervill
3414abb970 Remove unused IoC dependency references. (#31704)
Remove unused IoC dependencies
2024-09-01 23:22:50 +02:00
Ed
918709cb47 Displacement maps big update (#30093)
* split logic into own system

* add support for different size displacement maps

* some clothes may not use displacement maps

* displacement maps spport hand sprites

* Update DisplacementMapSystem.cs

* rename things

* fuck stencilmask

* fix bugs

* no masks

* Update jumpsuits.yml

* fix species specific sprites

* Update ClothingSystem.cs

* shoes + ears displacement, some bugfix

* Update DisplacementMapSystem.cs
2024-07-23 12:04:09 +03:00
Cojoke
390f8d19d1 Makes Eyepatches Flippable (#26277) 2024-06-16 23:21:29 -04:00
Ed
f079e77554 Displacement maps now works on any layers (#27405)
* try

* pipupi

* Update ClientClothingSystem.cs

* Update vox.yml

* Update ClientClothingSystem.cs
2024-04-28 12:35:40 +10:00
Pieter-Jan Briers
2f7d0dedbd Displacement map prototype (#26709)
Requires https://github.com/space-wizards/RobustToolbox/pull/5023

This uses the new engine features (above) to add a displacement map shader. This allows deforming a sprite based on another sprite.

Primary use case is automatically adapting human clothing sprites to different species, something we want to make species like Vox a reality.

A basic example of wiring this up with Vox has been added. The system is however incredibly simple and **will** need more work by a content developer to select and toggle displacement maps when appropriate. I am leaving that to somebody else. For example right now the displacement map is applied even if a species already has custom-fit sprites for a piece of clothing, such as the grey jumpsuit for Vox.

Basic Aseprite plugins to help with authoring displacement maps have also been made.
2024-04-27 16:03:58 +10:00
Jake Huxell
59e46aab93 Reduced Warning Count By 130 For Full Rebuilds (#26518)
* remove deprecated entity coordinate extension functions. Reduces warning count by approximately 50

* final toCoords Removed

* Remove all unused variables and dead code paths

* remove always true variable, should be a cvar or something instead

* remove superfluous variables from tests
2024-03-29 16:28:16 +11:00
Ed
986ac589b4 Fashion is my profession - Procedural jumpsuit variants (#25888)
* add color field to clothing layers

* add support to randomsprite

* bababa

* finalize spriting work

* add to game

* fix

* remove space

* edit patelle, +1 decor variant

* added only pants, some sprite fix

* inflation

* fix mixed

* not tested commit

* Revert "not tested commit"

This reverts commit 4a904df3452263e87c9cb819ab5d8cf411ebe468.

* naked human is fun

* update

* add new style

* some sprite pixel tweak

* Update meta.json
2024-03-15 18:37:12 +11:00
LordCarve
aafe815122 Obsolete Logger cleanup for EntitySystems (#25941)
* Small obsolete Logger cleanup

* Fixed three EntitySystem logs that weren't doing it right.
2024-03-10 01:15:13 +01:00
Leon Friedrich
287d22cc49 Inventory slot enumerator rejig (#21788) 2023-12-08 08:20:51 +11:00
metalgearsloth
5b8f3c48c4 Revert "Update submodule to 175.0.0 (#21318)" (#21319) 2023-10-29 15:29:30 +11:00
metalgearsloth
9b1b3e03ed Content audio (#20862) 2023-10-29 14:58:23 +11:00
metalgearsloth
5a0fc68be2 Content update for NetEntities (#18935) 2023-09-11 09:42:41 +10:00
Visne
c7b21b631b Remove unused dependencies (#19490) 2023-08-24 09:55:15 -08:00
Leon Friedrich
cc81a7511b Fix monkey jumpsuits (#17410) 2023-06-19 03:23:04 +10:00
DEATHB4DEFEAT
a8337172ca More gendered sprite masks (#14735) 2023-06-05 21:11:45 +10:00
Leon Friedrich
f99533a7bf Remove server and shared sprite component (#15917) 2023-04-30 16:09:52 +10:00
DrSmugleaf
98b4af8df0 Remove inventory component references (#15249) 2023-04-12 10:20:47 +10:00
Zoldorf
8400ed7fbb add the ability to override the equipped state sprite clothing system uses for custom prototypes. (#15294) 2023-04-12 02:28:56 +10:00
Visne
5a5a3afbb1 Remove some obsolete AppearanceComponent method usages (#13726) 2023-02-02 12:34:53 -04:00
Leon Friedrich
48bcd30ef9 Makes humanoid appearance component networked. (#13009)
Fixes https://github.com/space-wizards/space-station-14/issues/12248
2023-01-24 11:38:19 +11:00
AJCM-git
c7ec03d2fb TryGetData() Generics support content changes (#13053) 2022-12-20 14:24:55 -08:00
Leon Friedrich
35015795a4 Species specific jumpsuit sprite fixes (#12552) 2022-11-11 19:57:18 -06:00
Justin Trotter
8c0b113fcf Pet internals (#12376)
* toggle other crew and pet internals

* oops
2022-11-08 15:04:06 -06:00
Rane
16e1b9e349 Fix female clothing mask (#12217)
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2022-10-31 11:06:16 +11:00
Leon Friedrich
7d276d1101 Remove server/client clothing components. (#11981) 2022-10-22 15:30:37 -07:00