mirror of
https://gitgud.io/Ed86/rjw-cum.git
synced 2024-08-15 00:43:40 +00:00
support for 1.4
This commit is contained in:
parent
358b0d4f2e
commit
b943cb55c6
39 changed files with 1912 additions and 1 deletions
68
1.4/Source/Mod/Patch_AddGizmo.cs
Normal file
68
1.4/Source/Mod/Patch_AddGizmo.cs
Normal file
|
@ -0,0 +1,68 @@
|
|||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
using HarmonyLib;
|
||||
using rjw;
|
||||
//using Multiplayer.API;
|
||||
|
||||
namespace rjwcum
|
||||
{
|
||||
//adds new gizmo for adding cum for testing
|
||||
[HarmonyPatch(typeof(Pawn), "GetGizmos")]
|
||||
class Patch_AddGizmo
|
||||
{
|
||||
[HarmonyPriority(99),HarmonyPostfix]
|
||||
static IEnumerable<Gizmo> AddCum_test(IEnumerable<Gizmo> __result, Pawn __instance)
|
||||
{
|
||||
|
||||
foreach (Gizmo entry in __result)
|
||||
{
|
||||
yield return entry;
|
||||
}
|
||||
|
||||
if (Prefs.DevMode )//&& RJWSettings.DevMode && !MP.IsInMultiplayer)
|
||||
{
|
||||
Command_Action addCum = new Command_Action();
|
||||
addCum.defaultDesc = "AddCumHediff";
|
||||
addCum.defaultLabel = "AddCum";
|
||||
addCum.action = delegate ()
|
||||
{
|
||||
AddCum(__instance);
|
||||
};
|
||||
|
||||
yield return addCum;
|
||||
}
|
||||
}
|
||||
|
||||
//[SyncMethod]
|
||||
static void AddCum(Pawn pawn)
|
||||
{
|
||||
//Log.Message("add cum button is pressed for " + pawn);
|
||||
|
||||
if (!pawn.Dead && pawn.records != null)
|
||||
{
|
||||
//get all acceptable body parts:
|
||||
IEnumerable<BodyPartRecord> filteredParts = CumHelper.getAvailableBodyParts(pawn);
|
||||
|
||||
//select random part:
|
||||
BodyPartRecord randomPart;
|
||||
//filteredParts.TryRandomElement<BodyPartRecord>(out randomPart);
|
||||
//for testing - choose either genitals or anus:
|
||||
//Rand.PopState();
|
||||
//Rand.PushState(RJW_Multiplayer.PredictableSeed());
|
||||
if (Rand.Value > 0.5f)
|
||||
{
|
||||
randomPart = pawn.RaceProps.body.AllParts.Find(x => x.def == xxx.anusDef);
|
||||
}
|
||||
else
|
||||
{
|
||||
randomPart = pawn.RaceProps.body.AllParts.Find(x => x.def == xxx.genitalsDef);
|
||||
}
|
||||
|
||||
if (randomPart != null)
|
||||
{
|
||||
CumHelper.cumOn(pawn, randomPart, 0.2f, null, CumHelper.CUM_NORMAL);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue