Merge SetDirty() with preview reload
People were forgetting to SetDirty() when changing a property; move SetDirty()
into preview reloading, since if the preview is being reloaded, some property
has definitely changed anyway.
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
(cherry picked from commit 55771cab745bf45e4756ded41382ef990b84d505)
* it just works
* why hasn't it catastrophically failed yet
* not just gotta do the ui
oh god the ui
* that was easier than expected
* a devious misdirection
* touchups
* svin
* loc+fix
* touchups
* shitfix
* touchups x3
* for further use
* i hate this piece of shit engine
* touchups x4
* ribbit
also i'm retarded x2
* big tard energy
* bb
* rabbitson
* ?
* forgor
* k
* whoops
* fug
* Give silicons proper lobby/character editor previews
No more naked dummies, properly show a borg/AI sprite now.
This means taking the JobEntity into account when spawning the dummy. For AIs I had to add a "JobPreviewEntity" field because they'd look like a posibrain otherwise. AI therefore uses a custom dummy entity I defined.
Also I had to add some margins to the UI, because otherwise the 32x32 sprite of the AI would look bad.
* Update Content.Shared/Roles/JobPrototype.cs
* Update Content.Client/Lobby/LobbyUIController.cs
* Update Resources/Prototypes/Entities/Mobs/Player/silicon.yml
---------
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
(cherry picked from commit 299b13f21b91166fa0db6a4dd97578a03a1ef966)
* Большое обновление книжек
* Remove dotnet tool cache artifacts
* Remove dotnet tool cache artifacts 2
* All comments on English
* Add all validation
* All localization, code reduction, named bookmarks system
* Add "try catch" because coderabbitai asked
* Add base check content length
* Fix "\\n"
* the "BookRandomStory" system has been fix and translate
* little fix "BookRandomStory" system
* 2 little fix "BookRandomStory" system
* 3 little fix "BookRandomStory" system
* 4 little fix "BookRandomStory" system
* 5 little fix "BookRandomStory" system
* Improved handling of UTF-8 character truncation
* 2 Improved validation and handling of UTF-8 character truncation
* Mini-up for author_books
* add new author book for botany
* Smaller long of text on one page
* translation of the new janitor's book
* Spelling lesson
* Make TODO notes
* Translate TODO notes...
* little fix "Check the status of the dialog before using it."
* DONE: Create new pages to transfer text, not replace old ones
* DONE: Make it visible when the text limit per page is exceeded
* DONE: Make it possible to delete unnecessary pages
* Fall protection on incorrect markings
* fix ".ftl"
* Text length limit for SplitContentIntoPages
* change limits
* Add sound
* Add placeholder to loadouts and new symbol for CreateNewPage
* Apply some suggestions from code review
All changes, except moving files into White folders
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
* Apply some suggestions from code review 2
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
* Transfering into "_White" folder
* Remove dublicate code
* Added the necessary code
* Add method
* BookSystem has been transfered into "Shared" folder
* Add attributions for ".ogg"
* changes for tools have been canceled
* Apply some suggestions from code review 3
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
* content have been transfered into "_White" folder 2
* Little fix locales
* Apply some suggestions from code review 4
Add comments in "Resources/Prototypes/Entities/Objects/Misc/books_author.yml"
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
* content have been transfered into "_White" folder and translate
* English spelling lesson
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
* Add BookRandomeStorySystem
* Apply some suggestions from code review 5
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
* rolling back some changes from "code review 5"
* Spelling lesson 2
* tweak BookSystem. (Apply suggestion from code review)
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
* Little fix bookmark-default-title
* Apply some suggestions from code review 6
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
* fix code review changes and transfer "BookRandomStorySystem.cs" into "Content.System"
* Half of good locales
* full good locales of RandomStorySystem
* Spelling lesson 3
* Removed unnecessary StoryGen file
* Fixed bookmarks pos after del any page
* Transd files into _White folder
* Fixed the constant activity of the add page button
* Correction at the request of coderabbitai
* Transfered at the request of code review
* Transfered at the request of code review 2
* Fix transfer
* Apply suggestions from code review 7
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
* Apply suggestions from code review 8
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Apply and fix all suggestions from code review of file "BookWindow.xaml.cs"
* Fix formated
* Apply some suggestions from code review 9
maybe last...
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Add try catch on texture loading
* Add Dispose method
* Correct display of blank pages
* Little fix eng locale
* Unnecessary code removed
* A Little Defense Against NRE/KeyNotFound.
* Highlighting the current page in the bookmarks drop-down list.
* Added fallback for the save button when there is no hotkey.
* Correct unsubscribing from events.
* Little fix save button
* Little fix formated
* Locales transfered fix
---------
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Character menu asks if you want to save your character on exit
* Fix
* Another fix, little mistake by me
* Update Content.Client/Lobby/UI/CharacterSetupGuiSavePanel.xaml.cs
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
(cherry picked from commit adcbe8d0be2ccdc76dd5e17af0206c623786874b)
# Description
Cleaned up Logger obsolete compiler warnings in non robust code.
Should probably be changed to a ISawmill reference in classes to avoid
repeated lookups in heavy logging logic.
---
# Changelog
🆑
- tweak: Logger to Logger.GetSawmill("name");
---------
Co-authored-by: ilmenwe <no@mail.com>
(cherry picked from commit 2e8ffd971716d38dc6d5a520bebdf88b743045a3)
# Description
Adds a datafield for Species to define having bonus trait points or
penalty trait points. Currently only used by Human because they have
literally nothing. But you could for example make a particularly
"powerful' species such as Oni have negative bonus trait points.
# TODO
<details><summary><h1>Media</h1></summary>
<p>
Felinid(Default 10 points):

Human: (+2 trait points)

</p>
</details>
# Changelog
🆑
- add: Humans now have +2 bonus trait points. It's also possible now for
"overpowered" species to have fewer trait points, although this is not
currently used.
(cherry picked from commit f1c29573cbe9918c833f180a121f26a2d2ad5a94)
# Description
I like doing stupid stuff with UI
---
<details><summary><h1>Media</h1></summary>
<p>
I can't take a picture of tooltip, so I got this through a video

</p>
</details>
---
# Changelog
🆑
- tweak: Loadouts' and traits' tooltips are much easier to read and look
better (and cooler of course)
(cherry picked from commit 5ae4b44e9fff1b6ca53df9f3795ef47e357e9b75)
# Description
This PR gently reworks the traits and loadouts system to where both
systems have a new Datafield for "Slots", which declares how many
selections the trait/loadout occupies. The actual implementation of
these differs between the two, since Traits has an actual selection
limit, while Loadouts do not(but instead respect CharacterItemGroups).
In both cases, Slots are defaulted to 1, and can be omitted in most
cases.
Where this shines particularly is in Traits, where it serves as a new
second line for trait balancing. Traits such as Accents, which are
completely worthless, otherwise would never be taken at all since they
compete with other traits for Opportunity Cost. Conversely, there's only
so many points we can increase a powerful trait to, (literally, they
cannot cost more than the current trait maximum). So traits can be made
to occupy >1 slot selections.
Slots can be defined for Item Groups as well, which is what this
datafield does on Loadouts, which both of these share. But since Traits
have two different places that their slots are used, I've opted to
create a split slot datafield for Traits. To simplify things, their
ItemGroupSlots defaults to their Slots datafield, but can be
independently changed as desired.
<details><summary><h1>Media</h1></summary>
<p>
https://github.com/user-attachments/assets/99dddfe1-76d2-445a-a94a-1998d3d39c51
</p>
</details>
# Changelog
🆑
- tweak: Accents no longer cost trait slots.
(cherry picked from commit d760c5813d5dd29b3eddebd8d671bf3ed6e86b3e)
# Description

Mfw a downstream fixes things only for themselves, leaving me to hear
hundreds of complaints constantly about bugs that I don't have the time
or manpower to fix upstream.
# Changelog
🆑
- fix: Fixed an issue that prevented players from saving item
customizations if they didn't have enough loadout points to buy the item
a second time.
- add: Traits can now define the order in which they are applied.
- fix: Fixed RGBee pushie not working.
(cherry picked from commit bf3a0ec705acb9781ca5f5c2d200857b6a964a07)
<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->
# Description
<!--
Explain this PR in as much detail as applicable
Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->
Some coats and scrubs in loadout are branded with specific corporation
logo's.
This PR restricts specifically those items to the employers that they
are from.
Note that we have coats from other companies currently not listed as
available employers too. Perhaps we should consider adding them?
# Updated:
This PR now also includes CCVars that can disable a part, or the
entirety, of Contractors for downstreams that prefer free-form RP over
gameplay.
While I was at it, I made it so that AI and Borgs don't get Passports.
---
# Changelog
<!--
You can add an author after the `🆑` to change the name that appears
in the changelog (ex: `🆑 Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->
🆑
- tweak: Restricted some corporate jackets and scrubs to that specific
corporation.
- tweak: Downstreams can now disable Contractors entirely or partially
if they prefer freeform-rp over gameplay facilitating RP
- tweak: Station AI and Borg are no longer people and don't get
passports.
(cherry picked from commit 445bdc5c1b04c9f41460fb1cc6986e736732508e)
<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->
# Description
<!--
Explain this PR in as much detail as applicable
Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->
Adds a description to your chosen lifepath, employer or nationality.
---
<!--
This is default collapsed, readers click to expand it and see all your
media
The PR media section can get very large at times, so this is a good way
to keep it clean
The title is written using HTML tags
The title must be within the <summary> tags or you won't see it
-->
<details><summary><h1>Media</h1></summary>
<p>

</p>
</details>
---
# Changelog
<!--
You can add an author after the `🆑` to change the name that appears
in the changelog (ex: `🆑 Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->
🆑
- add: Moved Nationality, Employer, and Lifepath to a new Background
tab. They now also show descriptions for the chosen selections.
(cherry picked from commit 862b95e92b44f34379187111c8505395ff9f3473)
<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->
# Description
<!--
Explain this PR in as much detail as applicable
Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->
Contractors v1 is the first version of a system that will allow you to
set a nationality and an employer to your character. Initially, this
will determine the availability of some loadout items, jobs and traits,
but this is built to expand upon later.
As of this moment, the PR will let you select a nationality, an employer
and a lifepath. Nationalities give you a language and a passport, while
the other two don't do a lot yet. (except Command can only be NanoTrasen
and most other jobs can't be unemployed)
The passport functions, and the CharacterRequirements do as well.
there's still a lot more that can be done--tying jobs to certain
employers, items or traits to nationalities or lifepaths, but the reason
I want to merge it before that's done is primarily so that I don't need
to be the sole person working on it anymore. The C# is done, the rest is
YAML, and we have a bunch of competent YAML warriors who will do great
stuff with this, no doubt.
---
# TODO
<!--
A list of everything you have to do before this PR is "complete"
You probably won't have to complete everything before merging but it's
good to leave future references
-->
- [x] Create Nationality and Employer Prototype code
- [x] Create Nationality and Employer Character Requirements
- [x] Add both fields to the Character Creation menu
- [x] Create Nationality and Employer Prototypes
- [x] Create Nationality and Employer Prototypes YAML
- [x] Add requirements to a few jobs
- [ ] Add requirements to a few traits
- [ ] Add requirements to a few loadout items
- [x] create a passport item that can be opened and closed
- [x] Give each nationality a passport item valid for their species
---
<!--
This is default collapsed, readers click to expand it and see all your
media
The PR media section can get very large at times, so this is a good way
to keep it clean
The title is written using HTML tags
The title must be within the <summary> tags or you won't see it
-->
<details><summary><h1>Media</h1></summary>
<p>

https://github.com/user-attachments/assets/9e61aed8-2e07-4d44-89c7-595a170df8c7
</p>
</details>
---
# Changelog
<!--
You can add an author after the `🆑` to change the name that appears
in the changelog (ex: `🆑 Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->
🆑
- add: Contractors. Be sure to edit your character to set an employer
and nationality!
- add: Nationality, Lifepath, and Employer have been added to character
creation. These don't currently do much except spawn a passport
containing information about where your character is from and who they
are, but they are fully integrated with Character Requirements, and by
extension can be used for and alongside Traits, Loadouts, Jobs,
Antagonists, etc.
---------
Signed-off-by: Timfa <timfalken@hotmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
(cherry picked from commit c3b12c62ee3bd226b57022690d1b24cb7cf54e3f)
* Give jobs & antags prototypes a guide field
* A
* space
Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
* Add todo
* Fix merge errors
---------
Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
(cherry picked from commit e7f2ae52ab24dddc8f3c94cb84b751482700e3da)
(cherry picked from commit 4cee20b913a1de0cd6f8ee7d02c2bf55e3e75298)