2022-08-09 16:30:56 +00:00
|
|
|
|
using rjw;
|
|
|
|
|
using RJWSexperience.Ideology.HistoryEvents;
|
2022-11-20 13:47:55 +00:00
|
|
|
|
using RJWSexperience.Ideology.Patches;
|
|
|
|
|
using System.Collections.Generic;
|
2022-08-09 16:30:56 +00:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using Verse;
|
|
|
|
|
|
|
|
|
|
namespace RJWSexperience.Ideology
|
|
|
|
|
{
|
|
|
|
|
internal class DebugAction
|
|
|
|
|
{
|
|
|
|
|
[DebugAction("RJW Sexperience Ideology", "Test marriage event", false, false, actionType = DebugActionType.ToolMapForPawns, allowedGameStates = AllowedGameStates.PlayingOnMap)]
|
|
|
|
|
private static void GenerateMarriageEvent(Pawn p)
|
|
|
|
|
{
|
|
|
|
|
Pawn hero = p.Map.PlayerPawnsForStoryteller.First(x => x.IsDesignatedHero());
|
|
|
|
|
if (hero == null)
|
|
|
|
|
return;
|
|
|
|
|
RsiHistoryEventDefOf.RSI_NonIncestuosMarriage.RecordEventWithPartner(hero, p);
|
|
|
|
|
RsiHistoryEventDefOf.RSI_NonIncestuosMarriage.RecordEventWithPartner(p, hero);
|
|
|
|
|
}
|
2022-11-20 13:47:55 +00:00
|
|
|
|
|
|
|
|
|
[DebugAction("RJW Sexperience Ideology", "Manual romance check", false, true, actionType = DebugActionType.Action, allowedGameStates = AllowedGameStates.PlayingOnMap)]
|
|
|
|
|
public static void DisplayDebugTable()
|
|
|
|
|
{
|
|
|
|
|
IEnumerable<Pawn> pawns = Find.CurrentMap.mapPawns.AllPawnsSpawned.Where(pawn => pawn.IsColonist);
|
|
|
|
|
|
|
|
|
|
IEnumerable<TableDataGetter<Pawn>> columns = pawns
|
|
|
|
|
.Select(pawn => new TableDataGetter<Pawn>(pawn.Name.ToStringShort, (Pawn p) => Rimworld_Patch_IncestuousManualRomance.RsiIncestuous(p, pawn)));
|
|
|
|
|
|
|
|
|
|
var name = new TableDataGetter<Pawn>("Name", (Pawn pawn) => pawn.Name.ToStringShort);
|
|
|
|
|
|
|
|
|
|
TableDataGetter<Pawn>[] getters = (new List<TableDataGetter<Pawn>>() { name }).Concat(columns).ToArray();
|
|
|
|
|
|
|
|
|
|
DebugTables.MakeTablesDialog(pawns, getters);
|
|
|
|
|
}
|
2022-08-09 16:30:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|