2022-12-17 19:52:10 +00:00
using System ;
using System.Collections.Generic ;
using System.Linq ;
using System.Text ;
using System.Threading.Tasks ;
using Verse ;
using UnityEngine ;
2022-12-19 19:48:56 +00:00
2022-12-25 11:38:05 +00:00
namespace RJW_BGS
2022-12-17 19:52:10 +00:00
{
public class RJW_BGSSettings : ModSettings
{
public static void DoWindowContents ( Rect inRect )
{
//Copied from RJW settings mostly
Rect outRect = new Rect ( 0f , 30f , inRect . width , inRect . height - 30f ) ;
Rect rect = new Rect ( 0f , 0f , inRect . width - 16f , inRect . height + 300f ) ;
//Widgets.BeginScrollView(outRect, ref RJWSettings.scrollPosition, rect, true);
Listing_Standard listing_Standard = new Listing_Standard ( ) ;
listing_Standard . maxOneColumn = true ;
listing_Standard . ColumnWidth = rect . width / 2.05f ;
listing_Standard . Begin ( rect ) ;
listing_Standard . Gap ( 24f ) ;
2023-01-15 16:48:11 +00:00
listing_Standard . CheckboxLabeled ( "enabled" , ref rjw_bgs_enabled , "If toggled, Animal Pregnancies will try inherit genes." , 0f , 1f ) ;
2022-12-17 19:52:10 +00:00
//listing_Standard.CheckboxLabeled("sexfrenzy", ref sexfrenzy, "disable the effects", 0f, 1f);
2022-12-25 11:38:05 +00:00
listing_Standard . Gap ( 5f ) ;
listing_Standard . Label ( "gene inheritance chance" + ": " +
2023-01-15 16:48:11 +00:00
Math . Round ( ( double ) ( RJW_BGSSettings . rjw_bgs_global_gene_chance * 100f ) , 0 ) . ToString ( ) + "%" , - 1f , "modify chance for a gene to be inherited." ) ;
RJW_BGSSettings . rjw_bgs_global_gene_chance = listing_Standard . Slider ( RJW_BGSSettings . rjw_bgs_global_gene_chance , 0f , 5f ) ;
listing_Standard . Gap ( 5f ) ;
listing_Standard . CheckboxLabeled ( "genes as xenogenes" , ref rjw_bgs_animal_genes_as_xenogenes , "If toggled, animal genes will be added as xenogenes." , 0f , 1f ) ;
listing_Standard . Gap ( 5f ) ;
2024-06-04 11:08:37 +00:00
listing_Standard . CheckboxLabeled ( "enable VE genetics hybridation" , ref rjw_bgs_VE_genetics , "If enabled and if you have VE genetics it will enable the hybridation system." , 0f , 1f ) ;
listing_Standard . Gap ( 5f ) ;
2023-01-15 16:48:11 +00:00
listing_Standard . CheckboxLabeled ( "detailed-debug" , ref rjw_bgs_detailed_debug , "Adds detailed information to the log about pregnancies and genes." , 0f , 1f ) ;
2022-12-17 19:52:10 +00:00
listing_Standard . End ( ) ;
}
public override void ExposeData ( )
{
base . ExposeData ( ) ;
2023-01-15 16:48:11 +00:00
Scribe_Values . Look < bool > ( ref RJW_BGSSettings . rjw_bgs_enabled , "rjw_bgs_enabled" , RJW_BGSSettings . rjw_bgs_enabled , true ) ;
Scribe_Values . Look < float > ( ref RJW_BGSSettings . rjw_bgs_global_gene_chance , "rjw_bgs_global_gene_chance" , RJW_BGSSettings . rjw_bgs_global_gene_chance , true ) ;
Scribe_Values . Look < bool > ( ref RJW_BGSSettings . rjw_bgs_animal_genes_as_xenogenes , "rjw_bgs_animal_genes_as_xenogenes" , RJW_BGSSettings . rjw_bgs_animal_genes_as_xenogenes , true ) ;
Scribe_Values . Look < bool > ( ref RJW_BGSSettings . rjw_bgs_detailed_debug , "rjw_bgs_detailed_debug" , RJW_BGSSettings . rjw_bgs_detailed_debug , true ) ;
2024-06-04 11:08:37 +00:00
Scribe_Values . Look < bool > ( ref RJW_BGSSettings . rjw_bgs_VE_genetics , "rjw_bgs_VE_genetics" , RJW_BGSSettings . rjw_bgs_VE_genetics , true ) ;
2022-12-17 19:52:10 +00:00
}
2023-01-15 16:48:11 +00:00
public static float rjw_bgs_global_gene_chance = 1f ;
public static bool rjw_bgs_enabled = true ;
public static bool rjw_bgs_animal_genes_as_xenogenes = false ;
public static bool rjw_bgs_detailed_debug = false ;
2024-06-04 11:08:37 +00:00
public static bool rjw_bgs_VE_genetics = true ;
2022-12-17 19:52:10 +00:00
}
}