Fixes to make Psychic Arouse occur naturally

This commit is contained in:
c0ffee 2023-06-01 15:01:45 -07:00
parent 60a4205e6f
commit 2859cc2484
3 changed files with 17 additions and 2 deletions

Binary file not shown.

View File

@ -2,7 +2,7 @@
<Defs>
<GameConditionDef>
<defName>PsychicArouse</defName>
<conditionClass>RJW_Events.GameCondition_PsychicArouse</conditionClass>
<conditionClass>RJW_Events.GameCondition_PsychicEmanation</conditionClass>
<label>psychic arouse</label>
<description>A distant archotech is emitting psychic signals through an orbital amplifier, sexually arousing people.</description>
@ -12,5 +12,8 @@
<defaultDroneLevel>BadMedium</defaultDroneLevel>
<letterDef>NegativeEvent</letterDef>
<natural>false</natural>
<exclusiveConditions>
<li>PsychicArouse</li>
</exclusiveConditions>
</GameConditionDef>
</Defs>

View File

@ -5,12 +5,24 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.Sound;
namespace RJW_Events
{
public class IncidentWorker_PsychicArouse : IncidentWorker_PsychicEmanation
{
protected override void DoConditionAndLetter(IncidentParms parms, Map map, int duration, Gender gender, float points)
protected override bool TryExecuteWorker(IncidentParms parms)
{
if (base.TryExecuteWorker(parms))
{
SoundDefOf.PsychicSootheGlobal.PlayOneShotOnCamera((Map)parms.target);
return true;
}
return false;
}
protected override void DoConditionAndLetter(IncidentParms parms, Map map, int duration, Gender gender, float points)
{
PsychicDroneLevel level;
if (points < 800f)