mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
32 lines
847 B
C#
32 lines
847 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using RimWorld;
|
|
using Verse;
|
|
|
|
|
|
namespace RJWSexperience.Ideology
|
|
{
|
|
public class GoodwillSituationWorker_OneWayReceive : GoodwillSituationWorker_MemeCompatibility
|
|
{
|
|
public override int GetNaturalGoodwillOffset(Faction other)
|
|
{
|
|
|
|
if (!Applies(other)) return 0;
|
|
return def.naturalGoodwillOffset;
|
|
}
|
|
|
|
protected bool Applies(Faction other)
|
|
{
|
|
Ideo primaryideo = Faction.OfPlayer.ideos?.PrimaryIdeo;
|
|
Ideo primaryideo2 = other.ideos?.PrimaryIdeo;
|
|
if (primaryideo == null || primaryideo2 == null) return false;
|
|
|
|
return primaryideo.memes.Contains(def.meme) && !primaryideo2.memes.Contains(def.meme);
|
|
}
|
|
|
|
|
|
}
|
|
}
|