Skip to content

Implement NPC Dresser editor with clothing picker#265

Open
PatrickJnr wants to merge 1 commit into
Facepunch:mainfrom
PatrickJnr:feature/npc-dresser-editor
Open

Implement NPC Dresser editor with clothing picker#265
PatrickJnr wants to merge 1 commit into
Facepunch:mainfrom
PatrickJnr:feature/npc-dresser-editor

Conversation

@PatrickJnr
Copy link
Copy Markdown

Implement NPC Dresser Editor

Hooks up the TODO in DresserEditor.razor - you can now add/remove clothing on NPCs through the inspector.

Changes

  • DresserEditor - Shows equipped clothing grouped by category. Add, remove, randomise, and clear buttons.
  • ClothingPickerPopup - New popup for picking clothing. Filtered to citizen model only (no human skins). Has category tabs and multi-select so you can equip a full outfit in one go.
  • Localisation - Added English keys for all new UI strings (spawnmenu.dresser.*).

Notes

  • Only shows clothing that has a Model set and isn't a human skin - keeps the picker relevant for terry/citizen NPCs
  • Can't equip the same item twice
  • All changes go through [Rpc.Host] so it works in multiplayer

To test

  1. Spawn a scientist or army guy
  2. Hold C, click the NPC and go to the Dresser tab
  3. Try adding clothing, removing items, randomising, and clearing
  4. Check that duplicates get rejected

Video

sbox_10mb.mp4

@PatrickJnr
Copy link
Copy Markdown
Author

@DevulTj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant