-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ideo preset chooser for new factions
Fix saving of policies (outfits etc) Remove spectator faction when converting to sp
- Loading branch information
Showing
14 changed files
with
260 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System.Linq; | ||
using RimWorld; | ||
using UnityEngine; | ||
using Verse; | ||
|
||
namespace Multiplayer.Client.Factions; | ||
|
||
public class Page_ChooseIdeo_Multifaction : Page | ||
{ | ||
public override string PageTitle => "ChooseYourIdeoligion".Translate(); | ||
|
||
public Page_ChooseIdeoPreset pageChooseIdeo = new(); | ||
|
||
public override void DoWindowContents(Rect inRect) | ||
{ | ||
DrawPageTitle(inRect); | ||
float totalHeight = 0f; | ||
Rect mainRect = GetMainRect(inRect); | ||
TaggedString descText = "ChooseYourIdeoligionDesc".Translate(); | ||
float descHeight = Text.CalcHeight(descText, mainRect.width); | ||
Rect descRect = mainRect; | ||
descRect.yMin += totalHeight; | ||
Widgets.Label(descRect, descText); | ||
totalHeight += descHeight + 10f; | ||
|
||
pageChooseIdeo.DrawStructureAndStyleSelection(inRect); | ||
|
||
Rect outRect = mainRect; | ||
outRect.width = 954f; | ||
outRect.yMin += totalHeight; | ||
float num3 = (InitialSize.x - 937f) / 2f; | ||
|
||
Widgets.BeginScrollView( | ||
viewRect: new Rect(0f - num3, 0f, 921f, pageChooseIdeo.totalCategoryListHeight + 100f), | ||
outRect: outRect, | ||
scrollPosition: ref pageChooseIdeo.leftScrollPosition); | ||
|
||
totalHeight = 0f; | ||
pageChooseIdeo.lastCategoryGroupLabel = ""; | ||
foreach (IdeoPresetCategoryDef item in DefDatabase<IdeoPresetCategoryDef>.AllDefsListForReading.Where(c => c != IdeoPresetCategoryDefOf.Classic && c != IdeoPresetCategoryDefOf.Custom && c != IdeoPresetCategoryDefOf.Fluid)) | ||
{ | ||
pageChooseIdeo.DrawCategory(item, ref totalHeight); | ||
} | ||
pageChooseIdeo.totalCategoryListHeight = totalHeight; | ||
Widgets.EndScrollView(); | ||
|
||
DoBottomButtons(inRect); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.