Fixed Guidebook Sorting / Ordering (#34960)

* fixed all yml and cs

* Subjective Rearranging

* fixed my accidentally removed xml endline

* Accidentally included for a different PR

* Added .ThenBy and cleaned up newplayer.yml
This commit is contained in:
GrownSamoyedDog
2025-02-22 18:00:10 -07:00
committed by GitHub
parent a6d2948f75
commit 91678f75da
11 changed files with 51 additions and 98 deletions

View File

@@ -133,24 +133,14 @@ public sealed partial class GuidebookWindow : FancyWindow, ILinkClickHandler
HashSet<ProtoId<GuideEntryPrototype>> entries = new(_entries.Keys);
foreach (var entry in _entries.Values)
{
if (entry.Children.Count > 0)
{
var sortedChildren = entry.Children
.Select(childId => _entries[childId])
.OrderBy(childEntry => childEntry.Priority)
.ThenBy(childEntry => Loc.GetString(childEntry.Name))
.Select(childEntry => new ProtoId<GuideEntryPrototype>(childEntry.Id))
.ToList();
entry.Children = sortedChildren;
}
entries.ExceptWith(entry.Children);
}
rootEntries = entries.ToList();
}
// Only roots need to be sorted.
// As defined in the SS14 Dev Wiki, children are already sorted based on their child field order within their parent's prototype definition.
// Roots are sorted by priority. If there is no defined priority for a root then it is by definition sorted undefined.
return rootEntries
.Select(rootEntryId => _entries[rootEntryId])
.OrderBy(rootEntry => rootEntry.Priority)

View File

@@ -4,12 +4,12 @@
text: "/ServerInfo/Guidebook/Antagonist/Antagonists.xml"
children:
- Traitors
- NuclearOperatives
- Zombies
- Revolutionaries
- MinorAntagonists
- SpaceNinja
- Thieves
- Revolutionaries
- NuclearOperatives
- SpaceNinja
- Zombies
- MinorAntagonists
- type: guideEntry
id: Traitors

View File

@@ -3,9 +3,9 @@
name: guide-entry-engineering
text: "/ServerInfo/Guidebook/Engineering/Engineering.xml"
children:
- Atmospherics
- Construction
- Power
- Atmospherics
- ShuttleCraft
- Networking

View File

@@ -1,6 +1,7 @@
- type: guideEntry
id: NewPlayer
name: guide-entry-newplayer
priority: 0
text: "/ServerInfo/Guidebook/NewPlayer/NewPlayer.xml"
children:
- Controls
@@ -16,7 +17,7 @@
- type: guideEntry
id: Radio
name: guide-entry-radio
text: "/ServerInfo/Guidebook/NewPlayer/Controls/Radio.xml"
text: "/ServerInfo/Guidebook/NewPlayer/Controls/Radio.xml"
- type: guideEntry
id: CharacterCreation
@@ -24,7 +25,7 @@
text: "/ServerInfo/Guidebook/NewPlayer/CharacterCreation.xml"
children:
- YourFirstCharacter
- Species
- Species
- type: guideEntry
id: YourFirstCharacter

View File

@@ -1,6 +1,7 @@
- type: guideEntry
id: References
name: guide-entry-references
priority: 30
text: "/ServerInfo/Guidebook/References.xml"
children:
- Chemicals

View File

@@ -1,21 +1,25 @@
- type: guideEntry # Default for forks and stuff. Should not be listed anywhere if the server is using a custom ruleset.
# Only one of those rulesets will appear on the server at any given time.
# They all have a priority of 10 so they appear 2nd by default (after priority 0 and before priority 20)
- type: guideEntry # Default for forks and stuff. Should not be listed anywhere if the server is using a custom ruleset.
id: DefaultRuleset
name: guide-entry-rules
ruleEntry: true
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/DefaultRules.xml"
- type: guideEntry
id: CoreRuleset
name: guide-entry-rules-core-only
ruleEntry: true
priority: 0
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/WizDenCoreOnlyRules.xml"
- type: guideEntry
id: StandardRuleset
name: guide-entry-rules-lrp
ruleEntry: true
priority: 5
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/WizDenLRPRules.xml"
- type: guideEntry
@@ -29,14 +33,14 @@
id: RoleTypes
name: guide-entry-rules-role-types
ruleEntry: true
priority: 20
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/RoleTypes.xml"
- type: guideEntry
id: CoreRules
name: guide-entry-rules-core
ruleEntry: true
priority: 30
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC0.xml"
children:
- RuleC1
@@ -58,105 +62,91 @@
id: RuleC1
name: guide-entry-rules-c1
ruleEntry: true
priority: 1
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC1Admins.xml"
- type: guideEntry
id: RuleC2
name: guide-entry-rules-c2
ruleEntry: true
priority: 2
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC2DBAD.xml"
- type: guideEntry
id: RuleC3
name: guide-entry-rules-c3
ruleEntry: true
priority: 3
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC3NoHate.xml"
- type: guideEntry
id: RuleC4
name: guide-entry-rules-c4
ruleEntry: true
priority: 4
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC4NoERP.xml"
- type: guideEntry
id: RuleC5
name: guide-entry-rules-c5
ruleEntry: true
priority: 5
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC5Metacomms.xml"
- type: guideEntry
id: RuleC6
name: guide-entry-rules-c6
ruleEntry: true
priority: 6
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC6BanEvasion.xml"
- type: guideEntry
id: RuleC7
name: guide-entry-rules-c7
ruleEntry: true
priority: 7
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC7EnglishOnly.xml"
- type: guideEntry
id: RuleC8
name: guide-entry-rules-c8
ruleEntry: true
priority: 8
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC8Exploits.xml"
- type: guideEntry
id: RuleC9
name: guide-entry-rules-c9
ruleEntry: true
priority: 9
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC9Multikey.xml"
- type: guideEntry
id: RuleC10
name: guide-entry-rules-c10
ruleEntry: true
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC10AHelp.xml"
- type: guideEntry
id: RuleC11
name: guide-entry-rules-c11
ruleEntry: true
priority: 11
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC11AhelpThreats.xml"
- type: guideEntry
id: RuleC12
name: guide-entry-rules-c12
ruleEntry: true
priority: 12
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC12MinAge.xml"
- type: guideEntry
id: RuleC13
name: guide-entry-rules-c13
ruleEntry: true
priority: 13
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC13CharacterNames.xml"
- type: guideEntry
id: RuleC14
name: guide-entry-rules-c14
ruleEntry: true
priority: 14
text: "/ServerInfo/Guidebook/ServerRules/CoreRules/RuleC14ICinOOC.xml"
- type: guideEntry
id: RoleplayRules
name: guide-entry-rules-roleplay
ruleEntry: true
priority: 40
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR0.xml"
children:
- RuleR1
@@ -179,77 +169,66 @@
id: RuleR1
name: guide-entry-rules-r1
ruleEntry: true
priority: 1
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR1Silicons.xml"
- type: guideEntry
id: RuleR2
name: guide-entry-rules-r2
ruleEntry: true
priority: 2
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR2Familiars.xml"
- type: guideEntry
id: RuleR3
name: guide-entry-rules-r3
ruleEntry: true
priority: 3
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR3NormalRP.xml"
- type: guideEntry
id: RuleR4
name: guide-entry-rules-r4
ruleEntry: true
priority: 4
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR4Metashield.xml"
- type: guideEntry
id: RuleR5
name: guide-entry-rules-r5
ruleEntry: true
priority: 5
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR5Arrivals.xml"
- type: guideEntry
id: RuleR6
name: guide-entry-rules-r6
ruleEntry: true
priority: 6
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR6SelfAntag.xml"
- type: guideEntry
id: RuleR7
name: guide-entry-rules-r7
ruleEntry: true
priority: 7
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR7RoundStalling.xml"
- type: guideEntry
id: RuleR8
name: guide-entry-rules-r8
ruleEntry: true
priority: 8
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR8NoFriendlyAntag.xml"
- type: guideEntry
id: RuleR9
name: guide-entry-rules-r9
ruleEntry: true
priority: 9
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR9MassSabotage.xml"
- type: guideEntry
id: RuleR10
name: guide-entry-rules-r10
ruleEntry: true
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR10Subordination.xml"
- type: guideEntry
id: RuleR11
name: guide-entry-rules-r11
ruleEntry: true
priority: 11
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR11Escalation.xml"
children:
- RuleR11-1
@@ -259,49 +238,43 @@
id: RuleR11-1
name: guide-entry-rules-r11-1
ruleEntry: true
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR11-1AnimalEscalation.xml"
- type: guideEntry
id: RuleR11-2
name: guide-entry-rules-r11-2
ruleEntry: true
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR11-2ConflictTypes.xml"
- type: guideEntry
id: RuleR12
name: guide-entry-rules-r12
ruleEntry: true
priority: 12
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR12RoleAbandonment.xml"
- type: guideEntry
id: RuleR13
name: guide-entry-rules-r13
ruleEntry: true
priority: 13
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR13PerformRole.xml"
- type: guideEntry
id: RuleR14
name: guide-entry-rules-r14
ruleEntry: true
priority: 14
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR14SecComStandard.xml"
- type: guideEntry
id: RuleR15
name: guide-entry-rules-r15
ruleEntry: true
priority: 15
text: "/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR15SpaceLaw.xml"
- type: guideEntry
id: SiliconRules
name: guide-entry-rules-silicon
ruleEntry: true
priority: 50
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS0.xml"
children:
- RuleS1
@@ -319,70 +292,60 @@
id: RuleS1
name: guide-entry-rules-s1
ruleEntry: true
priority: 1
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS1Laws.xml"
- type: guideEntry
id: RuleS2
name: guide-entry-rules-s2
ruleEntry: true
priority: 2
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS2LawPriority.xml"
- type: guideEntry
id: RuleS3
name: guide-entry-rules-s3
ruleEntry: true
priority: 3
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS3LawRedefinition.xml"
- type: guideEntry
id: RuleS4
name: guide-entry-rules-s4
ruleEntry: true
priority: 4
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS4RequestChanges.xml"
- type: guideEntry
id: RuleS5
name: guide-entry-rules-s5
ruleEntry: true
priority: 5
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS5FreeSilicon.xml"
- type: guideEntry
id: RuleS6
name: guide-entry-rules-s6
ruleEntry: true
priority: 6
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS6UnreasonableOrders.xml"
- type: guideEntry
id: RuleS7
name: guide-entry-rules-s7
ruleEntry: true
priority: 7
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS7Consistency.xml"
- type: guideEntry
id: RuleS8
name: guide-entry-rules-s8
ruleEntry: true
priority: 8
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS8DefaultCrewDefinition.xml"
- type: guideEntry
id: RuleS9
name: guide-entry-rules-s9
ruleEntry: true
priority: 9
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS9DefaultHarmDefinition.xml"
- type: guideEntry
id: RuleS10
name: guide-entry-rules-s10
ruleEntry: true
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/SiliconRules/RuleS10OrderConflicts.xml"
@@ -390,7 +353,7 @@
id: MRPRules
name: guide-entry-rules-mrp-m0
ruleEntry: true
priority: 60
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/MRPRules/RuleM0.xml"
children:
- RuleM1
@@ -399,33 +362,18 @@
id: RuleM1
name: guide-entry-rules-m1
ruleEntry: true
priority: 10
text: "/ServerInfo/Guidebook/ServerRules/MRPRules/RuleM1DoNotPowergame.xml"
- type: guideEntry
id: SpaceLaw
name: guide-entry-rules-space-law
priority: 1
text: "/ServerInfo/Guidebook/ServerRules/SpaceLaw/SpaceLaw.xml"
children:
- SpaceLawCrimeList
- type: guideEntry
id: SpaceLawCrimeList
name: guide-entry-rules-sl-crime-list
priority: 5
text: "/ServerInfo/Guidebook/ServerRules/SpaceLaw/SLCrimeList.xml"
# Ban-Related Guide Entries are used as hyperlinks in certain Ruleset Guide Entry explanations.
- type: guideEntry
id: BanTypes
name: guide-entry-rules-ban-types
ruleEntry: true
priority: 90
text: "/ServerInfo/Guidebook/ServerRules/BanTypes.xml"
- type: guideEntry
id: BanDurations
name: guide-entry-rules-ban-durations
ruleEntry: true
priority: 100
text: "/ServerInfo/Guidebook/ServerRules/BanDurations.xml"

View File

@@ -22,3 +22,15 @@
id: CriminalRecords
name: guide-entry-criminal-records
text: "/ServerInfo/Guidebook/Security/CriminalRecords.xml"
- type: guideEntry
id: SpaceLaw
name: guide-entry-rules-space-law
text: "/ServerInfo/Guidebook/ServerRules/SpaceLaw/SpaceLaw.xml"
children:
- SpaceLawCrimeList
- type: guideEntry
id: SpaceLawCrimeList
name: guide-entry-rules-sl-crime-list
text: "/ServerInfo/Guidebook/ServerRules/SpaceLaw/SLCrimeList.xml"

View File

@@ -3,10 +3,10 @@
name: guide-entry-jobs
text: "/ServerInfo/Guidebook/Jobs.xml"
children:
- Service
- Cargo
- Command
- Engineering
- Medical
- Science
- Engineering
- Security
- Service
- Command

View File

@@ -1,6 +1,7 @@
- type: guideEntry
id: SS14
name: guide-entry-ss14
priority: 20
text: "/ServerInfo/Guidebook/SpaceStation14.xml"
children:
- Jobs

View File

@@ -8,11 +8,11 @@
## Various Antagonists
Antagonists can take many forms, like:
- [textlink="Nuclear operatives" link="Nuclear Operatives"], with the goal of infiltrating and destroying the station.
- [textlink="Traitors" link="Traitors"] amongst the crew who must assassinate, steal and decieve.
- [textlink="Revolutionaries" link="Revolutionaries"] who are intent on taking control of the station from the inside.
- [textlink="Zombies" link="Zombies"] that crave the flesh of every crew member and creature on board.
- [textlink="Space Ninjas" link="SpaceNinja"], masters of espionage and sabotage with special gear.
- [textlink="Thieves" link="Thieves"] driven by kleptomania, determined to get their fix using their special gloves.
- [textlink="Revolutionaries" link="Revolutionaries"] who are intent on taking control of the station from the inside.
- [textlink="Nuclear operatives" link="Nuclear Operatives"], with the goal of infiltrating and destroying the station.
- [textlink="Space Ninjas" link="SpaceNinja"], masters of espionage and sabotage with special gear.
- [textlink="Zombies" link="Zombies"] that crave the flesh of every crew member and creature on board.
- [textlink="Various non-humanoid creatures" link="MinorAntagonists"] that generally attack anything that moves.
</Document>

View File

@@ -13,11 +13,6 @@ It primarily functions as folks who entertain, clean, and serve the rest of the
For the most part, this means they scrounge around the station and assorted wrecks to find materials to sell and redistribute, and purchase materials other departments request.
## Security
[color=#cb0000]Security[/color] consists of the security cadets, lawyers, detective, security officers, warden, and the head of security. As a department it is responsible for dealing with troublemakers and non-humanoid threats like giant rats and carp.
As a result of this, and the need to walk a fine line, security sometimes is overwhelmed by angry crew (don't kill the clown), and it is important for its members to try and stay on their best behavior.
## Medical
[color=#5b97bc]Medical[/color] consists of the medical interns, chemists, medical doctors, and the chief medical officer. As a department it is responsible for taking care of the crew, treat and/or clone the wounded and dead, treat disease, and prevent everyone from dying a horrible, bloody death in a closet somewhere.
@@ -33,6 +28,11 @@ Scientists should seek out new artifacts to study, as well as solicit department
Engineering is readily equipped to go safely into space, and as such they should always attempt to repair uninhabitable parts of the station.
## Security
[color=#cb0000]Security[/color] consists of the security cadets, lawyers, detective, security officers, warden, and the head of security. As a department it is responsible for dealing with troublemakers and non-humanoid threats like giant rats and carp.
As a result of this, and the need to walk a fine line, security sometimes is overwhelmed by angry crew (don't kill the clown), and it is important for its members to try and stay on their best behavior.
## Command
[color=#1b67a5]Command[/color] consists of every department head. It is responsible for keeping the station and its departments running efficiently.