diff --git a/1.5/Core/Defs/HediffDefs/Hediffs_Maintenance.xml b/1.5/Core/Defs/HediffDefs/Hediffs_Maintenance.xml index 41c763b..db3ef76 100644 --- a/1.5/Core/Defs/HediffDefs/Hediffs_Maintenance.xml +++ b/1.5/Core/Defs/HediffDefs/Hediffs_Maintenance.xml @@ -128,7 +128,7 @@ I can't move my body well. -5 - +
  • false
  • @@ -136,7 +136,7 @@ I feel like I'm made new! 5 - + \ No newline at end of file diff --git a/1.6/Biotech/Defs/Bio_Hediffs_Mechanitor.xml b/1.6/Biotech/Defs/Bio_Hediffs_Mechanitor.xml new file mode 100644 index 0000000..f541bc9 --- /dev/null +++ b/1.6/Biotech/Defs/Bio_Hediffs_Mechanitor.xml @@ -0,0 +1,530 @@ + + + + + PN_Mechlink + + This is a modified mechlink for automaton. + Mechlink + + MechlinkImplant + + + 100 + -4 + 1 + 500 + 0 + + + Things/Pawn/Humanlike/Apparel/Mechlink + Graphic_Single + 0.65 + + +
  • +
  • + CompUsableImplant + InstallMechlink + Install {0_label} to become mechanitor +
  • +
  • + CompUseEffect_InstallImplantMechlink + MechlinkImplant + PNBrain + true +
  • +
  • + MechlinkInstalled +
  • +
    +
    + + + PN_Make_Mechlink_Automaton + + make automaton mechlink + Making automaton mechlink. + GeneralLaborSpeed + Cook + Recipe_Machining + 2000 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • Mechlink
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 2 + +
    + + 1 + + + 6 + + Crafting + PNRP_Mechlink +
    + + + + + 100 + -4 + 1 + 1200 + 0 + 3200 + + + Things/Item/Health/HealthItem + Graphic_Single + 0.80 + (247,180,130) + + +
  • + + None + + + + + ControlSublinkImplant + + + 3 + + + + + PN_ControlSublink + + This is a modified control sublink (standard) for automaton. + + 1 + 4 + + +
  • + CompUsableImplant + UseItem + Implant sublink + MechlinkImplant +
  • +
  • + ControlSublinkImplant + PNBrain + true + 3 +
  • +
    +
    + + + PN_ControlSublinkHigh + + This is a modified control sublink (high) for automaton. + + 1 + 3 + 3 + + +
  • + CompUsableImplant + UseItem + Implant high sublink + MechlinkImplant +
  • +
  • + ControlSublinkImplant + PNBrain + true + true + 3 +
  • +
    +
    + + + PN_Make_ControlSublink_Automaton + + make automaton sublink + Making automaton sublink. + GeneralLaborSpeed + Cook + Recipe_Machining + 2000 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • ControlSublink
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 2 + +
    + + 1 + + + 6 + + Crafting + PNRP_Mechlink +
    + + + PN_Make_PN_ControlSublinkHigh_Automaton + + make automaton sublink + Making automaton sublink. + GeneralLaborSpeed + Cook + Recipe_Machining + 2000 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • ControlSublinkHigh
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 2 + +
    + + 1 + + + 6 + + Crafting + PNRP_Mechlink +
    + + + + PN_RemoteRepairer + + This is a modified remote repairer for automaton. + + RemoteRepairerImplant + + + 1 + 6 + + + 3 + + +
  • + CompUsableImplant + UseItem + Implant {0_label} + MechlinkImplant +
  • +
  • + RemoteRepairerImplant + PNBrain + true +
  • +
    +
    + + + PN_Make_PN_RemoteRepairer_Automaton + + make automaton remote repairer + Making automaton remote repairer. + GeneralLaborSpeed + Cook + Recipe_Machining + 2000 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • RemoteRepairer
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 2 + +
    + + 1 + + + 6 + + Crafting + PNRP_Mechlink +
    + + + + PN_MechFormfeeder + + This is a modified mech gestation processor for automaton. + + MechFormfeederImplant + + + 1 + 6 + + + 6 + + +
  • + CompUsableImplant + UseItem + Implant {0_label} + MechlinkImplant +
  • +
  • + MechFormfeederImplant + PNBrain + true +
  • +
    +
    + + + PN_Make_PN_MechFormfeeder_Automaton + + make automaton mech gestation processor + Making automaton mech gestation processor. + GeneralLaborSpeed + Cook + Recipe_Machining + 2000 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • MechFormfeeder
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 2 + +
    + + 1 + + + 6 + + Crafting + PNRP_Mechlink +
    + + + + PN_RemoteShielder + + This is a modified remote shielder for automaton. + + RemoteShielderImplant + + + 1 + 6 + + + 3 + + +
  • + CompUsableImplant + UseItem + Implant {0_label} + MechlinkImplant +
  • +
  • + RemoteShielderImplant + PNBrain + true +
  • +
    +
    + + + PN_Make_PN_RemoteShielder_Automaton + + make automaton remote shielder + Making automaton remote shielder. + GeneralLaborSpeed + Cook + Recipe_Machining + 2000 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • RemoteShielder
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 2 + +
    + + 1 + + + 6 + + Crafting + PNRP_Mechlink +
    + + + + PN_RepairProbe + + This is a modified repair probe for automaton. + + RepairProbeImplant + + + 1 + 2 + + + 6 + + +
  • + CompUsableImplant + UseItem + Implant {0_label} + MechlinkImplant +
  • +
  • + RepairProbeImplant + PNBrain + true +
  • +
    +
    + + + PN_Make_PN_RepairProbe_Automaton + + make automaton repair probe + Making automaton repair probe. + GeneralLaborSpeed + Cook + Recipe_Machining + 2000 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • RepairProbe
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 2 + +
    + + 1 + + + 6 + + Crafting + PNRP_Mechlink +
    +
    \ No newline at end of file diff --git a/1.6/Biotech/Defs/Bio_Reserch_ProjectDefs.xml b/1.6/Biotech/Defs/Bio_Reserch_ProjectDefs.xml new file mode 100644 index 0000000..e19757b --- /dev/null +++ b/1.6/Biotech/Defs/Bio_Reserch_ProjectDefs.xml @@ -0,0 +1,17 @@ + + + + PNRP_Mechlink + + Research how to modify mechlink and sublink for use by the Automaton. + PN_technology + 300 + Industrial + +
  • PNRP_Production
  • +
    + 1.0 + 4.9 + +
    +
    \ No newline at end of file diff --git a/1.6/Biotech/Defs/Bio_ThingDef_Module.xml b/1.6/Biotech/Defs/Bio_ThingDef_Module.xml new file mode 100644 index 0000000..111b19b --- /dev/null +++ b/1.6/Biotech/Defs/Bio_ThingDef_Module.xml @@ -0,0 +1,102 @@ + + + + + + PN_ArrayModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nAny model (legd), (mast), (exc)\n\nThis module increases the automaton's MechBandwidth and MechControlGroups stat. + + PN_ArrayModuleHediff + + + 45 + 20 + 2 + 1 + + + PNRP_TierB_Module + + 6 + + + + + + +
  • + PN_ArrayModuleHediff + PNTorso +
  • +
    +
    + + + PN_ArrayModuleHediff + + The hediff created by installing array module. + + PN_ArrayModule + + +
  • + + 6 + 1 + +
  • +
    + +
    + + + PN_IntegratorModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nAny model (legd)\n\nThis module increases the automaton's MechBandwidth and MechControlGroups stat. + + PN_IntegratorModuleHediff + + + 45 + 12 + 9 + 3 + 2 + 1 + + + PNRP_TierC_Module + + 6 + + + + + + +
  • + PN_IntegratorModuleHediff + PNTorso +
  • +
    +
    + + + PN_IntegratorModuleHediff + + The hediff created by installing integrator module. + + PN_IntegratorModule + + +
  • + + 18 + 1 + +
  • +
    + +
    +
    \ No newline at end of file diff --git a/1.6/Biotech/Defs/Bio_ThingDef_Part_Body.xml b/1.6/Biotech/Defs/Bio_ThingDef_Part_Body.xml new file mode 100644 index 0000000..daaf347 --- /dev/null +++ b/1.6/Biotech/Defs/Bio_ThingDef_Part_Body.xml @@ -0,0 +1,70 @@ + + + + + PN_DetoxifierOilFilter + + a detoxifier oil filter + An advanced Oil Filter. Using PNL Industry technology, it can rapidly remove a vast range of toxins from the fuel, making it effective against environmental toxins, venoms, and injected poisons. + + DetoxifierKidney + + DetoxifierKidney + + true + 1.1 + true + + +
  • + + 0.5 + +
  • +
    +
    + + + PN_InstallDetoxifierOilFilter + + Install a detoxifier oil filter. + + DetoxifierKidney + PN_DetoxifierOilFilter + + Installing detoxifier oil filter. + +
  • + + +
  • DetoxifierKidney
  • + + + 1 + +
    + + +
  • DetoxifierKidney
  • +
    +
    + +
  • PNKidney
  • +
    + PN_DetoxifierOilFilter + 0 +
    + + + PN_RemoveDetoxifierOilFilter + + Remove detoxifier Oil Filter. + + DetoxifierKidney + PN_DetoxifierOilFilter + + Removing detoxifier Oil Filter. + PN_DetoxifierOilFilter + + +
    \ No newline at end of file diff --git a/1.6/Core/Assemblies/1_CustomizableRecipe.dll b/1.6/Core/Assemblies/1_CustomizableRecipe.dll new file mode 100644 index 0000000..4080252 Binary files /dev/null and b/1.6/Core/Assemblies/1_CustomizableRecipe.dll differ diff --git a/1.6/Core/Assemblies/2_AutomataRace.dll b/1.6/Core/Assemblies/2_AutomataRace.dll new file mode 100644 index 0000000..66f56de Binary files /dev/null and b/1.6/Core/Assemblies/2_AutomataRace.dll differ diff --git a/1.6/Core/Assemblies/2_AutomataRace.pdb b/1.6/Core/Assemblies/2_AutomataRace.pdb new file mode 100644 index 0000000..8f25ff9 Binary files /dev/null and b/1.6/Core/Assemblies/2_AutomataRace.pdb differ diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs.sln b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs.sln new file mode 100644 index 0000000..b08108b --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoharHediffs", "MoharHediffs\MoharHediffs.csproj", "{7ACFB1B0-3B20-48B9-BA73-48DD6353ABED}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7ACFB1B0-3B20-48B9-BA73-48DD6353ABED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7ACFB1B0-3B20-48B9-BA73-48DD6353ABED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7ACFB1B0-3B20-48B9-BA73-48DD6353ABED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7ACFB1B0-3B20-48B9-BA73-48DD6353ABED}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ActivityRestriction.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ActivityRestriction.cs new file mode 100644 index 0000000..491e09a --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ActivityRestriction.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class ActivityRestriction + { + public bool HasPostureRestriction + { + get + { + return !this.allowedPostures.NullOrEmpty(); + } + } + + public bool HasJobRestriction + { + get + { + return !this.allowedJobs.NullOrEmpty(); + } + } + + public bool HasAllowedRotation + { + get + { + return !this.allowedRotation.NullOrEmpty(); + } + } + + public bool onlyWhenMoving = true; + + public List allowedPostures; + + public List allowedJobs; + + public List allowedRotation; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyPartCondition.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyPartCondition.cs new file mode 100644 index 0000000..bc2ad45 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyPartCondition.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class BodyPartCondition + { + public bool HasLabel + { + get + { + return !this.bodyPartLabel.NullOrEmpty(); + } + } + + public bool HasDef + { + get + { + return !this.bodyPartDef.NullOrEmpty(); + } + } + + public bool HasTag + { + get + { + return !this.bodyPartTag.NullOrEmpty(); + } + } + + public bool HasBPCondition + { + get + { + return this.HasLabel || this.HasDef || this.HasTag; + } + } + + public List bodyPartLabel; + + public List bodyPartDef; + + public List bodyPartTag; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyPartsTools.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyPartsTools.cs new file mode 100644 index 0000000..2e43755 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyPartsTools.cs @@ -0,0 +1,307 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public static class BodyPartsTools + { + public static BodyPartRecord GetBPRWithoutHediff(this Pawn pawn, BodyPartDef bpd, HediffDef hediffDef) + { + IEnumerable source; + bool flag = (source = from b in pawn.health.hediffSet.GetNotMissingParts(BodyPartHeight.Undefined, BodyPartDepth.Undefined, null, null) + where b.def == bpd + select b) == null; + BodyPartRecord result; + if (flag) + { + result = null; + } + else + { + List bprToExclude = new List(); + IEnumerable hediffs = pawn.health.hediffSet.hediffs; + Func <>9__1; + Func predicate; + if ((predicate = <>9__1) == null) + { + predicate = (<>9__1 = ((Hediff h) => h.def == hediffDef)); + } + foreach (Hediff hediff in hediffs.Where(predicate)) + { + bool flag2 = !bprToExclude.Contains(hediff.Part); + if (flag2) + { + bprToExclude.Add(hediff.Part); + } + } + bool flag3 = bprToExclude.NullOrEmpty(); + if (flag3) + { + result = source.RandomElementWithFallback(null); + } + else + { + IEnumerable source2; + bool flag4 = (source2 = from b in source + where !bprToExclude.Contains(b) + select b) == null; + if (flag4) + { + result = null; + } + else + { + result = source2.RandomElementWithFallback(null); + } + } + } + return result; + } + + public static bool CheckIfExistingNaturalBP(this Pawn pawn, BodyPartDef bodyPartDef, bool myDebug = false) + { + BodyPartRecord bodyPartRecord = pawn.GetBPRecord(bodyPartDef, false) ?? null; + bool flag = bodyPartRecord == null || pawn.health.hediffSet.PartIsMissing(bodyPartRecord) || pawn.health.hediffSet.AncestorHasDirectlyAddedParts(bodyPartRecord); + return !flag; + } + + public static BodyPartRecord GetBPRecord(this Pawn pawn, BodyPartDef bodyPartDef, bool myDebug = false) + { + IEnumerable enumerable = from b in DefDatabase.AllDefs + where b == bodyPartDef + select b; + bool flag = enumerable.EnumerableNullOrEmpty(); + BodyPartRecord result; + if (flag) + { + if (myDebug) + { + string label = pawn.Label; + string str = " - GetBPRecord - did not find any "; + BodyPartDef bodyPartDef2 = bodyPartDef; + Log.Warning(label + str + ((bodyPartDef2 != null) ? bodyPartDef2.defName : null)); + } + result = null; + } + else + { + BodyPartDef def = enumerable.RandomElement(); + BodyPartRecord bodyPartRecord; + pawn.RaceProps.body.GetPartsWithDef(def).TryRandomElement(out bodyPartRecord); + if (myDebug) + { + string label2 = pawn.Label; + string str2 = "GetBPRecord - DID find "; + BodyPartDef bodyPartDef3 = bodyPartDef; + Log.Warning(label2 + str2 + ((bodyPartDef3 != null) ? bodyPartDef3.defName : null)); + } + result = bodyPartRecord; + } + return result; + } + + public static bool IsMissingBPR(this Pawn pawn, BodyPartRecord BPR, out Hediff missingHediff) + { + bool flag = BPR == null; + bool result; + if (flag) + { + missingHediff = null; + result = false; + } + else + { + missingHediff = (from h in pawn.health.hediffSet.hediffs + where h.def == HediffDefOf.MissingBodyPart && h.Part == BPR + select h).FirstOrFallback(null); + result = (missingHediff != null); + } + return result; + } + + public static bool HasMissingChildren(this Pawn pawn, BodyPartRecord bpr) + { + List missingPartsCommonAncestors = pawn.health.hediffSet.GetMissingPartsCommonAncestors(); + return missingPartsCommonAncestors.Any((Hediff_MissingPart HMP) => HMP.Part == bpr); + } + + public static bool IsMissingOrHasMissingChildren(this Pawn pawn, BodyPartRecord bpr) + { + return pawn.health.hediffSet.PartIsMissing(bpr) || pawn.HasMissingChildren(bpr); + } + + public static IEnumerable GetAllBPR(this Pawn pawn, string bodyPartLabel, BodyPartDef bodyPartDef) + { + bool HasLabel = !bodyPartLabel.NullOrEmpty(); + bool HasDef = bodyPartDef != null; + return from bpr in pawn.RaceProps.body.AllParts + where (!HasLabel || bpr.customLabel == bodyPartLabel) && (!HasDef || bpr.def == bodyPartDef) + select bpr; + } + + public static IEnumerable GetAllNotMissingBPR(this Pawn pawn, string bodyPartLabel, BodyPartDef bodyPartDef) + { + bool HasLabel = !bodyPartLabel.NullOrEmpty(); + bool HasDef = bodyPartDef != null; + return from bpr in pawn.health.hediffSet.GetNotMissingParts(BodyPartHeight.Undefined, BodyPartDepth.Undefined, null, null) + where (!HasLabel || bpr.customLabel == bodyPartLabel) && (!HasDef || bpr.def == bodyPartDef) + select bpr; + } + + public static BodyPartRecord GetBPRecordWithoutHediff(this Pawn pawn, string bodyPartLabel, BodyPartDef bodyPartDef, HediffDef hd, bool AllowMissing = false, bool PrioritizeMissing = false, bool AllowAddedPart = true, bool myDebug = false) + { + bool flag = hd != null; + bool flag2 = !bodyPartLabel.NullOrEmpty(); + bool flag3 = bodyPartDef != null; + string text = pawn.Label + " GetBPRecordWithoutHediff - "; + if (myDebug) + { + string[] array = new string[5]; + array[0] = text; + array[1] = string.Format("HasDef?{0} bodyPartDef:{1} ", flag3, (bodyPartDef != null) ? bodyPartDef.defName : null); + array[2] = string.Format("HasLabel?{0} bodyPartLabel:{1} ", flag2, bodyPartLabel); + int num = 3; + string format = "HasHediffDef?{0} Hediff:{1} "; + object arg = flag; + HediffDef hd2 = hd; + array[num] = string.Format(format, arg, (hd2 != null) ? hd2.defName : null); + array[4] = string.Format("AllowMissing:{0} PrioritizeMissing:{1} AllowAddedPart:{2}", AllowMissing, PrioritizeMissing, AllowAddedPart); + Log.Warning(string.Concat(array)); + } + List bprToExclude = new List(); + bool flag4 = flag; + if (flag4) + { + IEnumerable hediffs = pawn.health.hediffSet.hediffs; + Func <>9__3; + Func predicate; + if ((predicate = <>9__3) == null) + { + predicate = (<>9__3 = ((Hediff h) => h.def == hd)); + } + foreach (Hediff hediff in hediffs.Where(predicate)) + { + bool flag5 = !bprToExclude.Contains(hediff.Part); + if (flag5) + { + bprToExclude.Add(hediff.Part); + } + } + if (myDebug) + { + object[] array2 = new object[5]; + array2[0] = text; + array2[1] = "found "; + int num2 = 2; + List bprToExclude2 = bprToExclude; + array2[num2] = ((bprToExclude2 != null) ? new int?(bprToExclude2.Count) : null); + array2[3] = " bpr to exclude bc they had "; + array2[4] = hd.defName; + Log.Warning(string.Concat(array2)); + } + } + BodyPartRecord bodyPartRecord = null; + IEnumerable enumerable; + if (AllowMissing) + { + enumerable = pawn.GetAllBPR(bodyPartLabel, bodyPartDef); + if (myDebug) + { + Log.Warning(text + "Allow missing - found " + (enumerable.EnumerableNullOrEmpty() ? "0" : enumerable.Count().ToString()) + " bpr"); + } + bool flag6 = PrioritizeMissing && !enumerable.EnumerableNullOrEmpty() && enumerable.Any((BodyPartRecord bpr) => pawn.IsMissingOrHasMissingChildren(bpr)); + if (flag6) + { + enumerable = from bpr in enumerable + where pawn.IsMissingOrHasMissingChildren(bpr) + select bpr; + if (myDebug) + { + Log.Warning(text + "Prioritize Missing - found " + (enumerable.EnumerableNullOrEmpty() ? "0" : enumerable.Count().ToString()) + " bpr"); + } + } + } + else + { + enumerable = pawn.GetAllNotMissingBPR(bodyPartLabel, bodyPartDef); + if (myDebug) + { + Log.Warning(text + "Not missing - found " + (enumerable.EnumerableNullOrEmpty() ? "0" : enumerable.Count().ToString()) + " bpr"); + } + } + bool flag7 = enumerable.EnumerableNullOrEmpty(); + BodyPartRecord result; + if (flag7) + { + result = null; + } + else + { + bool flag8 = !AllowAddedPart; + if (flag8) + { + Tools.Warn(text + "Trying to exlude addedpart", myDebug); + bool flag9 = enumerable.Any((BodyPartRecord bpr) => pawn.health.hediffSet.HasDirectlyAddedPartFor(bpr)); + if (flag9) + { + enumerable = from bpr in enumerable + where !pawn.health.hediffSet.HasDirectlyAddedPartFor(bpr) + select bpr; + if (myDebug) + { + Log.Warning(text + "Added parts(bionics) forbidden- found " + (enumerable.EnumerableNullOrEmpty() ? "0" : enumerable.Count().ToString()) + " bpr"); + } + } + else if (myDebug) + { + Log.Warning(text + "found no addedpart to exclude"); + } + } + bool flag10 = bprToExclude.NullOrEmpty(); + if (flag10) + { + enumerable.TryRandomElement(out bodyPartRecord); + } + else + { + bool flag11 = enumerable.Any((BodyPartRecord bp) => !bprToExclude.Contains(bp)); + if (flag11) + { + (from bp in enumerable + where !bprToExclude.Contains(bp) + select bp).TryRandomElement(out bodyPartRecord); + } + else + { + bodyPartRecord = null; + } + } + if (myDebug) + { + Log.Warning(string.Concat(new string[] + { + pawn.Label, + "GetBPRecord - did ", + (bodyPartRecord == null) ? "not" : "", + " find with def ", + (bodyPartDef != null) ? bodyPartDef.defName : null, + " without hediff def ", + hd.defName + })); + } + result = bodyPartRecord; + } + return result; + } + + public static BodyPartRecord GetBrain(this Pawn pawn) + { + BodyPartRecord result; + pawn.RaceProps.body.GetPartsWithTag(BodyPartTagDefOf.ConsciousnessSource).TryRandomElement(out result); + return result; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyTypeOffset.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyTypeOffset.cs new file mode 100644 index 0000000..7e5d88e --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyTypeOffset.cs @@ -0,0 +1,13 @@ +using System; +using RimWorld; +using UnityEngine; + +namespace MoharHediffs +{ + public class BodyTypeOffset + { + public BodyTypeDef bodyType; + + public Vector3 offset; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyTypeSpecificities.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyTypeSpecificities.cs new file mode 100644 index 0000000..423944e --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/BodyTypeSpecificities.cs @@ -0,0 +1,12 @@ +using System; +using RimWorld; + +namespace MoharHediffs +{ + public class BodyTypeSpecificities + { + public BodyTypeDef bodyTypeDef; + + public DrawingSpecificities drawRules; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ChannelColorCondition.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ChannelColorCondition.cs new file mode 100644 index 0000000..bd0a06d --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ChannelColorCondition.cs @@ -0,0 +1,11 @@ +using System; + +namespace MoharHediffs +{ + public class ChannelColorCondition + { + public string channelName; + + public int channelNum = 0; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ColorRange.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ColorRange.cs new file mode 100644 index 0000000..eea67be --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ColorRange.cs @@ -0,0 +1,14 @@ +using System; +using UnityEngine; + +namespace MoharHediffs +{ + public class ColorRange + { + public Color colorA; + + public Color colorB; + + public float variationPerIteration; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/CommonSettings.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/CommonSettings.cs new file mode 100644 index 0000000..bbf6b84 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/CommonSettings.cs @@ -0,0 +1,11 @@ +using System; + +namespace MoharHediffs +{ + public class CommonSettings + { + public StackSettings stack; + + public FilthSettings filth; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ConditionBuilder.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ConditionBuilder.cs new file mode 100644 index 0000000..4f478cf --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ConditionBuilder.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public static class ConditionBuilder + { + public static void CopyHediffCondition(HediffCondition source, HediffCondition dest, bool debug = false) + { + string str = debug ? "CopyHediffCondition - " : ""; + bool hasBodypartCondition = source.HasBodypartCondition; + if (hasBodypartCondition) + { + Tools.Warn(str + "found HasBodypartCondition, copying", debug); + bool hasDef = source.bodyPart.HasDef; + if (hasDef) + { + dest.bodyPart.bodyPartDef = source.bodyPart.bodyPartDef.ListFullCopy(); + } + bool hasLabel = source.bodyPart.HasLabel; + if (hasLabel) + { + dest.bodyPart.bodyPartLabel = source.bodyPart.bodyPartLabel.ListFullCopy(); + } + bool hasTag = source.bodyPart.HasTag; + if (hasTag) + { + dest.bodyPart.bodyPartTag = source.bodyPart.bodyPartTag.ListFullCopy(); + } + } + bool hasPawnCondition = source.HasPawnCondition; + if (hasPawnCondition) + { + Tools.Warn(str + "found HasPawnCondition, copying", debug); + bool hasRace = source.pawn.HasRace; + if (hasRace) + { + dest.pawn.race = source.pawn.race.ListFullCopy(); + } + bool hasGender = source.pawn.HasGender; + if (hasGender) + { + dest.pawn.gender = source.pawn.gender.ListFullCopy(); + } + dest.pawn.ageRange = source.pawn.ageRange; + } + } + + public static HediffCondition GetDefaultPlusSpecificHediffCondition(HediffCondition defaultHC, HediffCondition specificHC, bool debug = false) + { + string str = debug ? "GetDefaultPlusSpecificHediffCondition - " : ""; + Tools.Warn(str + "allocating answerHC", debug); + HediffCondition hediffCondition = new HediffCondition + { + bodyPart = new BodyPartCondition + { + bodyPartDef = new List(), + bodyPartLabel = new List(), + bodyPartTag = new List() + }, + pawn = new PawnCondition + { + race = new List(), + gender = new List() + } + }; + bool flag = defaultHC != null; + if (flag) + { + Tools.Warn(str + "found defaultHC, copying", debug); + ConditionBuilder.CopyHediffCondition(defaultHC, hediffCondition, debug); + } + bool flag2 = specificHC != null; + if (flag2) + { + Tools.Warn(str + "found specificHC, copying", debug); + ConditionBuilder.CopyHediffCondition(specificHC, hediffCondition, debug); + } + return hediffCondition; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ConditionValidation.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ConditionValidation.cs new file mode 100644 index 0000000..da42e86 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ConditionValidation.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Verse; + +namespace MoharHediffs +{ + public static class ConditionValidation + { + public static bool ValidateCompatibilityOfHediffWithPawn(this PawnCondition pCon, Pawn pawn, bool debug = false) + { + string text = debug ? (pawn.LabelShort + " ValidateCompatibilityOfHediffWithPawn - ") : ""; + bool hasRace = pCon.HasRace; + if (hasRace) + { + bool flag = !pCon.race.Contains(pawn.def); + if (flag) + { + Tools.Warn(text + " does not belong to the good race", debug); + return false; + } + } + bool hasGender = pCon.HasGender; + if (hasGender) + { + bool flag2 = !pCon.gender.Contains(pawn.gender); + if (flag2) + { + Tools.Warn(text + " does not belong to the good gender", debug); + return false; + } + } + bool flag3 = !pCon.ageRange.Includes((float)pawn.ageTracker.AgeBiologicalYears); + bool result; + if (flag3) + { + Tools.Warn(string.Concat(new object[] + { + text, + " does not have the good age : ", + pawn.ageTracker.AgeBiologicalYears, + " => ", + pCon.ageRange + }), debug); + result = false; + } + else + { + Tools.Warn(text + " valid ok", debug); + result = true; + } + return result; + } + + public static bool InitialHediffConditionCheck(this HediffComp_AnotherRandom comp, bool debug = false) + { + string str = debug ? (comp.Pawn.LabelShort + " InitialHediffConditionCheck - ") : ""; + Tools.Warn(str + " Entering", debug); + bool result = !comp.GetCompatibleItems().NullOrEmpty(); + Tools.Warn(str + "found anyAppliableItem:" + result.ToString(), debug); + return result; + } + + public static bool GetBPRFromHediffCondition(this BodyPartCondition bpCon, Pawn pawn, out BodyPartRecord BPR, bool debug = false) + { + string text = debug ? (pawn.LabelShort + " GetBPRFromHediffCondition - ") : ""; + BPR = null; + Tools.Warn(text + " Entering", debug); + bool flag = bpCon == null; + bool result; + if (flag) + { + Tools.Warn(text + " Found no condition, returning null aka body", debug); + result = true; + } + else + { + bool flag2 = !bpCon.HasBPCondition; + if (flag2) + { + Tools.Warn(text + " Found no BP condition, returning null aka body", debug); + result = true; + } + else + { + Tools.Warn(string.Concat(new string[] + { + text, + " Found BP conditions, selecting : Label:", + bpCon.HasLabel.ToString(), + "; Def:", + bpCon.HasDef.ToString(), + "; Tag:", + bpCon.HasTag.ToString() + }), debug); + IEnumerable enumerable = from bpr in pawn.health.hediffSet.GetNotMissingParts(BodyPartHeight.Undefined, BodyPartDepth.Undefined, null, null) + where (!bpCon.HasLabel || bpCon.bodyPartLabel.Any((string s) => s == bpr.customLabel)) && (!bpCon.HasDef || bpCon.bodyPartDef.Any((BodyPartDef d) => d == bpr.def)) && (!bpCon.HasTag || (!bpr.def.tags.NullOrEmpty() && !bpCon.bodyPartTag.Intersect(bpr.def.tags).EnumerableNullOrEmpty())) + select bpr; + bool flag3 = !enumerable.EnumerableNullOrEmpty(); + if (flag3) + { + BPR = enumerable.RandomElement(); + result = true; + } + else + { + Tools.Warn(pawn.LabelShort + " does not have any compatible bodypart", debug); + result = false; + } + } + } + return result; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/CopyPawnSettings.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/CopyPawnSettings.cs new file mode 100644 index 0000000..bc4a81f --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/CopyPawnSettings.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class CopyPawnSettings + { + public bool HasHediffExclusion + { + get + { + return !this.excludeHediff.NullOrEmpty(); + } + } + + public bool name = false; + + public bool pawnKind = false; + + public bool age = false; + + public bool gender = false; + + public bool melanin = false; + + public bool skinColorChannel = false; + + public bool bodyType = false; + + public bool crownType = false; + + public bool hair = false; + + public bool hairColor = false; + + public bool hediff = false; + + public List excludeHediff; + + public bool excludeTendableHediffs = false; + + public bool excludePermanentHediffs = false; + + public bool childBS = false; + + public bool adultBS = false; + + public bool skills = false; + + public FloatRange skillDecay = new FloatRange(1f, 1f); + + public bool passions = false; + + public bool traits = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/DrawingSpecificities.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/DrawingSpecificities.cs new file mode 100644 index 0000000..1b02741 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/DrawingSpecificities.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public class DrawingSpecificities + { + public Vector3 GetRotationOffset(Pawn p) + { + RotationOffset rotationOffset; + bool flag = (rotationOffset = (from ro in this.rotationOffset + where ro.rot == p.Rotation + select ro).FirstOrFallback(null)) != null; + Vector3 result; + if (flag) + { + result = rotationOffset.offset; + } + else + { + result = Vector3.zero; + } + return result; + } + + public FloatRange randomScale = new FloatRange(0.5f, 0.8f); + + public List rotationOffset; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/FactionPickerParameters.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/FactionPickerParameters.cs new file mode 100644 index 0000000..4b07566 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/FactionPickerParameters.cs @@ -0,0 +1,113 @@ +using System; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class FactionPickerParameters + { + public bool HasInheritedFaction + { + get + { + return this.inheritedFaction; + } + } + + public bool HasForcedFaction + { + get + { + return this.forcedFaction != null; + } + } + + public bool HasPlayerFaction + { + get + { + return this.playerFaction; + } + } + + public bool HasNoFaction + { + get + { + return this.noFaction; + } + } + + public bool HasDefaultPawnKindFaction + { + get + { + return this.defaultPawnKindFaction; + } + } + + public bool IsLegitRandomFactionParameter() + { + int num = 0; + bool hasInheritedFaction = this.HasInheritedFaction; + checked + { + if (hasInheritedFaction) + { + num++; + } + bool hasForcedFaction = this.HasForcedFaction; + if (hasForcedFaction) + { + num++; + } + bool hasPlayerFaction = this.HasPlayerFaction; + if (hasPlayerFaction) + { + num++; + } + bool hasNoFaction = this.HasNoFaction; + if (hasNoFaction) + { + num++; + } + bool hasDefaultPawnKindFaction = this.HasDefaultPawnKindFaction; + if (hasDefaultPawnKindFaction) + { + num++; + } + return num == 1; + } + } + + public void Dump() + { + Log.Warning(string.Concat(new string[] + { + "inherited:", + this.HasInheritedFaction.ToString(), + "; forced:", + this.HasForcedFaction.ToString(), + "; player:", + this.HasPlayerFaction.ToString(), + "; noFaction:", + this.HasNoFaction.ToString(), + "; defaultPawnKindFaction:", + this.HasDefaultPawnKindFaction.ToString(), + "; " + })); + } + + public bool inheritedFaction = false; + + public FactionDef forcedFaction = null; + + public bool playerFaction = false; + + public bool defaultPawnKindFaction = false; + + public bool noFaction = false; + + public float weight = 1f; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/FactionPickerUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/FactionPickerUtils.cs new file mode 100644 index 0000000..8693c91 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/FactionPickerUtils.cs @@ -0,0 +1,161 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public static class FactionPickerUtils + { + public static float FactionTotalWeight(this List FPP) + { + float num = 0f; + for (int i = 0; i < FPP.Count; i = checked(i + 1)) + { + num += FPP[i].weight; + } + return num; + } + + public static void ComputeRandomFaction(this HediffComp_RandySpawnUponDeath comp) + { + bool flag = !comp.ChosenItem.HasFactionParams; + if (!flag) + { + int weightedRandomFaction = comp.GetWeightedRandomFaction(); + bool flag2 = weightedRandomFaction == -1; + if (flag2) + { + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning("ComputeRandomFaction - found no index"); + } + } + else + { + FactionPickerParameters factionPickerParameters = comp.ChosenItem.faction[weightedRandomFaction]; + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + factionPickerParameters.Dump(); + } + comp.RandomFaction = comp.GetFaction(factionPickerParameters); + bool myDebug3 = comp.MyDebug; + if (myDebug3) + { + string str = "ComputeRandomFaction - found:"; + Faction randomFaction = comp.RandomFaction; + Log.Warning(str + ((randomFaction != null) ? randomFaction.GetCallLabel() : null)); + } + } + } + } + + public static int GetWeightedRandomFaction(this HediffComp_RandySpawnUponDeath comp) + { + bool flag = !comp.HasChosenPawn || !comp.ChosenItem.HasFactionParams; + checked + { + int result; + if (flag) + { + result = -1; + } + else + { + List faction = comp.ChosenItem.faction; + float num = Rand.Range(0f, faction.FactionTotalWeight()); + for (int i = 0; i < faction.Count; i++) + { + bool flag2 = unchecked(num -= faction[i].weight) < 0f; + if (flag2) + { + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning("GetWeightedRandomIndex : returning " + i); + } + return i; + } + } + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning("GetWeightedRandomFaction : failed to return proper index, returning -1"); + } + result = -1; + } + return result; + } + } + + public static Faction GetFaction(this HediffComp_RandySpawnUponDeath comp, FactionPickerParameters FPP) + { + FactionDef fDef = comp.GetFactionDef(FPP); + bool flag = fDef == null; + Faction result; + if (flag) + { + result = null; + } + else + { + result = (from F in Find.FactionManager.AllFactions + where F.def == fDef + select F).FirstOrFallback(null); + } + return result; + } + + public static FactionDef GetFactionDef(this HediffComp_RandySpawnUponDeath comp, FactionPickerParameters FPP) + { + Pawn pawn = comp.Pawn; + bool flag = FPP.HasInheritedFaction && pawn.Faction != null; + FactionDef result; + if (flag) + { + result = pawn.Faction.def; + } + else + { + bool hasForcedFaction = FPP.HasForcedFaction; + if (hasForcedFaction) + { + result = FPP.forcedFaction; + } + else + { + bool hasPlayerFaction = FPP.HasPlayerFaction; + if (hasPlayerFaction) + { + result = Faction.OfPlayer.def; + } + else + { + bool hasNoFaction = FPP.HasNoFaction; + if (hasNoFaction) + { + result = null; + } + else + { + bool hasDefaultPawnKindFaction = FPP.HasDefaultPawnKindFaction; + if (hasDefaultPawnKindFaction) + { + PawnKindDef pawnKindToSpawn = comp.ChosenItem.pawnKindToSpawn; + result = (((pawnKindToSpawn != null) ? pawnKindToSpawn.defaultFactionType : null) ?? null); + } + else + { + result = null; + } + } + } + } + } + return result; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/FilthSettings.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/FilthSettings.cs new file mode 100644 index 0000000..54be685 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/FilthSettings.cs @@ -0,0 +1,14 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class FilthSettings + { + public ThingDef filthDef = null; + + public IntRange filthNum = new IntRange(1, 1); + + public FloatRange filthRadius = new FloatRange(1f, 1f); + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Footprint.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Footprint.cs new file mode 100644 index 0000000..e6c8ddd --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Footprint.cs @@ -0,0 +1,27 @@ +using System; +using UnityEngine; + +namespace MoharHediffs +{ + public class Footprint + { + public string Dump() + { + return string.Concat(new object[] + { + "intervalDistance:", + this.intervalDistance, + "; offset:", + this.offset, + "; distanceBetweenFeet:", + this.distanceBetweenFeet + }); + } + + public float intervalDistance = 0.632f; + + public Vector3 offset = new Vector3(0f, 0f, -0.3f); + + public float distanceBetweenFeet = 0.17f; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/GeneralSettings.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/GeneralSettings.cs new file mode 100644 index 0000000..6075da4 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/GeneralSettings.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class GeneralSettings + { + public bool HasSomethingToSpawn + { + get + { + return !this.things.NullOrEmpty(); + } + } + + public bool HasDefaultSettings + { + get + { + return this.defaultSettings != null; + } + } + + public void LogParams(bool myDebug = false) + { + if (myDebug) + { + Log.Warning(string.Concat(new string[] + { + "HasSomethingToSpawn:", + this.HasSomethingToSpawn.ToString(), + "; HasDefaultSettings:", + this.HasDefaultSettings.ToString(), + "; " + })); + } + } + + public List things; + + public CommonSettings defaultSettings; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/GfxEffects.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/GfxEffects.cs new file mode 100644 index 0000000..8fd89c0 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/GfxEffects.cs @@ -0,0 +1,153 @@ +using System; +using AlienRace; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class GfxEffects + { + public static Color ClosestColor(Pawn pawn, bool complementary = false, bool myDebug = false) + { + AlienPartGenerator.AlienComp alien = Tools.GetAlien(pawn); + bool flag = alien == null; + Color color; + if (flag) + { + color = pawn.DrawColor; + } + else + { + color = alien.GetChannel("skin").first; + if (myDebug) + { + Log.Warning(pawn.LabelShort + " is alien, color=" + color); + } + } + Color color2 = Color.blue; + float num = 1000f; + float num2 = Math.Abs(color.r - MyGfx.Purple.r) + Math.Abs(color.g - MyGfx.Purple.g) / 4f + Math.Abs(color.b - MyGfx.Purple.b); + float num3 = Math.Abs(color.r - MyGfx.Blue.r) / 2f + Math.Abs(color.g - MyGfx.Blue.g) / 2f + Math.Abs(color.b - MyGfx.Blue.b); + float num4 = Math.Abs(color.r - MyGfx.Cyan.r) / 4f + Math.Abs(color.g - MyGfx.Cyan.g) + Math.Abs(color.b - MyGfx.Cyan.b); + float num5 = Math.Abs(color.r - MyGfx.Green.r) / 2f + Math.Abs(color.g - MyGfx.Green.g) + Math.Abs(color.b - MyGfx.Green.b) / 2f; + float num6 = Math.Abs(color.r - MyGfx.Yellow.r) + Math.Abs(color.g - MyGfx.Yellow.g) + Math.Abs(color.b - MyGfx.Yellow.b) / 4f; + float num7 = Math.Abs(color.r - MyGfx.Orange.r) + Math.Abs(color.g - MyGfx.Orange.g) / 1.6f + Math.Abs(color.b - MyGfx.Orange.b) / 2.5f; + float num8 = Math.Abs(color.r - MyGfx.Red.r) + Math.Abs(color.g - MyGfx.Red.g) / 2f + Math.Abs(color.b - MyGfx.Red.b) / 2f; + if (myDebug) + { + Log.Warning(pawn.LabelShort + "'s pColor: " + color); + Log.Warning(string.Concat(new object[] + { + "purpleDiff: ", + num2, + "; blueDiff: ", + num3, + "; cyanDiff: ", + num4, + "; greenDiff: ", + num5, + "; yellowDiff: ", + num6, + "; orangeDiff: ", + num7, + "; redDiff: ", + num8 + })); + } + bool flag2 = num2 < num; + if (flag2) + { + num = num2; + color2 = MyGfx.Purple; + } + bool flag3 = num3 < num; + if (flag3) + { + num = num3; + color2 = MyGfx.Blue; + } + bool flag4 = num4 < num; + if (flag4) + { + num = num4; + color2 = MyGfx.Blue; + } + bool flag5 = num5 < num; + if (flag5) + { + num = num5; + color2 = MyGfx.Green; + } + bool flag6 = num6 < num; + if (flag6) + { + num = num6; + color2 = MyGfx.Yellow; + } + bool flag7 = num7 < num; + if (flag7) + { + num = num7; + color2 = MyGfx.Orange; + } + bool flag8 = num8 < num; + if (flag8) + { + color2 = MyGfx.Red; + } + if (complementary) + { + bool flag9 = color2 == MyGfx.Purple; + if (flag9) + { + color2 = MyGfx.Yellow; + } + else + { + bool flag10 = color2 == MyGfx.Blue || color2 == MyGfx.Cyan; + if (flag10) + { + color2 = MyGfx.Orange; + } + else + { + bool flag11 = color2 == MyGfx.Green; + if (flag11) + { + color2 = MyGfx.Red; + } + else + { + bool flag12 = color2 == MyGfx.Yellow; + if (flag12) + { + color2 = MyGfx.Purple; + } + else + { + bool flag13 = color2 == MyGfx.Orange; + if (flag13) + { + color2 = MyGfx.Blue; + } + else + { + bool flag14 = color2 == MyGfx.Red; + if (flag14) + { + color2 = MyGfx.Green; + } + } + } + } + } + } + } + if (myDebug) + { + Log.Warning(complementary ? "complementary" : ("closest Color=" + color2)); + } + return color2; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HeDiffCompProperties_HediffExclusive.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HeDiffCompProperties_HediffExclusive.cs new file mode 100644 index 0000000..65eb369 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HeDiffCompProperties_HediffExclusive.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HeDiffCompProperties_HediffExclusive : HediffCompProperties + { + public HeDiffCompProperties_HediffExclusive() + { + this.compClass = typeof(HeDiffComp_HediffExclusive); + } + + public List hediffToNullify; + + public List hediffPatternToNullify; + + public HediffDef hediffToApply = null; + + public BodyDef bodyDef; + + public List bodyDefWhiteList; + + public List bodyDefBlackList; + + public BodyPartDef bodyPartDef; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HeDiffComp_HediffExclusive.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HeDiffComp_HediffExclusive.cs new file mode 100644 index 0000000..2a4d8e6 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HeDiffComp_HediffExclusive.cs @@ -0,0 +1,341 @@ +using System; +using System.Linq; +using Verse; + +namespace MoharHediffs +{ + public class HeDiffComp_HediffExclusive : HediffComp + { + private bool MyDebug + { + get + { + return this.Props.debug; + } + } + + public HeDiffCompProperties_HediffExclusive Props + { + get + { + return (HeDiffCompProperties_HediffExclusive)this.props; + } + } + + public bool HasHediffToNullify + { + get + { + return !this.Props.hediffToNullify.NullOrEmpty(); + } + } + + public bool HasHediffPatternToNullify + { + get + { + return !this.Props.hediffPatternToNullify.NullOrEmpty(); + } + } + + public bool HasHediffToApply + { + get + { + return this.Props.hediffToApply != null; + } + } + + private bool HasWhiteList + { + get + { + return !this.Props.bodyDefWhiteList.NullOrEmpty(); + } + } + + private bool HasBlackList + { + get + { + return !this.Props.bodyDefBlackList.NullOrEmpty(); + } + } + + private bool WhiteListCompliant + { + get + { + return !this.HasWhiteList || this.Props.bodyDefWhiteList.Contains(base.Pawn.def.race.body); + } + } + + private bool BlackListCompliant + { + get + { + return !this.HasBlackList || !this.Props.bodyDefBlackList.Contains(base.Pawn.def.race.body); + } + } + + private bool HasAccessList + { + get + { + return this.HasWhiteList || this.HasBlackList; + } + } + + private string DebugStr + { + get + { + return this.MyDebug ? (base.Pawn.LabelShort + " HediffExclusive " + this.parent.def.defName + " - ") : ""; + } + } + + private bool PatternMatch(string MyHediffDefname) + { + foreach (string value in this.Props.hediffPatternToNullify) + { + bool flag = MyHediffDefname.Contains(value); + if (flag) + { + return true; + } + } + return false; + } + + public void NullifyHediff() + { + int num = 0; + checked + { + foreach (Hediff hediff in base.Pawn.health.hediffSet.hediffs) + { + Tools.Warn(string.Concat(new object[] + { + base.Pawn.Label, + " hediff #", + num, + ": ", + hediff.def.defName + }), this.MyDebug); + int num2 = 0; + foreach (HediffDef hediffDef in this.Props.hediffToNullify) + { + Tools.Warn(string.Concat(new object[] + { + " Props.hediffToNullify #", + num2, + ": ", + hediffDef + }), this.MyDebug); + bool flag = hediff.def == hediffDef && this.Props.hediffToApply != hediffDef; + if (flag) + { + hediff.Severity = 0f; + Tools.Warn(hediff.def.defName + " removed", this.MyDebug); + } + num2++; + } + num++; + } + } + } + + public void PatternNullifyHediff() + { + int num = 0; + checked + { + foreach (Hediff hediff in base.Pawn.health.hediffSet.hediffs) + { + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning(string.Concat(new object[] + { + base.Pawn.LabelShort, + " hediff #", + num, + ": ", + hediff.def.defName + })); + } + int num2 = 0; + foreach (string text in this.Props.hediffPatternToNullify) + { + bool myDebug2 = this.MyDebug; + if (myDebug2) + { + Log.Warning(string.Concat(new object[] + { + " Props.hediffPatternToNullify #", + num2, + ": ", + text + })); + } + bool flag = this.PatternMatch(hediff.def.defName); + if (flag) + { + hediff.Severity = 0f; + Tools.Warn(hediff.def.defName + " severity = 0", this.MyDebug); + } + num2++; + } + num++; + } + } + } + + public void ApplyHediff() + { + HediffDef hediffToApply = this.Props.hediffToApply; + bool flag = hediffToApply == null; + if (flag) + { + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning("cant find hediff called: " + this.Props.hediffToApply); + } + } + else + { + BodyPartDef bodyPartDef = (from b in DefDatabase.AllDefs + where b == this.Props.bodyPartDef + select b).RandomElementWithFallback(null); + BodyPartRecord bodyPartRecord = null; + bool flag2 = bodyPartDef != null; + if (flag2) + { + bodyPartRecord = base.Pawn.RaceProps.body.GetPartsWithDef(bodyPartDef).RandomElementWithFallback(null); + bool flag3 = bodyPartRecord == null; + if (flag3) + { + bool myDebug2 = this.MyDebug; + if (myDebug2) + { + Log.Warning("cant find body part record called: " + this.Props.bodyPartDef.defName); + } + return; + } + } + Hediff hediff = HediffMaker.MakeHediff(hediffToApply, base.Pawn, bodyPartRecord); + bool flag4 = hediff == null; + if (flag4) + { + bool myDebug3 = this.MyDebug; + if (myDebug3) + { + Log.Warning("cant create hediff " + hediffToApply.defName + " to apply on " + this.Props.bodyPartDef.defName); + } + } + else + { + base.Pawn.health.AddHediff(hediff, bodyPartRecord, null, null); + } + } + } + + public bool CheckProps() + { + string text = this.DebugStr + "ApplyHediff - "; + bool flag = this.Props.bodyDef != null; + if (flag) + { + bool flag2 = base.Pawn.def.race.body != this.Props.bodyDef; + if (flag2) + { + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning(string.Concat(new string[] + { + base.Pawn.Label, + " has not a bodyDef like required: ", + base.Pawn.def.race.body.ToString(), + "!=", + this.Props.bodyDef.ToString() + })); + } + return false; + } + } + bool hasAccessList = this.HasAccessList; + if (hasAccessList) + { + bool blackListCompliant = this.BlackListCompliant; + bool whiteListCompliant = this.WhiteListCompliant; + bool flag3 = !blackListCompliant || !whiteListCompliant; + if (flag3) + { + bool myDebug2 = this.MyDebug; + if (myDebug2) + { + Log.Warning(string.Concat(new string[] + { + text, + this.HasWhiteList ? string.Format("Props.BodyDefWhiteList contains {0} elements", this.Props.bodyDefWhiteList.Count) : "No whitelist", + ", compliant: ", + whiteListCompliant.ToString(), + "; ", + this.HasBlackList ? string.Format("Props.BodyDefBlackList contains {0} elements", this.Props.bodyDefBlackList.Count) : "No blacklist", + ", compliant:", + blackListCompliant.ToString() + })); + } + return false; + } + bool myDebug3 = this.MyDebug; + if (myDebug3) + { + Log.Warning(text + " AccessList compliant ok"); + } + } + return true; + } + + public override void CompPostTick(ref float severityAdjustment) + { + bool flag = base.Pawn.Negligible(); + if (!flag) + { + bool flag2 = this.CheckProps(); + if (flag2) + { + bool hasHediffToNullify = this.HasHediffToNullify; + if (hasHediffToNullify) + { + this.NullifyHediff(); + } + bool hasHediffPatternToNullify = this.HasHediffPatternToNullify; + if (hasHediffPatternToNullify) + { + this.PatternNullifyHediff(); + } + bool hasHediffToApply = this.HasHediffToApply; + if (hasHediffToApply) + { + this.ApplyHediff(); + } + } + Tools.DestroyParentHediff(this.parent, this.MyDebug); + } + } + + public override string CompTipStringExtra + { + get + { + string empty = string.Empty; + return empty + "This should disappear very fast"; + } + } + + private const int tickLimiterModulo = 60; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffAndBodyPart.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffAndBodyPart.cs new file mode 100644 index 0000000..61d575e --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffAndBodyPart.cs @@ -0,0 +1,24 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffAndBodyPart + { + public HediffDef hediff; + + public BodyPartDef bodyPart; + + public string bodyPartLabel; + + public bool prioritizeMissing = false; + + public bool allowMissing = true; + + public bool regenIfMissing = true; + + public bool allowAddedPart = true; + + public bool wholeBodyFallback = true; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_AnotherRandom.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_AnotherRandom.cs new file mode 100644 index 0000000..90c33eb --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_AnotherRandom.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_AnotherRandom : HediffCompProperties + { + public bool HasConditionsToApplyHediffs + { + get + { + return this.conditionsToApplyHediffs != null; + } + } + + public bool HasDefaultCondition + { + get + { + return this.defaultCondition != null; + } + } + + public bool HasHediffPool + { + get + { + return !this.hediffPool.NullOrEmpty(); + } + } + + public HediffCompProperties_AnotherRandom() + { + this.compClass = typeof(HediffComp_AnotherRandom); + } + + public HediffCondition conditionsToApplyHediffs; + + public HediffCondition defaultCondition; + + public List hediffPool; + + public IntRange hediffToApplyNumRange = new IntRange(1, 1); + + public bool excludePickedItems = true; + + public bool excludeRandomlyNotApplied = false; + + public bool debug = false; + + public int verbosity = 1; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_Filther.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_Filther.cs new file mode 100644 index 0000000..ae08e6a --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_Filther.cs @@ -0,0 +1,21 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_Filther : HediffCompProperties + { + public HediffCompProperties_Filther() + { + this.compClass = typeof(HediffComp_Filther); + } + + public int MinTicksBetweenSprays = 60; + + public int MaxTicksBetweenSprays = 120; + + public ThingDef filthDef = null; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_HediffNullifier.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_HediffNullifier.cs new file mode 100644 index 0000000..c632728 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_HediffNullifier.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_HediffNullifier : HediffCompProperties + { + public HediffCompProperties_HediffNullifier() + { + this.compClass = typeof(HediffComp_HediffNullifier); + } + + public int checkPeriod = 240; + + public List hediffToNullify; + + public int limitedUsageNumber = -99; + + public List RequiredBodyPart; + + public bool showMessage = false; + + public string nullifyKey = ""; + + public bool concatUsageLimit = false; + + public string limitedKey = ""; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_HediffRandom.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_HediffRandom.cs new file mode 100644 index 0000000..39dc875 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_HediffRandom.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_HediffRandom : HediffCompProperties + { + public HediffCompProperties_HediffRandom() + { + this.compClass = typeof(HediffComp_HediffRandom); + } + + public BodyDef bodyDef; + + public List hediffPool; + + public List weights; + + public List bodyPartDef; + + public bool debug = false; + + public bool hideBySeverity = true; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_InnerShine.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_InnerShine.cs new file mode 100644 index 0000000..c0f7120 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_InnerShine.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_InnerShine : HediffCompProperties + { + public bool HasShinePool + { + get + { + return this.HasRawShinePool || this.HasShineDefPool; + } + } + + public bool HasRawShinePool + { + get + { + return !this.innerShinePool.NullOrEmpty(); + } + } + + public bool HasShineDefPool + { + get + { + return !this.innerShineDefPool.NullOrEmpty(); + } + } + + public HediffCompProperties_InnerShine() + { + this.compClass = typeof(HediffComp_InnerShine); + } + + public List innerShinePool; + + public List innerShineDefPool; + + public bool debug; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_MultipleHediff.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_MultipleHediff.cs new file mode 100644 index 0000000..16c10ca --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_MultipleHediff.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_MultipleHediff : HediffCompProperties + { + public HediffCompProperties_MultipleHediff() + { + this.compClass = typeof(HediffComp_MultipleHediff); + } + + public BodyDef bodyDef; + + public List bodyDefWhiteList; + + public List bodyDefBlackList; + + public List hediffAndBodypart; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_OnTheCarpet.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_OnTheCarpet.cs new file mode 100644 index 0000000..2b74c6e --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_OnTheCarpet.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_OnTheCarpet : HediffCompProperties + { + public bool HasDefaultCondition + { + get + { + return this.defaultCondition != null; + } + } + + public bool HasHediffPool + { + get + { + return !this.hediffPool.NullOrEmpty(); + } + } + + public int ItemCount + { + get + { + return this.HasHediffPool ? this.hediffPool.Count : 0; + } + } + + public HediffCompProperties_OnTheCarpet() + { + this.compClass = typeof(HediffComp_OnTheCarpet); + } + + public List hediffPool; + + public HediffKeepingCondition defaultCondition; + + public int checkPeriod = 120; + + public int graceTimeBase = 120; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_PostRemoveTrigger_HediffAdd.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_PostRemoveTrigger_HediffAdd.cs new file mode 100644 index 0000000..ef49eac --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_PostRemoveTrigger_HediffAdd.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_PostRemoveTrigger_HediffAdd : HediffCompProperties + { + public HediffCompProperties_PostRemoveTrigger_HediffAdd() + { + this.compClass = typeof(HediffComp_PostRemoveTrigger_HediffAdd); + } + + public List triggeredHediff; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_RainbowTrail.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_RainbowTrail.cs new file mode 100644 index 0000000..90c99c5 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_RainbowTrail.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_RainbowTrail : HediffCompProperties + { + public HediffCompProperties_RainbowTrail() + { + this.compClass = typeof(HediffComp_RainbowTrail); + } + + public int period = 15; + + public List motePurpleDef; + + public List moteBlueDef; + + public List moteGreenDef; + + public List moteYellowDef; + + public List moteOrangeDef; + + public List moteRedDef; + + public float staySameColorChance = 0.5f; + + public int maxTimesSameColor = 3; + + public int minTimesSameColor = 1; + + public FloatRange scale = new FloatRange(0.5f, 0.8f); + + public bool threeColorsGradient = false; + + public HediffComp_RainbowTrail.ColorChoice colorChoice = HediffComp_RainbowTrail.ColorChoice.random; + + public HediffComp_RainbowTrail.CycleKind cycleKind = HediffComp_RainbowTrail.CycleKind.circular; + + public bool debug = false; + + public bool hideBySeverity = true; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_RandySpawnUponDeath.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_RandySpawnUponDeath.cs new file mode 100644 index 0000000..e1a6e33 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_RandySpawnUponDeath.cs @@ -0,0 +1,45 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_RandySpawnUponDeath : HediffCompProperties + { + public bool HasRequirements + { + get + { + return this.requirements != null; + } + } + + public bool HasParentRedress + { + get + { + return this.redressParent != null; + } + } + + public HediffCompProperties_RandySpawnUponDeath() + { + this.compClass = typeof(HediffComp_RandySpawnUponDeath); + } + + public GeneralSettings settings; + + public RedressSettings redressParent; + + public RequirementSettings requirements; + + public IntRange iterationRange = new IntRange(1, 1); + + public bool excludeAlreadyPickedOptions = false; + + public int spawnMaxAdjacent = -1; + + public bool spawnForbidden = false; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_RandySpawner.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_RandySpawner.cs new file mode 100644 index 0000000..7b67b66 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_RandySpawner.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_RandySpawner : HediffCompProperties + { + public HediffCompProperties_RandySpawner() + { + this.compClass = typeof(HediffComp_RandySpawner); + } + + public List itemParameters; + + public int spawnMaxAdjacent = -1; + + public bool spawnForbidden = false; + + public bool hungerRelative = false; + + public bool healthRelative = false; + + public bool logNextSpawn = false; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_Spawner.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_Spawner.cs new file mode 100644 index 0000000..a558bf7 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_Spawner.cs @@ -0,0 +1,55 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_Spawner : HediffCompProperties + { + public HediffCompProperties_Spawner() + { + this.compClass = typeof(HediffComp_Spawner); + } + + public ThingDef thingToSpawn; + + public int spawnCount = 1; + + public bool animalThing = false; + + public PawnKindDef animalToSpawn; + + public bool factionOfPlayerAnimal = false; + + public float minDaysB4Next = 1f; + + public float maxDaysB4Next = 2f; + + public float randomGrace = 0f; + + public float graceDays = 0.5f; + + public int spawnMaxAdjacent = -1; + + public bool spawnForbidden = false; + + public bool hungerRelative = false; + + public bool healthRelative = false; + + public bool ageWeightedQuantity = false; + + public bool ageWeightedPeriod = false; + + public bool olderSmallerPeriod = false; + + public bool olderBiggerQuantity = false; + + public bool exponentialQuantity = false; + + public int exponentialRatioLimit = 15; + + public string spawnVerb = "delivery"; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_Steamer.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_Steamer.cs new file mode 100644 index 0000000..f52c48b --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_Steamer.cs @@ -0,0 +1,27 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_Steamer : HediffCompProperties + { + public HediffCompProperties_Steamer() + { + this.compClass = typeof(HediffComp_Steamer); + } + + public int MinTicksBetweenSprays = 200; + + public int MaxTicksBetweenSprays = 400; + + public int MinSprayDuration = 60; + + public int MaxSprayDuration = 120; + + public float puffingChance = 1f; + + public float temperatureIncreasePerPuff = 0.5f; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_TrailLeaver.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_TrailLeaver.cs new file mode 100644 index 0000000..75bf603 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCompProperties_TrailLeaver.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_TrailLeaver : HediffCompProperties + { + public bool HasRestriction + { + get + { + return this.restriction != null; + } + } + + public bool HasColorRange + { + get + { + return this.colorRange != null; + } + } + + public bool UsesFootPrints + { + get + { + return this.footprint != null; + } + } + + public bool HasMotePool + { + get + { + return !this.motePool.NullOrEmpty(); + } + } + + public bool HasOffset + { + get + { + return !this.offSetPerBodyType.NullOrEmpty(); + } + } + + public bool HasRotationOffset + { + get + { + return this.rotationOffset != 0f; + } + } + + public HediffCompProperties_TrailLeaver() + { + this.compClass = typeof(HediffComp_TrailLeaver); + } + + public IntRange period = new IntRange(15, 25); + + public List motePool; + + public List offSetPerBodyType; + + public Vector3 defaultOffset = new Vector3(0f, 0f, -0.32f); + + public Restriction restriction; + + public Footprint footprint; + + public ColorRange colorRange; + + public float rotationOffset = 0f; + + public bool dynamicRotation = true; + + public FloatRange randomScale = new FloatRange(0.5f, 0.8f); + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_AnotherRandom.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_AnotherRandom.cs new file mode 100644 index 0000000..8c01cde --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_AnotherRandom.cs @@ -0,0 +1,322 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_AnotherRandom : HediffComp + { + public bool HasItems + { + get + { + return this.Props.HasHediffPool; + } + } + + public int ItemNum + { + get + { + return this.Props.hediffPool.Count; + } + } + + public bool MyDebug + { + get + { + return this.Props.debug; + } + } + + public bool LowVerbosity + { + get + { + return this.Props.debug && this.Props.verbosity >= 1; + } + } + + public bool MediumVerbosity + { + get + { + return this.Props.debug && this.Props.verbosity >= 2; + } + } + + public bool HighVerbosity + { + get + { + return this.Props.debug && this.Props.verbosity >= 3; + } + } + + public HediffCompProperties_AnotherRandom Props + { + get + { + return (HediffCompProperties_AnotherRandom)this.props; + } + } + + public void DumpProps() + { + string text = "CheckProps"; + bool flag = !this.HasItems; + if (flag) + { + Tools.Warn(text + "- HediffComp_AnotherRandom; no item found", this.MyDebug); + } + else + { + Tools.Warn(string.Concat(new object[] + { + text, + "- HediffComp_AnotherRandom; found ", + this.ItemNum, + " items" + }), this.MyDebug); + } + } + + public override void CompPostMake() + { + base.CompPostMake(); + string text = this.MyDebug ? (base.Pawn.LabelShort + " CompPostMake - ") : ""; + bool myDebug = this.MyDebug; + if (myDebug) + { + this.DumpProps(); + } + bool flag = !this.HasItems; + if (flag) + { + Tools.Warn(text + " found no item to work with, destroying ", this.MyDebug); + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + this.blockAction = true; + } + else + { + Tools.Warn(string.Concat(new object[] + { + text, + " found ", + this.ItemNum, + " items to work with" + }), this.MyDebug); + bool hasConditionsToApplyHediffs = this.Props.HasConditionsToApplyHediffs; + if (hasConditionsToApplyHediffs) + { + BodyPartRecord bodyPartRecord; + bool flag2 = !this.Props.conditionsToApplyHediffs.pawn.ValidateCompatibilityOfHediffWithPawn(base.Pawn, this.MyDebug) || !this.Props.conditionsToApplyHediffs.bodyPart.GetBPRFromHediffCondition(base.Pawn, out bodyPartRecord, this.MyDebug); + if (flag2) + { + Tools.Warn(text + " is not compatible with this hediff, destroying ", this.MyDebug); + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + this.blockAction = true; + return; + } + } + else + { + Tools.Warn(text + " skipped HasConditionsToApplyHediffs", this.MyDebug); + } + Tools.Warn(string.Concat(new object[] + { + text, + " checking if at least 1 hediff from ", + this.ItemNum, + " is appliable" + }), this.MyDebug); + bool flag3 = !this.InitialHediffConditionCheck(this.MyDebug); + if (flag3) + { + Tools.Warn(text + " has found no appliable item, destroying ", this.MyDebug); + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + this.blockAction = true; + } + else + { + Tools.Warn(text + " found at least 1 appliable hediff", this.MyDebug); + } + } + } + + public void ApplyHediff(Pawn pawn) + { + string text = this.MyDebug ? (base.Pawn.LabelShort + " - " + this.parent.def.defName + " - ApplyHediff") : ""; + List list = new List(); + int randomInRange = this.Props.hediffToApplyNumRange.RandomInRange; + List list2 = this.GetCompatibleItems(); + bool flag = list2.NullOrEmpty(); + checked + { + if (!flag) + { + Tools.Warn(string.Concat(new object[] + { + text, + "Trying to apply ", + randomInRange, + " hediffs among ", + list2.Count, + " options pool" + }), this.MyDebug); + for (int i = 0; i < randomInRange; i++) + { + string text2 = this.MyDebug ? string.Concat(new object[] + { + "[", + i, + "/", + randomInRange, + "]" + }) : ""; + bool flag2 = !list.NullOrEmpty(); + if (flag2) + { + list2 = list2.GetRemainingItems(list); + bool flag3 = list2.NullOrEmpty(); + if (flag3) + { + break; + } + } + Tools.Warn(string.Concat(new object[] + { + text, + text2, + " ", + list2.Count, + " options remaining " + }), this.MyDebug); + HediffItem hediffItem = list2.PickRandomWeightedItem(false); + bool flag4 = hediffItem == null; + if (flag4) + { + Tools.Warn(text + text2 + " null hediffItem, giving up ", this.MyDebug); + break; + } + Tools.Warn(string.Concat(new object[] + { + text, + text2, + " found a hediffItem:", + (hediffItem != null) ? hediffItem.hediffDef : null, + ", going on " + }), this.MyDebug); + float randomInRange2 = hediffItem.applyChance.RandomInRange; + bool flag5 = !Rand.Chance(randomInRange2); + if (flag5) + { + Tools.Warn(string.Concat(new object[] + { + text, + text2, + " rand(", + randomInRange2, + ") == false, nothing is applied" + }), this.MyDebug); + bool flag6 = this.Props.excludePickedItems && this.Props.excludeRandomlyNotApplied; + if (flag6) + { + list.Add(hediffItem); + } + } + else + { + Tools.Warn(string.Concat(new object[] + { + text, + text2, + " rand(", + randomInRange2, + ") == true, hediff:", + (hediffItem != null) ? hediffItem.hediffDef : null, + " will be applied" + }), this.MyDebug); + HediffDef hediffDef = hediffItem.hediffDef; + bool flag7 = hediffDef == null; + if (flag7) + { + Tools.Warn(text + text2 + "cant find hediff, giving up", this.MyDebug); + break; + } + HediffCompProperties_AnotherRandom props = this.Props; + HediffCondition defaultPlusSpecificHediffCondition = ConditionBuilder.GetDefaultPlusSpecificHediffCondition(((props != null) ? props.defaultCondition : null) ?? null, ((hediffItem != null) ? hediffItem.specificCondition : null) ?? null, this.HighVerbosity); + BodyPartRecord bodyPartRecord; + bool flag8 = !defaultPlusSpecificHediffCondition.bodyPart.GetBPRFromHediffCondition(base.Pawn, out bodyPartRecord, this.MyDebug); + if (flag8) + { + Tools.Warn(text + text2 + " could not find anything suitable, giving up", this.MyDebug); + break; + } + Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn, bodyPartRecord); + bool flag9 = hediff == null; + if (flag9) + { + Tools.Warn(text + text2 + "cant create hediff", this.MyDebug); + break; + } + hediff.Severity = hediffItem.severity.RandomInRange; + Tools.Warn(string.Concat(new object[] + { + text, + text2, + " Applying hediff:", + hediffDef.defName, + "; bpr:", + (bodyPartRecord == null) ? "body" : bodyPartRecord.def.defName, + "; severity:", + hediff.Severity + }), this.MyDebug); + pawn.health.AddHediff(hediff, bodyPartRecord, null, null); + bool excludePickedItems = this.Props.excludePickedItems; + if (excludePickedItems) + { + list.Add(hediffItem); + } + } + } + } + } + } + + public override void CompPostTick(ref float severityAdjustment) + { + Pawn pawn = this.parent.pawn; + bool flag = !Tools.OkPawn(pawn); + if (!flag) + { + bool flag2 = this.blockAction; + if (flag2) + { + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + } + else + { + bool hasItems = this.HasItems; + if (hasItems) + { + this.ApplyHediff(pawn); + } + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + } + } + } + + public override string CompTipStringExtra + { + get + { + string empty = string.Empty; + return empty + "This should disappear very fast"; + } + } + + private bool blockAction = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_Filther.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_Filther.cs new file mode 100644 index 0000000..cdb1a13 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_Filther.cs @@ -0,0 +1,64 @@ +using System; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_Filther : HediffComp + { + public HediffCompProperties_Filther Props + { + get + { + return (HediffCompProperties_Filther)this.props; + } + } + + public override void CompPostMake() + { + this.myDebug = this.Props.debug; + } + + public override void CompPostTick(ref float severityAdjustment) + { + this.myPawn = this.parent.pawn; + bool flag = this.myPawn == null; + checked + { + if (flag) + { + Tools.Warn("pawn null", this.myDebug); + } + else + { + bool flag2 = this.myPawn.Map == null; + if (!flag2) + { + bool flag3 = this.Props.filthDef == null; + if (!flag3) + { + bool flag4 = this.filthTicksLeft <= 0; + if (flag4) + { + FilthMaker.TryMakeFilth(this.myPawn.Position, this.myPawn.Map, this.Props.filthDef, 1, FilthSourceFlags.None, true); + this.filthTicksLeft = (this.ticksUntilFilth = Rand.RangeInclusive(this.Props.MinTicksBetweenSprays, this.Props.MaxTicksBetweenSprays)); + } + else + { + this.filthTicksLeft--; + } + } + } + } + } + } + + private Pawn myPawn = null; + + private int ticksUntilFilth = 500; + + private int filthTicksLeft; + + private bool myDebug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_HediffNullifier.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_HediffNullifier.cs new file mode 100644 index 0000000..4806add --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_HediffNullifier.cs @@ -0,0 +1,230 @@ +using System; +using System.Linq; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_HediffNullifier : HediffComp + { + public HediffCompProperties_HediffNullifier Props + { + get + { + return (HediffCompProperties_HediffNullifier)this.props; + } + } + + public bool RequiresAtLeastOneBodyPart + { + get + { + return !this.Props.RequiredBodyPart.NullOrEmpty(); + } + } + + public bool HasMessageToDisplay + { + get + { + return this.Props.showMessage && !this.Props.nullifyKey.NullOrEmpty(); + } + } + + public bool DisplayLimitedUsageLeft + { + get + { + return this.HasMessageToDisplay && this.Props.concatUsageLimit && !this.Props.limitedKey.NullOrEmpty(); + } + } + + public bool HasHediffToNullify + { + get + { + return !this.Props.hediffToNullify.NullOrEmpty(); + } + } + + public bool HasLimitedUsage + { + get + { + return this.Props.limitedUsageNumber != -99; + } + } + + public void BlockAndDestroy() + { + Tools.DestroyParentHediff(this.parent, this.myDebug); + this.BlockPostTick = true; + } + + public override void CompPostMake() + { + bool flag = this.myDebug; + if (flag) + { + Log.Warning(">>>" + this.parent.def.defName + " - CompPostMake start"); + } + bool flag2 = !this.HasHediffToNullify; + if (flag2) + { + bool flag3 = this.myDebug; + if (flag3) + { + Log.Warning(this.parent.def.defName + " has no hediff to nullify, autokill"); + } + this.BlockAndDestroy(); + } + this.DestroyHediffIfMissingBP(); + bool hasLimitedUsage = this.HasLimitedUsage; + if (hasLimitedUsage) + { + this.LimitedUsageNumber = this.Props.limitedUsageNumber; + } + } + + public void DestroyHediffIfMissingBP() + { + bool flag = !this.RequiresAtLeastOneBodyPart; + if (!flag) + { + bool flag2 = false; + foreach (BodyPartDef bodyPartDef in this.Props.RequiredBodyPart) + { + bool flag3; + flag2 = (flag3 = base.Pawn.CheckIfExistingNaturalBP(bodyPartDef, false)); + if (flag3) + { + break; + } + } + bool flag4 = !flag2; + if (flag4) + { + bool flag5 = this.myDebug; + if (flag5) + { + Log.Warning(base.Pawn.LabelShort + " does not have any required body part to have an active " + this.parent.def.defName + ", autokill"); + } + this.BlockAndDestroy(); + } + } + } + + public override void CompExposeData() + { + Scribe_Values.Look(ref this.LimitedUsageNumber, "LimitedUsageNumber", 0, false); + } + + public override void CompPostTick(ref float severityAdjustment) + { + bool flag = !base.Pawn.IsHashIntervalTick(this.Props.checkPeriod); + checked + { + if (!flag) + { + bool flag2 = !Tools.OkPawn(base.Pawn); + if (!flag2) + { + this.DestroyHediffIfMissingBP(); + bool blockPostTick = this.BlockPostTick; + if (!blockPostTick) + { + foreach (Hediff hediff in from h in base.Pawn.health.hediffSet.hediffs + where this.Props.hediffToNullify.Contains(h.def) + select h) + { + bool flag3 = this.myDebug; + if (flag3) + { + Log.Warning(base.Pawn.Label + " - " + hediff.def.defName); + } + hediff.Severity = 0f; + bool flag4 = this.myDebug; + if (flag4) + { + Log.Warning(hediff.def.defName + " severity = 0"); + } + bool hasLimitedUsage = this.HasLimitedUsage; + if (hasLimitedUsage) + { + this.LimitedUsageNumber--; + bool flag5 = this.LimitedUsageNumber <= 0; + if (flag5) + { + bool flag6 = this.myDebug; + if (flag6) + { + Log.Warning(this.parent.def.defName + " has reached its limit usage, autokill"); + } + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + } + bool hasMessageToDisplay = this.HasMessageToDisplay; + if (hasMessageToDisplay) + { + string text = this.Props.nullifyKey.Translate(base.Pawn.LabelShort, hediff.def.label, base.Pawn.gender.GetPronoun(), base.Pawn.kindDef.race.label); + bool displayLimitedUsageLeft = this.DisplayLimitedUsageLeft; + if (displayLimitedUsageLeft) + { + text += this.Props.limitedKey.Translate(this.LimitedUsageNumber); + } + text += "."; + Messages.Message(text, MessageTypeDefOf.NeutralEvent, true); + } + } + } + } + } + } + } + + public override string CompTipStringExtra + { + get + { + string text = string.Empty; + bool flag = !this.HasHediffToNullify; + string result; + if (flag) + { + result = text; + } + else + { + text += "Immune to: "; + foreach (HediffDef hediffDef in this.Props.hediffToNullify) + { + text = text + hediffDef.label + "; "; + } + bool flag2 = !this.HasLimitedUsage; + if (flag2) + { + text += " for ever"; + } + else + { + text = string.Concat(new object[] + { + text, + " ", + this.LimitedUsageNumber, + " left" + }); + } + result = text; + } + return result; + } + } + + private int LimitedUsageNumber = 0; + + private bool BlockPostTick = false; + + private readonly bool myDebug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_HediffRandom.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_HediffRandom.cs new file mode 100644 index 0000000..a8b9b16 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_HediffRandom.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_HediffRandom : HediffComp + { + public HediffCompProperties_HediffRandom Props + { + get + { + return (HediffCompProperties_HediffRandom)this.props; + } + } + + private bool myDebug + { + get + { + return this.Props.debug; + } + } + + private bool HasWeights + { + get + { + return !this.Props.weights.NullOrEmpty() && this.Props.weights.Count == this.Props.hediffPool.Count; + } + } + + private bool HasBodyParts + { + get + { + return !this.Props.bodyPartDef.NullOrEmpty() && this.Props.bodyPartDef.Count == this.Props.hediffPool.Count; + } + } + + private bool HasHediff + { + get + { + return !this.Props.hediffPool.NullOrEmpty(); + } + } + + private Pawn pawn + { + get + { + return this.parent.pawn; + } + } + + public override void CompPostMake() + { + bool hideBySeverity = this.Props.hideBySeverity; + if (hideBySeverity) + { + this.parent.Severity = 0.05f; + } + } + + public int WeightedRandomness + { + get + { + int num = 0; + checked + { + foreach (int num2 in this.Props.weights) + { + num += num2; + } + int num3 = Rand.Range(0, num); + for (int i = 0; i < this.Props.weights.Count; i++) + { + int num4 = this.Props.weights[i]; + bool flag = (num3 -= num4) < 0; + if (flag) + { + return i; + } + } + return 0; + } + } + } + + public void ApplyHediff(Pawn pawn) + { + bool flag = this.Props.bodyDef != null; + if (flag) + { + bool flag2 = pawn.def.race.body != this.Props.bodyDef; + if (flag2) + { + Tools.Warn(string.Concat(new string[] + { + pawn.Label, + " has not a bodyDef like required: ", + pawn.def.race.body.ToString(), + "!=", + this.Props.bodyDef.ToString() + }), this.myDebug); + return; + } + } + bool flag3 = !this.HasWeights; + int num; + if (flag3) + { + num = Rand.Range(0, this.Props.hediffPool.Count()); + } + else + { + num = this.WeightedRandomness; + } + bool flag4 = num < 0 || num >= this.Props.hediffPool.Count; + if (flag4) + { + Tools.Warn(num + " is out of range. Applyhediff will fail. Please report this error.", this.myDebug); + } + HediffDef hediffDef = this.Props.hediffPool[num]; + bool flag5 = hediffDef == null; + if (flag5) + { + Tools.Warn("cant find hediff", this.myDebug); + } + else + { + BodyPartRecord bodyPartRecord = null; + BodyPartDef bodyPartDef = null; + bool hasBodyParts = this.HasBodyParts; + if (hasBodyParts) + { + bodyPartDef = this.Props.bodyPartDef[num]; + IEnumerable partsWithDef = pawn.RaceProps.body.GetPartsWithDef(bodyPartDef); + bool flag6 = partsWithDef.EnumerableNullOrEmpty(); + if (flag6) + { + Tools.Warn("cant find body part record called: " + bodyPartDef.defName, this.myDebug); + return; + } + bodyPartRecord = partsWithDef.RandomElement(); + } + Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn, bodyPartRecord); + bool flag7 = hediff == null; + if (flag7) + { + Tools.Warn("cant create hediff " + hediffDef.defName + " to apply on " + ((bodyPartDef != null) ? bodyPartDef.defName : null), this.myDebug); + } + else + { + pawn.health.AddHediff(hediff, bodyPartRecord, null, null); + Tools.Warn("Succesfully applied " + hediffDef.defName + " to apply on " + ((bodyPartDef != null) ? bodyPartDef.defName : null), this.myDebug); + } + } + } + + public override void CompPostTick(ref float severityAdjustment) + { + bool flag = !Tools.OkPawn(this.pawn); + if (!flag) + { + bool hasHediff = this.HasHediff; + if (hasHediff) + { + this.ApplyHediff(this.pawn); + } + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_InnerShine.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_InnerShine.cs new file mode 100644 index 0000000..91cad6b --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_InnerShine.cs @@ -0,0 +1,209 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_InnerShine : HediffComp + { + public Map MyMap + { + get + { + return base.Pawn.Map; + } + } + + public bool NullMap + { + get + { + return this.MyMap == null; + } + } + + public bool MyDebug + { + get + { + return this.Props.debug; + } + } + + public bool HasEmptyTracer + { + get + { + return this.Tracer.NullOrEmpty(); + } + } + + public bool HasShinePool + { + get + { + return this.Props.HasShinePool; + } + } + + public HediffCompProperties_InnerShine Props + { + get + { + return (HediffCompProperties_InnerShine)this.props; + } + } + + public override void CompPostMake() + { + this.PropsCheck(); + this.CreateTracer(); + } + + public override void CompPostTick(ref float severityAdjustment) + { + bool flag = base.Pawn.Negligible(); + checked + { + if (flag) + { + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning("null pawn"); + } + } + else + { + bool hasEmptyTracer = this.HasEmptyTracer; + if (hasEmptyTracer) + { + this.CreateTracer(); + } + foreach (InnerShineRecord innerShineRecord in this.Tracer) + { + InnerShineItem innerShineItem = this.RetrieveISI(innerShineRecord.label); + bool flag2 = innerShineItem == null; + if (flag2) + { + bool myDebug2 = this.MyDebug; + if (myDebug2) + { + Log.Warning("Did not find ISI with label:" + innerShineRecord.label); + } + } + else + { + bool flag3 = innerShineRecord.ticksLeft <= 0; + if (flag3) + { + bool flag4 = innerShineItem.ShouldSpawnMote(innerShineRecord, base.Pawn); + if (flag4) + { + innerShineItem.TryPlaceMote(innerShineRecord, base.Pawn); + } + innerShineItem.ResetTicks(innerShineRecord); + } + else + { + innerShineRecord.ticksLeft--; + } + innerShineItem.UpdateMotes(innerShineRecord, base.Pawn, this.MyDebug); + } + } + } + } + } + + public void PropsCheck() + { + bool flag = !this.HasShinePool; + checked + { + if (flag) + { + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning("no shine pool, giving up"); + } + this.SelfDestroy(); + } + else + { + bool flag2 = !this.MyDebug; + if (!flag2) + { + bool hasRawShinePool = this.Props.HasRawShinePool; + if (hasRawShinePool) + { + IEnumerable enumerable; + bool flag3 = (enumerable = from s in this.Props.innerShinePool + where !s.HasMotePool + select s) != null; + if (flag3) + { + foreach (InnerShineItem innerShineItem in enumerable) + { + Log.Warning(innerShineItem.label + " has no mote pool"); + } + } + IEnumerable enumerable2; + bool flag4 = (enumerable2 = from s in this.Props.innerShinePool + where !s.HasDefaultDrawRules && !s.HasBodyTypeDrawRules + select s) != null; + if (flag4) + { + foreach (InnerShineItem innerShineItem2 in enumerable2) + { + Log.Warning(innerShineItem2.label + " has no default nor bodytypedef draw rules, at least one is required"); + } + } + int num = 0; + foreach (InnerShineItem innerShineItem3 in this.Props.innerShinePool) + { + Log.Warning("Raw" + num.ToString("00") + " => " + innerShineItem3.Dump()); + num++; + } + } + bool hasShineDefPool = this.Props.HasShineDefPool; + if (hasShineDefPool) + { + IEnumerable enumerable3; + bool flag5 = (enumerable3 = from s in this.Props.innerShineDefPool + where !s.item.HasMotePool + select s) != null; + if (flag5) + { + foreach (InnerShineDef innerShineDef in enumerable3) + { + Log.Warning(innerShineDef.item.label + " has no mote pool"); + } + } + IEnumerable enumerable4; + bool flag6 = (enumerable4 = from s in this.Props.innerShineDefPool + where !s.item.HasDefaultDrawRules && !s.item.HasBodyTypeDrawRules + select s) != null; + if (flag6) + { + foreach (InnerShineDef innerShineDef2 in enumerable4) + { + Log.Warning(innerShineDef2.item.label + " has no default nor bodytypedef draw rules, at least one is required"); + } + } + int num2 = 0; + foreach (InnerShineDef innerShineDef3 in this.Props.innerShineDefPool) + { + Log.Warning("Def" + num2.ToString("00") + " => " + innerShineDef3.item.Dump()); + num2++; + } + } + } + } + } + } + + public List Tracer; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_MultipleHediff.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_MultipleHediff.cs new file mode 100644 index 0000000..8de1b36 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_MultipleHediff.cs @@ -0,0 +1,287 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_MultipleHediff : HediffComp + { + private bool MyDebug + { + get + { + return this.Props.debug; + } + } + + private string DebugStr + { + get + { + return this.MyDebug ? (base.Pawn.LabelShort + " MultipleHediff " + this.parent.def.defName + " - ") : ""; + } + } + + private bool HasSingleBodyRequirement + { + get + { + return this.Props.bodyDef != null; + } + } + + private bool HasWhiteList + { + get + { + return !this.Props.bodyDefWhiteList.NullOrEmpty(); + } + } + + private bool HasBlackList + { + get + { + return !this.Props.bodyDefBlackList.NullOrEmpty(); + } + } + + private bool WhiteListCompliant + { + get + { + return !this.HasWhiteList || this.Props.bodyDefWhiteList.Contains(base.Pawn.def.race.body); + } + } + + private bool BlackListCompliant + { + get + { + return !this.HasBlackList || !this.Props.bodyDefBlackList.Contains(base.Pawn.def.race.body); + } + } + + private bool HasAccessList + { + get + { + return this.HasWhiteList || this.HasBlackList; + } + } + + public HediffCompProperties_MultipleHediff Props + { + get + { + return (HediffCompProperties_MultipleHediff)this.props; + } + } + + public bool HasHediffToApply + { + get + { + return !this.Props.hediffAndBodypart.NullOrEmpty(); + } + } + + public void CheckProps() + { + string text = this.DebugStr + "CheckProps - "; + bool flag = !this.HasHediffToApply; + if (flag) + { + Tools.Warn(text + "- empty hediffAndBodypart, destroying", this.MyDebug); + base.Pawn.DestroyHediff(this.parent, false); + this.blockAction = true; + } + bool flag2 = this.HasSingleBodyRequirement && base.Pawn.def.race.body != this.Props.bodyDef; + if (flag2) + { + Tools.Warn(string.Concat(new string[] + { + text, + " has not a bodyDef like required: ", + base.Pawn.def.race.body.ToString(), + "!=", + this.Props.bodyDef.ToString() + }), this.MyDebug); + base.Pawn.DestroyHediff(this.parent, false); + this.blockAction = true; + } + bool hasAccessList = this.HasAccessList; + if (hasAccessList) + { + bool blackListCompliant = this.BlackListCompliant; + bool whiteListCompliant = this.WhiteListCompliant; + bool flag3 = !blackListCompliant || !whiteListCompliant; + if (flag3) + { + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning(string.Concat(new string[] + { + text, + this.HasWhiteList ? string.Format("Props.BodyDefWhiteList contains {0} elements", this.Props.bodyDefWhiteList.Count) : "No whitelist", + ", compliant: ", + whiteListCompliant.ToString(), + "; ", + this.HasBlackList ? string.Format("Props.BodyDefBlackList contains {0} elements", this.Props.bodyDefBlackList.Count) : "No blacklist", + ", compliant:", + blackListCompliant.ToString() + })); + } + base.Pawn.DestroyHediff(this.parent, false); + this.blockAction = true; + } + else + { + bool myDebug2 = this.MyDebug; + if (myDebug2) + { + Log.Warning(text + " AccessList compliant ok"); + } + } + } + bool flag4 = this.Props.hediffAndBodypart.Any((HediffAndBodyPart habp) => habp.bodyPart != null && habp.bodyPartLabel != null); + if (flag4) + { + Tools.Warn(text + "at least one item has both a bodypart def and a bodypart label, label will be prioritized", this.MyDebug); + } + bool flag5 = this.Props.hediffAndBodypart.Any((HediffAndBodyPart habp) => habp.hediff == null); + if (flag5) + { + Tools.Warn(text + "at least one item has no hediff defined. What will happen ?", this.MyDebug); + } + } + + public void BlockAndDestroy(string ErrorLog = "", bool myDebug = false) + { + Tools.Warn(ErrorLog, myDebug && !ErrorLog.NullOrEmpty()); + this.blockAction = true; + Tools.DestroyParentHediff(this.parent, myDebug); + } + + public override void CompPostMake() + { + base.CompPostMake(); + Tools.Warn(this.DebugStr + "CompPostMake", this.MyDebug); + this.CheckProps(); + } + + public void ApplyHediff(Pawn pawn) + { + string text = this.DebugStr + "ApplyHediff - "; + checked + { + for (int i = 0; i < this.Props.hediffAndBodypart.Count; i++) + { + HediffDef hediff = this.Props.hediffAndBodypart[i].hediff; + BodyPartDef bodyPart = this.Props.hediffAndBodypart[i].bodyPart; + string bodyPartLabel = this.Props.hediffAndBodypart[i].bodyPartLabel; + bool prioritizeMissing = this.Props.hediffAndBodypart[i].prioritizeMissing; + bool allowMissing = this.Props.hediffAndBodypart[i].allowMissing; + bool regenIfMissing = this.Props.hediffAndBodypart[i].regenIfMissing; + bool allowAddedPart = this.Props.hediffAndBodypart[i].allowAddedPart; + bool wholeBodyFallback = this.Props.hediffAndBodypart[i].wholeBodyFallback; + bool flag = hediff == null; + if (flag) + { + Tools.Warn(text + "cant find hediff; i=" + i, true); + } + else + { + BodyPartRecord bodyPartRecord = null; + bool flag2 = bodyPartLabel != null || bodyPart != null; + if (flag2) + { + Tools.Warn(string.Concat(new string[] + { + text, + "Trying to retrieve BPR with [BP label]:", + bodyPartLabel, + " [BP def]:", + (bodyPart != null) ? bodyPart.defName : null + }), this.MyDebug); + bodyPartRecord = pawn.GetBPRecordWithoutHediff(bodyPartLabel, bodyPart, hediff, allowMissing, prioritizeMissing, allowAddedPart, this.MyDebug); + } + bool flag3 = bodyPartRecord == null; + if (flag3) + { + Tools.Warn(text + "Could not find a BPR to apply hediff, will pick whole body?" + wholeBodyFallback.ToString(), this.MyDebug); + bool flag4 = !wholeBodyFallback; + if (flag4) + { + goto IL_291; + } + } + bool flag5 = allowMissing && regenIfMissing && bodyPartRecord != null; + if (flag5) + { + Hediff hediff2; + bool flag6 = base.Pawn.IsMissingBPR(bodyPartRecord, out hediff2); + if (flag6) + { + Tools.Warn(text + "regenerating " + bodyPartRecord.customLabel, this.MyDebug); + base.Pawn.health.RemoveHediff(hediff2); + } + } + Hediff hediff3 = HediffMaker.MakeHediff(hediff, pawn, bodyPartRecord); + bool flag7 = hediff3 == null; + if (flag7) + { + Tools.Warn(string.Concat(new string[] + { + text, + "cant create hediff ", + hediff.defName, + " to apply on ", + bodyPart.defName + }), true); + } + else + { + pawn.health.AddHediff(hediff3, bodyPartRecord, null, null); + Tools.Warn(text + "Applied " + hediff.defName, this.MyDebug); + } + } + IL_291:; + } + } + } + + public override void CompPostTick(ref float severityAdjustment) + { + bool flag = base.Pawn.Negligible(); + if (!flag) + { + bool flag2 = this.blockAction; + if (flag2) + { + Tools.DestroyParentHediff(this.parent, this.MyDebug); + } + else + { + bool hasHediffToApply = this.HasHediffToApply; + if (hasHediffToApply) + { + this.ApplyHediff(base.Pawn); + } + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + } + } + } + + public override string CompTipStringExtra + { + get + { + string empty = string.Empty; + return empty + "This should disappear very fast"; + } + } + + private bool blockAction = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_OnTheCarpet.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_OnTheCarpet.cs new file mode 100644 index 0000000..be43d76 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_OnTheCarpet.cs @@ -0,0 +1,146 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_OnTheCarpet : HediffComp + { + public bool HasItems + { + get + { + return this.Props.HasHediffPool; + } + } + + public int ItemCount + { + get + { + return this.Props.ItemCount; + } + } + + public bool MyDebug + { + get + { + return this.Props.debug; + } + } + + public bool IsTimeToCheck + { + get + { + return base.Pawn.IsHashIntervalTick(this.Props.checkPeriod); + } + } + + public HediffCompProperties_OnTheCarpet Props + { + get + { + return (HediffCompProperties_OnTheCarpet)this.props; + } + } + + public void BlockAndDestroy(string ErrorLog = "", bool myDebug = false) + { + Tools.Warn(ErrorLog, myDebug && !ErrorLog.NullOrEmpty()); + this.blockAction = true; + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + } + + public override void CompPostMake() + { + base.CompPostMake(); + string text = this.MyDebug ? (base.Pawn.LabelShort + " " + this.parent.def.defName + " CompPostMake - ") : ""; + bool flag = !this.HasItems; + if (flag) + { + Tools.Warn(text + " found no item to work with, destroying ", this.MyDebug); + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + this.blockAction = true; + } + else + { + Tools.Warn(string.Concat(new object[] + { + text, + " found ", + this.ItemCount, + " items to work with" + }), this.MyDebug); + bool flag2 = !this.Props.IsPawnNeedCompatible(base.Pawn); + if (flag2) + { + Tools.Warn(text + " is not compatible with this hediff, destroying ", this.MyDebug); + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + this.blockAction = true; + } + else + { + this.SetGraceTime(); + Tools.Warn(text + " found something to do", this.MyDebug); + } + } + } + + public void SetGraceTime() + { + this.graceTime = this.Props.graceTimeBase; + } + + public override void CompExposeData() + { + base.CompExposeData(); + Scribe_Values.Look(ref this.graceTime, "graceTime", 0, false); + } + + public override void CompPostTick(ref float severityAdjustment) + { + base.CompPostTick(ref severityAdjustment); + bool flag = base.Pawn.Negligible(); + if (!flag) + { + bool flag2 = this.blockAction; + if (!flag2) + { + int num = this.graceTime; + this.graceTime = checked(num - 1); + bool flag3 = num > 0; + if (!flag3) + { + bool flag4 = false; + bool isTimeToCheck = this.IsTimeToCheck; + if (isTimeToCheck) + { + flag4 = !this.TreatRelevantHediffsAndReportIfStillHediffsToCheck(); + } + bool flag5 = flag4; + if (flag5) + { + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + } + } + } + } + } + + public override string CompTipStringExtra + { + get + { + string empty = string.Empty; + return empty + "This should not disappear until an hediff is still there"; + } + } + + private bool blockAction = false; + + private int graceTime = 999; + + public bool foundFault = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_PostRemoveTrigger_HediffAdd.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_PostRemoveTrigger_HediffAdd.cs new file mode 100644 index 0000000..5107726 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_PostRemoveTrigger_HediffAdd.cs @@ -0,0 +1,99 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_PostRemoveTrigger_HediffAdd : HediffComp + { + public HediffCompProperties_PostRemoveTrigger_HediffAdd Props + { + get + { + return (HediffCompProperties_PostRemoveTrigger_HediffAdd)this.props; + } + } + + public void CheckProps() + { + bool flag = !this.HasHediffToApply; + if (flag) + { + this.blockAction = true; + Tools.DestroyParentHediff(this.parent, this.Props.debug); + } + } + + public bool HasHediffToApply + { + get + { + return !this.Props.triggeredHediff.NullOrEmpty(); + } + } + + public void ApplyHediff(Pawn pawn) + { + checked + { + for (int i = 0; i < this.Props.triggeredHediff.Count; i++) + { + HediffDef hediffDef = this.Props.triggeredHediff[i]; + bool flag = hediffDef == null; + if (flag) + { + Tools.Warn("cant find hediff; i=" + i, true); + break; + } + Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn, null); + bool flag2 = hediff == null; + if (flag2) + { + Tools.Warn("cant create hediff " + hediffDef.defName, true); + break; + } + Tools.Warn("Adding " + hediffDef.defName + "for science", this.Props.debug); + pawn.health.AddHediff(hediff, null, null, null); + } + } + } + + public override void CompPostPostRemoved() + { + Pawn pawn = this.parent.pawn; + bool flag = !Tools.OkPawn(pawn); + if (flag) + { + Tools.DestroyParentHediff(this.parent, this.Props.debug); + } + else + { + bool flag2 = this.blockAction; + if (!flag2) + { + Tools.Warn(this.parent.def.defName + " is no more, applying hediff", this.Props.debug); + bool hasHediffToApply = this.HasHediffToApply; + if (hasHediffToApply) + { + this.ApplyHediff(pawn); + } + } + } + } + + public override string CompTipStringExtra + { + get + { + string text = string.Empty; + bool debug = this.Props.debug; + if (debug) + { + text = text + this.parent.def.defName + " is still alive, aperture science we do what we must"; + } + return text; + } + } + + private bool blockAction = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_RainbowTrail.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_RainbowTrail.cs new file mode 100644 index 0000000..fe998d8 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_RainbowTrail.cs @@ -0,0 +1,514 @@ +using System; +using System.Collections.Generic; +using RimWorld; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_RainbowTrail : HediffComp + { + public HediffCompProperties_RainbowTrail Props + { + get + { + return (HediffCompProperties_RainbowTrail)this.props; + } + } + + public override void CompPostMake() + { + bool hideBySeverity = this.Props.hideBySeverity; + if (hideBySeverity) + { + this.parent.Severity = 0.05f; + } + this.myDebug = this.Props.debug; + this.Init(this.myDebug); + } + + public override void CompExposeData() + { + Scribe_Values.Look(ref this.ticksLeft, "ticksLeft", 0, false); + Scribe_Values.Look(ref this.curColor, "curColor", HediffComp_RainbowTrail.RainbowColor.purple, false); + Scribe_Values.Look(ref this.variation, "variation", 0, false); + Scribe_Values.Look(ref this.myDebug, "debug", false, false); + } + + public override void CompPostTick(ref float severityAdjustment) + { + this.SetPawnAndMap(); + bool flag = this.myPawn == null || this.myMap == null || this.blockAction; + checked + { + if (flag) + { + Tools.Warn(string.Concat(new string[] + { + "null tick - pawn: ", + (this.myPawn == null).ToString(), + "myMap: ", + (this.myMap == null).ToString(), + "blockAction: ", + this.blockAction.ToString() + }), this.myDebug); + } + else + { + bool flag2 = this.moteDef.NullOrEmpty(); + if (flag2) + { + Tools.Warn("empty moteDef", this.myDebug); + this.Init(this.myDebug); + } + TerrainDef terrain = this.myPawn.Position.GetTerrain(this.myPawn.Map); + bool flag3 = terrain == null || terrain.IsWater || this.myPawn.Map.snowGrid.GetDepth(this.myPawn.Position) >= 0.4f || !this.myPawn.Position.InBounds(this.myMap); + if (flag3) + { + Tools.Warn(string.Concat(new object[] + { + this.myPawn, + "'s ", + this.parent.def.defName, + " is blocked by terrain" + }), this.myDebug); + } + else + { + bool flag4 = this.ticksLeft <= 0; + if (flag4) + { + bool flag5 = this.TryPlaceMote(); + if (flag5) + { + this.sameColorInRow++; + bool flag6 = this.sameColorInRow >= this.Props.minTimesSameColor || this.sameColorInRow > this.Props.maxTimesSameColor || !Rand.Chance(this.Props.staySameColorChance); + if (flag6) + { + bool threeColorsGradient = this.Props.threeColorsGradient; + if (threeColorsGradient) + { + this.NextColorThreeColors(); + } + else + { + this.NextColorRainbow(); + } + Tools.Warn(string.Concat(new object[] + { + this.myPawn, + "'s ", + this.parent.def.defName, + " now uses ", + this.curColor, + "after ", + this.sameColorInRow, + "puddles" + }), this.myDebug); + this.SetMoteDef(); + this.sameColorInRow = 0; + } + this.Reset(); + } + else + { + Tools.Warn(string.Concat(new object[] + { + this.myPawn, + "'s ", + this.parent.def.defName, + "failed to TryPlaceMote" + }), this.myDebug); + } + } + else + { + this.ticksLeft--; + } + } + } + } + } + + public void SetMoteDef() + { + switch (this.curColor) + { + case HediffComp_RainbowTrail.RainbowColor.purple: + this.moteDef = this.Props.motePurpleDef; + break; + case HediffComp_RainbowTrail.RainbowColor.blue: + this.moteDef = this.Props.moteBlueDef; + break; + case HediffComp_RainbowTrail.RainbowColor.green: + this.moteDef = this.Props.moteGreenDef; + break; + case HediffComp_RainbowTrail.RainbowColor.yellow: + this.moteDef = this.Props.moteYellowDef; + break; + case HediffComp_RainbowTrail.RainbowColor.orange: + this.moteDef = this.Props.moteOrangeDef; + break; + case HediffComp_RainbowTrail.RainbowColor.red: + this.moteDef = this.Props.moteRedDef; + break; + } + } + + public void NextColorRainbow() + { + checked + { + this.curColor += this.variation; + bool flag = this.Props.cycleKind == HediffComp_RainbowTrail.CycleKind.circular; + if (flag) + { + bool flag2 = this.curColor > HediffComp_RainbowTrail.RainbowColor.red; + if (flag2) + { + this.curColor = HediffComp_RainbowTrail.RainbowColor.purple; + } + else + { + bool flag3 = this.curColor < HediffComp_RainbowTrail.RainbowColor.purple; + if (flag3) + { + this.curColor = HediffComp_RainbowTrail.RainbowColor.red; + } + } + } + else + { + bool flag4 = this.Props.cycleKind == HediffComp_RainbowTrail.CycleKind.bouncing; + if (flag4) + { + bool flag5 = this.curColor > HediffComp_RainbowTrail.RainbowColor.red; + if (flag5) + { + this.variation = -1; + this.curColor = HediffComp_RainbowTrail.RainbowColor.orange; + } + else + { + bool flag6 = this.curColor < HediffComp_RainbowTrail.RainbowColor.purple; + if (flag6) + { + this.variation = 1; + this.curColor = HediffComp_RainbowTrail.RainbowColor.blue; + } + } + } + else + { + bool flag7 = this.Props.cycleKind == HediffComp_RainbowTrail.CycleKind.random; + if (flag7) + { + this.curColor = (HediffComp_RainbowTrail.RainbowColor)Rand.Range(0, 6); + } + } + } + } + } + + public void NextColorThreeColors() + { + checked + { + this.curColor += this.variation; + bool flag = this.Props.cycleKind == HediffComp_RainbowTrail.CycleKind.circular; + if (flag) + { + bool flag2 = this.curColor > this.topColor; + if (flag2) + { + this.curColor = this.bottomColor; + } + else + { + bool flag3 = this.curColor < this.bottomColor; + if (flag3) + { + this.curColor = this.topColor; + } + } + } + else + { + bool flag4 = this.Props.cycleKind == HediffComp_RainbowTrail.CycleKind.bouncing; + if (flag4) + { + bool flag5 = this.curColor > this.topColor; + if (flag5) + { + this.variation = -1; + this.curColor = this.pivotColor; + } + else + { + bool flag6 = this.curColor < HediffComp_RainbowTrail.RainbowColor.purple; + if (flag6) + { + this.variation = 1; + this.curColor = this.pivotColor; + } + } + } + else + { + bool flag7 = this.Props.cycleKind == HediffComp_RainbowTrail.CycleKind.random; + if (flag7) + { + bool flag8 = Rand.Chance(0.33f); + if (flag8) + { + this.curColor = this.pivotColor; + } + else + { + bool flag9 = Rand.Chance(0.5f); + if (flag9) + { + this.curColor = this.topColor; + } + else + { + this.curColor = this.bottomColor; + } + } + } + } + } + } + } + + private void SetPawnAndMap() + { + this.myPawn = this.parent.pawn; + this.myMap = this.myPawn.Map; + } + + public HediffComp_RainbowTrail.RainbowColor ColorTranslation(Color myColor) + { + bool flag = myColor == MyGfx.Purple; + HediffComp_RainbowTrail.RainbowColor result; + if (flag) + { + result = HediffComp_RainbowTrail.RainbowColor.purple; + } + else + { + bool flag2 = myColor == MyGfx.Blue; + if (flag2) + { + result = HediffComp_RainbowTrail.RainbowColor.blue; + } + else + { + bool flag3 = myColor == MyGfx.Green; + if (flag3) + { + result = HediffComp_RainbowTrail.RainbowColor.green; + } + else + { + bool flag4 = myColor == MyGfx.Yellow; + if (flag4) + { + result = HediffComp_RainbowTrail.RainbowColor.yellow; + } + else + { + bool flag5 = myColor == MyGfx.Orange; + if (flag5) + { + result = HediffComp_RainbowTrail.RainbowColor.orange; + } + else + { + bool flag6 = myColor == MyGfx.Red; + if (flag6) + { + result = HediffComp_RainbowTrail.RainbowColor.red; + } + else + { + Tools.Warn(this.myPawn.LabelShort + " could not ColorTranslation, default value", this.myDebug); + result = HediffComp_RainbowTrail.RainbowColor.blue; + } + } + } + } + } + } + return result; + } + + public void Init(bool myDebug = false) + { + this.SetPawnAndMap(); + Tools.Warn(string.Concat(new object[] + { + this.myPawn, + "'s ", + this.parent.def.defName, + " Init" + }), myDebug); + bool flag = this.Props.motePurpleDef.NullOrEmpty() || this.Props.moteBlueDef.NullOrEmpty() || this.Props.moteGreenDef.NullOrEmpty() || this.Props.moteYellowDef.NullOrEmpty() || this.Props.moteOrangeDef.NullOrEmpty() || this.Props.moteRedDef.NullOrEmpty(); + if (flag) + { + this.blockAction = true; + this.parent.Severity = 0f; + } + switch (this.Props.colorChoice) + { + case HediffComp_RainbowTrail.ColorChoice.pawnColor: + { + Color myColor = GfxEffects.ClosestColor(this.myPawn, false, myDebug); + this.pivotColor = (this.curColor = this.ColorTranslation(myColor)); + break; + } + case HediffComp_RainbowTrail.ColorChoice.complementary: + { + Color myColor2 = GfxEffects.ClosestColor(this.myPawn, true, myDebug); + this.pivotColor = (this.curColor = this.ColorTranslation(myColor2)); + break; + } + case HediffComp_RainbowTrail.ColorChoice.random: + this.pivotColor = (this.curColor = (HediffComp_RainbowTrail.RainbowColor)Rand.Range(0, 6)); + break; + } + checked + { + this.bottomColor = this.pivotColor - 1; + this.topColor = this.pivotColor + 1; + bool flag2 = this.topColor > HediffComp_RainbowTrail.RainbowColor.red; + if (flag2) + { + this.topColor = HediffComp_RainbowTrail.RainbowColor.purple; + } + bool flag3 = this.bottomColor < HediffComp_RainbowTrail.RainbowColor.purple; + if (flag3) + { + this.bottomColor = HediffComp_RainbowTrail.RainbowColor.red; + } + Tools.Warn(string.Concat(new object[] + { + this.myPawn, + "'s ", + this.parent.def.defName, + " bottom: ", + this.bottomColor, + " pivot: ", + this.pivotColor, + " top: ", + this.topColor + }), myDebug); + this.SetMoteDef(); + } + } + + public static void PlacePuddle(Vector3 loc, Map map, float rot, float scale, ThingDef Mote_FootprintDef) + { + bool flag = !loc.ShouldSpawnMotesAt(map, true) || map.moteCounter.SaturatedLowPriority; + if (!flag) + { + MoteThrown moteThrown = (MoteThrown)ThingMaker.MakeThing(Mote_FootprintDef, null); + moteThrown.Scale = scale; + moteThrown.exactRotation = rot; + moteThrown.exactPosition = loc; + GenSpawn.Spawn(moteThrown, loc.ToIntVec3(), map, WipeMode.Vanish); + } + } + + private bool TryPlaceMote() + { + Vector3 drawPos = this.myPawn.Drawer.DrawPos; + Vector3 normalized = (drawPos - this.lastFootprintPlacePos).normalized; + float rot = normalized.AngleFlat(); + Vector3 vector = this.myPawn.TrueCenter() + HediffComp_RainbowTrail.PuddleOffset; + IntVec3 c = vector.ToIntVec3(); + bool flag = c.InBounds(this.myMap); + if (flag) + { + TerrainDef terrain = c.GetTerrain(this.myPawn.Map); + bool flag2 = terrain != null; + if (flag2) + { + HediffComp_RainbowTrail.PlacePuddle(vector, this.myMap, rot, this.Props.scale.RandomInRange, this.moteDef.RandomElement()); + return true; + } + } + this.lastFootprintPlacePos = drawPos; + return false; + } + + private void Reset() + { + this.ticksLeft = this.Props.period; + } + + private Pawn myPawn = null; + + private Map myMap = null; + + private Vector3 lastFootprintPlacePos; + + private static readonly Vector3 PuddleOffset = new Vector3(0f, 0f, -0.3f); + + private int ticksLeft; + + private List moteDef = null; + + private HediffComp_RainbowTrail.RainbowColor curColor = HediffComp_RainbowTrail.RainbowColor.purple; + + private int sameColorInRow = 0; + + public HediffComp_RainbowTrail.RainbowColor bottomColor; + + public HediffComp_RainbowTrail.RainbowColor pivotColor; + + public HediffComp_RainbowTrail.RainbowColor topColor; + + private int variation = 1; + + private bool blockAction = false; + + private bool myDebug = false; + + public enum RainbowColor + { + [Description("purple")] + purple, + [Description("blue")] + blue, + [Description("green")] + green, + [Description("yellow")] + yellow, + [Description("orange")] + orange, + [Description("red")] + red + } + + public enum ColorChoice + { + [Description("pawnColor")] + pawnColor, + [Description("complementary")] + complementary, + [Description("random")] + random + } + + public enum CycleKind + { + [Description("circular")] + circular, + [Description("bouncing")] + bouncing, + [Description("random")] + random + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_RandySpawnUponDeath.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_RandySpawnUponDeath.cs new file mode 100644 index 0000000..893ed2e --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_RandySpawnUponDeath.cs @@ -0,0 +1,587 @@ +using System; +using System.Collections.Generic; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_RandySpawnUponDeath : HediffComp + { + public HediffCompProperties_RandySpawnUponDeath Props + { + get + { + return (HediffCompProperties_RandySpawnUponDeath)this.props; + } + } + + public bool MyDebug + { + get + { + return this.Props.debug; + } + } + + public bool ValidIndex + { + get + { + return this.RandomIndex != -1 && this.Props.settings.HasSomethingToSpawn && this.RandomIndex < this.NumberOfItems; + } + } + + public bool ValidQuantity + { + get + { + return this.RandomQuantity > 0; + } + } + + public ThingSettings ChosenItem + { + get + { + return this.ValidIndex ? this.Props.settings.things[this.RandomIndex] : null; + } + } + + public bool HasRequirement + { + get + { + return this.Props.HasRequirements && this.Props.requirements.HasAtLeastOneRequirementSetting; + } + } + + public bool HasHediffRequirement + { + get + { + return this.Props.HasRequirements && this.Props.requirements.HasHediffRequirement; + } + } + + public bool HasThingRequirement + { + get + { + return this.Props.HasRequirements && this.Props.requirements.HasThingRequirement; + } + } + + public bool HasCustomSpawn + { + get + { + bool result; + if (this.HasThingRequirement) + { + result = this.Props.requirements.thing.Any((ThingRequirementSettings t) => t.HasCustomSpawn); + } + else + { + result = false; + } + return result; + } + } + + public bool HasContainerSpawn + { + get + { + bool result; + if (this.HasThingRequirement) + { + result = this.Props.requirements.thing.Any((ThingRequirementSettings t) => t.HasContainerSpawn); + } + else + { + result = false; + } + return result; + } + } + + public bool HasChosenThing + { + get + { + return this.ChosenItem != null && this.ChosenItem.thingToSpawn != null; + } + } + + public bool HasChosenPawn + { + get + { + return this.ChosenItem != null && (this.ChosenItem.pawnKindToSpawn != null || this.IsParentPawnKindCopier); + } + } + + public bool IsParentPawnKindCopier + { + get + { + return this.ChosenItem.IsCopier && this.ChosenItem.copyParent.pawnKind; + } + } + + public bool PrecedentIterationsExclusion + { + get + { + return this.Props.excludeAlreadyPickedOptions; + } + } + + public bool HasColorCondition + { + get + { + return this.Props.settings.things.Any((ThingSettings t) => t.HasColorCondition); + } + } + + public ThingDef ThingOfChoice + { + get + { + return this.HasChosenThing ? this.ChosenItem.thingToSpawn : null; + } + } + + public List FullOptionList + { + get + { + return this.Props.settings.things; + } + } + + public PawnKindDef PawnOfChoice + { + get + { + bool flag = !this.HasChosenPawn; + PawnKindDef result; + if (flag) + { + result = null; + } + else + { + bool isParentPawnKindCopier = this.IsParentPawnKindCopier; + if (isParentPawnKindCopier) + { + result = base.Pawn.kindDef; + } + else + { + result = this.ChosenItem.pawnKindToSpawn; + } + } + return result; + } + } + + public bool HasFilth + { + get + { + return this.FilthToSpawn != null; + } + } + + public int NumberOfItems + { + get + { + return this.Props.settings.things.Count; + } + } + + public int NumberToSpawn + { + get + { + bool flag = this.HasChosenThing && this.ChosenItem.HasStackSettings; + int result; + if (flag) + { + result = this.ChosenItem.specificSettings.stack.spawnCount.RandomInRange; + } + else + { + bool hasDefaultSettings = this.Props.settings.HasDefaultSettings; + if (hasDefaultSettings) + { + result = this.Props.settings.defaultSettings.stack.spawnCount.RandomInRange; + } + else + { + result = 1; + } + } + return result; + } + } + + public bool WeightedSpawn + { + get + { + bool flag = this.HasChosenThing && this.ChosenItem.HasStackSettings; + bool result; + if (flag) + { + result = this.ChosenItem.specificSettings.stack.weightedSpawnCount; + } + else + { + bool hasDefaultSettings = this.Props.settings.HasDefaultSettings; + result = (hasDefaultSettings && this.Props.settings.defaultSettings.stack.weightedSpawnCount); + } + return result; + } + } + + public ThingDef FilthToSpawn + { + get + { + bool flag = this.HasChosenThing && this.ChosenItem.HasFilthSettings; + ThingDef result; + if (flag) + { + result = this.ChosenItem.specificSettings.filth.filthDef; + } + else + { + bool hasDefaultSettings = this.Props.settings.HasDefaultSettings; + if (hasDefaultSettings) + { + result = this.Props.settings.defaultSettings.filth.filthDef; + } + else + { + result = null; + } + } + return result; + } + } + + public FloatRange FilthRadius + { + get + { + bool flag = this.HasChosenThing && this.ChosenItem.HasFilthSettings; + FloatRange result; + if (flag) + { + result = this.ChosenItem.specificSettings.filth.filthRadius; + } + else + { + bool hasDefaultSettings = this.Props.settings.HasDefaultSettings; + if (hasDefaultSettings) + { + result = this.Props.settings.defaultSettings.filth.filthRadius; + } + else + { + result = new FloatRange(0f, 1f); + } + } + return result; + } + } + + public IntRange FilthNum + { + get + { + bool flag = this.HasChosenThing && this.ChosenItem.HasFilthSettings; + IntRange result; + if (flag) + { + result = this.ChosenItem.specificSettings.filth.filthNum; + } + else + { + bool hasDefaultSettings = this.Props.settings.HasDefaultSettings; + if (hasDefaultSettings) + { + result = this.Props.settings.defaultSettings.filth.filthNum; + } + else + { + result = new IntRange(0, 0); + } + } + return result; + } + } + + public override void CompPostMake() + { + bool myDebug = this.MyDebug; + if (myDebug) + { + string[] array = new string[5]; + array[0] = ">>> "; + int num = 1; + Pawn pawn = base.Pawn; + array[num] = ((pawn != null) ? pawn.Label : null); + array[2] = " - "; + array[3] = this.parent.def.defName; + array[4] = " - CompPostMake start"; + Log.Warning(string.Concat(array)); + } + } + + public override void Notify_PawnDied(DamageInfo? dinfo, Hediff culprit = null) + { + string text = this.MyDebug ? (base.Pawn.LabelShort + " HediffComp_RandySpawnUponDeath Notify_PawnDied") : ""; + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning(text + " Entering"); + } + bool flag = false; + bool flag2 = base.Pawn.Corpse.Negligible(); + if (flag2) + { + bool myDebug2 = this.MyDebug; + if (myDebug2) + { + Log.Warning(text + " Corpse is no more, cant find its position - giving up"); + } + flag = true; + } + bool flag3 = this.blockSpawn; + if (flag3) + { + bool myDebug3 = this.MyDebug; + if (myDebug3) + { + Log.Warning(text + " blockSpawn for some reason- giving up"); + } + flag = true; + } + Thing closestThing; + bool flag4 = !this.FulfilsRequirement(out closestThing); + if (flag4) + { + bool myDebug4 = this.MyDebug; + if (myDebug4) + { + Log.Warning(text + "not Fulfiling requirements- giving up"); + } + flag = true; + } + bool flag5 = flag; + checked + { + if (flag5) + { + base.Notify_PawnDied(dinfo, culprit); + } + else + { + int randomInRange = this.Props.iterationRange.RandomInRange; + List list = new List(); + bool myDebug5 = this.MyDebug; + if (myDebug5) + { + Log.Warning(text + "iterationNum: " + randomInRange); + } + for (int i = 0; i < randomInRange; i++) + { + bool myDebug6 = this.MyDebug; + if (myDebug6) + { + Log.Warning(string.Concat(new object[] + { + text, + " Trying to spawn ", + i, + "/", + randomInRange - 1 + })); + } + bool flag6 = !this.DiceThrow(list); + if (flag6) + { + bool myDebug7 = this.MyDebug; + if (myDebug7) + { + Log.Warning(text + " DiceThrow wrong results"); + } + base.Notify_PawnDied(dinfo, culprit); + return; + } + bool myDebug8 = this.MyDebug; + if (myDebug8) + { + Log.Warning(string.Concat(new object[] + { + text, + " index: ", + this.RandomIndex, + " quantity: ", + this.RandomQuantity, + " nature: ", + this.ChosenItem.ItemDump + })); + } + bool precedentIterationsExclusion = this.PrecedentIterationsExclusion; + if (precedentIterationsExclusion) + { + list.Add(this.RandomIndex); + } + bool flag7 = this.CheckShouldSpawn(closestThing); + if (flag7) + { + bool myDebug9 = this.MyDebug; + if (myDebug9) + { + Log.Warning(string.Concat(new object[] + { + text, + " Spawn ", + i, + "/", + randomInRange - 1, + " occured nature: t:", + this.ChosenItem.ItemDump + })); + } + } + bool myDebug10 = this.MyDebug; + if (myDebug10) + { + Log.Warning("#################"); + } + } + bool flag8 = this.CheckShouldHandleCorpse(); + if (flag8) + { + bool myDebug11 = this.MyDebug; + if (myDebug11) + { + Log.Warning(text + " Corpse handled"); + } + } + base.Notify_PawnDied(dinfo, culprit); + } + } + } + + public bool DiceThrow(List AlreadyPickedOptions) + { + this.RandomIndex = this.GetWeightedRandomIndex(AlreadyPickedOptions); + bool flag = this.HasChosenPawn && this.ChosenItem.HasFactionParams; + if (flag) + { + this.ComputeRandomFaction(); + } + this.RandomQuantity = this.ComputeSpawnCount(); + bool flag2 = !this.ValidIndex; + bool result; + if (flag2) + { + this.BlockAndDestroy(">ERROR< failed to find an index for IP, check and adjust your hediff props", this.MyDebug); + result = false; + } + else + { + bool flag3 = !this.ValidQuantity; + if (flag3) + { + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning("random quantity: " + this.RandomQuantity + " - impossible to spawn anything"); + } + result = false; + } + else + { + result = true; + } + } + return result; + } + + public void BlockAndDestroy(string ErrorLog = "", bool myDebug = false) + { + bool flag = this.MyDebug && !ErrorLog.NullOrEmpty(); + if (flag) + { + Log.Warning(ErrorLog); + } + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, myDebug); + } + + private bool CheckShouldSpawn(Thing closestThing) + { + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning(base.Pawn.LabelShort + " CheckShouldSpawn"); + } + bool myDebug2 = this.MyDebug; + if (myDebug2) + { + Log.Warning(string.Concat(new object[] + { + " Trying to spawn ", + this.RandomQuantity, + " ", + this.ThingOfChoice, + "/", + this.PawnOfChoice + })); + } + Thing thing = this.HasCustomSpawn ? closestThing : base.Pawn.Corpse; + bool result = this.TryDoSpawn(thing, this.RandomQuantity); + bool myDebug3 = this.MyDebug; + if (myDebug3) + { + Log.Warning("TryDoSpawn: " + result.ToString()); + } + return result; + } + + private bool CheckShouldHandleCorpse() + { + Corpse corpse = base.Pawn.Corpse; + bool flag = false; + flag |= this.StripCorpse(corpse); + return flag | this.DestroyCorpse(corpse); + } + + private bool blockSpawn = false; + + private int RandomIndex = -1; + + public Faction RandomFaction = null; + + public MentalStateDef RandomMS = null; + + private int RandomQuantity = 0; + + public readonly float minDaysB4NextErrorLimit = 0.001f; + + public readonly int spawnCountErrorLimit = 750; + + public Pawn_SkillTracker rememberSkillTracker = null; + + public int lastSkillUpdateTick = -1; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_RandySpawner.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_RandySpawner.cs new file mode 100644 index 0000000..beea1ea --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_RandySpawner.cs @@ -0,0 +1,450 @@ +using System; +using System.Collections.Generic; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_RandySpawner : HediffComp + { + public HediffCompProperties_RandySpawner Props + { + get + { + return (HediffCompProperties_RandySpawner)this.props; + } + } + + public bool MyDebug + { + get + { + return this.Props.debug; + } + } + + public bool HasGraceDelay + { + get + { + return this.graceTicks > 0; + } + } + + private float CalculatedDaysB4Next + { + get + { + return (float)this.ticksUntilSpawn / 60000f; + } + } + + public ItemParameter CurIP + { + get + { + return (this.pickedItem != -1 && !this.Props.itemParameters.NullOrEmpty() && this.pickedItem < this.Props.itemParameters.Count) ? this.Props.itemParameters[this.pickedItem] : null; + } + } + + public bool HasValidIP + { + get + { + return this.CurIP != null; + } + } + + public bool RequiresFood + { + get + { + return this.Props.hungerRelative && base.Pawn.IsHungry(this.MyDebug); + } + } + + public bool RequiresHealth + { + get + { + return this.Props.healthRelative && base.Pawn.IsInjured(this.MyDebug); + } + } + + public override void CompExposeData() + { + Scribe_Values.Look(ref this.ticksUntilSpawn, "ticksUntilSpawn", 0, false); + Scribe_Values.Look(ref this.initialTicksUntilSpawn, "initialTicksUntilSpawn", 0, false); + Scribe_Values.Look(ref this.calculatedQuantity, "calculatedQuantity", 0, false); + Scribe_Values.Look(ref this.hungerReset, "LTF_hungerReset", 0, false); + Scribe_Values.Look(ref this.healthReset, "LTF_healthReset", 0, false); + Scribe_Values.Look(ref this.graceTicks, "graceTicks", 0, false); + Scribe_Values.Look(ref this.pickedItem, "pickedItem", 0, false); + } + + public override void CompPostMake() + { + string[] array = new string[5]; + array[0] = ">>> "; + int num = 1; + Pawn pawn = base.Pawn; + array[num] = ((pawn != null) ? pawn.Label : null); + array[2] = " - "; + array[3] = this.parent.def.defName; + array[4] = " - CompPostMake start"; + Tools.Warn(string.Concat(array), this.MyDebug); + this.DumpProps(); + this.CheckProps(); + this.CalculateValues(); + this.CheckCalculatedValues(); + this.DumpCalculatedValues(); + } + + public override void CompPostTick(ref float severityAdjustment) + { + bool flag = base.Pawn.Negligible(); + checked + { + if (!flag) + { + bool flag2 = this.blockSpawn; + if (!flag2) + { + bool hasGraceDelay = this.HasGraceDelay; + if (hasGraceDelay) + { + this.graceTicks--; + } + else + { + bool flag3 = this.SetRequirementGraceTicks(); + if (!flag3) + { + bool flag4 = this.CheckShouldSpawn(); + if (flag4) + { + Tools.Warn("Reseting countdown bc spawned thing", this.MyDebug); + this.CalculateValues(); + this.CheckCalculatedValues(); + } + } + } + } + } + } + } + + private void CalculateValues() + { + this.pickedItem = this.GetWeightedRandomIndex(); + bool hasValidIP = this.HasValidIP; + if (hasValidIP) + { + this.CurIP.ComputeRandomParameters(out this.ticksUntilSpawn, out this.graceTicks, out this.calculatedQuantity); + bool hasFactionParams = this.CurIP.HasFactionParams; + if (hasFactionParams) + { + this.ComputeRandomFaction(); + } + } + else + { + this.BlockAndDestroy(">ERROR< failed to find an index for IP, check and adjust your hediff props", this.MyDebug); + } + } + + private void CheckCalculatedValues() + { + bool flag = this.calculatedQuantity > this.spawnCountErrorLimit; + if (flag) + { + this.BlockAndDestroy(string.Concat(new object[] + { + ">ERROR< calculatedQuantity is too high: ", + this.calculatedQuantity, + "(>", + this.spawnCountErrorLimit, + "), check and adjust your hediff props" + }), this.MyDebug); + } + else + { + bool flag2 = this.CalculatedDaysB4Next < this.minDaysB4NextErrorLimit; + if (flag2) + { + this.BlockAndDestroy(string.Concat(new object[] + { + ">ERROR< calculatedMinDaysB4Next is too low: ", + this.CalculatedDaysB4Next, + "(<", + this.minDaysB4NextErrorLimit, + "), check and adjust your hediff props" + }), this.MyDebug); + } + } + } + + private void DumpCalculatedValues() + { + Tools.Warn(string.Concat(new object[] + { + "<<< calculatedDaysB4Next: ", + this.CalculatedDaysB4Next, + "; CalculatedQuantity: ", + this.calculatedQuantity, + "; " + }), this.MyDebug); + } + + public void BlockAndDestroy(string ErrorLog = "", bool myDebug = false) + { + Tools.Warn(ErrorLog, myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, myDebug); + } + + private bool CheckShouldSpawn() + { + checked + { + this.ticksUntilSpawn--; + bool flag = this.ticksUntilSpawn <= 0; + bool result; + if (flag) + { + bool flag2 = this.TryDoSpawn(); + Tools.Warn("TryDoSpawn: " + flag2.ToString(), this.MyDebug); + bool flag3 = flag2; + if (flag3) + { + this.pickedItem = -1; + } + result = flag2; + } + else + { + result = false; + } + return result; + } + } + + public bool TrySpawnPawn() + { + PawnGenerationRequest request = new PawnGenerationRequest(this.CurIP.pawnKindToSpawn, this.Itemfaction, PawnGenerationContext.NonPlayer, -1, false, this.newBorn, false, true, false, 1f, false, true, false, true, true, false, false, false, false, 0f, 0f, null, 1f, null, null, null, null, null, null, null, null, null, null, null, null, false, false, false, false, null, null, null, null, null, 0f, DevelopmentalStage.Adult, null, null, null, false, false, false, -1, 0, false); + checked + { + for (int i = 0; i < this.calculatedQuantity; i++) + { + Pawn newThing = PawnGenerator.GeneratePawn(request); + GenSpawn.Spawn(newThing, base.Pawn.Position, base.Pawn.Map, WipeMode.Vanish); + bool hasFilth = this.CurIP.HasFilth; + if (hasFilth) + { + FilthMaker.TryMakeFilth(this.parent.pawn.Position, this.parent.pawn.Map, this.CurIP.filthDef, 1, FilthSourceFlags.None, true); + } + } + return true; + } + } + + public bool TryDoSpawn() + { + bool flag = base.Pawn.Negligible(); + checked + { + bool result; + if (flag) + { + Tools.Warn("TryDoSpawn - pawn null", this.MyDebug); + result = false; + } + else + { + bool pawnSpawner = this.CurIP.PawnSpawner; + if (pawnSpawner) + { + result = this.TrySpawnPawn(); + } + else + { + bool thingSpawner = this.CurIP.ThingSpawner; + if (thingSpawner) + { + bool flag2 = this.Props.spawnMaxAdjacent >= 0; + if (flag2) + { + int num = 0; + for (int i = 0; i < 9; i++) + { + IntVec3 c = base.Pawn.Position + GenAdj.AdjacentCellsAndInside[i]; + bool flag3 = !c.InBounds(base.Pawn.Map); + if (!flag3) + { + List thingList = c.GetThingList(base.Pawn.Map); + for (int j = 0; j < thingList.Count; j++) + { + bool flag4 = thingList[j].def == this.CurIP.thingToSpawn; + if (flag4) + { + num += thingList[j].stackCount; + bool flag5 = num >= this.Props.spawnMaxAdjacent; + if (flag5) + { + return false; + } + } + } + } + } + } + } + int k = 0; + int num2 = this.calculatedQuantity; + int num3 = 0; + while (k < this.calculatedQuantity) + { + IntVec3 intVec; + bool flag6 = this.TryFindSpawnCell(out intVec); + if (flag6) + { + Thing thing = ThingMaker.MakeThing(this.CurIP.thingToSpawn, null); + thing.stackCount = num2; + bool flag7 = thing.def.stackLimit > 0; + if (flag7) + { + bool flag8 = thing.stackCount > thing.def.stackLimit; + if (flag8) + { + thing.stackCount = thing.def.stackLimit; + } + } + k += thing.stackCount; + num2 -= thing.stackCount; + Thing t; + GenPlace.TryPlaceThing(thing, intVec, base.Pawn.Map, ThingPlaceMode.Direct, ref t, null, null, default(Rot4)); + bool spawnForbidden = this.Props.spawnForbidden; + if (spawnForbidden) + { + t.SetForbidden(true, true); + } + } + bool flag9 = num3++ > 10; + if (flag9) + { + Tools.Warn("Had to break the loop", this.MyDebug); + return false; + } + } + bool flag10 = num2 <= 0; + result = flag10; + } + } + return result; + } + } + + public override string CompTipStringExtra + { + get + { + string text = string.Empty; + bool flag = !this.HasValidIP || !this.Props.logNextSpawn; + string result; + if (flag) + { + result = text; + } + else + { + bool hasGraceDelay = this.HasGraceDelay; + if (hasGraceDelay) + { + bool pawnSpawner = this.CurIP.PawnSpawner; + if (pawnSpawner) + { + text = " No " + this.CurIP.pawnKindToSpawn.label + " for " + this.graceTicks.ToStringTicksToPeriod(true, false, true, true, false); + } + else + { + bool thingSpawner = this.CurIP.ThingSpawner; + if (thingSpawner) + { + text = " No " + this.CurIP.thingToSpawn.label + " for " + this.graceTicks.ToStringTicksToPeriod(true, false, true, true, false); + } + } + bool flag2 = this.hungerReset > 0; + if (flag2) + { + text += "(hunger)"; + } + else + { + bool flag3 = this.healthReset > 0; + if (flag3) + { + text += "(injury)"; + } + else + { + text += "(grace period)"; + } + } + } + else + { + text = this.ticksUntilSpawn.ToStringTicksToPeriod(true, false, true, true, false) + " before "; + bool pawnSpawner2 = this.CurIP.PawnSpawner; + if (pawnSpawner2) + { + text += this.CurIP.pawnKindToSpawn.label; + } + else + { + bool thingSpawner2 = this.CurIP.ThingSpawner; + if (thingSpawner2) + { + text += this.CurIP.thingToSpawn.label; + } + } + text = string.Concat(new object[] + { + text, + " ", + this.CurIP.spawnVerb, + "(", + this.calculatedQuantity, + "x)" + }); + } + result = text; + } + return result; + } + } + + private int ticksUntilSpawn; + + private int initialTicksUntilSpawn = 0; + + public int graceTicks = 0; + + public int calculatedQuantity; + + public int hungerReset = 0; + + public int healthReset = 0; + + private bool blockSpawn = false; + + private int pickedItem = -1; + + public Faction Itemfaction = null; + + public bool newBorn = false; + + public readonly float minDaysB4NextErrorLimit = 0.001f; + + public readonly int spawnCountErrorLimit = 750; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_Spawner.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_Spawner.cs new file mode 100644 index 0000000..199ea8a --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_Spawner.cs @@ -0,0 +1,778 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_Spawner : HediffComp + { + public HediffCompProperties_Spawner Props + { + get + { + return (HediffCompProperties_Spawner)this.props; + } + } + + public override void CompExposeData() + { + Scribe_Values.Look(ref this.ticksUntilSpawn, "ticksUntilSpawn", 0, false); + Scribe_Values.Look(ref this.initialTicksUntilSpawn, "initialTicksUntilSpawn", 0, false); + Scribe_Values.Look(ref this.calculatedMinDaysB4Next, "calculatedMinDaysB4Next", 0f, false); + Scribe_Values.Look(ref this.calculatedMaxDaysB4Next, "calculatedMaxDaysB4Next", 0f, false); + Scribe_Values.Look(ref this.calculatedQuantity, "calculatedQuantity", 0, false); + Scribe_Values.Look(ref this.graceTicks, "graceTicks", 0, false); + } + + public override void CompPostMake() + { + this.myDebug = this.Props.debug; + Tools.Warn(string.Concat(new string[] + { + ">>> ", + this.parent.pawn.Label, + " - ", + this.parent.def.defName, + " - CompPostMake start" + }), this.myDebug); + this.TraceProps(); + this.CheckProps(); + this.CalculateValues(); + this.CheckCalculatedValues(); + this.TraceCalculatedValues(); + bool flag = this.initialTicksUntilSpawn == 0; + if (flag) + { + Tools.Warn("Reseting countdown bc initialTicksUntilSpawn == 0 (comppostmake)", this.myDebug); + this.ResetCountdown(); + } + } + + public override void CompPostTick(ref float severityAdjustment) + { + this.pawn = this.parent.pawn; + bool flag = !Tools.OkPawn(this.pawn); + checked + { + if (!flag) + { + bool flag2 = this.blockSpawn; + if (!flag2) + { + bool flag3 = this.graceTicks > 0; + if (flag3) + { + this.graceTicks--; + } + else + { + bool flag4 = this.Props.hungerRelative && this.pawn.IsHungry(this.myDebug); + if (flag4) + { + int num = (int)(unchecked(this.RandomGraceDays() * 60000f)); + this.hungerReset++; + this.graceTicks = num; + } + else + { + bool flag5 = this.Props.healthRelative && this.pawn.IsInjured(this.myDebug); + if (flag5) + { + int num2 = (int)(unchecked(this.RandomGraceDays() * 60000f)); + this.healthReset++; + this.graceTicks = num2; + } + else + { + this.hungerReset = (this.healthReset = 0); + bool flag6 = this.CheckShouldSpawn(); + if (flag6) + { + Tools.Warn("Reseting countdown bc spawned thing", this.myDebug); + this.CalculateValues(); + this.CheckCalculatedValues(); + this.ResetCountdown(); + bool flag7 = Rand.Chance(this.Props.randomGrace); + if (flag7) + { + int num3 = (int)(unchecked(this.RandomGraceDays() * 60000f)); + this.graceTicks = num3; + } + } + } + } + } + } + } + } + } + + private void TraceProps() + { + Tools.Warn(string.Concat(new object[] + { + "Props => minDaysB4Next: ", + this.Props.minDaysB4Next, + "; maxDaysB4Next: ", + this.Props.maxDaysB4Next, + "; randomGrace: ", + this.Props.randomGrace, + "; graceDays: ", + this.Props.graceDays, + "; hungerRelative: ", + this.Props.hungerRelative.ToString(), + "; healthRelative: ", + this.Props.healthRelative.ToString(), + "; " + }), this.myDebug); + bool animalThing = this.Props.animalThing; + if (animalThing) + { + Tools.Warn(string.Concat(new string[] + { + "animalThing: ", + this.Props.animalThing.ToString(), + "; animalName: ", + this.Props.animalToSpawn.defName, + "; factionOfPlayerAnimal: ", + this.Props.factionOfPlayerAnimal.ToString(), + "; " + }), this.myDebug); + } + bool ageWeightedQuantity = this.Props.ageWeightedQuantity; + if (ageWeightedQuantity) + { + Tools.Warn(string.Concat(new string[] + { + "ageWeightedQuantity:", + this.Props.ageWeightedQuantity.ToString(), + "; olderBiggerQuantity:", + this.Props.olderBiggerQuantity.ToString(), + "; ", + this.myDebug.ToString() + }), false); + bool exponentialQuantity = this.Props.exponentialQuantity; + if (exponentialQuantity) + { + Tools.Warn(string.Concat(new object[] + { + "exponentialQuantity:", + this.Props.exponentialQuantity.ToString(), + "; exponentialRatioLimit:", + this.Props.exponentialRatioLimit, + "; " + }), this.myDebug); + } + } + bool ageWeightedPeriod = this.Props.ageWeightedPeriod; + if (ageWeightedPeriod) + { + } + Tools.Warn(string.Concat(new string[] + { + "ageWeightedPeriod:", + this.Props.ageWeightedPeriod.ToString(), + "; olderSmallerPeriod:", + this.Props.olderSmallerPeriod.ToString(), + "; ", + this.myDebug.ToString() + }), false); + } + + private void CalculateValues() + { + float num = Tools.GetPawnAgeOverlifeExpectancyRatio(this.parent.pawn, this.myDebug); + num = ((num > 1f) ? 1f : num); + this.calculatedMinDaysB4Next = this.Props.minDaysB4Next; + this.calculatedMaxDaysB4Next = this.Props.maxDaysB4Next; + bool ageWeightedPeriod = this.Props.ageWeightedPeriod; + if (ageWeightedPeriod) + { + float num2 = this.Props.olderSmallerPeriod ? (-num) : num; + this.calculatedMinDaysB4Next = this.Props.minDaysB4Next * (1f + num2); + this.calculatedMaxDaysB4Next = this.Props.maxDaysB4Next * (1f + num2); + Tools.Warn(string.Concat(new object[] + { + " ageWeightedPeriod: ", + this.Props.ageWeightedPeriod.ToString(), + " ageRatio: ", + num, + " minDaysB4Next: ", + this.Props.minDaysB4Next, + " maxDaysB4Next: ", + this.Props.maxDaysB4Next, + " daysAgeRatio: ", + num2, + " calculatedMinDaysB4Next: ", + this.calculatedMinDaysB4Next, + "; calculatedMaxDaysB4Next: ", + this.calculatedMaxDaysB4Next, + "; " + }), this.myDebug); + } + this.calculatedQuantity = this.Props.spawnCount; + bool ageWeightedQuantity = this.Props.ageWeightedQuantity; + if (ageWeightedQuantity) + { + float num3 = this.Props.olderBiggerQuantity ? num : (-num); + Tools.Warn("quantityAgeRatio: " + num3, this.myDebug); + this.calculatedQuantity = checked((int)Math.Round(unchecked((double)this.Props.spawnCount * (double)(1f + num3)))); + bool exponentialQuantity = this.Props.exponentialQuantity; + if (exponentialQuantity) + { + num3 = 1f - num; + bool flag = num3 == 0f; + if (flag) + { + Tools.Warn(">ERROR< quantityAgeRatio is f* up : " + num3, this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + float num4 = this.Props.olderBiggerQuantity ? (1f / num3) : (num3 * num3); + bool flag2 = false; + bool flag3 = false; + bool flag4 = num4 > (float)this.Props.exponentialRatioLimit; + if (flag4) + { + num4 = (float)this.Props.exponentialRatioLimit; + flag2 = true; + } + this.calculatedQuantity = checked((int)Math.Round(unchecked((double)this.Props.spawnCount * (double)num4))); + bool flag5 = this.calculatedQuantity < 1; + if (flag5) + { + this.calculatedQuantity = 1; + flag3 = true; + } + Tools.Warn(string.Concat(new object[] + { + " exponentialQuantity: ", + this.Props.exponentialQuantity.ToString(), + "; expoFactor: ", + num4, + "; gotLimited: ", + flag2.ToString(), + "; gotAugmented: ", + flag3.ToString() + }), this.myDebug); + } + Tools.Warn(string.Concat(new object[] + { + "; Props.spawnCount: ", + this.Props.spawnCount, + "; calculatedQuantity: ", + this.calculatedQuantity + }), this.myDebug); + } + } + + private void CheckCalculatedValues() + { + bool flag = this.calculatedQuantity > this.errorSpawnCount; + if (flag) + { + Tools.Warn(string.Concat(new object[] + { + ">ERROR< calculatedQuantity is too high: ", + this.calculatedQuantity, + "(>", + this.errorSpawnCount, + "), check and adjust your hediff props" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + else + { + bool flag2 = this.calculatedMinDaysB4Next >= this.calculatedMaxDaysB4Next; + if (flag2) + { + Tools.Warn(">ERROR< calculatedMinDaysB4Next should be lower than calculatedMaxDaysB4Next", this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + else + { + bool flag3 = this.calculatedMinDaysB4Next < this.errorMinDaysB4Next; + if (flag3) + { + Tools.Warn(string.Concat(new object[] + { + ">ERROR< calculatedMinDaysB4Next is too low: ", + this.Props.minDaysB4Next, + "(<", + this.errorMinDaysB4Next, + "), check and adjust your hediff props" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + } + } + } + + private void TraceCalculatedValues() + { + Tools.Warn(string.Concat(new object[] + { + "<<< ", + this.Props.ageWeightedPeriod ? ("Props.olderMoreOften: " + this.Props.olderSmallerPeriod.ToString() + "; ") : "", + this.Props.ageWeightedQuantity ? ("Props.olderBiggerquantities: " + this.Props.olderBiggerQuantity.ToString() + "; ") : "", + " Props.minDaysB4Next: ", + this.Props.minDaysB4Next, + "; Props.maxDaysB4Next: ", + this.Props.maxDaysB4Next, + "; calculatedMinDaysB4Next: ", + this.calculatedMinDaysB4Next, + "; calculatedMaxDaysB4Next: ", + this.calculatedMaxDaysB4Next, + "; Props.spawnCount: ", + this.Props.spawnCount, + "; CalculatedQuantity: ", + this.calculatedQuantity, + "; " + }), this.myDebug); + } + + private void CheckProps() + { + bool flag = this.Props.spawnCount > this.errorSpawnCount; + if (flag) + { + Tools.Warn(string.Concat(new object[] + { + "SpawnCount is too high: ", + this.Props.spawnCount, + "(>", + this.errorSpawnCount, + "), some people just want to see the world burn" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + else + { + bool flag2 = this.Props.minDaysB4Next >= this.Props.maxDaysB4Next; + if (flag2) + { + Tools.Warn("minDaysB4Next should be lower than maxDaysB4Next", this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + else + { + bool flag3 = this.Props.minDaysB4Next < this.errorMinDaysB4Next; + if (flag3) + { + Tools.Warn(string.Concat(new object[] + { + "minDaysB4Next is too low: ", + this.Props.minDaysB4Next, + "(<", + this.errorMinDaysB4Next, + "), some people just want to see the world burn" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + else + { + bool animalThing = this.Props.animalThing; + if (animalThing) + { + bool flag4 = this.Props.animalToSpawn == null || this.Props.animalToSpawn.defName.NullOrEmpty(); + if (flag4) + { + Tools.Warn("Props.animalThing=" + this.Props.animalThing.ToString() + "; but no Props.animalName", this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + Tools.Warn("Found animal PawnKindDef.defName=" + this.Props.animalToSpawn.defName, this.myDebug); + } + else + { + ThingDef thingDef = (from b in DefDatabase.AllDefs + where b == this.Props.thingToSpawn + select b).RandomElement(); + bool flag5 = thingDef == null; + if (flag5) + { + Tools.Warn("Could not find Props.thingToSpawn in DefDatabase", this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + Tools.Warn("Found ThingDef for " + this.Props.thingToSpawn.defName + "in DefDatabase", this.myDebug); + } + bool flag6 = !this.Props.ageWeightedPeriod; + if (flag6) + { + bool olderSmallerPeriod = this.Props.olderSmallerPeriod; + if (olderSmallerPeriod) + { + Tools.Warn("olderSmallerPeriod ignored since ageWeightedPeriod is false ", this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + } + bool flag7 = !this.Props.ageWeightedQuantity; + if (flag7) + { + bool olderBiggerQuantity = this.Props.olderBiggerQuantity; + if (olderBiggerQuantity) + { + Tools.Warn("olderBiggerQuantity ignored since ageWeightedQuantity is false ", this.myDebug); + } + bool exponentialQuantity = this.Props.exponentialQuantity; + if (exponentialQuantity) + { + Tools.Warn("exponentialQuantity ignored since ageWeightedQuantity is false ", this.myDebug); + } + bool flag8 = this.Props.olderBiggerQuantity || this.Props.exponentialQuantity; + if (flag8) + { + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + } + bool flag9 = this.Props.exponentialQuantity && this.Props.exponentialRatioLimit > this.errorExponentialLimit; + if (flag9) + { + Tools.Warn(string.Concat(new object[] + { + "expoRatioLimit too low while expoQuantity is set: ", + this.Props.exponentialRatioLimit, + "(>", + this.errorExponentialLimit, + "), some people just want to see the world burn" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + } + } + } + } + + private bool CheckShouldSpawn() + { + this.pawn = this.parent.pawn; + bool flag = !Tools.OkPawn(this.pawn); + checked + { + bool result; + if (flag) + { + Tools.Warn("CheckShouldSpawn pawn Null", this.myDebug); + result = false; + } + else + { + this.ticksUntilSpawn--; + bool flag2 = this.ticksUntilSpawn <= 0; + if (flag2) + { + Tools.Warn("TryDoSpawn: " + this.TryDoSpawn().ToString(), this.myDebug); + result = true; + } + else + { + result = false; + } + } + return result; + } + } + + private PawnKindDef MyPawnKindDefNamed(string myDefName) + { + PawnKindDef result = null; + foreach (PawnKindDef pawnKindDef in DefDatabase.AllDefs) + { + bool flag = pawnKindDef.defName == myDefName; + if (flag) + { + return pawnKindDef; + } + } + return result; + } + + public bool TryDoSpawn() + { + this.pawn = this.parent.pawn; + bool flag = !Tools.OkPawn(this.pawn); + checked + { + bool result; + if (flag) + { + Tools.Warn("TryDoSpawn - pawn null", this.myDebug); + result = false; + } + else + { + bool animalThing = this.Props.animalThing; + if (animalThing) + { + Faction faction = this.Props.factionOfPlayerAnimal ? Faction.OfPlayer : null; + PawnGenerationRequest request = new PawnGenerationRequest(this.Props.animalToSpawn, faction, PawnGenerationContext.NonPlayer, -1, false, true, false, true, false, 1f, false, true, false, true, true, false, false, false, false, 0f, 0f, null, 1f, null, null, null, null, null, null, null, null, null, null, null, null, false, false, false, false, null, null, null, null, null, 0f, DevelopmentalStage.Adult, null, null, null, false, false, false, -1, 0, false); + for (int i = 0; i < this.calculatedQuantity; i++) + { + Pawn newThing = PawnGenerator.GeneratePawn(request); + GenSpawn.Spawn(newThing, this.parent.pawn.Position, this.parent.pawn.Map, WipeMode.Vanish); + FilthMaker.TryMakeFilth(this.parent.pawn.Position, this.parent.pawn.Map, ThingDefOf.Filth_AmnioticFluid, 1, FilthSourceFlags.None, true); + } + result = true; + } + else + { + bool flag2 = this.Props.spawnMaxAdjacent >= 0; + if (flag2) + { + int num = 0; + for (int j = 0; j < 9; j++) + { + IntVec3 c = this.pawn.Position + GenAdj.AdjacentCellsAndInside[j]; + bool flag3 = !c.InBounds(this.pawn.Map); + if (!flag3) + { + List thingList = c.GetThingList(this.pawn.Map); + for (int k = 0; k < thingList.Count; k++) + { + bool flag4 = thingList[k].def == this.Props.thingToSpawn; + if (flag4) + { + num += thingList[k].stackCount; + bool flag5 = num >= this.Props.spawnMaxAdjacent; + if (flag5) + { + return false; + } + } + } + } + } + } + int l = 0; + int num2 = this.calculatedQuantity; + int num3 = 0; + while (l < this.calculatedQuantity) + { + IntVec3 intVec; + bool flag6 = this.TryFindSpawnCell(out intVec); + if (flag6) + { + Thing thing = ThingMaker.MakeThing(this.Props.thingToSpawn, null); + thing.stackCount = num2; + bool flag7 = thing.def.stackLimit > 0; + if (flag7) + { + bool flag8 = thing.stackCount > thing.def.stackLimit; + if (flag8) + { + thing.stackCount = thing.def.stackLimit; + } + } + l += thing.stackCount; + num2 -= thing.stackCount; + Thing t; + GenPlace.TryPlaceThing(thing, intVec, this.pawn.Map, ThingPlaceMode.Direct, ref t, null, null, default(Rot4)); + bool spawnForbidden = this.Props.spawnForbidden; + if (spawnForbidden) + { + t.SetForbidden(true, true); + } + } + bool flag9 = num3++ > 10; + if (flag9) + { + Tools.Warn("Had to break the loop", this.myDebug); + return false; + } + } + bool flag10 = num2 <= 0; + result = flag10; + } + } + return result; + } + } + + private bool TryFindSpawnCell(out IntVec3 result) + { + this.pawn = this.parent.pawn; + bool flag = !Tools.OkPawn(this.pawn); + checked + { + bool result2; + if (flag) + { + result = IntVec3.Invalid; + Tools.Warn("TryFindSpawnCell Null - pawn null", this.myDebug); + result2 = false; + } + else + { + foreach (IntVec3 intVec in GenAdj.CellsAdjacent8Way(this.pawn).InRandomOrder(null)) + { + bool flag2 = intVec.Walkable(this.pawn.Map); + if (flag2) + { + Building edifice = intVec.GetEdifice(this.pawn.Map); + bool flag3 = edifice == null || !this.Props.thingToSpawn.IsEdifice(); + if (flag3) + { + Building_Door building_Door; + bool flag4 = (building_Door = (edifice as Building_Door)) == null || building_Door.FreePassage; + if (flag4) + { + bool flag5 = GenSight.LineOfSight(this.pawn.Position, intVec, this.pawn.Map, false, null, 0, 0); + if (flag5) + { + bool flag6 = false; + List thingList = intVec.GetThingList(this.pawn.Map); + for (int i = 0; i < thingList.Count; i++) + { + Thing thing = thingList[i]; + bool flag7 = thing.def.category == ThingCategory.Item; + if (flag7) + { + bool flag8 = thing.def != this.Props.thingToSpawn || thing.stackCount > this.Props.thingToSpawn.stackLimit - this.calculatedQuantity; + if (flag8) + { + flag6 = true; + break; + } + } + } + bool flag9 = !flag6; + if (flag9) + { + result = intVec; + return true; + } + } + } + } + } + } + Tools.Warn("TryFindSpawnCell Null - no spawn cell found", this.myDebug); + result = IntVec3.Invalid; + result2 = false; + } + return result2; + } + } + + private void ResetCountdown() + { + this.ticksUntilSpawn = (this.initialTicksUntilSpawn = checked((int)(unchecked(this.RandomDays2wait() * 60000f)))); + } + + private float RandomDays2wait() + { + return Rand.Range(this.calculatedMinDaysB4Next, this.calculatedMaxDaysB4Next); + } + + private float RandomGraceDays() + { + return this.Props.graceDays * Rand.Range(0f, 1f); + } + + public override string CompTipStringExtra + { + get + { + string text = string.Empty; + bool flag = this.graceTicks > 0; + if (flag) + { + bool animalThing = this.Props.animalThing; + if (animalThing) + { + text = " No " + this.Props.animalToSpawn.defName + " for " + this.graceTicks.ToStringTicksToPeriod(true, false, true, true, false); + } + else + { + text = " No " + this.Props.thingToSpawn.label + " for " + this.graceTicks.ToStringTicksToPeriod(true, false, true, true, false); + } + bool flag2 = this.hungerReset > 0; + if (flag2) + { + text += "(hunger)"; + } + else + { + bool flag3 = this.healthReset > 0; + if (flag3) + { + text += "(injury)"; + } + else + { + text += "(grace period)"; + } + } + } + else + { + text = this.ticksUntilSpawn.ToStringTicksToPeriod(true, false, true, true, false) + " before "; + bool animalThing2 = this.Props.animalThing; + if (animalThing2) + { + text += this.Props.animalToSpawn.defName; + } + else + { + text += this.Props.thingToSpawn.label; + } + text = string.Concat(new object[] + { + text, + " ", + this.Props.spawnVerb, + "(", + this.calculatedQuantity, + "x)" + }); + } + return text; + } + } + + private int ticksUntilSpawn; + + private int initialTicksUntilSpawn = 0; + + private int hungerReset = 0; + + private int healthReset = 0; + + private int graceTicks = 0; + + private Pawn pawn = null; + + private float calculatedMaxDaysB4Next = 2f; + + private float calculatedMinDaysB4Next = 1f; + + private int calculatedQuantity = 1; + + private bool blockSpawn = false; + + private bool myDebug = false; + + private readonly float errorMinDaysB4Next = 0.001f; + + private readonly int errorExponentialLimit = 20; + + private readonly int errorSpawnCount = 750; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_Steamer.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_Steamer.cs new file mode 100644 index 0000000..13cef1a --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_Steamer.cs @@ -0,0 +1,80 @@ +using System; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_Steamer : HediffComp + { + private bool MyDebug + { + get + { + return this.Props.debug; + } + } + + private Map MyMap + { + get + { + return base.Pawn.Map; + } + } + + public HediffCompProperties_Steamer Props + { + get + { + return (HediffCompProperties_Steamer)this.props; + } + } + + public override void CompPostTick(ref float severityAdjustment) + { + bool flag = base.Pawn.Negligible(); + checked + { + if (flag) + { + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning("null pawn"); + } + } + else + { + bool flag2 = this.sprayTicksLeft <= 0; + if (flag2) + { + bool flag3 = Rand.Chance(this.Props.puffingChance); + if (flag3) + { + FleckMaker.ThrowAirPuffUp(base.Pawn.TrueCenter(), this.MyMap); + GenTemperature.PushHeat(base.Pawn.Position, this.MyMap, this.Props.temperatureIncreasePerPuff); + } + this.sprayTicksLeft = (this.ticksUntilSpray = Rand.RangeInclusive(this.Props.MinTicksBetweenSprays, this.Props.MaxTicksBetweenSprays)); + } + else + { + this.sprayTicksLeft--; + } + } + } + } + + public override string CompTipStringExtra + { + get + { + string empty = string.Empty; + return empty + "Puff in " + this.sprayTicksLeft.ToStringTicksToPeriod(true, false, true, true, false); + } + } + + private int ticksUntilSpray = 500; + + private int sprayTicksLeft; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_TrailLeaver.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_TrailLeaver.cs new file mode 100644 index 0000000..71e118e --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffComp_TrailLeaver.cs @@ -0,0 +1,236 @@ +using System; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_TrailLeaver : HediffComp + { + public Map MyMap + { + get + { + return base.Pawn.Map; + } + } + + public bool NullMap + { + get + { + return this.MyMap == null; + } + } + + public bool MyDebug + { + get + { + return this.Props.debug; + } + } + + public HediffCompProperties_TrailLeaver Props + { + get + { + return (HediffCompProperties_TrailLeaver)this.props; + } + } + + public bool HasMotePool + { + get + { + return this.Props.HasMotePool; + } + } + + public TerrainRestriction TerrainRestriction + { + get + { + return (!this.Props.HasRestriction || !this.Props.restriction.HasTerrainRestriction) ? null : this.Props.restriction.terrain; + } + } + + public bool HasTerrainRestriction + { + get + { + return this.TerrainRestriction != null; + } + } + + public Restriction PawnRestriction + { + get + { + return (!this.Props.HasRestriction) ? null : this.Props.restriction; + } + } + + public bool HasPawnRestriction + { + get + { + return this.TerrainRestriction != null; + } + } + + public override void CompPostMake() + { + this.PropsCheck(); + } + + public void NewPeriod() + { + this.currentPeriod = this.Props.period.RandomInRange; + } + + public override void CompPostTick(ref float severityAdjustment) + { + bool flag = base.Pawn.Negligible(); + if (flag) + { + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning("null pawn"); + } + } + else + { + bool flag2 = this.currentPeriod == 0; + if (flag2) + { + this.NewPeriod(); + } + bool flag3 = !base.Pawn.IsHashIntervalTick(this.currentPeriod); + if (!flag3) + { + bool flag4 = !this.IsTerrainAllowed(base.Pawn.Position.GetTerrain(this.MyMap)); + if (flag4) + { + bool myDebug2 = this.MyDebug; + if (myDebug2) + { + Log.Warning("terrain does not allow motes"); + } + } + else + { + bool flag5 = !this.IsPawnActivityCompatible(); + if (flag5) + { + bool myDebug3 = this.MyDebug; + if (myDebug3) + { + Log.Warning("pawn activity does not allow motes"); + } + } + else + { + this.TryPlaceMote(); + this.NewPeriod(); + } + } + } + } + } + + public void PropsCheck() + { + bool flag = !this.MyDebug; + if (!flag) + { + bool flag2 = !this.HasMotePool; + if (flag2) + { + Log.Warning("Mote pool is empty, trailLeaver needs at least 1 mote"); + } + bool flag3 = !this.Props.HasOffset; + if (flag3) + { + Log.Warning("no offset per body type found, will use default:" + this.Props.defaultOffset); + } + else + { + string text = "BodyTypeOffsets dump => "; + foreach (BodyTypeOffset bodyTypeOffset in this.Props.offSetPerBodyType) + { + text = string.Concat(new object[] + { + text, + bodyTypeOffset.bodyType.defName, + ":", + bodyTypeOffset.offset, + "; " + }); + } + Log.Warning(text); + } + bool usesFootPrints = this.Props.UsesFootPrints; + if (usesFootPrints) + { + Log.Warning("footprints => " + this.Props.footprint.Dump()); + } + } + } + + private void TryPlaceMote() + { + bool flag = !this.HasMotePool; + if (!flag) + { + Vector3 drawPos = base.Pawn.DrawPos; + bool flag2 = base.Pawn.Position.InBounds(this.MyMap); + if (flag2) + { + Vector3 vector; + float moteRotation = this.GetMoteRotation(drawPos, out vector); + Vector3 vector2 = drawPos + this.GetBodyTypeOffset() + this.GetFootPrintOffset(vector); + bool myDebug = this.MyDebug; + if (myDebug) + { + Log.Warning(string.Concat(new object[] + { + base.Pawn.ThingID, + " ", + this.parent.def.defName, + " TryPlaceMote - dynRot:", + this.Props.dynamicRotation.ToString(), + " footprint:", + this.Props.UsesFootPrints.ToString(), + " drawPos:", + drawPos, + " offset:", + vector2, + " rot:", + moteRotation, + " normalized:", + vector + })); + } + float randomInRange = this.Props.randomScale.RandomInRange; + ThingDef moteDef = this.Props.motePool.RandomElementWithFallback(null); + Mote mote; + bool flag3 = (mote = (vector2.TryAnyMoteSpawn(this.MyMap, moteRotation, randomInRange, moteDef, this.MyDebug) as Mote)) != null; + if (flag3) + { + this.ChangeMoteColor(mote); + } + } + this.RecordMotePos(drawPos); + } + } + + public int currentPeriod = 0; + + public Vector3 lastMotePos; + + public Color lastColor = Color.black; + + public bool lastFootprintRight; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCondition.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCondition.cs new file mode 100644 index 0000000..6c26eaa --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffCondition.cs @@ -0,0 +1,27 @@ +using System; + +namespace MoharHediffs +{ + public class HediffCondition + { + public bool HasPawnCondition + { + get + { + return this.pawn != null; + } + } + + public bool HasBodypartCondition + { + get + { + return this.bodyPart != null && this.bodyPart.HasBPCondition; + } + } + + public PawnCondition pawn; + + public BodyPartCondition bodyPart; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffIntersect.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffIntersect.cs new file mode 100644 index 0000000..12f9500 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffIntersect.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public static class HediffIntersect + { + public static bool RemoveHediffAndReturnTrue(Pawn p, Hediff h, bool debug = false) + { + string warning = debug ? string.Concat(new string[] + { + p.LabelShort, + " - ", + p.def.defName, + " - RemoveHediff ", + h.def.defName + }) : ""; + Tools.Warn(warning, debug); + p.health.RemoveHediff(h); + return true; + } + + public static bool TreatLightCondition(this Pawn p, LightCondition LC, Hediff h, float lightLevel, bool outside, bool debug = false) + { + bool flag = (LC.RequiresLightLevel && !LC.level.Value.Includes(lightLevel)) || (LC.requiresOutside && !outside) || (LC.requiresInside && outside); + return flag && HediffIntersect.RemoveHediffAndReturnTrue(p, h, debug); + } + + public static bool TreatNeedCondition(this Pawn p, List needs, Hediff h, bool debug = false) + { + string str = debug ? (p.LabelShort + " TreatNeedCondition - ") : ""; + using (List.Enumerator enumerator = needs.GetEnumerator()) + { + while (enumerator.MoveNext()) + { + NeedCondition NC = enumerator.Current; + Tools.Warn(str + string.Format("checking {0} => {1} > x > {2}", NC.needDef.defName, NC.level.min, NC.level.max), debug); + Need need = (from n in p.needs.AllNeeds + where n.def == NC.needDef && !NC.level.Includes(n.CurLevelPercentage) + select n).FirstOrFallback(null); + bool flag = need == null; + if (!flag) + { + Tools.Warn(str + string.Format("Found {0} out of range: {1}", need.def.defName, need.CurLevelPercentage), debug); + return HediffIntersect.RemoveHediffAndReturnTrue(p, h, debug); + } + } + } + return false; + } + + public static bool TreatHediffSeverityCondition(this Pawn p, List destroyingHediffs, Hediff h, bool debug = false) + { + using (List.Enumerator enumerator = destroyingHediffs.GetEnumerator()) + { + while (enumerator.MoveNext()) + { + HediffSeverityCondition HSC = enumerator.Current; + Hediff hediff = (from dh in p.health.hediffSet.hediffs + where dh.def == HSC.hediffDef && !HSC.acceptableSeverity.Includes(dh.Severity) + select dh).FirstOrFallback(null); + bool flag = hediff == null; + if (!flag) + { + return HediffIntersect.RemoveHediffAndReturnTrue(p, hediff, debug); + } + } + } + return false; + } + + public static bool TreatRelevantHediffsAndReportIfStillHediffsToCheck(this HediffComp_OnTheCarpet comp) + { + bool myDebug = comp.MyDebug; + bool flag = false; + Pawn pawn = comp.Pawn; + string text = myDebug ? (pawn.LabelShort + " TreatRelevant - ") : ""; + Tools.Warn(text + " Entering", myDebug); + float ambientTemperature = pawn.AmbientTemperature; + float lightLevel = pawn.Map.glowGrid.GroundGlowAt(pawn.Position, false, false); + Room room = pawn.GetRoom(RegionType.Set_All); + bool outside = room == null || room.PsychologicallyOutdoors; + List hediffs = comp.Pawn.health.hediffSet.hediffs; + checked + { + int num = hediffs.Count - 1; + while (num >= 0 && !hediffs.NullOrEmpty()) + { + Hediff H = hediffs[num]; + IEnumerable hediffPool = comp.Props.hediffPool; + Func predicate; + Func <>9__0; + if ((predicate = <>9__0) == null) + { + predicate = (<>9__0 = ((HediffItemToRemove h) => h.hediffDef == H.def)); + } + foreach (HediffItemToRemove hediffItemToRemove in hediffPool.Where(predicate)) + { + Tools.Warn(text + " found intersect hediff: " + H.def.defName, myDebug); + HediffKeepingCondition defaultPlusSpecificHediffCondition = HediffRemovalConditionBuilder.GetDefaultPlusSpecificHediffCondition(comp.Props.defaultCondition, hediffItemToRemove.specificCondition, myDebug); + bool flag2 = false; + bool hasLightCondition = defaultPlusSpecificHediffCondition.HasLightCondition; + if (hasLightCondition) + { + Tools.Warn(text + H.def.defName + "checking light", myDebug); + flag2 = pawn.TreatLightCondition(defaultPlusSpecificHediffCondition.light, H, lightLevel, outside, myDebug); + } + else + { + bool flag3 = defaultPlusSpecificHediffCondition.HasTemperatureCondition && !defaultPlusSpecificHediffCondition.temperature.Value.Includes(ambientTemperature); + if (flag3) + { + Tools.Warn(text + H.def.defName + "checking temperature", myDebug); + flag2 = HediffIntersect.RemoveHediffAndReturnTrue(pawn, H, myDebug); + } + else + { + bool hasNeedCondition = defaultPlusSpecificHediffCondition.HasNeedCondition; + if (hasNeedCondition) + { + Tools.Warn(string.Concat(new object[] + { + text, + H.def.defName, + "checking ", + defaultPlusSpecificHediffCondition.needs.Count, + "need" + }), myDebug); + flag2 = pawn.TreatNeedCondition(defaultPlusSpecificHediffCondition.needs, H, myDebug); + } + else + { + bool hasDestroyingHediffs = defaultPlusSpecificHediffCondition.HasDestroyingHediffs; + if (hasDestroyingHediffs) + { + Tools.Warn(text + H.def.defName + "checking other hediffs", myDebug); + flag2 = pawn.TreatHediffSeverityCondition(defaultPlusSpecificHediffCondition.destroyingHediffs, H, myDebug); + } + } + } + } + flag |= !flag2; + bool flag4 = flag2; + if (flag4) + { + return true; + } + } + num--; + } + Tools.Warn(text + "exiting", myDebug); + return flag; + } + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffItem.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffItem.cs new file mode 100644 index 0000000..301523b --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffItem.cs @@ -0,0 +1,26 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffItem + { + public bool HasSpecific + { + get + { + return this.specificCondition != null; + } + } + + public HediffDef hediffDef; + + public FloatRange applyChance = new FloatRange(1f, 1f); + + public FloatRange severity = new FloatRange(0.1f, 0.2f); + + public float weight = 1f; + + public HediffCondition specificCondition; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffItemToRemove.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffItemToRemove.cs new file mode 100644 index 0000000..f46b375 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffItemToRemove.cs @@ -0,0 +1,20 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffItemToRemove + { + public bool HasSpecificCondition + { + get + { + return this.specificCondition != null; + } + } + + public HediffDef hediffDef; + + public HediffKeepingCondition specificCondition; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffKeepingCondition.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffKeepingCondition.cs new file mode 100644 index 0000000..fc886fb --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffKeepingCondition.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffKeepingCondition + { + public bool HasTemperatureCondition + { + get + { + return this.temperature != null; + } + } + + public bool HasLightCondition + { + get + { + return this.light != null; + } + } + + public bool HasNeedCondition + { + get + { + return !this.needs.NullOrEmpty(); + } + } + + public bool HasDestroyingHediffs + { + get + { + bool result; + if (!this.destroyingHediffs.NullOrEmpty()) + { + result = this.destroyingHediffs.Any((HediffSeverityCondition dh) => !dh.HasHediffDef); + } + else + { + result = false; + } + return result; + } + } + + public FloatRange? temperature = null; + + public LightCondition light; + + public List needs; + + public List destroyingHediffs; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffRemovalConditionBuilder.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffRemovalConditionBuilder.cs new file mode 100644 index 0000000..e159a8e --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffRemovalConditionBuilder.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Verse; + +namespace MoharHediffs +{ + public static class HediffRemovalConditionBuilder + { + public static void CopyHediffKeepingCondition(HediffKeepingCondition source, HediffKeepingCondition dest, bool debug = false) + { + string str = debug ? "CopyHediffCondition - " : ""; + bool hasTemperatureCondition = source.HasTemperatureCondition; + if (hasTemperatureCondition) + { + Tools.Warn(str + "found HasTemperatureCondition, copying", debug); + dest.temperature = source.temperature; + } + bool hasLightCondition = source.HasLightCondition; + if (hasLightCondition) + { + Tools.Warn(str + "found HasLightCondition, copying", debug); + dest.light = new LightCondition(source.light); + } + bool hasNeedCondition = source.HasNeedCondition; + if (hasNeedCondition) + { + Tools.Warn(str + "found HasNeedCondition, copying", debug); + using (List.Enumerator enumerator = source.needs.GetEnumerator()) + { + while (enumerator.MoveNext()) + { + NeedCondition nc = enumerator.Current; + bool flag = dest.needs.Any((NeedCondition n) => n.needDef == nc.needDef); + if (flag) + { + (from n in dest.needs + where n.needDef == nc.needDef + select n).First().level = nc.level; + } + else + { + dest.needs.Add(new NeedCondition(nc)); + } + } + } + } + bool hasDestroyingHediffs = source.HasDestroyingHediffs; + if (hasDestroyingHediffs) + { + Tools.Warn(str + "found HasDestroyingHediffs, copying", debug); + using (List.Enumerator enumerator2 = source.destroyingHediffs.GetEnumerator()) + { + while (enumerator2.MoveNext()) + { + HediffSeverityCondition hsc = enumerator2.Current; + bool flag2 = dest.destroyingHediffs.Any((HediffSeverityCondition dh) => dh.hediffDef == hsc.hediffDef); + if (flag2) + { + (from dh in dest.destroyingHediffs + where dh.hediffDef == hsc.hediffDef + select dh).First().acceptableSeverity = hsc.acceptableSeverity; + } + else + { + dest.destroyingHediffs.Add(new HediffSeverityCondition(hsc)); + } + } + } + } + } + + public static HediffKeepingCondition GetDefaultPlusSpecificHediffCondition(HediffKeepingCondition defaultHKC, HediffKeepingCondition specificHKC, bool debug = false) + { + string text = debug ? "GetDefaultPlusSpecificHediffCondition - " : ""; + Tools.Warn(text + "allocating answerHC", debug); + HediffKeepingCondition hediffKeepingCondition = new HediffKeepingCondition + { + needs = new List() + }; + bool flag = defaultHKC != null; + if (flag) + { + Tools.Warn(text + "found defaultHKC, copying", debug); + HediffRemovalConditionBuilder.CopyHediffKeepingCondition(defaultHKC, hediffKeepingCondition, debug); + } + bool flag2 = specificHKC != null; + if (flag2) + { + Tools.Warn(text + "found specificHKC, copying", debug); + HediffRemovalConditionBuilder.CopyHediffKeepingCondition(specificHKC, hediffKeepingCondition, debug); + } + Tools.Warn(string.Concat(new object[] + { + text, + string.Format("HasDestroyingHediffs:{0} - ", hediffKeepingCondition.HasDestroyingHediffs), + hediffKeepingCondition.HasDestroyingHediffs ? hediffKeepingCondition.destroyingHediffs.Count() : 0, + string.Format("HasLightCondition:{0} - ", hediffKeepingCondition.HasLightCondition), + hediffKeepingCondition.HasLightCondition ? ("reqIn:" + hediffKeepingCondition.light.requiresInside.ToString() + " reqOut:" + hediffKeepingCondition.light.requiresOutside.ToString()) : "", + string.Format("HasNeedCondition:{0}", hediffKeepingCondition.HasNeedCondition), + hediffKeepingCondition.HasNeedCondition ? hediffKeepingCondition.needs.Count() : 0, + string.Format("HasTemperatureCondition:{0}", hediffKeepingCondition.HasTemperatureCondition) + }), debug); + return hediffKeepingCondition; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffRequirementSettings.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffRequirementSettings.cs new file mode 100644 index 0000000..28532cd --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffRequirementSettings.cs @@ -0,0 +1,20 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffRequirementSettings + { + public bool HasHediffDef + { + get + { + return this.hediffDef != null; + } + } + + public HediffDef hediffDef; + + public FloatRange severity = new FloatRange(0f, 1f); + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffSeverityCondition.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffSeverityCondition.cs new file mode 100644 index 0000000..573549a --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/HediffSeverityCondition.cs @@ -0,0 +1,30 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffSeverityCondition + { + public bool HasHediffDef + { + get + { + return this.hediffDef != null; + } + } + + public HediffSeverityCondition(HediffSeverityCondition copyMe) + { + this.hediffDef = copyMe.hediffDef; + this.acceptableSeverity = copyMe.acceptableSeverity; + } + + public HediffSeverityCondition() + { + } + + public HediffDef hediffDef; + + public FloatRange acceptableSeverity = new FloatRange(0f, 0.5f); + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShineDef.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShineDef.cs new file mode 100644 index 0000000..1831fbf --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShineDef.cs @@ -0,0 +1,25 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class InnerShineDef : Def + { + public override string ToString() + { + return this.defName; + } + + public InnerShineDef Named(string name) + { + return DefDatabase.GetNamed(name, true); + } + + public override int GetHashCode() + { + return this.defName.GetHashCode(); + } + + public InnerShineItem item; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShineItem.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShineItem.cs new file mode 100644 index 0000000..415ed01 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShineItem.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class InnerShineItem + { + public bool HasSpawningRules + { + get + { + return this.spawningRules != null; + } + } + + public bool HasRestriction + { + get + { + return this.restriction != null; + } + } + + public bool HasMotePool + { + get + { + return !this.motePool.NullOrEmpty(); + } + } + + public bool HasBodyTypeDrawRules + { + get + { + return !this.bodyTypeDrawRules.NullOrEmpty(); + } + } + + public bool HasDefaultDrawRules + { + get + { + return this.defaultDrawRules != null; + } + } + + public bool HasColorRange + { + get + { + return this.colorRange != null; + } + } + + public string Dump() + { + return string.Concat(new string[] + { + "label:", + this.label, + string.Format(" HasSpawningRules:{0} HasRestriction:{1}", this.HasSpawningRules, this.HasRestriction), + string.Format(" HasMotePool:{0} HasBodyTypeDrawRules:{1} HasDefaultDrawRules:{2}", this.HasMotePool, this.HasBodyTypeDrawRules, this.HasDefaultDrawRules), + string.Format(" HasColorRange:{0}", this.HasColorRange), + string.Format(" debug:{0}", this.debug) + }); + } + + public string label; + + public SpawnRules spawningRules; + + public List motePool; + + public MoteLink.Nature linkType; + + public List bodyTypeDrawRules; + + public DrawingSpecificities defaultDrawRules; + + public ActivityRestriction restriction; + + public ColorRange colorRange; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShineRecord.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShineRecord.cs new file mode 100644 index 0000000..27e6724 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShineRecord.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public class InnerShineRecord + { + public InnerShineRecord(InnerShineItem ISI) + { + this.label = ISI.label; + this.spawned = new List(); + this.ticksLeft = ISI.NewPeriod(); + this.lastColor = Color.black; + } + + public string Dump + { + get + { + string format = "label:{0} spawned:{1} ticksLeft:{2} lastColor:{3}"; + object[] array = new object[4]; + array[0] = this.label; + int num = 1; + List list = this.spawned; + array[num] = ((list != null) ? new int?(list.CountAllowNull()) : null); + array[2] = this.ticksLeft; + array[3] = this.lastColor; + return string.Format(format, array); + } + } + + public string label; + + public List spawned; + + public int ticksLeft; + + public Color lastColor; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShinerUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShinerUtils.cs new file mode 100644 index 0000000..31e0c7a --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/InnerShinerUtils.cs @@ -0,0 +1,189 @@ +using System; +using System.Linq; +using RimWorld; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class InnerShinerUtils + { + public static InnerShineItem RetrieveISI(this HediffComp_InnerShine comp, string label) + { + bool hasRawShinePool = comp.Props.HasRawShinePool; + if (hasRawShinePool) + { + InnerShineItem result; + bool flag = (result = (from i in comp.Props.innerShinePool + where i.label == label + select i).FirstOrFallback(null)) != null; + if (flag) + { + return result; + } + } + bool hasShineDefPool = comp.Props.HasShineDefPool; + if (hasShineDefPool) + { + InnerShineDef innerShineDef; + bool flag2 = (innerShineDef = (from i in comp.Props.innerShineDefPool + where i.item.label == label + select i).FirstOrFallback(null)) != null; + if (flag2) + { + return innerShineDef.item; + } + } + return null; + } + + public static void SelfDestroy(this HediffComp_InnerShine comp) + { + comp.parent.Severity = 0f; + comp.Pawn.health.RemoveHediff(comp.parent); + } + + public static void ChangeMoteColor(this InnerShineItem ISI, InnerShineRecord ISR, Mote mote) + { + bool flag = !ISI.HasColorRange || mote == null; + if (!flag) + { + bool flag2 = ISR.lastColor == Color.black; + if (flag2) + { + ISR.lastColor = ISI.colorRange.colorA; + } + ISR.lastColor = ISI.colorRange.RandomPickColor(ISR.lastColor, ISI.debug); + mote.instanceColor = ISR.lastColor; + } + } + + public static void GetSpecifities(this InnerShineItem ISI, Pawn p, out Vector3 offset, out float scale) + { + offset = Vector3.zero; + scale = 1f; + Pawn_StoryTracker story = p.story; + bool flag = ((story != null) ? story.bodyType : null) == null || !ISI.HasBodyTypeDrawRules; + if (flag) + { + bool hasDefaultDrawRules = ISI.HasDefaultDrawRules; + if (hasDefaultDrawRules) + { + offset = ISI.defaultDrawRules.GetRotationOffset(p); + scale = ISI.defaultDrawRules.randomScale.RandomInRange; + } + } + else + { + BodyTypeSpecificities bodyTypeSpecificities = (from b in ISI.bodyTypeDrawRules + where b.bodyTypeDef == p.story.bodyType + select b).FirstOrFallback(null); + bool flag2 = bodyTypeSpecificities == null; + if (flag2) + { + bool hasDefaultDrawRules2 = ISI.HasDefaultDrawRules; + if (hasDefaultDrawRules2) + { + offset = ISI.defaultDrawRules.GetRotationOffset(p); + scale = ISI.defaultDrawRules.randomScale.RandomInRange; + } + } + else + { + offset = bodyTypeSpecificities.drawRules.GetRotationOffset(p); + scale = bodyTypeSpecificities.drawRules.randomScale.RandomInRange; + } + } + } + + public static bool ShouldSpawnMote(this InnerShineItem ISI, InnerShineRecord ISR, Pawn p) + { + bool flag = !ISI.HasCompatibleActivity(p); + bool result; + if (flag) + { + result = false; + } + else + { + bool flag2 = ISI.HasMoteNumLimit(); + result = (!flag2 || !ISR.AlreadyReachedMax(ISI.spawningRules.spawnedMax)); + } + return result; + } + + public static Vector3 GetDrawOffset(this InnerShineItem ISI, Pawn p) + { + Pawn_StoryTracker story = p.story; + bool flag = ((story != null) ? story.bodyType : null) == null || !ISI.HasBodyTypeDrawRules; + Vector3 result; + if (flag) + { + bool hasDefaultDrawRules = ISI.HasDefaultDrawRules; + if (hasDefaultDrawRules) + { + result = ISI.defaultDrawRules.GetRotationOffset(p); + } + else + { + result = Vector3.zero; + } + } + else + { + BodyTypeSpecificities bodyTypeSpecificities = (from b in ISI.bodyTypeDrawRules + where b.bodyTypeDef == p.story.bodyType + select b).FirstOrFallback(null); + bool flag2 = bodyTypeSpecificities == null; + if (flag2) + { + result = (ISI.HasDefaultDrawRules ? ISI.defaultDrawRules.GetRotationOffset(p) : Vector3.zero); + } + else + { + result = bodyTypeSpecificities.drawRules.GetRotationOffset(p); + } + } + return result; + } + + public static bool AlreadyReachedMax(this InnerShineRecord ISR, int max) + { + bool flag = ISR.spawned.NullOrEmpty(); + return !flag && ISR.spawned.Count() >= max; + } + + public static bool HasCompatibleActivity(this InnerShineItem ISI, Pawn p) + { + bool flag = !ISI.HasRestriction; + bool result; + if (flag) + { + result = true; + } + else + { + ActivityRestriction restriction = ISI.restriction; + bool flag2 = restriction.HasPostureRestriction && !restriction.allowedPostures.Contains(p.GetPosture()); + if (flag2) + { + result = false; + } + else + { + bool flag3 = restriction.HasJobRestriction && p.CurJob != null && !restriction.allowedJobs.Contains(p.CurJob.def); + if (flag3) + { + result = false; + } + else + { + bool flag4 = restriction.HasAllowedRotation && !restriction.allowedRotation.Contains(p.Rotation); + result = !flag4; + } + } + } + return result; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ItemParameter.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ItemParameter.cs new file mode 100644 index 0000000..b2dd1be --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ItemParameter.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class ItemParameter + { + public bool ThingSpawner + { + get + { + return this.thingToSpawn != null && this.pawnKindToSpawn == null; + } + } + + public bool PawnSpawner + { + get + { + return this.thingToSpawn == null && this.pawnKindToSpawn != null; + } + } + + public bool HasFactionParams + { + get + { + return !this.randomFactionParameters.NullOrEmpty(); + } + } + + public bool HasGraceChance + { + get + { + return this.graceChance != 0f; + } + } + + public bool HasFilth + { + get + { + return this.filthDef != null; + } + } + + public void LogParams(bool myDebug = false) + { + Tools.Warn(string.Concat(new object[] + { + "ThingSpawner:", + this.ThingSpawner.ToString(), + "; ", + this.ThingSpawner ? this.thingToSpawn.defName : "", + "PawnSpawner:", + this.PawnSpawner.ToString(), + "; ", + this.PawnSpawner ? this.pawnKindToSpawn.defName : "", + "spawnCount:", + this.spawnCount, + "; weight:", + this.weight, + "; " + }), myDebug); + } + + public void ComputeRandomParameters(out int calculatedTickUntilSpawn, out int calculatedGraceTicks, out int calculatedSpawnCount) + { + checked + { + calculatedTickUntilSpawn = (int)(unchecked(this.daysB4Next.RandomInRange * 60000f)); + calculatedSpawnCount = this.spawnCount.RandomInRange; + calculatedGraceTicks = 0; + bool flag = this.HasGraceChance && Rand.Chance(this.graceChance); + if (flag) + { + calculatedGraceTicks = (int)(unchecked(this.graceDays.RandomInRange * 60000f)); + } + } + } + + public ThingDef thingToSpawn = null; + + public PawnKindDef pawnKindToSpawn = null; + + public IntRange spawnCount = new IntRange(1, 1); + + public ThingDef filthDef = null; + + public List randomFactionParameters; + + public FloatRange daysB4Next = new FloatRange(1f, 2f); + + public float graceChance = 0f; + + public FloatRange graceDays = new FloatRange(1f, 2f); + + public float weight = 0f; + + public string spawnVerb = "delivery"; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/KeepingConditionCompatibility.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/KeepingConditionCompatibility.cs new file mode 100644 index 0000000..1f175d7 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/KeepingConditionCompatibility.cs @@ -0,0 +1,69 @@ +using System; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public static class KeepingConditionCompatibility + { + public static bool IsPawnNeedConditionCompatible(this Pawn p, HediffKeepingCondition HKC, bool debug = false) + { + string str = debug ? (p.Label + " IsPawnNeedConditionCompatible - ") : ""; + bool hasNeedCondition = HKC.HasNeedCondition; + if (hasNeedCondition) + { + foreach (NeedCondition needCondition in HKC.needs) + { + bool flag = false; + foreach (Need need in p.needs.AllNeeds) + { + Tools.Warn(str + needCondition.needDef.defName + " found in pawn needs, ok", debug); + flag |= (need.def == needCondition.needDef); + } + bool flag2 = !flag; + if (flag2) + { + Tools.Warn(str + needCondition.needDef.defName + " not found in pawn needs, exiting", debug); + return false; + } + } + } + Tools.Warn(str + "is need compatible, ok", debug); + return true; + } + + public static bool IsPawnNeedCompatible(this HediffCompProperties_OnTheCarpet Props, Pawn p) + { + bool debug = Props.debug; + string str = debug ? (p.Label + " IsPawnNeedCompatible - ") : ""; + bool hasDefaultCondition = Props.HasDefaultCondition; + if (hasDefaultCondition) + { + Tools.Warn(str + "checking default condition", debug); + bool flag = !p.IsPawnNeedConditionCompatible(Props.defaultCondition, debug); + if (flag) + { + Tools.Warn(str + "defaultCondition not compatible with pawn, exiting", debug); + return false; + } + Tools.Warn(str + " Compatible with defaultCondition", debug); + } + foreach (HediffItemToRemove hediffItemToRemove in Props.hediffPool) + { + bool hasSpecificCondition = hediffItemToRemove.HasSpecificCondition; + if (hasSpecificCondition) + { + Tools.Warn(str + "checking " + hediffItemToRemove.hediffDef.defName + " specific condition", debug); + bool flag2 = !p.IsPawnNeedConditionCompatible(hediffItemToRemove.specificCondition, debug); + if (flag2) + { + Tools.Warn(str + "specificCondition not compatible with pawn, exiting", debug); + return false; + } + Tools.Warn(str + " Compatible with specificCondition", debug); + } + } + return true; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/LightCondition.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/LightCondition.cs new file mode 100644 index 0000000..40ae3fd --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/LightCondition.cs @@ -0,0 +1,29 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class LightCondition + { + public bool RequiresLightLevel + { + get + { + return this.level != null; + } + } + + public LightCondition(LightCondition copyMe) + { + this.requiresInside = copyMe.requiresInside; + this.requiresOutside = copyMe.requiresOutside; + this.level = copyMe.level; + } + + public bool requiresOutside = true; + + public bool requiresInside = false; + + public FloatRange? level; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MentalStateOption.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MentalStateOption.cs new file mode 100644 index 0000000..abedb6d --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MentalStateOption.cs @@ -0,0 +1,24 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class MentalStateOption + { + public void Dump() + { + Log.Warning(string.Concat(new object[] + { + "MentalStateDef:", + this.mentalDef.defName, + "; weight:", + this.weight, + "; " + })); + } + + public MentalStateDef mentalDef; + + public float weight = 1f; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MentalStatePicker.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MentalStatePicker.cs new file mode 100644 index 0000000..7d4bf08 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MentalStatePicker.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public static class MentalStatePicker + { + public static float MSTotalWeight(this List MSO) + { + float num = 0f; + for (int i = 0; i < MSO.Count; i = checked(i + 1)) + { + num += MSO[i].weight; + } + return num; + } + + public static void ComputeRandomMentalState(this HediffComp_RandySpawnUponDeath comp) + { + bool flag = !comp.ChosenItem.HasMentalStateParams; + if (!flag) + { + MentalStateDef weightedRandomMentalState = comp.GetWeightedRandomMentalState(); + bool flag2 = weightedRandomMentalState == null; + if (flag2) + { + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning("ComputeRandomMentalState - found no MentalStateDef"); + } + } + else + { + comp.RandomMS = weightedRandomMentalState; + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + string str = "ComputeRandomFaction - found:"; + Faction randomFaction = comp.RandomFaction; + Log.Warning(str + ((randomFaction != null) ? randomFaction.GetCallLabel() : null)); + } + } + } + } + + public static MentalStateDef GetWeightedRandomMentalState(this HediffComp_RandySpawnUponDeath comp) + { + bool flag = !comp.HasChosenPawn || !comp.ChosenItem.HasMentalStateParams; + checked + { + MentalStateDef result; + if (flag) + { + result = null; + } + else + { + List mentalState = comp.ChosenItem.mentalState; + float num = Rand.Range(0f, mentalState.MSTotalWeight()); + for (int i = 0; i < mentalState.Count; i++) + { + bool flag2 = unchecked(num -= mentalState[i].weight) < 0f; + if (flag2) + { + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning("GetWeightedRandomIndex : returning " + i); + } + return mentalState[i].mentalDef; + } + } + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning("GetWeightedRandomMentalState : failed to return proper index, returning null"); + } + result = null; + } + return result; + } + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoharHediffs.csproj b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoharHediffs.csproj new file mode 100644 index 0000000..a2e4e89 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoharHediffs.csproj @@ -0,0 +1,151 @@ + + + + Debug + AnyCPU + {7ACFB1B0-3B20-48B9-BA73-48DD6353ABED} + Library + Properties + MoharHediffs + MoharHediffs + v4.8 + 4096 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\..\..\..\..\..\..\..\..\..\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll + + + ..\..\..\..\..\..\..\..\..\..\Steam\steamapps\workshop\content\294100\2057001924\1.5\Assemblies\MoharGfx.dll + + + ..\..\..\..\..\..\..\..\..\..\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\System.Core.dll + + + ..\..\..\..\..\..\..\..\..\..\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoteColorChangeUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoteColorChangeUtils.cs new file mode 100644 index 0000000..6757320 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoteColorChangeUtils.cs @@ -0,0 +1,63 @@ +using System; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class MoteColorChangeUtils + { + public static int GetProgressSign(float limA, float limB, float val) + { + bool flag = val <= limA && limA < limB; + int result; + if (flag) + { + result = 1; + } + else + { + bool flag2 = val >= limB && limB > limA; + if (flag2) + { + result = -1; + } + else + { + result = (Rand.Chance(0.5f) ? 1 : -1); + } + } + return result; + } + + public static Color RandomPickColor(this ColorRange colorRange, Color oldColor, bool debug = false) + { + float variationPerIteration = colorRange.variationPerIteration; + float num = Rand.Range(0f, variationPerIteration); + float num2 = Rand.Range(0f, variationPerIteration - num); + float num3 = variationPerIteration - num - num2; + int progressSign = MoteColorChangeUtils.GetProgressSign(colorRange.colorA.r, colorRange.colorB.r, oldColor.r); + int progressSign2 = MoteColorChangeUtils.GetProgressSign(colorRange.colorA.g, colorRange.colorB.g, oldColor.g); + int progressSign3 = MoteColorChangeUtils.GetProgressSign(colorRange.colorA.b, colorRange.colorB.b, oldColor.b); + float num4 = Math.Abs(colorRange.colorA.r - colorRange.colorB.r) * num * (float)progressSign; + float num5 = Math.Abs(colorRange.colorA.g - colorRange.colorB.g) * num2 * (float)progressSign3; + float num6 = Math.Abs(colorRange.colorA.b - colorRange.colorB.b) * num3 * (float)progressSign2; + Color result = new Color((oldColor.r + num4).Clamp(colorRange.colorA.r, colorRange.colorB.r), (oldColor.g + num5).Clamp(colorRange.colorA.g, colorRange.colorB.g), (oldColor.b + num6).Clamp(colorRange.colorA.b, colorRange.colorB.b)); + return result; + } + + public static void ChangeMoteColor(this HediffComp_TrailLeaver comp, Mote mote) + { + bool flag = !comp.Props.HasColorRange || mote == null; + if (!flag) + { + bool flag2 = comp.lastColor == Color.black; + if (flag2) + { + comp.lastColor = comp.Props.colorRange.colorA; + } + comp.lastColor = comp.Props.colorRange.RandomPickColor(comp.lastColor, comp.MyDebug); + mote.instanceColor = comp.lastColor; + } + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoteLink.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoteLink.cs new file mode 100644 index 0000000..95f3c33 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoteLink.cs @@ -0,0 +1,33 @@ +using System; +using RimWorld; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class MoteLink + { + public static Vector3 GetLinkOffset(this Pawn p, MoteLink.Nature linkType) + { + Vector3 result; + if (linkType != MoteLink.Nature.head) + { + if (linkType != MoteLink.Nature.body) + { + } + result = Vector3.zero; + } + else + { + result = p.Drawer.renderer.BaseHeadOffsetAt((p.GetPosture() == PawnPosture.Standing) ? Rot4.North : p.Drawer.renderer.LayingFacing()).RotatedBy(p.Drawer.renderer.BodyAngle(PawnRenderFlags.Cache)); + } + return result; + } + + public enum Nature + { + head, + body + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoteSpawnUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoteSpawnUtils.cs new file mode 100644 index 0000000..0b97de4 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MoteSpawnUtils.cs @@ -0,0 +1,111 @@ +using System; +using MoharGfx; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class MoteSpawnUtils + { + public static Thing TryMoteSpawn(this Vector3 loc, Map map, float rot, float scale, ThingDef moteDef, bool debug = false) + { + bool flag = loc.ForbiddenMote(map); + Thing result; + if (flag) + { + result = null; + } + else + { + bool flag2 = moteDef == null; + if (flag2) + { + if (debug) + { + Log.Warning("null mote"); + } + result = null; + } + else + { + MoteThrown moteThrown = (MoteThrown)ThingMaker.MakeThing(moteDef, null); + bool flag3 = moteThrown == null; + if (flag3) + { + result = null; + } + else + { + moteThrown.Scale = scale; + moteThrown.exactRotation = rot; + moteThrown.exactPosition = loc; + result = GenSpawn.Spawn(moteThrown, loc.ToIntVec3(), map, WipeMode.Vanish); + } + } + } + return result; + } + + public static Thing TryAnyMoteSpawn(this Vector3 loc, Map map, float rot, float scale, ThingDef moteDef, bool debug = false) + { + bool flag = loc.ForbiddenMote(map); + Thing result; + if (flag) + { + result = null; + } + else + { + bool flag2 = moteDef == null; + if (flag2) + { + if (debug) + { + Log.Warning("null mote"); + } + result = null; + } + else + { + Type thingClass = moteDef.thingClass; + bool flag3 = thingClass == typeof(CustomTransformation_Mote); + if (flag3) + { + CustomTransformation_Mote mote = (CustomTransformation_Mote)ThingMaker.MakeThing(moteDef, null); + result = mote.FinalizeMoteSpawn(loc, map, rot, scale); + } + else + { + bool flag4 = thingClass == typeof(MoteThrown); + if (flag4) + { + MoteThrown mote2 = (MoteThrown)ThingMaker.MakeThing(moteDef, null); + result = mote2.FinalizeMoteSpawn(loc, map, rot, scale); + } + else + { + result = null; + } + } + } + } + return result; + } + + public static Thing FinalizeMoteSpawn(this CustomTransformation_Mote mote, Vector3 loc, Map map, float rot, float scale) + { + mote.Scale = scale; + mote.exactRotation = rot; + mote.exactPosition = loc; + return GenSpawn.Spawn(mote, loc.ToIntVec3(), map, WipeMode.Vanish); + } + + public static Thing FinalizeMoteSpawn(this MoteThrown mote, Vector3 loc, Map map, float rot, float scale) + { + mote.Scale = scale; + mote.exactRotation = rot; + mote.exactPosition = loc; + return GenSpawn.Spawn(mote, loc.ToIntVec3(), map, WipeMode.Vanish); + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MyDefs.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MyDefs.cs new file mode 100644 index 0000000..bd030a0 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MyDefs.cs @@ -0,0 +1,9 @@ +using System; + +namespace MoharHediffs +{ + public static class MyDefs + { + public static int OneYearTicks = 3600000; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MyGfx.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MyGfx.cs new file mode 100644 index 0000000..34c7652 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/MyGfx.cs @@ -0,0 +1,24 @@ +using System; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + [StaticConstructorOnStartup] + public class MyGfx + { + public static Color Purple = new Color(1f, 0f, 1f); + + public static Color Blue = new Color(0f, 0f, 1f); + + public static Color Cyan = new Color(0f, 1f, 1f); + + public static Color Green = new Color(0f, 1f, 0f); + + public static Color Yellow = new Color(1f, 1f, 0f); + + public static Color Orange = new Color(1f, 0.6f, 0f); + + public static Color Red = new Color(1f, 0f, 1f); + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/NeedCondition.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/NeedCondition.cs new file mode 100644 index 0000000..d059309 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/NeedCondition.cs @@ -0,0 +1,23 @@ +using System; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class NeedCondition + { + public NeedCondition(NeedCondition copyMe) + { + this.needDef = copyMe.needDef; + this.level = copyMe.level; + } + + public NeedCondition() + { + } + + public NeedDef needDef; + + public FloatRange level; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/NoMsgRandHediffGiver.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/NoMsgRandHediffGiver.cs new file mode 100644 index 0000000..89afe7e --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/NoMsgRandHediffGiver.cs @@ -0,0 +1,19 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class NoMsgRandHediffGiver : HediffGiver + { + public override void OnIntervalPassed(Pawn pawn, Hediff cause) + { + bool flag = Rand.MTBEventOccurs(this.mtbDays, 60000f, 60f); + if (flag) + { + base.TryApply(pawn, null); + } + } + + public float mtbDays; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ParametersHandlingsUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ParametersHandlingsUtils.cs new file mode 100644 index 0000000..e7ed5b4 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ParametersHandlingsUtils.cs @@ -0,0 +1,96 @@ +using System; +using System.Linq; +using RimWorld; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class ParametersHandlingsUtils + { + public static bool IsTerrainAllowed(this HediffComp_TrailLeaver comp, TerrainDef terrain) + { + bool flag = terrain == null || comp.NullMap; + bool result; + if (flag) + { + result = false; + } + else + { + bool flag2 = !comp.HasTerrainRestriction; + if (flag2) + { + result = true; + } + else + { + TerrainRestriction terrainRestriction = comp.TerrainRestriction; + bool flag3 = !terrainRestriction.allowedInWater && terrain.IsWater; + if (flag3) + { + result = false; + } + else + { + bool flag4 = terrainRestriction.HasRelevantSnowRestriction && !terrainRestriction.allowedSnowDepth.Includes(comp.MyMap.snowGrid.GetDepth(comp.Pawn.Position)); + if (flag4) + { + result = false; + } + else + { + bool flag5 = terrainRestriction.HasForbiddenTerrains && terrainRestriction.forbiddenTerrains.Contains(terrain); + result = !flag5; + } + } + } + } + return result; + } + + public static bool IsPawnActivityCompatible(this HediffComp_TrailLeaver comp) + { + bool flag = !comp.HasPawnRestriction; + bool result; + if (flag) + { + result = true; + } + else + { + Restriction pawnRestriction = comp.PawnRestriction; + bool flag2 = pawnRestriction.HasPostureRestriction && !pawnRestriction.allowedPostures.Contains(comp.Pawn.GetPosture()); + if (flag2) + { + result = false; + } + else + { + bool flag3 = pawnRestriction.onlyWhenMoving && !comp.Pawn.pather.MovingNow; + result = !flag3; + } + } + return result; + } + + public static Vector3 GetBodyTypeOffset(this HediffComp_TrailLeaver comp) + { + Pawn_StoryTracker story = comp.Pawn.story; + bool flag = ((story != null) ? story.bodyType : null) == null || !comp.Props.HasOffset; + Vector3 result; + if (flag) + { + result = comp.Props.defaultOffset; + } + else + { + BodyTypeOffset bodyTypeOffset = (from b in comp.Props.offSetPerBodyType + where b.bodyType == comp.Pawn.story.bodyType + select b).FirstOrFallback(null); + result = ((bodyTypeOffset == null) ? comp.Props.defaultOffset : bodyTypeOffset.offset); + } + return result; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/PawnCondition.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/PawnCondition.cs new file mode 100644 index 0000000..09eb125 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/PawnCondition.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class PawnCondition + { + public bool HasRace + { + get + { + return !this.race.NullOrEmpty(); + } + } + + public bool HasGender + { + get + { + return !this.gender.NullOrEmpty(); + } + } + + public List race; + + public FloatRange ageRange = new FloatRange(0f, 999f); + + public List gender; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/PawnCopyUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/PawnCopyUtils.cs new file mode 100644 index 0000000..ca06390 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/PawnCopyUtils.cs @@ -0,0 +1,344 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using AlienRace; +using RimWorld; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class PawnCopyUtils + { + public static void SetAge(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + ThingSettings chosenItem = comp.ChosenItem; + bool flag = chosenItem.IsCopier && chosenItem.copyParent.age; + if (flag) + { + LifeStageDef LSDef = comp.Pawn.ageTracker.CurLifeStage; + LifeStageAge lifeStageAge = (from LS in comp.Pawn.def.race.lifeStageAges + where LS.def == LSDef + select LS).FirstOrFallback(null); + bool flag2 = lifeStageAge == null; + if (!flag2) + { + newPawn.ageTracker.AgeBiologicalTicks = checked((long)(unchecked(lifeStageAge.minAge * (float)MyDefs.OneYearTicks))); + newPawn.ageTracker.AgeChronologicalTicks = Math.Max(comp.Pawn.ageTracker.AgeBiologicalTicks, comp.Pawn.ageTracker.AgeChronologicalTicks); + } + } + else + { + newPawn.ageTracker.AgeBiologicalTicks = (long)(checked(MyDefs.OneYearTicks * chosenItem.biologicalAgeRange.RandomInRange)); + newPawn.ageTracker.AgeChronologicalTicks = checked(unchecked((long)(checked(MyDefs.OneYearTicks * chosenItem.chronologicalAgeRange.RandomInRange))) + newPawn.ageTracker.AgeBiologicalTicks); + } + } + + public static void SetName(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool name = comp.ChosenItem.copyParent.name; + if (name) + { + newPawn.Name = comp.Pawn.Name; + } + } + + public static void SetGender(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool gender = comp.ChosenItem.copyParent.gender; + if (gender) + { + newPawn.gender = comp.Pawn.gender; + } + } + + public static void SetMelanin(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool melanin = comp.ChosenItem.copyParent.melanin; + if (melanin) + { + newPawn.story.SkinColorBase = comp.Pawn.story.SkinColorBase; + } + } + + public static void SetAlienSkinColor(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + AlienPartGenerator.AlienComp alienComp = comp.Pawn.TryGetComp(); + AlienPartGenerator.AlienComp alienComp2 = (newPawn != null) ? newPawn.TryGetComp() : null; + bool flag = alienComp == null || alienComp2 == null; + if (!flag) + { + Color first = alienComp.GetChannel("skin").first; + Color second = alienComp.GetChannel("skin").second; + alienComp2.GetChannel("skin").first = first; + alienComp2.GetChannel("skin").second = second; + } + } + + public static void SetAlienBodyAndHeadType(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool flag = !comp.Pawn.IsAlien() || !newPawn.IsAlien(); + if (!flag) + { + AlienPartGenerator.AlienComp alienComp = comp.Pawn.TryGetComp(); + AlienPartGenerator.AlienComp alienComp2 = (newPawn != null) ? newPawn.TryGetComp() : null; + bool flag2 = alienComp == null || alienComp2 == null; + if (!flag2) + { + newPawn.story.headType = comp.Pawn.story.headType; + alienComp2.headMaskVariant = alienComp.headMaskVariant; + alienComp2.headVariant = alienComp.headVariant; + newPawn.story.bodyType = comp.Pawn.story.bodyType; + alienComp2.bodyMaskVariant = alienComp.bodyMaskVariant; + alienComp2.bodyVariant = alienComp.bodyVariant; + } + } + } + + public static void SetHair(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool hair = comp.ChosenItem.copyParent.hair; + if (hair) + { + newPawn.story.hairDef = comp.Pawn.story.hairDef; + } + } + + public static void SetHairColor(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool hairColor = comp.ChosenItem.copyParent.hairColor; + if (hairColor) + { + newPawn.story.HairColor = comp.Pawn.story.HairColor; + } + } + + public static void SetHediff(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool flag = !comp.ChosenItem.copyParent.hediff; + if (!flag) + { + newPawn.health.hediffSet.hediffs = new List(); + List hediffs = comp.ChosenItem.copyParent.HasHediffExclusion ? (from h in comp.Pawn.health.hediffSet.hediffs.ListFullCopy() + where !comp.ChosenItem.copyParent.excludeHediff.Contains(h.def) && (!comp.ChosenItem.copyParent.excludeTendableHediffs || !h.def.tendable) && (!comp.ChosenItem.copyParent.excludePermanentHediffs || h.TryGetComp() == null) + select h).ToList() : comp.Pawn.health.hediffSet.hediffs.ListFullCopy(); + newPawn.health.hediffSet.hediffs = hediffs; + } + } + + public static void SetSkills(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn, bool debug = false) + { + bool flag = !comp.ChosenItem.copyParent.skills; + checked + { + if (!flag) + { + string text = newPawn.LabelShort + " - SetSkills - "; + for (int i = 0; i < newPawn.skills.skills.Count; i++) + { + float randomInRange = comp.ChosenItem.copyParent.skillDecay.RandomInRange; + int num = (int)(unchecked((float)comp.Pawn.skills.skills[i].levelInt * randomInRange)); + if (debug) + { + Log.Warning(string.Concat(new object[] + { + text, + " browsing ", + comp.Pawn.skills.skills[i].def.defName, + " ori: ", + comp.Pawn.skills.skills[i].levelInt, + " new: ", + newPawn.skills.skills[i].levelInt, + " decayRatio: ", + randomInRange, + " wantedSkill: ", + num + })); + } + bool flag2 = num > newPawn.skills.skills[i].levelInt; + if (flag2) + { + if (debug) + { + Log.Warning(text + "Calling gainskill"); + } + comp.GainSkill(newPawn, num, i, debug); + } + else + { + bool flag3 = num < newPawn.skills.skills[i].levelInt; + if (flag3) + { + if (debug) + { + Log.Warning(text + "Calling loseskill"); + } + comp.LoseSkill(newPawn, num, i, debug); + } + } + if (debug) + { + Log.Warning(string.Concat(new object[] + { + text, + " copied skill [", + i, + "]:", + comp.Pawn.skills.skills[i].def.defName, + " new: ", + newPawn.skills.skills[i].levelInt + })); + } + } + } + } + } + + public static void GainSkill(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn, int wantedLevel, int index, bool debug = false) + { + string text = newPawn.LabelShort + " - GainSkill - "; + if (debug) + { + Log.Warning(text + "Entering"); + } + int num = 20; + checked + { + while (wantedLevel > newPawn.skills.skills[index].levelInt && num > 0) + { + float xpRequiredForLevelUp = newPawn.skills.skills[index].XpRequiredForLevelUp; + if (debug) + { + Log.Warning(string.Concat(new object[] + { + text, + " loop: ", + num, + " xpInjected: ", + xpRequiredForLevelUp, + " ori: ", + comp.Pawn.skills.skills[index].levelInt, + " new: ", + newPawn.skills.skills[index].levelInt + })); + } + newPawn.skills.skills[index].Learn(xpRequiredForLevelUp, true, false); + num--; + } + } + } + + public static void LoseSkill(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn, int wantedLevel, int index, bool debug = false) + { + string text = newPawn.LabelShort + " - LoseSkill - "; + if (debug) + { + Log.Warning(text + "Entering"); + } + int num = 20; + checked + { + while (wantedLevel < newPawn.skills.skills[index].levelInt && num > 0) + { + float num2 = (float)(0 - newPawn.skills.skills[index].levelInt * 1000); + if (debug) + { + Log.Warning(string.Concat(new object[] + { + text, + " loop: ", + num, + " xpInjected: ", + num2, + " ori: ", + comp.Pawn.skills.skills[index].levelInt, + " new: ", + newPawn.skills.skills[index].levelInt + })); + } + newPawn.skills.skills[index].Learn(num2, true, false); + num--; + } + } + } + + public static void SetPassions(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn, bool debug = false) + { + bool flag = !comp.ChosenItem.copyParent.passions; + checked + { + if (!flag) + { + for (int i = 0; i < newPawn.skills.skills.Count; i++) + { + newPawn.skills.skills[i].passion = comp.Pawn.skills.skills[i].passion; + } + } + } + } + + public static void InitRememberBackstories(out BackstoryDef childBS, out BackstoryDef adultBS) + { + BackstoryDef backstoryDef; + adultBS = (backstoryDef = null); + childBS = backstoryDef; + } + + public static void ResetBackstories(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + newPawn.story.Childhood = null; + newPawn.story.Adulthood = null; + } + + public static void RememberBackstories(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn, out BackstoryDef childBS, out BackstoryDef adultBS) + { + childBS = newPawn.story.Childhood; + adultBS = newPawn.story.Adulthood; + } + + public static void ReinjectBackstories(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn, BackstoryDef childBS, BackstoryDef adultBS) + { + newPawn.story.Childhood = childBS; + newPawn.story.Adulthood = adultBS; + } + + public static void SetBackstories(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool childBS = comp.ChosenItem.copyParent.childBS; + if (childBS) + { + newPawn.story.Childhood = comp.Pawn.story.Childhood; + } + bool adultBS = comp.ChosenItem.copyParent.adultBS; + if (adultBS) + { + newPawn.story.Adulthood = comp.Pawn.story.Adulthood; + } + } + + public static void SetTraits(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool flag = !comp.ChosenItem.copyParent.traits; + checked + { + if (!flag) + { + for (int i = newPawn.story.traits.allTraits.Count - 1; i >= 0; i--) + { + newPawn.story.traits.allTraits.RemoveAt(i); + } + newPawn.story.traits.allTraits = comp.Pawn.story.traits.allTraits.ListFullCopy(); + } + } + } + + public static void UpdateDisabilities(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool flag = newPawn.skills == null; + if (!flag) + { + newPawn.skills.Notify_SkillDisablesChanged(); + } + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/PawnRedressUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/PawnRedressUtils.cs new file mode 100644 index 0000000..1928302 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/PawnRedressUtils.cs @@ -0,0 +1,63 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public static class PawnRedressUtils + { + public static void DestroyInventory(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool destroyInventory = comp.ChosenItem.redressNewPawn.destroyInventory; + if (destroyInventory) + { + newPawn.inventory.innerContainer.ClearAndDestroyContents(DestroyMode.Vanish); + } + } + + public static void DestroyEquipment(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool destroyEquipment = comp.ChosenItem.redressNewPawn.destroyEquipment; + if (destroyEquipment) + { + newPawn.equipment.DestroyAllEquipment(DestroyMode.Vanish); + } + } + + public static void DestroyApparel(this HediffComp_RandySpawnUponDeath comp, Pawn newPawn) + { + bool destroyApparel = comp.ChosenItem.redressNewPawn.destroyApparel; + if (destroyApparel) + { + newPawn.apparel.DestroyAll(DestroyMode.Vanish); + } + } + + public static bool StripCorpse(this HediffComp_RandySpawnUponDeath comp, Corpse corpse) + { + bool result = false; + bool flag = comp.Props.HasParentRedress && comp.Props.redressParent.strip && !corpse.Negligible(); + if (flag) + { + result = true; + bool flag2 = corpse.AnythingToStrip(); + if (flag2) + { + corpse.Strip(true); + } + } + return result; + } + + public static bool DestroyCorpse(this HediffComp_RandySpawnUponDeath comp, Corpse corpse) + { + bool result = false; + bool flag = comp.Props.HasParentRedress && comp.Props.redressParent.destroyCorpse && !corpse.Negligible(); + if (flag) + { + result = true; + corpse.DeSpawn(DestroyMode.Vanish); + } + return result; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Properties/AssemblyInfo.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..205d85b --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +using System; +using System.Diagnostics; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.Versioning; + +[assembly: AssemblyVersion("0.0.0.0")] +[assembly: AssemblyTitle("MoharHediffs")] +[assembly: AssemblyProduct("MoharHediffs")] diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandomFactionParameter.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandomFactionParameter.cs new file mode 100644 index 0000000..051277a --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandomFactionParameter.cs @@ -0,0 +1,96 @@ +using System; +using RimWorld; + +namespace MoharHediffs +{ + public class RandomFactionParameter + { + public bool HasInheritedFaction + { + get + { + return this.inheritedFaction; + } + } + + public bool HasForcedFaction + { + get + { + return this.forcedFaction != null; + } + } + + public bool HasPlayerFaction + { + get + { + return this.playerFaction; + } + } + + public bool HasNoFaction + { + get + { + return this.noFaction; + } + } + + public bool HasDefaultPawnKindFaction + { + get + { + return this.defaultPawnKindFaction; + } + } + + public bool IsLegitRandomFactionParameter() + { + int num = 0; + bool hasInheritedFaction = this.HasInheritedFaction; + checked + { + if (hasInheritedFaction) + { + num++; + } + bool hasForcedFaction = this.HasForcedFaction; + if (hasForcedFaction) + { + num++; + } + bool hasPlayerFaction = this.HasPlayerFaction; + if (hasPlayerFaction) + { + num++; + } + bool hasNoFaction = this.HasNoFaction; + if (hasNoFaction) + { + num++; + } + bool hasDefaultPawnKindFaction = this.HasDefaultPawnKindFaction; + if (hasDefaultPawnKindFaction) + { + num++; + } + return num == 1; + } + } + + public bool inheritedFaction = false; + + public FactionDef forcedFaction = null; + + public bool playerFaction = false; + + public bool defaultPawnKindFaction = false; + + public bool noFaction = false; + + public bool newBorn = false; + + public float weight; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandomPicker.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandomPicker.cs new file mode 100644 index 0000000..36d8f83 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandomPicker.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Verse; + +namespace MoharHediffs +{ + public static class RandomPicker + { + public static List GetCompatibleItems(this HediffComp_AnotherRandom comp) + { + List list = new List(); + foreach (HediffItem hediffItem in comp.Props.hediffPool) + { + HediffCompProperties_AnotherRandom props = comp.Props; + HediffCondition defaultPlusSpecificHediffCondition = ConditionBuilder.GetDefaultPlusSpecificHediffCondition(((props != null) ? props.defaultCondition : null) ?? null, ((hediffItem != null) ? hediffItem.specificCondition : null) ?? null, comp.HighVerbosity); + BodyPartRecord bodyPartRecord; + bool flag = defaultPlusSpecificHediffCondition.HasBodypartCondition ? defaultPlusSpecificHediffCondition.bodyPart.GetBPRFromHediffCondition(comp.Pawn, out bodyPartRecord, false) : (!defaultPlusSpecificHediffCondition.HasPawnCondition || defaultPlusSpecificHediffCondition.pawn.ValidateCompatibilityOfHediffWithPawn(comp.Pawn, false)); + if (flag) + { + list.Add(hediffItem); + } + } + bool flag2 = !list.NullOrEmpty(); + List result; + if (flag2) + { + result = list; + } + else + { + result = null; + } + return result; + } + + public static List GetRemainingItems(this List hediffItems, List AlreadyPickedItems) + { + return (from hi in hediffItems + where !AlreadyPickedItems.Contains(hi) + select hi).ToList(); + } + + public static float GetWeight(this List HL) + { + float num = 0f; + foreach (HediffItem hediffItem in HL) + { + num += hediffItem.weight; + } + return num; + } + + public static HediffItem PickRandomWeightedItem(this List HL, bool debug = false) + { + float weight = HL.GetWeight(); + float num = Rand.Range(0f, weight); + checked + { + for (int i = 0; i < HL.Count; i++) + { + bool flag = unchecked(num -= HL[i].weight) < 0f; + if (flag) + { + Tools.Warn("PickRandomWeightedItem : returning " + i, debug); + return HL[i]; + } + } + return null; + } + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandyPickerUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandyPickerUtils.cs new file mode 100644 index 0000000..f05680a --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandyPickerUtils.cs @@ -0,0 +1,281 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using AlienRace; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class RandyPickerUtils + { + public static float ThingsTotalWeight(this HediffComp_RandySpawnUponDeath comp, List TSList) + { + string text = comp.MyDebug ? (comp.Pawn.LabelShort + " ThingsTotalWeight ") : ""; + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning(text + " searching total weights thing list"); + } + float num = 0f; + for (int i = 0; i < TSList.Count; i = checked(i + 1)) + { + num += TSList[i].weight; + } + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning(text + " found: " + num); + } + return num; + } + + public static bool SameColorAs(this Color colorA, Color colorB) + { + bool flag = (double)Math.Abs(colorA.r - colorB.r) < 0.01; + bool flag2 = (double)Math.Abs(colorA.g - colorB.g) < 0.01; + bool flag3 = (double)Math.Abs(colorA.b - colorB.b) < 0.01; + bool flag4 = (double)Math.Abs(colorA.a - colorB.a) < 0.01; + return flag && flag2 && flag3 && flag4; + } + + public static Color PickAlienColor(this AlienPartGenerator.AlienComp a, string channelName, int channelNum) + { + return (channelNum == 1) ? a.GetChannel(channelName).first : ((channelNum == 2) ? a.GetChannel(channelName).second : Color.white); + } + + public static Color PickStuffColor(this ThingDef tDef) + { + StuffProperties stuffProps = tDef.stuffProps; + bool flag; + if (stuffProps == null) + { + flag = false; + } + else + { + Color color = stuffProps.color; + flag = true; + } + bool flag2 = flag; + Color result; + if (flag2) + { + result = tDef.stuffProps.color; + } + else + { + ThingDefCountClass thingDefCountClass = tDef.butcherProducts.FirstOrDefault() ?? null; + bool flag3 = thingDefCountClass == null; + if (flag3) + { + result = Color.black; + } + else + { + ThingDef thingDef = thingDefCountClass.thingDef; + bool flag4; + if (thingDef == null) + { + flag4 = true; + } + else + { + StuffProperties stuffProps2 = thingDef.stuffProps; + Color? color2 = (stuffProps2 != null) ? new Color?(stuffProps2.color) : null; + flag4 = (color2 == null); + } + bool flag5 = flag4; + if (flag5) + { + result = Color.black; + } + else + { + result = thingDef.stuffProps.color; + } + } + } + return result; + } + + public static List ThingSettingsWithColor(this HediffComp_RandySpawnUponDeath comp) + { + string text = comp.MyDebug ? (comp.Pawn.LabelShort + " ThingSettingsWithColor -") : ""; + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning(text + " creating thing list with color"); + } + bool flag = !comp.HasColorCondition || !comp.Pawn.IsAlien(); + List result; + if (flag) + { + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning(text + "Found no color condition or pawn is not alien"); + } + result = null; + } + else + { + AlienPartGenerator.AlienComp alien = Tools.GetAlien(comp.Pawn); + bool flag2 = alien == null; + if (flag2) + { + bool myDebug3 = comp.MyDebug; + if (myDebug3) + { + Log.Warning(text + "Found no AlienPartGenerator.AlienComp"); + } + result = null; + } + else + { + bool myDebug4 = comp.MyDebug; + if (myDebug4) + { + Log.Warning(string.Concat(new object[] + { + text, + "colors=> skin.first:", + alien.GetChannel("skin").first, + " skin.second:", + alien.GetChannel("skin").second + })); + } + List list = (from t in comp.FullOptionList + where t.IsThingSpawner && t.HasColorCondition + select t).ToList(); + bool myDebug5 = comp.MyDebug; + if (myDebug5) + { + Log.Warning("Option num:" + list.Count); + } + Color PawnColor = alien.GetChannel("skin").first; + foreach (ThingSettings thingSettings in list) + { + bool myDebug6 = comp.MyDebug; + if (myDebug6) + { + Log.Warning(string.Concat(new object[] + { + " TS.Def: ", + thingSettings.thingToSpawn.defName, + "; TS.color: ", + thingSettings.thingToSpawn.PickStuffColor(), + "; P.color: ", + PawnColor, + "; equals: ", + PawnColor.SameColorAs(thingSettings.thingToSpawn.PickStuffColor()).ToString() + })); + } + } + List list2 = new List(); + list2 = (from t in comp.FullOptionList + where t.IsThingSpawner && t.HasColorCondition && PawnColor.SameColorAs(t.thingToSpawn.PickStuffColor()) + select t).ToList(); + bool myDebug7 = comp.MyDebug; + if (myDebug7) + { + Log.Warning(string.Concat(new object[] + { + text, + "Found ", + list2.Count, + " things with color" + })); + } + result = list2; + } + } + return result; + } + + public static List ThingSettingsWithExclusion(this HediffComp_RandySpawnUponDeath comp, List TSList, List AlreadyPickedOptions) + { + List list = new List(); + list = comp.Props.settings.things.ListFullCopy(); + foreach (int index in AlreadyPickedOptions) + { + list.RemoveAt(index); + } + return list; + } + + public static int GetWeightedRandomIndex(this HediffComp_RandySpawnUponDeath comp, List AlreadyPickedOptions) + { + bool flag = !comp.Props.settings.HasSomethingToSpawn; + int result; + if (flag) + { + result = -1; + } + else + { + bool hasColorCondition = comp.HasColorCondition; + List list; + if (hasColorCondition) + { + list = comp.ThingSettingsWithColor(); + } + else + { + list = comp.FullOptionList; + } + bool flag2 = !AlreadyPickedOptions.NullOrEmpty(); + if (flag2) + { + list = comp.ThingSettingsWithExclusion(list, AlreadyPickedOptions); + } + float num = Rand.Range(0f, comp.ThingsTotalWeight(list)); + int i = 0; + while (i < list.Count) + { + bool flag3 = (num -= list[i].weight) < 0f; + checked + { + if (flag3) + { + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning("GetWeightedRandomIndex : returning thing " + i); + } + bool flag4 = AlreadyPickedOptions.NullOrEmpty() && !comp.HasColorCondition; + if (flag4) + { + return i; + } + int num2 = comp.Props.settings.things.IndexOf(list[i]); + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning(string.Concat(new object[] + { + "GetWeightedRandomIndex : returning thing ", + i, + " normalized:", + num2 + })); + } + return num2; + } + else + { + i++; + } + } + } + bool myDebug3 = comp.MyDebug; + if (myDebug3) + { + Log.Warning("GetWeightedRandomIndex : failed to return proper index, returning -1"); + } + result = -1; + } + return result; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandySpawnerUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandySpawnerUtils.cs new file mode 100644 index 0000000..dca77a6 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RandySpawnerUtils.cs @@ -0,0 +1,348 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public static class RandySpawnerUtils + { + public static float TotalWeight(this HediffComp_RandySpawner comp) + { + float num = 0f; + List itemParameters = comp.Props.itemParameters; + for (int i = 0; i < itemParameters.Count; i = checked(i + 1)) + { + num += itemParameters[i].weight; + } + return num; + } + + public static float TotalWeight(this List RFP) + { + float num = 0f; + for (int i = 0; i < RFP.Count; i = checked(i + 1)) + { + num += RFP[i].weight; + } + return num; + } + + public static void ComputeRandomFaction(this HediffComp_RandySpawner comp) + { + bool hasFactionParams = comp.CurIP.HasFactionParams; + if (hasFactionParams) + { + int weightedRandomFaction = comp.GetWeightedRandomFaction(); + bool flag = weightedRandomFaction == -1; + if (flag) + { + Tools.Warn("ComputeRandomFaction - found no index", comp.MyDebug); + } + else + { + comp.newBorn = comp.CurIP.randomFactionParameters[weightedRandomFaction].newBorn; + RandomFactionParameter rfp = comp.CurIP.randomFactionParameters[weightedRandomFaction]; + comp.Itemfaction = comp.GetFaction(rfp); + string str = "ComputeRandomFaction - found:"; + Faction itemfaction = comp.Itemfaction; + Tools.Warn(str + ((itemfaction != null) ? itemfaction.GetCallLabel() : null), comp.MyDebug); + } + } + } + + public static int GetWeightedRandomIndex(this HediffComp_RandySpawner comp) + { + float num = Rand.Range(0f, comp.TotalWeight()); + List itemParameters = comp.Props.itemParameters; + checked + { + for (int i = 0; i < itemParameters.Count; i++) + { + bool flag = unchecked(num -= itemParameters[i].weight) < 0f; + if (flag) + { + Tools.Warn("GetWeightedRandomIndex : returning " + i, comp.MyDebug); + return i; + } + } + Tools.Warn("GetWeightedRandomIndex : failed to return proper index, returning -1", comp.MyDebug); + return -1; + } + } + + public static int GetWeightedRandomFaction(this HediffComp_RandySpawner comp) + { + bool flag = !comp.HasValidIP || !comp.CurIP.HasFactionParams; + checked + { + int result; + if (flag) + { + result = -1; + } + else + { + List randomFactionParameters = comp.CurIP.randomFactionParameters; + float num = Rand.Range(0f, randomFactionParameters.TotalWeight()); + for (int i = 0; i < randomFactionParameters.Count; i++) + { + bool flag2 = unchecked(num -= randomFactionParameters[i].weight) < 0f; + if (flag2) + { + Tools.Warn("GetWeightedRandomIndex : returning " + i, comp.MyDebug); + return i; + } + } + Tools.Warn("GetWeightedRandomFaction : failed to return proper index, returning -1", comp.MyDebug); + result = -1; + } + return result; + } + } + + public static bool SetRequirementGraceTicks(this HediffComp_RandySpawner comp) + { + bool requiresFood = comp.RequiresFood; + bool requiresHealth = comp.RequiresHealth; + bool flag = requiresFood || requiresHealth; + checked + { + bool result; + if (flag) + { + bool flag2 = requiresFood; + if (flag2) + { + comp.hungerReset++; + } + else + { + comp.healthReset++; + } + bool hasValidIP = comp.HasValidIP; + if (hasValidIP) + { + comp.graceTicks = (int)(unchecked(comp.CurIP.graceDays.RandomInRange * 60000f)); + } + result = true; + } + else + { + comp.hungerReset = (comp.healthReset = 0); + result = false; + } + return result; + } + } + + public static void CheckProps(this HediffComp_RandySpawner comp) + { + bool flag = comp.Props.itemParameters.NullOrEmpty(); + if (flag) + { + comp.BlockAndDestroy(comp.Pawn.Label + " props: no itemParameters - giving up", comp.MyDebug); + } + checked + { + for (int i = 0; i < comp.Props.itemParameters.Count; i++) + { + ItemParameter itemParameter = comp.Props.itemParameters[i]; + bool flag2 = itemParameter.spawnCount.min > comp.spawnCountErrorLimit || itemParameter.spawnCount.max > comp.spawnCountErrorLimit; + if (flag2) + { + comp.BlockAndDestroy(comp.Pawn.Label + " props: SpawnCount is too high: >" + comp.spawnCountErrorLimit, comp.MyDebug); + break; + } + bool flag3 = itemParameter.daysB4Next.min < comp.minDaysB4NextErrorLimit; + if (flag3) + { + comp.BlockAndDestroy(string.Concat(new object[] + { + comp.Pawn.Label, + " props: minDaysB4Next is too low: ", + itemParameter.daysB4Next.min, + "<", + comp.minDaysB4NextErrorLimit + }), comp.MyDebug); + break; + } + bool flag4 = !itemParameter.ThingSpawner && !itemParameter.PawnSpawner; + if (flag4) + { + comp.BlockAndDestroy(comp.Pawn.Label + " props: not a thing nor pawn spawner bc no def for either", comp.MyDebug); + break; + } + bool hasFactionParams = itemParameter.HasFactionParams; + if (hasFactionParams) + { + foreach (RandomFactionParameter randomFactionParameter in itemParameter.randomFactionParameters) + { + bool flag5 = !randomFactionParameter.IsLegitRandomFactionParameter(); + if (flag5) + { + comp.BlockAndDestroy(comp.Pawn.Label + " faction props: invalid faction params", comp.MyDebug); + return; + } + } + } + } + } + } + + public static void DumpProps(this HediffComp_RandySpawner comp) + { + Tools.Warn(string.Concat(new string[] + { + "hungerRelative: ", + comp.Props.hungerRelative.ToString(), + "; healthRelative: ", + comp.Props.healthRelative.ToString(), + "; " + }), comp.MyDebug); + checked + { + for (int i = 0; i < comp.Props.itemParameters.Count; i++) + { + ItemParameter itemParameter = comp.Props.itemParameters[i]; + itemParameter.LogParams(comp.MyDebug); + } + } + } + + public static bool TryFindSpawnCell(this HediffComp_RandySpawner comp, out IntVec3 result) + { + Pawn pawn = comp.Pawn; + ThingDef thingToSpawn = comp.CurIP.thingToSpawn; + bool flag = pawn.Negligible(); + checked + { + bool result2; + if (flag) + { + result = IntVec3.Invalid; + Tools.Warn("TryFindSpawnCell Null - pawn null", comp.MyDebug); + result2 = false; + } + else + { + foreach (IntVec3 intVec in GenAdj.CellsAdjacent8Way(pawn).InRandomOrder(null)) + { + bool flag2 = intVec.Walkable(pawn.Map); + if (flag2) + { + Building edifice = intVec.GetEdifice(pawn.Map); + bool flag3 = edifice == null || !thingToSpawn.IsEdifice(); + if (flag3) + { + Building_Door building_Door; + bool flag4 = (building_Door = (edifice as Building_Door)) == null || building_Door.FreePassage; + if (flag4) + { + bool flag5 = GenSight.LineOfSight(pawn.Position, intVec, pawn.Map, false, null, 0, 0); + if (flag5) + { + bool flag6 = false; + List thingList = intVec.GetThingList(pawn.Map); + for (int i = 0; i < thingList.Count; i++) + { + Thing thing = thingList[i]; + bool flag7 = thing.def.category == ThingCategory.Item; + if (flag7) + { + bool flag8 = thing.def != thingToSpawn || thing.stackCount > thingToSpawn.stackLimit - comp.calculatedQuantity; + if (flag8) + { + flag6 = true; + break; + } + } + } + bool flag9 = !flag6; + if (flag9) + { + result = intVec; + return true; + } + } + } + } + } + } + Tools.Warn("TryFindSpawnCell Null - no spawn cell found", comp.MyDebug); + result = IntVec3.Invalid; + result2 = false; + } + return result2; + } + } + + public static Faction GetFaction(this HediffComp_RandySpawner comp, RandomFactionParameter RFP) + { + FactionDef fDef = comp.GetFactionDef(RFP); + bool flag = fDef == null; + Faction result; + if (flag) + { + result = null; + } + else + { + result = (from F in Find.FactionManager.AllFactions + where F.def == fDef + select F).FirstOrFallback(null); + } + return result; + } + + public static FactionDef GetFactionDef(this HediffComp_RandySpawner comp, RandomFactionParameter RFP) + { + Pawn pawn = comp.Pawn; + bool hasInheritedFaction = RFP.HasInheritedFaction; + FactionDef result; + if (hasInheritedFaction) + { + result = pawn.Faction.def; + } + else + { + bool hasForcedFaction = RFP.HasForcedFaction; + if (hasForcedFaction) + { + result = RFP.forcedFaction; + } + else + { + bool hasPlayerFaction = RFP.HasPlayerFaction; + if (hasPlayerFaction) + { + result = Faction.OfPlayerSilentFail.def; + } + else + { + bool hasNoFaction = RFP.HasNoFaction; + if (hasNoFaction) + { + result = null; + } + else + { + bool hasDefaultPawnKindFaction = RFP.HasDefaultPawnKindFaction; + if (hasDefaultPawnKindFaction) + { + PawnKindDef pawnKindToSpawn = comp.CurIP.pawnKindToSpawn; + result = (((pawnKindToSpawn != null) ? pawnKindToSpawn.defaultFactionType : null) ?? null); + } + else + { + result = null; + } + } + } + } + } + return result; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RedressSettings.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RedressSettings.cs new file mode 100644 index 0000000..4130443 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RedressSettings.cs @@ -0,0 +1,17 @@ +using System; + +namespace MoharHediffs +{ + public class RedressSettings + { + public bool destroyApparel = false; + + public bool destroyEquipment = false; + + public bool destroyInventory = false; + + public bool strip = false; + + public bool destroyCorpse = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RequirementSettings.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RequirementSettings.cs new file mode 100644 index 0000000..88ae7a8 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RequirementSettings.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class RequirementSettings + { + public bool HasHediffRequirement + { + get + { + bool result; + if (!this.hediff.NullOrEmpty()) + { + result = this.hediff.Any((HediffRequirementSettings h) => h.HasHediffDef); + } + else + { + result = false; + } + return result; + } + } + + public bool HasThingRequirement + { + get + { + bool result; + if (!this.thing.NullOrEmpty()) + { + result = this.thing.Any((ThingRequirementSettings t) => t.HasThingDef); + } + else + { + result = false; + } + return result; + } + } + + public bool HasAtLeastOneRequirementSetting + { + get + { + return this.HasHediffRequirement || this.HasThingRequirement; + } + } + + public bool HasContainerSpawn + { + get + { + bool result; + if (this.HasThingRequirement) + { + result = this.thing.Any((ThingRequirementSettings t) => t.HasContainerSpawn); + } + else + { + result = false; + } + return result; + } + } + + public List hediff; + + public List thing; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RequirementUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RequirementUtils.cs new file mode 100644 index 0000000..7fbe21c --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RequirementUtils.cs @@ -0,0 +1,177 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public static class RequirementUtils + { + public static bool FulfilsSeverityRequirement(this HediffComp_RandySpawnUponDeath comp) + { + string text = comp.MyDebug ? (comp.Pawn.LabelShort + " FulfilsSeverityRequirement - ") : ""; + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning(text + "Entering"); + } + bool flag = comp.Pawn == null || !comp.HasHediffRequirement; + bool result; + if (flag) + { + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning(text + " null pawn or no requirement"); + } + result = false; + } + else + { + bool flag2 = true; + using (List.Enumerator enumerator = comp.Props.requirements.hediff.GetEnumerator()) + { + while (enumerator.MoveNext()) + { + HediffRequirementSettings HRS = enumerator.Current; + bool flag3 = HRS.hediffDef == null; + if (!flag3) + { + IEnumerable enumerable = from h in comp.Pawn.health.hediffSet.hediffs + where h.def == HRS.hediffDef && h.Severity >= HRS.severity.min && h.Severity <= HRS.severity.max + select h; + bool flag4 = !enumerable.EnumerableNullOrEmpty(); + flag2 = (flag2 && flag4); + bool flag5 = !flag4; + if (flag5) + { + bool myDebug3 = comp.MyDebug; + if (myDebug3) + { + Log.Warning(text + " did not find " + HRS.hediffDef); + } + return false; + } + } + } + } + result = flag2; + } + return result; + } + + public static bool FulfilsThingRequirement(this HediffComp_RandySpawnUponDeath comp, Corpse corpse, out Thing closestThing) + { + RequirementUtils.<>c__DisplayClass1_0 CS$<>8__locals1 = new RequirementUtils.<>c__DisplayClass1_0(); + CS$<>8__locals1.corpse = corpse; + string text = comp.MyDebug ? (comp.Pawn.LabelShort + " FulfilsThingRequirement - ") : ""; + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning(text + "Entering"); + } + closestThing = null; + bool flag = CS$<>8__locals1.corpse.Negligible() || !comp.HasThingRequirement; + bool result; + if (flag) + { + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning(text + " negligeable corpse or no requirement"); + } + result = false; + } + else + { + bool flag2 = true; + using (List.Enumerator enumerator = comp.Props.requirements.thing.GetEnumerator()) + { + while (enumerator.MoveNext()) + { + RequirementUtils.<>c__DisplayClass1_1 CS$<>8__locals2 = new RequirementUtils.<>c__DisplayClass1_1(); + CS$<>8__locals2.CS$<>8__locals1 = CS$<>8__locals1; + CS$<>8__locals2.TRS = enumerator.Current; + bool flag3 = CS$<>8__locals2.TRS.thingDef == null; + if (!flag3) + { + CompRefuelable fuelComp = null; + CompPowerTrader powerComp = null; + IEnumerable enumerable = from t in Find.CurrentMap.spawnedThings + where t.def == CS$<>8__locals2.TRS.thingDef && t.Position.DistanceTo(CS$<>8__locals2.CS$<>8__locals1.corpse.Position) <= CS$<>8__locals2.TRS.distance.max && t.Position.DistanceTo(CS$<>8__locals2.CS$<>8__locals1.corpse.Position) >= CS$<>8__locals2.TRS.distance.min && (!CS$<>8__locals2.TRS.sameFaction || CS$<>8__locals2.CS$<>8__locals1.corpse.InnerPawn.Faction == t.Faction) && (!CS$<>8__locals2.TRS.needsFueled || ((fuelComp = t.TryGetComp()) != null && fuelComp.HasFuel)) && (!CS$<>8__locals2.TRS.needsPowered || ((powerComp = t.TryGetComp()) != null && powerComp.PowerOn)) + select t; + bool flag4 = !enumerable.EnumerableNullOrEmpty(); + bool flag5 = flag4 && (CS$<>8__locals2.TRS.spawnClose || CS$<>8__locals2.TRS.spawnInside); + if (flag5) + { + IEnumerable source = enumerable; + Func selector; + if ((selector = CS$<>8__locals2.CS$<>8__locals1.<>9__1) == null) + { + selector = (CS$<>8__locals2.CS$<>8__locals1.<>9__1 = ((Thing t) => t.Position.DistanceTo(CS$<>8__locals2.CS$<>8__locals1.corpse.Position))); + } + closestThing = source.MinBy(selector); + } + flag2 = (flag2 && flag4); + bool flag6 = !flag4; + if (flag6) + { + bool myDebug3 = comp.MyDebug; + if (myDebug3) + { + Log.Warning(text + " did not find " + CS$<>8__locals2.TRS.thingDef); + } + return false; + } + } + } + } + result = flag2; + } + return result; + } + + public static bool FulfilsRequirement(this HediffComp_RandySpawnUponDeath comp, out Thing closestThing) + { + closestThing = null; + bool flag = !comp.HasRequirement; + bool result; + if (flag) + { + result = true; + } + else + { + bool flag2 = comp.HasHediffRequirement && !comp.FulfilsSeverityRequirement(); + if (flag2) + { + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning("hediff requirements not fulfiled"); + } + result = false; + } + else + { + bool flag3 = comp.HasThingRequirement && !comp.FulfilsThingRequirement(comp.Pawn.Corpse, out closestThing); + if (flag3) + { + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning("thing requirements not fulfiled"); + } + result = false; + } + else + { + result = true; + } + } + } + return result; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Restriction.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Restriction.cs new file mode 100644 index 0000000..986938d --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Restriction.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class Restriction + { + public bool HasTerrainRestriction + { + get + { + return this.terrain != null; + } + } + + public bool HasPostureRestriction + { + get + { + return !this.allowedPostures.NullOrEmpty(); + } + } + + public bool onlyWhenMoving = true; + + public List allowedPostures; + + public TerrainRestriction terrain; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RotationOffset.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RotationOffset.cs new file mode 100644 index 0000000..3acdf7a --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/RotationOffset.cs @@ -0,0 +1,13 @@ +using System; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public class RotationOffset + { + public Rot4 rot; + + public Vector3 offset; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/SpawnRules.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/SpawnRules.cs new file mode 100644 index 0000000..c5821dc --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/SpawnRules.cs @@ -0,0 +1,20 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class SpawnRules + { + public bool IsUnlimited + { + get + { + return this.spawnedMax <= 0; + } + } + + public int spawnedMax = 2; + + public IntRange period = new IntRange(15, 25); + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/SpawnerUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/SpawnerUtils.cs new file mode 100644 index 0000000..ac93c3f --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/SpawnerUtils.cs @@ -0,0 +1,372 @@ +using System; +using System.Collections.Generic; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public static class SpawnerUtils + { + public static bool TrySpawnPawn(this HediffComp_RandySpawnUponDeath comp, Thing refThing, int randomQuantity) + { + string text = comp.MyDebug ? (comp.Pawn.LabelShort + " TrySpawnPawn ") : ""; + ThingSettings chosenItem = comp.ChosenItem; + IntVec3 position = refThing.Position; + Map map = refThing.Map; + PawnKindDef pawnOfChoice = comp.PawnOfChoice; + PawnGenerationRequest request = chosenItem.newBorn ? new PawnGenerationRequest(pawnOfChoice, comp.RandomFaction, PawnGenerationContext.NonPlayer, -1, false, false, false, true, false, 0f, false, true, false, false, false, false, false, false, false, 0f, 0f, null, 0f, null, null, null, null, null, new float?(0f), new float?(0f), null, null, null, null, null, false, false, false, false, null, null, null, null, null, 0f, DevelopmentalStage.Adult, null, null, null, false, false, false, -1, 0, false) : new PawnGenerationRequest(pawnOfChoice, comp.RandomFaction, PawnGenerationContext.NonPlayer, -1, false, false, false, true, false, 0f, false, true, false, false, false, false, false, false, false, 0f, 0f, null, 0f, null, null, null, null, null, null, null, null, null, null, null, null, false, false, false, false, null, null, null, null, null, 0f, DevelopmentalStage.Adult, null, null, null, false, false, false, -1, 0, false); + checked + { + for (int i = 0; i < randomQuantity; i++) + { + Pawn pawn = PawnGenerator.GeneratePawn(request); + comp.SetAge(pawn); + bool isCopier = chosenItem.IsCopier; + if (isCopier) + { + comp.SetName(pawn); + comp.SetGender(pawn); + comp.SetMelanin(pawn); + comp.SetAlienSkinColor(pawn); + comp.SetAlienBodyAndHeadType(pawn); + comp.SetHair(pawn); + comp.SetHairColor(pawn); + comp.SetHediff(pawn); + BackstoryDef backstoryDef; + BackstoryDef backstoryDef2; + PawnCopyUtils.InitRememberBackstories(out backstoryDef, out backstoryDef2); + bool flag = comp.ChosenItem.copyParent.passions || comp.ChosenItem.copyParent.traits; + if (flag) + { + comp.RememberBackstories(pawn, out backstoryDef, out backstoryDef2); + comp.ResetBackstories(pawn); + comp.SetPassions(pawn, false); + comp.SetSkills(pawn, false); + comp.SetTraits(pawn); + } + bool flag2 = backstoryDef != null || backstoryDef2 != null; + if (flag2) + { + comp.ReinjectBackstories(pawn, backstoryDef, backstoryDef2); + } + comp.SetBackstories(pawn); + comp.UpdateDisabilities(pawn); + } + bool isRedresser = chosenItem.IsRedresser; + if (isRedresser) + { + comp.DestroyApparel(pawn); + comp.DestroyEquipment(pawn); + comp.DestroyInventory(pawn); + } + bool hasContainerSpawn = comp.HasContainerSpawn; + if (hasContainerSpawn) + { + Building_Casket building_Casket; + bool flag3 = (building_Casket = (refThing as Building_Casket)) != null; + if (flag3) + { + bool flag4 = !building_Casket.TryAcceptThing(pawn, true); + if (flag4) + { + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning(string.Concat(new string[] + { + text, + " tried to add ", + pawn.LabelShort, + " to ", + refThing.Label, + ", but failed" + })); + } + } + } + } + else + { + GenSpawn.Spawn(pawn, position, map, WipeMode.Vanish); + } + bool hasMentalStateParams = comp.ChosenItem.HasMentalStateParams; + if (hasMentalStateParams) + { + comp.ComputeRandomMentalState(); + bool flag5 = comp.RandomMS != null; + if (flag5) + { + pawn.mindState.mentalStateHandler.TryStartMentalState(comp.RandomMS, null, false, false, false, null, true, false, false); + } + } + comp.TrySpawnAllFilth(refThing, false); + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning("------------------"); + } + } + return true; + } + } + + public static void TrySpawnAllFilth(this HediffComp_RandySpawnUponDeath comp, Thing refThing, bool debug = false) + { + if (debug) + { + Log.Warning(comp.Pawn.LabelShort + " - TrySpawnAllFilth"); + } + bool flag = !comp.HasFilth; + checked + { + if (flag) + { + if (debug) + { + Log.Warning("no filth found"); + } + } + else + { + int randomInRange = comp.FilthNum.RandomInRange; + for (int i = 0; i < randomInRange; i++) + { + if (debug) + { + Log.Warning(string.Concat(new object[] + { + "filth ", + i, + "/", + randomInRange, + " - fDef:", + comp.FilthToSpawn, + " - pos:", + refThing.Position, + " - map null?", + (refThing.Map == null).ToString() + })); + } + SpawnerUtils.TrySpawnFilth(refThing, comp.FilthRadius.RandomInRange, comp.FilthToSpawn); + } + } + } + } + + public static void TrySpawnFilth(Thing refT, float filthRadius, ThingDef filthDef) + { + IntVec3 c; + bool flag; + if (refT.Map != null) + { + flag = CellFinder.TryFindRandomReachableNearbyCell(refT.Position, refT.Map, filthRadius, TraverseParms.For(TraverseMode.NoPassClosedDoors, Danger.Deadly, false, false, false), (IntVec3 x) => x.Standable(refT.Map), (Region x) => true, out c, 999999); + } + else + { + flag = false; + } + bool flag2 = flag; + if (flag2) + { + FilthMaker.TryMakeFilth(c, refT.Map, filthDef, 1, FilthSourceFlags.None, true); + } + } + + public static bool TrySpawnThing(this HediffComp_RandySpawnUponDeath comp, Thing thing, int randomQuantity) + { + Map map = thing.Map; + bool flag = comp.Props.spawnMaxAdjacent >= 0; + checked + { + if (flag) + { + int num = 0; + for (int i = 0; i < 9; i++) + { + IntVec3 c = thing.Position + GenAdj.AdjacentCellsAndInside[i]; + bool flag2 = !c.InBounds(map); + if (!flag2) + { + List thingList = c.GetThingList(map); + for (int j = 0; j < thingList.Count; j++) + { + bool flag3 = thingList[j].def == comp.ChosenItem.thingToSpawn; + if (flag3) + { + num += thingList[j].stackCount; + bool flag4 = num >= comp.Props.spawnMaxAdjacent; + if (flag4) + { + return false; + } + } + } + } + } + } + int k = 0; + int num2 = randomQuantity; + int num3 = 0; + while (k < randomQuantity) + { + IntVec3 intVec; + bool flag5 = comp.TryFindSpawnCell(thing, randomQuantity, map, out intVec); + if (flag5) + { + Thing thing2 = ThingMaker.MakeThing(comp.ChosenItem.thingToSpawn, null); + thing2.stackCount = num2; + bool flag6 = thing2.def.stackLimit > 0; + if (flag6) + { + bool flag7 = thing2.stackCount > thing2.def.stackLimit; + if (flag7) + { + thing2.stackCount = thing2.def.stackLimit; + } + } + k += thing2.stackCount; + num2 -= thing2.stackCount; + Thing t; + GenPlace.TryPlaceThing(thing2, intVec, map, ThingPlaceMode.Direct, ref t, null, null, default(Rot4)); + bool spawnForbidden = comp.Props.spawnForbidden; + if (spawnForbidden) + { + t.SetForbidden(true, true); + } + } + bool flag8 = num3++ > 10; + if (flag8) + { + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning("Had to break the loop"); + } + return false; + } + } + return num2 <= 0; + } + } + + public static bool TryDoSpawn(this HediffComp_RandySpawnUponDeath comp, Thing thing, int randomQuantity) + { + bool flag = thing.Negligible(); + bool result; + if (flag) + { + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning("TryDoSpawn - negligeable"); + } + result = false; + } + else + { + bool hasChosenPawn = comp.HasChosenPawn; + if (hasChosenPawn) + { + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning("TryDoSpawn -> TrySpawnPawn"); + } + result = comp.TrySpawnPawn(thing, randomQuantity); + } + else + { + bool hasChosenThing = comp.HasChosenThing; + if (hasChosenThing) + { + bool myDebug3 = comp.MyDebug; + if (myDebug3) + { + Log.Warning("TryDoSpawn -> TrySpawnPawn"); + } + result = comp.TrySpawnThing(thing, randomQuantity); + } + else + { + result = false; + } + } + } + return result; + } + + public static bool TryFindSpawnCell(this HediffComp_RandySpawnUponDeath comp, Thing refThing, int randomQuantity, Map map, out IntVec3 result) + { + ThingDef thingToSpawn = comp.ChosenItem.thingToSpawn; + bool flag = refThing.Negligible(); + checked + { + bool result2; + if (flag) + { + result = IntVec3.Invalid; + bool myDebug = comp.MyDebug; + if (myDebug) + { + Log.Warning("TryFindSpawnCell Null - pawn null"); + } + result2 = false; + } + else + { + foreach (IntVec3 intVec in GenAdj.CellsAdjacent8Way(refThing).InRandomOrder(null)) + { + bool flag2 = intVec.Walkable(map); + if (flag2) + { + Building edifice = intVec.GetEdifice(map); + bool flag3 = edifice == null || !thingToSpawn.IsEdifice(); + if (flag3) + { + Building_Door building_Door; + bool flag4 = (building_Door = (edifice as Building_Door)) == null || building_Door.FreePassage; + if (flag4) + { + bool flag5 = GenSight.LineOfSight(refThing.Position, intVec, map, false, null, 0, 0); + if (flag5) + { + bool flag6 = false; + List thingList = intVec.GetThingList(map); + for (int i = 0; i < thingList.Count; i++) + { + Thing thing = thingList[i]; + bool flag7 = thing.def.category == ThingCategory.Item; + if (flag7) + { + bool flag8 = thing.def != thingToSpawn || thing.stackCount > thingToSpawn.stackLimit - randomQuantity; + if (flag8) + { + flag6 = true; + break; + } + } + } + bool flag9 = !flag6; + if (flag9) + { + result = intVec; + return true; + } + } + } + } + } + } + bool myDebug2 = comp.MyDebug; + if (myDebug2) + { + Log.Warning("TryFindSpawnCell Null - no spawn cell found"); + } + result = IntVec3.Invalid; + result2 = false; + } + return result2; + } + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/StackCalculator.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/StackCalculator.cs new file mode 100644 index 0000000..0550da0 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/StackCalculator.cs @@ -0,0 +1,49 @@ +using System; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public static class StackCalculator + { + public static float CompletudeRatio(this Pawn pawn, bool myDebug = false) + { + float statValue = pawn.GetStatValue(StatDefOf.MeatAmount, true, -1); + float statValueFromList = pawn.def.statBases.GetStatValueFromList(StatDefOf.MeatAmount, 75f); + bool flag = statValueFromList == 0f; + float num; + if (flag) + { + num = pawn.health.summaryHealth.SummaryHealthPercent; + } + else + { + num = statValue / statValueFromList; + } + if (myDebug) + { + Log.Warning(string.Concat(new object[] + { + "pawnWeightedMeat:", + statValue, + "; pawnBasisMeat:", + statValueFromList, + "=> ratio:", + num + })); + } + return num; + } + + public static int ComputeSpawnCount(this HediffComp_RandySpawnUponDeath comp) + { + float num = (float)comp.NumberToSpawn; + bool weightedSpawn = comp.WeightedSpawn; + if (weightedSpawn) + { + num *= comp.Pawn.CompletudeRatio(false); + } + return checked((int)num); + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/StackSettings.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/StackSettings.cs new file mode 100644 index 0000000..e83f2d6 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/StackSettings.cs @@ -0,0 +1,12 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class StackSettings + { + public IntRange spawnCount = new IntRange(1, 1); + + public bool weightedSpawnCount = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/TerrainRestriction.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/TerrainRestriction.cs new file mode 100644 index 0000000..b40cf11 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/TerrainRestriction.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class TerrainRestriction + { + public bool HasForbiddenTerrains + { + get + { + return !this.forbiddenTerrains.NullOrEmpty(); + } + } + + public bool HasRelevantSnowRestriction + { + get + { + return this.allowedSnowDepth.min != 0f && this.allowedSnowDepth.min != 1f; + } + } + + public bool allowedInWater = false; + + public FloatRange allowedSnowDepth = new FloatRange(0f, 0.4f); + + public List forbiddenTerrains; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ThingRequirementSettings.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ThingRequirementSettings.cs new file mode 100644 index 0000000..9eaf3ec --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ThingRequirementSettings.cs @@ -0,0 +1,46 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class ThingRequirementSettings + { + public bool HasThingDef + { + get + { + return this.thingDef != null; + } + } + + public bool HasContainerSpawn + { + get + { + return this.HasThingDef && this.spawnInside; + } + } + + public bool HasCustomSpawn + { + get + { + return this.HasThingDef && (this.spawnClose || this.spawnInside); + } + } + + public ThingDef thingDef; + + public FloatRange distance = new FloatRange(0f, 300f); + + public bool spawnClose = false; + + public bool spawnInside = false; + + public bool sameFaction = true; + + public bool needsFueled = false; + + public bool needsPowered = false; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ThingSettings.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ThingSettings.cs new file mode 100644 index 0000000..dc73a7d --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/ThingSettings.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class ThingSettings + { + public bool IsThingSpawner + { + get + { + return this.thingToSpawn != null; + } + } + + public bool IsParentCopier + { + get + { + return this.IsCopier && this.copyParent.pawnKind; + } + } + + public bool IsPawnSpawner + { + get + { + return this.pawnKindToSpawn != null || this.IsParentCopier; + } + } + + public string ItemDump + { + get + { + return this.IsThingSpawner ? ("thing:" + this.thingToSpawn) : (this.IsPawnSpawner ? (this.IsCopier ? "parentCopier" : ("pawn:" + this.pawnKindToSpawn)) : "nothing?!"); + } + } + + public bool HasFactionParams + { + get + { + return !this.faction.NullOrEmpty(); + } + } + + public bool HasMentalStateParams + { + get + { + return !this.mentalState.NullOrEmpty(); + } + } + + public bool IsCopier + { + get + { + return this.copyParent != null; + } + } + + public bool IsRedresser + { + get + { + return this.redressNewPawn != null; + } + } + + public bool HasSpecificSettings + { + get + { + return this.specificSettings != null; + } + } + + public bool HasFilthSettings + { + get + { + return this.HasSpecificSettings && this.specificSettings.filth != null && this.specificSettings.filth.filthDef != null; + } + } + + public bool HasStackSettings + { + get + { + return this.HasSpecificSettings && this.specificSettings.stack != null; + } + } + + public bool HasColorCondition + { + get + { + return this.colorCondition != null && !this.colorCondition.channelName.NullOrEmpty(); + } + } + + public ThingDef thingToSpawn = null; + + public PawnKindDef pawnKindToSpawn = null; + + public List faction; + + public CopyPawnSettings copyParent; + + public RedressSettings redressNewPawn; + + public List mentalState; + + public IntRange biologicalAgeRange = new IntRange(18, 80); + + public IntRange chronologicalAgeRange = new IntRange(0, 500); + + public bool newBorn = false; + + public ChannelColorCondition colorCondition; + + public CommonSettings specificSettings; + + public float weight = 1f; + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Tools.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Tools.cs new file mode 100644 index 0000000..5fdb081 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/Tools.cs @@ -0,0 +1,215 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using AlienRace; +using RimWorld; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class Tools + { + public static float Clamp(this float value, float min, float max) + { + return Math.Min(Math.Max(value, min), max); + } + + public static void DestroyParentHediff(Hediff parentHediff, bool debug = false) + { + bool flag = parentHediff.pawn != null && parentHediff.def.defName != null; + if (flag && debug) + { + Log.Warning(parentHediff.pawn.Label + "'s Hediff: " + parentHediff.def.defName + " says goodbye."); + } + parentHediff.Severity = 0f; + } + + public static void DestroyHediff(this Pawn pawn, Hediff hediff, bool debug = false) + { + bool flag = hediff.pawn != null && hediff.def.defName != null; + if (flag && debug) + { + Log.Warning(hediff.pawn.Label + "'s Hediff: " + hediff.def.defName + " says goodbye."); + } + pawn.health.RemoveHediff(hediff); + } + + public static float GetPawnAgeOverlifeExpectancyRatio(Pawn pawn, bool debug = false) + { + float num = 1f; + bool flag = pawn == null; + float result; + if (flag) + { + if (debug) + { + Log.Warning("GetPawnAgeOverlifeExpectancyRatio pawn NOT OK"); + } + result = num; + } + else + { + num = pawn.ageTracker.AgeBiologicalYearsFloat / pawn.RaceProps.lifeExpectancy; + if (debug) + { + Log.Warning(string.Concat(new object[] + { + pawn.Label, + " Age: ", + pawn.ageTracker.AgeBiologicalYearsFloat, + "; lifeExpectancy: ", + pawn.RaceProps.lifeExpectancy, + "; ratio:", + num + })); + } + result = num; + } + return result; + } + + public static float GetPawnAdultRatio(Pawn pawn, bool debug = false) + { + float num = 1f; + bool flag = !Tools.OkPawn(pawn); + float result; + if (flag) + { + if (debug) + { + Log.Warning("GetPawnAgeOverlifeExpectancyRatio pawn NOT OK"); + } + result = num; + } + else + { + num = (pawn.ageTracker.AgeBiologicalYearsFloat - pawn.RaceProps.lifeStageAges.Last().minAge) / (pawn.RaceProps.lifeExpectancy - pawn.RaceProps.lifeStageAges.Last().minAge); + result = num; + } + return result; + } + + public static bool IsInjured(this Pawn pawn, bool debug = false) + { + bool flag = pawn == null; + bool result; + if (flag) + { + if (debug) + { + Log.Warning("pawn is null - wounded "); + } + result = false; + } + else + { + float num = 0f; + List hediffs = pawn.health.hediffSet.hediffs; + for (int i = 0; i < hediffs.Count; i = checked(i + 1)) + { + bool flag2 = hediffs[i] is Hediff_Injury && !hediffs[i].IsPermanent(); + if (flag2) + { + num += hediffs[i].Severity; + } + } + bool flag3 = debug && num > 0f; + if (flag3) + { + Log.Warning(pawn.Label + " is wounded "); + } + result = (num > 0f); + } + return result; + } + + public static bool IsHungry(this Pawn pawn, bool debug = false) + { + bool flag = pawn == null; + bool result; + if (flag) + { + if (debug) + { + Log.Warning("pawn is null - IsHungry "); + } + result = false; + } + else + { + bool flag2 = pawn.needs.food != null && pawn.needs.food.CurCategory == HungerCategory.Starving; + bool flag3 = debug && flag2; + if (flag3) + { + Log.Warning(pawn.Label + " is hungry "); + } + result = flag2; + } + return result; + } + + public static bool Negligible(this Pawn p) + { + bool result; + if (p != null && p.Spawned && p.Map != null) + { + IntVec3 position = p.Position; + result = false; + } + else + { + result = true; + } + return result; + } + + public static bool Negligible(this Thing thing) + { + bool result; + if (thing != null && thing.Spawned && thing.Map != null) + { + IntVec3 position = thing.Position; + result = false; + } + else + { + result = true; + } + return result; + } + + public static bool OkPawn(Pawn pawn) + { + return pawn != null && pawn.Map != null; + } + + public static void Warn(string warning, bool debug = false) + { + if (debug) + { + Log.Warning(warning); + } + } + + public static bool IsAlien(this Pawn pawn) + { + return pawn.def.race.Humanlike && pawn.def != ThingDefOf.Human; + } + + public static bool IsHuman(this Pawn pawn) + { + return pawn.def.race.Humanlike && pawn.def == ThingDefOf.Human; + } + + public static AlienPartGenerator.AlienComp GetAlien(Pawn pawn = null) + { + return (pawn != null) ? pawn.TryGetComp() : null; + } + + public static bool ForbiddenMote(this Vector3 loc, Map map) + { + return !loc.ShouldSpawnMotesAt(map, true) || map.moteCounter.SaturatedLowPriority; + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/TracerUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/TracerUtils.cs new file mode 100644 index 0000000..cb51c48 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/TracerUtils.cs @@ -0,0 +1,149 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class TracerUtils + { + public static void CreateTracer(this HediffComp_InnerShine comp) + { + comp.Tracer = new List(); + bool hasRawShinePool = comp.Props.HasRawShinePool; + if (hasRawShinePool) + { + foreach (InnerShineItem isi in comp.Props.innerShinePool) + { + comp.Tracer.Add(new InnerShineRecord(isi)); + } + } + bool hasShineDefPool = comp.Props.HasShineDefPool; + if (hasShineDefPool) + { + foreach (InnerShineDef innerShineDef in comp.Props.innerShineDefPool) + { + comp.Tracer.Add(new InnerShineRecord(innerShineDef.item)); + } + } + bool myDebug = comp.MyDebug; + checked + { + if (myDebug) + { + int num = 0; + foreach (InnerShineRecord innerShineRecord in comp.Tracer) + { + Log.Warning(num.ToString("00") + "=>" + innerShineRecord.Dump); + num++; + } + } + } + } + + public static int NewPeriod(this InnerShineItem ISI) + { + return ISI.spawningRules.period.RandomInRange; + } + + public static void ResetTicks(this InnerShineItem ISI, InnerShineRecord ISR) + { + ISR.ticksLeft = ISI.NewPeriod(); + } + + public static bool HasMoteNumLimit(this InnerShineItem ISI) + { + return !ISI.spawningRules.IsUnlimited; + } + + public static void TryPlaceMote(this InnerShineItem ISI, InnerShineRecord ISR, Pawn pawn) + { + bool flag = pawn.Position.InBounds(pawn.Map); + if (flag) + { + float rot = 0f; + Vector3 vector; + float scale; + ISI.InitSpecs(ISR, pawn, out vector, out scale); + bool flag2 = vector.ToIntVec3().InBounds(pawn.Map); + if (flag2) + { + ThingDef moteDef = ISI.motePool.RandomElementWithFallback(null); + Mote mote; + bool flag3 = (mote = (vector.TryAnyMoteSpawn(pawn.Map, rot, scale, moteDef, ISI.debug) as Mote)) != null; + if (flag3) + { + ISI.ChangeMoteColor(ISR, mote); + ISR.spawned.Add(mote); + ISI.NewPeriod(); + } + } + } + } + + public static void UpdateMotes(this InnerShineItem ISI, InnerShineRecord ISR, Pawn pawn, bool debug = false) + { + bool flag = ISR.spawned.NullOrEmpty(); + checked + { + if (!flag) + { + for (int i = ISR.spawned.Count - 1; i >= 0; i--) + { + Thing thing = ISR.spawned[i]; + bool flag2 = thing.DestroyedOrNull(); + if (flag2) + { + ISR.spawned.RemoveAt(i); + } + else + { + bool flag3 = !ISI.HasCompatibleActivity(pawn); + if (flag3) + { + thing.Destroy(DestroyMode.Vanish); + ISR.spawned.RemoveAt(i); + } + else + { + Mote mote; + bool flag4 = (mote = (thing as Mote)) != null; + if (flag4) + { + mote.exactPosition = pawn.DrawPos + pawn.GetLinkOffset(ISI.linkType) + ISI.GetDrawOffset(pawn); + } + } + } + } + } + } + } + + public static void InitSpecs(this InnerShineItem ISI, InnerShineRecord ISR, Pawn pawn, out Vector3 drawPosWithOffset, out float scale) + { + Vector3 drawPos = pawn.DrawPos; + Vector3 vector; + ISI.GetSpecifities(pawn, out vector, out scale); + Vector3 linkOffset = pawn.GetLinkOffset(ISI.linkType); + drawPosWithOffset = drawPos + linkOffset + vector; + bool debug = ISI.debug; + if (debug) + { + Log.Warning(string.Concat(new object[] + { + pawn.ThingID, + " ", + ISI.label, + " TryPlaceMote - drawPos: ", + drawPos, + " linkOffset:", + linkOffset, + " bodyTypeOffset:", + vector, + "scale: ", + scale + })); + } + } + } +} diff --git a/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/TrailUtils.cs b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/TrailUtils.cs new file mode 100644 index 0000000..0b15601 --- /dev/null +++ b/1.6/Core/Assemblies/FULLMOHAR/MoharHediffs/TrailUtils.cs @@ -0,0 +1,61 @@ +using System; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class TrailUtils + { + public static float GetMoteRotation(this HediffComp_TrailLeaver comp, Vector3 drawPos, out Vector3 normalized) + { + normalized = Vector3.zero; + bool flag = !comp.Props.dynamicRotation && !comp.Props.UsesFootPrints; + float result; + if (flag) + { + result = 0f; + } + else + { + float dynamicRotation = comp.GetDynamicRotation(drawPos, out normalized); + float num = comp.Props.dynamicRotation ? dynamicRotation : 0f; + num += (comp.Props.HasRotationOffset ? comp.Props.rotationOffset : 0f); + result = num % 360f; + } + return result; + } + + public static float GetDynamicRotation(this HediffComp_TrailLeaver comp, Vector3 drawPos, out Vector3 normalized) + { + normalized = (drawPos - comp.lastMotePos).normalized; + return normalized.AngleFlat(); + } + + public static Vector3 GetFootPrintOffset(this HediffComp_TrailLeaver comp, Vector3 normalized) + { + bool flag = !comp.Props.UsesFootPrints; + Vector3 result; + if (flag) + { + result = Vector3.zero; + } + else + { + float angle = (float)(comp.lastFootprintRight ? 90 : -90); + Vector3 b = normalized.RotatedBy(angle) * comp.Props.footprint.distanceBetweenFeet * Mathf.Sqrt(comp.Pawn.BodySize); + comp.lastFootprintRight = !comp.lastFootprintRight; + result = comp.Props.footprint.offset + b; + } + return result; + } + + public static void RecordMotePos(this HediffComp_TrailLeaver comp, Vector3 drawPos) + { + bool flag = !comp.Props.dynamicRotation; + if (!flag) + { + comp.lastMotePos = drawPos; + } + } + } +} diff --git a/1.6/Core/Assemblies/ItemFormChange_Roo.dll b/1.6/Core/Assemblies/ItemFormChange_Roo.dll new file mode 100644 index 0000000..33b4adb Binary files /dev/null and b/1.6/Core/Assemblies/ItemFormChange_Roo.dll differ diff --git a/1.6/Core/Assemblies/MoharHediffs.dll b/1.6/Core/Assemblies/MoharHediffs.dll new file mode 100644 index 0000000..36989e5 Binary files /dev/null and b/1.6/Core/Assemblies/MoharHediffs.dll differ diff --git a/1.6/Core/Assemblies/MoharHediffs.sln b/1.6/Core/Assemblies/MoharHediffs.sln new file mode 100644 index 0000000..06ec6ca --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs.sln @@ -0,0 +1,32 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoharHediffs", "MoharHediffs\MoharHediffs.csproj", "{F992C1F9-4E11-4987-9E00-D665B2E34CBB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x64 = Debug|x64 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Debug|Any CPU.ActiveCfg = Debug|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Debug|Any CPU.Build.0 = Debug|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Debug|x64.ActiveCfg = Debug|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Debug|x64.Build.0 = Debug|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Release|Any CPU.ActiveCfg = Release|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Release|Any CPU.Build.0 = Release|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Release|Mixed Platforms.Build.0 = Release|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Release|x64.ActiveCfg = Release|x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/1.6/Core/Assemblies/MoharHediffs/BodyPartsTools.cs b/1.6/Core/Assemblies/MoharHediffs/BodyPartsTools.cs new file mode 100644 index 0000000..3c63517 --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/BodyPartsTools.cs @@ -0,0 +1,262 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public static class BodyPartsTools + { + public static BodyPartRecord GetBPRWithoutHediff(this Pawn pawn, BodyPartDef bpd, HediffDef hediffDef) + { + IEnumerable enumerable = from b in pawn.health.hediffSet.GetNotMissingParts(BodyPartHeight.Undefined, BodyPartDepth.Undefined, null, null) + where b.def == bpd + select b; + if (enumerable == null) + { + return null; + } + List bprToExclude = new List(); + IEnumerable hediffs = pawn.health.hediffSet.hediffs; + Func <>9__2; + Func predicate; + if ((predicate = <>9__2) == null) + { + predicate = (<>9__2 = ((Hediff h) => h.def == hediffDef)); + } + foreach (Hediff hediff in hediffs.Where(predicate)) + { + if (!bprToExclude.Contains(hediff.Part)) + { + bprToExclude.Add(hediff.Part); + } + } + if (bprToExclude.NullOrEmpty()) + { + return enumerable.RandomElementWithFallback(null); + } + IEnumerable enumerable2 = from b in enumerable + where !bprToExclude.Contains(b) + select b; + if (enumerable2 == null) + { + return null; + } + return enumerable2.RandomElementWithFallback(null); + } + + public static bool CheckIfExistingNaturalBP(this Pawn pawn, BodyPartDef bodyPartDef, bool myDebug = false) + { + BodyPartRecord bodyPartRecord = pawn.GetBPRecord(bodyPartDef, false) ?? null; + return bodyPartRecord != null && !pawn.health.hediffSet.PartIsMissing(bodyPartRecord) && !pawn.health.hediffSet.AncestorHasDirectlyAddedParts(bodyPartRecord); + } + + public static BodyPartRecord GetBPRecord(this Pawn pawn, BodyPartDef bodyPartDef, bool myDebug = false) + { + IEnumerable enumerable = from b in DefDatabase.AllDefs + where b == bodyPartDef + select b; + if (enumerable.EnumerableNullOrEmpty()) + { + if (myDebug) + { + string label = pawn.Label; + string str = " - GetBPRecord - did not find any "; + BodyPartDef bodyPartDef2 = bodyPartDef; + Log.Warning(label + str + ((bodyPartDef2 != null) ? bodyPartDef2.defName : null)); + } + return null; + } + BodyPartDef def = enumerable.RandomElement(); + BodyPartRecord result; + pawn.RaceProps.body.GetPartsWithDef(def).TryRandomElement(out result); + if (myDebug) + { + string label2 = pawn.Label; + string str2 = "GetBPRecord - DID find "; + BodyPartDef bodyPartDef3 = bodyPartDef; + Log.Warning(label2 + str2 + ((bodyPartDef3 != null) ? bodyPartDef3.defName : null)); + } + return result; + } + + public static bool IsMissingBPR(this Pawn pawn, BodyPartRecord BPR, out Hediff missingHediff) + { + if (BPR == null) + { + missingHediff = null; + return false; + } + missingHediff = (from h in pawn.health.hediffSet.hediffs + where h.def == HediffDefOf.MissingBodyPart && h.Part == BPR + select h).FirstOrFallback(null); + return missingHediff != null; + } + + public static bool HasMissingChildren(this Pawn pawn, BodyPartRecord bpr) + { + return pawn.health.hediffSet.GetMissingPartsCommonAncestors().Any((Hediff_MissingPart HMP) => HMP.Part == bpr); + } + + public static bool IsMissingOrHasMissingChildren(this Pawn pawn, BodyPartRecord bpr) + { + return pawn.health.hediffSet.PartIsMissing(bpr) || pawn.HasMissingChildren(bpr); + } + + public static IEnumerable GetAllBPR(this Pawn pawn, string bodyPartLabel, BodyPartDef bodyPartDef) + { + bool HasLabel = !bodyPartLabel.NullOrEmpty(); + bool HasDef = bodyPartDef != null; + return from bpr in pawn.RaceProps.body.AllParts + where (!HasLabel || bpr.customLabel == bodyPartLabel) && (!HasDef || bpr.def == bodyPartDef) + select bpr; + } + + public static IEnumerable GetAllNotMissingBPR(this Pawn pawn, string bodyPartLabel, BodyPartDef bodyPartDef) + { + bool HasLabel = !bodyPartLabel.NullOrEmpty(); + bool HasDef = bodyPartDef != null; + return from bpr in pawn.health.hediffSet.GetNotMissingParts(BodyPartHeight.Undefined, BodyPartDepth.Undefined, null, null) + where (!HasLabel || bpr.customLabel == bodyPartLabel) && (!HasDef || bpr.def == bodyPartDef) + select bpr; + } + + public static BodyPartRecord GetBPRecordWithoutHediff(this Pawn pawn, string bodyPartLabel, BodyPartDef bodyPartDef, HediffDef hd, bool AllowMissing = false, bool PrioritizeMissing = false, bool AllowAddedPart = true, bool myDebug = false) + { + bool flag = hd != null; + bool flag2 = !bodyPartLabel.NullOrEmpty(); + bool flag3 = bodyPartDef != null; + string text = pawn.Label + " GetBPRecordWithoutHediff - "; + if (myDebug) + { + string[] array = new string[5]; + array[0] = text; + array[1] = string.Format("HasDef?{0} bodyPartDef:{1} ", flag3, (bodyPartDef != null) ? bodyPartDef.defName : null); + array[2] = string.Format("HasLabel?{0} bodyPartLabel:{1} ", flag2, bodyPartLabel); + int num = 3; + string format = "HasHediffDef?{0} Hediff:{1} "; + object arg = flag; + HediffDef hd2 = hd; + array[num] = string.Format(format, arg, (hd2 != null) ? hd2.defName : null); + array[4] = string.Format("AllowMissing:{0} PrioritizeMissing:{1} AllowAddedPart:{2}", AllowMissing, PrioritizeMissing, AllowAddedPart); + Log.Warning(string.Concat(array)); + } + List bprToExclude = new List(); + if (flag) + { + IEnumerable hediffs = pawn.health.hediffSet.hediffs; + Func <>9__6; + Func predicate; + if ((predicate = <>9__6) == null) + { + predicate = (<>9__6 = ((Hediff h) => h.def == hd)); + } + foreach (Hediff hediff in hediffs.Where(predicate)) + { + if (!bprToExclude.Contains(hediff.Part)) + { + bprToExclude.Add(hediff.Part); + } + } + if (myDebug) + { + string[] array2 = new string[5]; + array2[0] = text; + array2[1] = "found "; + int num2 = 2; + List bprToExclude2 = bprToExclude; + array2[num2] = ((bprToExclude2 != null) ? new int?(bprToExclude2.Count) : null).ToString(); + array2[3] = " bpr to exclude bc they had "; + array2[4] = hd.defName; + Log.Warning(string.Concat(array2)); + } + } + BodyPartRecord bodyPartRecord = null; + IEnumerable enumerable; + if (AllowMissing) + { + enumerable = pawn.GetAllBPR(bodyPartLabel, bodyPartDef); + if (myDebug) + { + Log.Warning(text + "Allow missing - found " + (enumerable.EnumerableNullOrEmpty() ? "0" : enumerable.Count().ToString()) + " bpr"); + } + if (PrioritizeMissing && !enumerable.EnumerableNullOrEmpty() && enumerable.Any((BodyPartRecord bpr) => pawn.IsMissingOrHasMissingChildren(bpr))) + { + enumerable = from bpr in enumerable + where pawn.IsMissingOrHasMissingChildren(bpr) + select bpr; + if (myDebug) + { + Log.Warning(text + "Prioritize Missing - found " + (enumerable.EnumerableNullOrEmpty() ? "0" : enumerable.Count().ToString()) + " bpr"); + } + } + } + else + { + enumerable = pawn.GetAllNotMissingBPR(bodyPartLabel, bodyPartDef); + if (myDebug) + { + Log.Warning(text + "Not missing - found " + (enumerable.EnumerableNullOrEmpty() ? "0" : enumerable.Count().ToString()) + " bpr"); + } + } + if (enumerable.EnumerableNullOrEmpty()) + { + return null; + } + if (!AllowAddedPart) + { + Tools.Warn(text + "Trying to exlude addedpart", myDebug); + if (enumerable.Any((BodyPartRecord bpr) => pawn.health.hediffSet.HasDirectlyAddedPartFor(bpr))) + { + enumerable = from bpr in enumerable + where !pawn.health.hediffSet.HasDirectlyAddedPartFor(bpr) + select bpr; + if (myDebug) + { + Log.Warning(text + "Added parts(bionics) forbidden- found " + (enumerable.EnumerableNullOrEmpty() ? "0" : enumerable.Count().ToString()) + " bpr"); + } + } + else if (myDebug) + { + Log.Warning(text + "found no addedpart to exclude"); + } + } + if (bprToExclude.NullOrEmpty()) + { + enumerable.TryRandomElement(out bodyPartRecord); + } + else if (enumerable.Any((BodyPartRecord bp) => !bprToExclude.Contains(bp))) + { + (from bp in enumerable + where !bprToExclude.Contains(bp) + select bp).TryRandomElement(out bodyPartRecord); + } + else + { + bodyPartRecord = null; + } + if (myDebug) + { + Log.Warning(string.Concat(new string[] + { + pawn.Label, + "GetBPRecord - did ", + (bodyPartRecord == null) ? "not" : "", + " find with def ", + (bodyPartDef != null) ? bodyPartDef.defName : null, + " without hediff def ", + hd.defName + })); + } + return bodyPartRecord; + } + + public static BodyPartRecord GetBrain(this Pawn pawn) + { + BodyPartRecord result; + pawn.RaceProps.body.GetPartsWithTag(BodyPartTagDefOf.ConsciousnessSource).TryRandomElement(out result); + return result; + } + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/HediffAndBodyPart.cs b/1.6/Core/Assemblies/MoharHediffs/HediffAndBodyPart.cs new file mode 100644 index 0000000..834678e --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/HediffAndBodyPart.cs @@ -0,0 +1,24 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffAndBodyPart + { + public HediffDef hediff; + + public BodyPartDef bodyPart; + + public string bodyPartLabel; + + public bool prioritizeMissing; + + public bool allowMissing = true; + + public bool regenIfMissing = true; + + public bool allowAddedPart = true; + + public bool wholeBodyFallback = true; + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_HediffNullifier.cs b/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_HediffNullifier.cs new file mode 100644 index 0000000..d8c39a9 --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_HediffNullifier.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_HediffNullifier : HediffCompProperties + { + public HediffCompProperties_HediffNullifier() + { + this.compClass = typeof(HediffComp_HediffNullifier); + } + + public int checkPeriod = 240; + + public List hediffToNullify; + + public int limitedUsageNumber = -99; + + public List RequiredBodyPart; + + public bool showMessage; + + public string nullifyKey = ""; + + public bool concatUsageLimit; + + public string limitedKey = ""; + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_HediffRandom.cs b/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_HediffRandom.cs new file mode 100644 index 0000000..6388c0b --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_HediffRandom.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_HediffRandom : HediffCompProperties + { + public HediffCompProperties_HediffRandom() + { + this.compClass = typeof(HediffComp_HediffRandom); + } + + public BodyDef bodyDef; + + public List hediffPool; + + public List weights; + + public List bodyPartDef; + + public bool debug; + + public bool hideBySeverity = true; + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_MultipleHediff.cs b/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_MultipleHediff.cs new file mode 100644 index 0000000..4bad43b --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_MultipleHediff.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_MultipleHediff : HediffCompProperties + { + public HediffCompProperties_MultipleHediff() + { + this.compClass = typeof(HediffComp_MultipleHediff); + } + + public BodyDef bodyDef; + + public List bodyDefWhiteList; + + public List bodyDefBlackList; + + public List hediffAndBodypart; + + public bool debug; + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_Spawner.cs b/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_Spawner.cs new file mode 100644 index 0000000..0b4b910 --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/HediffCompProperties_Spawner.cs @@ -0,0 +1,55 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffCompProperties_Spawner : HediffCompProperties + { + public HediffCompProperties_Spawner() + { + this.compClass = typeof(HediffComp_Spawner); + } + + public ThingDef thingToSpawn; + + public int spawnCount = 1; + + public bool animalThing; + + public PawnKindDef animalToSpawn; + + public bool factionOfPlayerAnimal; + + public float minDaysB4Next = 1f; + + public float maxDaysB4Next = 2f; + + public float randomGrace; + + public float graceDays = 0.5f; + + public int spawnMaxAdjacent = -1; + + public bool spawnForbidden; + + public bool hungerRelative; + + public bool healthRelative; + + public bool ageWeightedQuantity; + + public bool ageWeightedPeriod; + + public bool olderSmallerPeriod; + + public bool olderBiggerQuantity; + + public bool exponentialQuantity; + + public int exponentialRatioLimit = 15; + + public string spawnVerb = "delivery"; + + public bool debug; + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/HediffComp_HediffNullifier.cs b/1.6/Core/Assemblies/MoharHediffs/HediffComp_HediffNullifier.cs new file mode 100644 index 0000000..ade3203 --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/HediffComp_HediffNullifier.cs @@ -0,0 +1,199 @@ +using System; +using System.Linq; +using RimWorld; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_HediffNullifier : HediffComp + { + public HediffCompProperties_HediffNullifier Props + { + get + { + return (HediffCompProperties_HediffNullifier)this.props; + } + } + + public bool RequiresAtLeastOneBodyPart + { + get + { + return !this.Props.RequiredBodyPart.NullOrEmpty(); + } + } + + public bool HasMessageToDisplay + { + get + { + return this.Props.showMessage && !this.Props.nullifyKey.NullOrEmpty(); + } + } + + public bool DisplayLimitedUsageLeft + { + get + { + return this.HasMessageToDisplay && this.Props.concatUsageLimit && !this.Props.limitedKey.NullOrEmpty(); + } + } + + public bool HasHediffToNullify + { + get + { + return !this.Props.hediffToNullify.NullOrEmpty(); + } + } + + public bool HasLimitedUsage + { + get + { + return this.Props.limitedUsageNumber != -99; + } + } + + public void BlockAndDestroy() + { + Tools.DestroyParentHediff(this.parent, this.myDebug); + this.BlockPostTick = true; + } + + public override void CompPostMake() + { + if (this.myDebug) + { + Log.Warning(">>>" + this.parent.def.defName + " - CompPostMake start"); + } + if (!this.HasHediffToNullify) + { + if (this.myDebug) + { + Log.Warning(this.parent.def.defName + " has no hediff to nullify, autokill"); + } + this.BlockAndDestroy(); + } + this.DestroyHediffIfMissingBP(); + if (this.HasLimitedUsage) + { + this.LimitedUsageNumber = this.Props.limitedUsageNumber; + } + } + + public void DestroyHediffIfMissingBP() + { + if (!this.RequiresAtLeastOneBodyPart) + { + return; + } + bool flag = false; + foreach (BodyPartDef bodyPartDef in this.Props.RequiredBodyPart) + { + if (flag = base.Pawn.CheckIfExistingNaturalBP(bodyPartDef, false)) + { + break; + } + } + if (!flag) + { + if (this.myDebug) + { + Log.Warning(base.Pawn.LabelShort + " does not have any required body part to have an active " + this.parent.def.defName + ", autokill"); + } + this.BlockAndDestroy(); + } + } + + public override void CompExposeData() + { + Scribe_Values.Look(ref this.LimitedUsageNumber, "LimitedUsageNumber", 0, false); + } + + public override void CompPostTick(ref float severityAdjustment) + { + if (!base.Pawn.IsHashIntervalTick(this.Props.checkPeriod)) + { + return; + } + if (!Tools.OkPawn(base.Pawn)) + { + return; + } + this.DestroyHediffIfMissingBP(); + if (this.BlockPostTick) + { + return; + } + foreach (Hediff hediff in from h in base.Pawn.health.hediffSet.hediffs + where this.Props.hediffToNullify.Contains(h.def) + select h) + { + if (this.myDebug) + { + Log.Warning(base.Pawn.Label + " - " + hediff.def.defName); + } + hediff.Severity = 0f; + if (this.myDebug) + { + Log.Warning(hediff.def.defName + " severity = 0"); + } + if (this.HasLimitedUsage) + { + this.LimitedUsageNumber--; + if (this.LimitedUsageNumber <= 0) + { + if (this.myDebug) + { + Log.Warning(this.parent.def.defName + " has reached its limit usage, autokill"); + } + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + } + if (this.HasMessageToDisplay) + { + string text = this.Props.nullifyKey.Translate(base.Pawn.LabelShort, hediff.def.label, base.Pawn.gender.GetPronoun(), base.Pawn.kindDef.race.label); + if (this.DisplayLimitedUsageLeft) + { + text += this.Props.limitedKey.Translate(this.LimitedUsageNumber); + } + text += "."; + Messages.Message(text, MessageTypeDefOf.NeutralEvent, true); + } + } + } + + public override string CompTipStringExtra + { + get + { + string text = string.Empty; + if (!this.HasHediffToNullify) + { + return text; + } + text += "Immune to: "; + foreach (HediffDef hediffDef in this.Props.hediffToNullify) + { + text = text + hediffDef.label + "; "; + } + if (!this.HasLimitedUsage) + { + text += " for ever"; + } + else + { + text = text + " " + this.LimitedUsageNumber.ToString() + " left"; + } + return text; + } + } + + private int LimitedUsageNumber; + + private bool BlockPostTick; + + private readonly bool myDebug; + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/HediffComp_HediffRandom.cs b/1.6/Core/Assemblies/MoharHediffs/HediffComp_HediffRandom.cs new file mode 100644 index 0000000..6c4512d --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/HediffComp_HediffRandom.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_HediffRandom : HediffComp + { + public HediffCompProperties_HediffRandom Props + { + get + { + return (HediffCompProperties_HediffRandom)this.props; + } + } + + private bool myDebug + { + get + { + return this.Props.debug; + } + } + + private bool HasWeights + { + get + { + return !this.Props.weights.NullOrEmpty() && this.Props.weights.Count == this.Props.hediffPool.Count; + } + } + + private bool HasBodyParts + { + get + { + return !this.Props.bodyPartDef.NullOrEmpty() && this.Props.bodyPartDef.Count == this.Props.hediffPool.Count; + } + } + + private bool HasHediff + { + get + { + return !this.Props.hediffPool.NullOrEmpty(); + } + } + + private Pawn pawn + { + get + { + return this.parent.pawn; + } + } + + public override void CompPostMake() + { + if (this.Props.hideBySeverity) + { + this.parent.Severity = 0.05f; + } + } + + public int WeightedRandomness + { + get + { + int num = 0; + foreach (int num2 in this.Props.weights) + { + num += num2; + } + int num3 = Rand.Range(0, num); + for (int i = 0; i < this.Props.weights.Count; i++) + { + int num4 = this.Props.weights[i]; + if ((num3 -= num4) < 0) + { + return i; + } + } + return 0; + } + } + + public void ApplyHediff(Pawn pawn) + { + if (this.Props.bodyDef != null && pawn.def.race.body != this.Props.bodyDef) + { + Tools.Warn(string.Concat(new string[] + { + pawn.Label, + " has not a bodyDef like required: ", + pawn.def.race.body.ToString(), + "!=", + this.Props.bodyDef.ToString() + }), this.myDebug); + return; + } + int num; + if (!this.HasWeights) + { + num = Rand.Range(0, this.Props.hediffPool.Count); + } + else + { + num = this.WeightedRandomness; + } + if (num < 0 || num >= this.Props.hediffPool.Count) + { + Tools.Warn(num.ToString() + " is out of range. Applyhediff will fail. Please report this error.", this.myDebug); + } + HediffDef hediffDef = this.Props.hediffPool[num]; + if (hediffDef == null) + { + Tools.Warn("cant find hediff", this.myDebug); + return; + } + BodyPartRecord bodyPartRecord = null; + BodyPartDef bodyPartDef = null; + if (this.HasBodyParts) + { + bodyPartDef = this.Props.bodyPartDef[num]; + IEnumerable partsWithDef = pawn.RaceProps.body.GetPartsWithDef(bodyPartDef); + if (partsWithDef.EnumerableNullOrEmpty()) + { + Tools.Warn("cant find body part record called: " + bodyPartDef.defName, this.myDebug); + return; + } + bodyPartRecord = partsWithDef.RandomElement(); + } + Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn, bodyPartRecord); + if (hediff == null) + { + Tools.Warn("cant create hediff " + hediffDef.defName + " to apply on " + ((bodyPartDef != null) ? bodyPartDef.defName : null), this.myDebug); + return; + } + pawn.health.AddHediff(hediff, bodyPartRecord, null, null); + Tools.Warn("Succesfully applied " + hediffDef.defName + " to apply on " + ((bodyPartDef != null) ? bodyPartDef.defName : null), this.myDebug); + } + + public override void CompPostTick(ref float severityAdjustment) + { + if (!Tools.OkPawn(this.pawn)) + { + return; + } + if (this.HasHediff) + { + this.ApplyHediff(this.pawn); + } + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/HediffComp_MultipleHediff.cs b/1.6/Core/Assemblies/MoharHediffs/HediffComp_MultipleHediff.cs new file mode 100644 index 0000000..dfa1370 --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/HediffComp_MultipleHediff.cs @@ -0,0 +1,262 @@ +using System; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_MultipleHediff : HediffComp + { + private bool MyDebug + { + get + { + return this.Props.debug; + } + } + + private string DebugStr + { + get + { + if (!this.MyDebug) + { + return ""; + } + return base.Pawn.LabelShort + " MultipleHediff " + this.parent.def.defName + " - "; + } + } + + private bool HasSingleBodyRequirement + { + get + { + return this.Props.bodyDef != null; + } + } + + private bool HasWhiteList + { + get + { + return !this.Props.bodyDefWhiteList.NullOrEmpty(); + } + } + + private bool HasBlackList + { + get + { + return !this.Props.bodyDefBlackList.NullOrEmpty(); + } + } + + private bool WhiteListCompliant + { + get + { + return !this.HasWhiteList || this.Props.bodyDefWhiteList.Contains(base.Pawn.def.race.body); + } + } + + private bool BlackListCompliant + { + get + { + return !this.HasBlackList || !this.Props.bodyDefBlackList.Contains(base.Pawn.def.race.body); + } + } + + private bool HasAccessList + { + get + { + return this.HasWhiteList || this.HasBlackList; + } + } + + public HediffCompProperties_MultipleHediff Props + { + get + { + return (HediffCompProperties_MultipleHediff)this.props; + } + } + + public bool HasHediffToApply + { + get + { + return !this.Props.hediffAndBodypart.NullOrEmpty(); + } + } + + public void CheckProps() + { + string text = this.DebugStr + "CheckProps - "; + if (!this.HasHediffToApply) + { + Tools.Warn(text + "- empty hediffAndBodypart, destroying", this.MyDebug); + base.Pawn.DestroyHediff(this.parent, false); + this.blockAction = true; + } + if (this.HasSingleBodyRequirement && base.Pawn.def.race.body != this.Props.bodyDef) + { + Tools.Warn(string.Concat(new string[] + { + text, + " has not a bodyDef like required: ", + base.Pawn.def.race.body.ToString(), + "!=", + this.Props.bodyDef.ToString() + }), this.MyDebug); + base.Pawn.DestroyHediff(this.parent, false); + this.blockAction = true; + } + if (this.HasAccessList) + { + bool blackListCompliant = this.BlackListCompliant; + bool whiteListCompliant = this.WhiteListCompliant; + if (!blackListCompliant || !whiteListCompliant) + { + if (this.MyDebug) + { + Log.Warning(string.Concat(new string[] + { + text, + this.HasWhiteList ? string.Format("Props.BodyDefWhiteList contains {0} elements", this.Props.bodyDefWhiteList.Count) : "No whitelist", + ", compliant: ", + whiteListCompliant.ToString(), + "; ", + this.HasBlackList ? string.Format("Props.BodyDefBlackList contains {0} elements", this.Props.bodyDefBlackList.Count) : "No blacklist", + ", compliant:", + blackListCompliant.ToString() + })); + } + base.Pawn.DestroyHediff(this.parent, false); + this.blockAction = true; + } + else if (this.MyDebug) + { + Log.Warning(text + " AccessList compliant ok"); + } + } + if (this.Props.hediffAndBodypart.Any((HediffAndBodyPart habp) => habp.bodyPart != null && habp.bodyPartLabel != null)) + { + Tools.Warn(text + "at least one item has both a bodypart def and a bodypart label, label will be prioritized", this.MyDebug); + } + if (this.Props.hediffAndBodypart.Any((HediffAndBodyPart habp) => habp.hediff == null)) + { + Tools.Warn(text + "at least one item has no hediff defined. What will happen ?", this.MyDebug); + } + } + + public void BlockAndDestroy(string ErrorLog = "", bool myDebug = false) + { + Tools.Warn(ErrorLog, myDebug && !ErrorLog.NullOrEmpty()); + this.blockAction = true; + Tools.DestroyParentHediff(this.parent, myDebug); + } + + public override void CompPostMake() + { + base.CompPostMake(); + Tools.Warn(this.DebugStr + "CompPostMake", this.MyDebug); + this.CheckProps(); + } + + public void ApplyHediff(Pawn pawn) + { + string text = this.DebugStr + "ApplyHediff - "; + for (int i = 0; i < this.Props.hediffAndBodypart.Count; i++) + { + HediffDef hediff = this.Props.hediffAndBodypart[i].hediff; + BodyPartDef bodyPart = this.Props.hediffAndBodypart[i].bodyPart; + string bodyPartLabel = this.Props.hediffAndBodypart[i].bodyPartLabel; + bool prioritizeMissing = this.Props.hediffAndBodypart[i].prioritizeMissing; + bool allowMissing = this.Props.hediffAndBodypart[i].allowMissing; + bool regenIfMissing = this.Props.hediffAndBodypart[i].regenIfMissing; + bool allowAddedPart = this.Props.hediffAndBodypart[i].allowAddedPart; + bool wholeBodyFallback = this.Props.hediffAndBodypart[i].wholeBodyFallback; + if (hediff == null) + { + Tools.Warn(text + "cant find hediff; i=" + i.ToString(), true); + } + else + { + BodyPartRecord bodyPartRecord = null; + if (bodyPartLabel != null || bodyPart != null) + { + Tools.Warn(string.Concat(new string[] + { + text, + "Trying to retrieve BPR with [BP label]:", + bodyPartLabel, + " [BP def]:", + (bodyPart != null) ? bodyPart.defName : null + }), this.MyDebug); + bodyPartRecord = pawn.GetBPRecordWithoutHediff(bodyPartLabel, bodyPart, hediff, allowMissing, prioritizeMissing, allowAddedPart, this.MyDebug); + } + if (bodyPartRecord == null) + { + Tools.Warn(text + "Could not find a BPR to apply hediff, will pick whole body?" + wholeBodyFallback.ToString(), this.MyDebug); + if (!wholeBodyFallback) + { + goto IL_247; + } + } + Hediff hediff2; + if (allowMissing && regenIfMissing && bodyPartRecord != null && base.Pawn.IsMissingBPR(bodyPartRecord, out hediff2)) + { + Tools.Warn(text + "regenerating " + bodyPartRecord.customLabel, this.MyDebug); + base.Pawn.health.RemoveHediff(hediff2); + } + Hediff hediff3 = HediffMaker.MakeHediff(hediff, pawn, bodyPartRecord); + if (hediff3 == null) + { + Tools.Warn(string.Concat(new string[] + { + text, + "cant create hediff ", + hediff.defName, + " to apply on ", + bodyPart.defName + }), true); + } + else + { + pawn.health.AddHediff(hediff3, bodyPartRecord, null, null); + Tools.Warn(text + "Applied " + hediff.defName, this.MyDebug); + } + } + IL_247:; + } + } + + public override void CompPostTick(ref float severityAdjustment) + { + if (base.Pawn.Negligible()) + { + return; + } + if (this.blockAction) + { + Tools.DestroyParentHediff(this.parent, this.MyDebug); + return; + } + if (this.HasHediffToApply) + { + this.ApplyHediff(base.Pawn); + } + base.Pawn.DestroyHediff(this.parent, this.MyDebug); + } + + public override string CompTipStringExtra + { + get + { + return string.Empty + "This should disappear very fast"; + } + } + + private bool blockAction; + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/HediffComp_Spawner.cs b/1.6/Core/Assemblies/MoharHediffs/HediffComp_Spawner.cs new file mode 100644 index 0000000..24146b2 --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/HediffComp_Spawner.cs @@ -0,0 +1,644 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using RimWorld.Planet; +using Verse; + +namespace MoharHediffs +{ + public class HediffComp_Spawner : HediffComp + { + public HediffCompProperties_Spawner Props + { + get + { + return (HediffCompProperties_Spawner)this.props; + } + } + + public override void CompExposeData() + { + Scribe_Values.Look(ref this.ticksUntilSpawn, "ticksUntilSpawn", 0, false); + Scribe_Values.Look(ref this.initialTicksUntilSpawn, "initialTicksUntilSpawn", 0, false); + Scribe_Values.Look(ref this.calculatedMinDaysB4Next, "calculatedMinDaysB4Next", 0f, false); + Scribe_Values.Look(ref this.calculatedMaxDaysB4Next, "calculatedMaxDaysB4Next", 0f, false); + Scribe_Values.Look(ref this.calculatedQuantity, "calculatedQuantity", 0, false); + Scribe_Values.Look(ref this.graceTicks, "graceTicks", 0, false); + } + + public override void CompPostMake() + { + this.myDebug = this.Props.debug; + Tools.Warn(string.Concat(new string[] + { + ">>> ", + this.parent.pawn.Label, + " - ", + this.parent.def.defName, + " - CompPostMake start" + }), this.myDebug); + this.TraceProps(); + this.CheckProps(); + this.CalculateValues(); + this.CheckCalculatedValues(); + this.TraceCalculatedValues(); + if (this.initialTicksUntilSpawn == 0) + { + Tools.Warn("Reseting countdown bc initialTicksUntilSpawn == 0 (comppostmake)", this.myDebug); + this.ResetCountdown(); + } + } + + public override void CompPostTick(ref float severityAdjustment) + { + this.pawn = this.parent.pawn; + if (!Tools.OkPawn(this.pawn)) + { + return; + } + if (this.blockSpawn) + { + return; + } + if (this.graceTicks > 0) + { + this.graceTicks--; + return; + } + if (this.Props.hungerRelative && this.pawn.IsHungry(this.myDebug)) + { + int num = (int)(this.RandomGraceDays() * 60000f); + this.hungerReset++; + this.graceTicks = num; + return; + } + if (this.Props.healthRelative && this.pawn.IsInjured(this.myDebug)) + { + int num2 = (int)(this.RandomGraceDays() * 60000f); + this.healthReset++; + this.graceTicks = num2; + return; + } + this.hungerReset = (this.healthReset = 0); + if (this.CheckShouldSpawn()) + { + Tools.Warn("Reseting countdown bc spawned thing", this.myDebug); + this.CalculateValues(); + this.CheckCalculatedValues(); + this.ResetCountdown(); + if (Rand.Chance(this.Props.randomGrace)) + { + int num3 = (int)(this.RandomGraceDays() * 60000f); + this.graceTicks = num3; + } + } + } + + private void TraceProps() + { + Tools.Warn(string.Concat(new string[] + { + "Props => minDaysB4Next: ", + this.Props.minDaysB4Next.ToString(), + "; maxDaysB4Next: ", + this.Props.maxDaysB4Next.ToString(), + "; randomGrace: ", + this.Props.randomGrace.ToString(), + "; graceDays: ", + this.Props.graceDays.ToString(), + "; hungerRelative: ", + this.Props.hungerRelative.ToString(), + "; healthRelative: ", + this.Props.healthRelative.ToString(), + "; " + }), this.myDebug); + if (this.Props.animalThing) + { + Tools.Warn(string.Concat(new string[] + { + "animalThing: ", + this.Props.animalThing.ToString(), + "; animalName: ", + this.Props.animalToSpawn.defName, + "; factionOfPlayerAnimal: ", + this.Props.factionOfPlayerAnimal.ToString(), + "; " + }), this.myDebug); + } + if (this.Props.ageWeightedQuantity) + { + Tools.Warn(string.Concat(new string[] + { + "ageWeightedQuantity:", + this.Props.ageWeightedQuantity.ToString(), + "; olderBiggerQuantity:", + this.Props.olderBiggerQuantity.ToString(), + "; ", + this.myDebug.ToString() + }), false); + if (this.Props.exponentialQuantity) + { + Tools.Warn(string.Concat(new string[] + { + "exponentialQuantity:", + this.Props.exponentialQuantity.ToString(), + "; exponentialRatioLimit:", + this.Props.exponentialRatioLimit.ToString(), + "; " + }), this.myDebug); + } + } + Tools.Warn(string.Concat(new string[] + { + "ageWeightedPeriod:", + this.Props.ageWeightedPeriod.ToString(), + "; olderSmallerPeriod:", + this.Props.olderSmallerPeriod.ToString(), + "; ", + this.myDebug.ToString() + }), false); + } + + private void CalculateValues() + { + float num = Tools.GetPawnAgeOverlifeExpectancyRatio(this.parent.pawn, this.myDebug); + num = ((num > 1f) ? 1f : num); + this.calculatedMinDaysB4Next = this.Props.minDaysB4Next; + this.calculatedMaxDaysB4Next = this.Props.maxDaysB4Next; + if (this.Props.ageWeightedPeriod) + { + float num2 = this.Props.olderSmallerPeriod ? (-num) : num; + this.calculatedMinDaysB4Next = this.Props.minDaysB4Next * (1f + num2); + this.calculatedMaxDaysB4Next = this.Props.maxDaysB4Next * (1f + num2); + Tools.Warn(string.Concat(new string[] + { + " ageWeightedPeriod: ", + this.Props.ageWeightedPeriod.ToString(), + " ageRatio: ", + num.ToString(), + " minDaysB4Next: ", + this.Props.minDaysB4Next.ToString(), + " maxDaysB4Next: ", + this.Props.maxDaysB4Next.ToString(), + " daysAgeRatio: ", + num2.ToString(), + " calculatedMinDaysB4Next: ", + this.calculatedMinDaysB4Next.ToString(), + "; calculatedMaxDaysB4Next: ", + this.calculatedMaxDaysB4Next.ToString(), + "; " + }), this.myDebug); + } + this.calculatedQuantity = this.Props.spawnCount; + if (this.Props.ageWeightedQuantity) + { + float num3 = this.Props.olderBiggerQuantity ? num : (-num); + Tools.Warn("quantityAgeRatio: " + num3.ToString(), this.myDebug); + this.calculatedQuantity = (int)Math.Round((double)this.Props.spawnCount * (double)(1f + num3)); + if (this.Props.exponentialQuantity) + { + num3 = 1f - num; + if (num3 == 0f) + { + Tools.Warn(">ERROR< quantityAgeRatio is f* up : " + num3.ToString(), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + float num4 = this.Props.olderBiggerQuantity ? (1f / num3) : (num3 * num3); + bool flag = false; + bool flag2 = false; + if (num4 > (float)this.Props.exponentialRatioLimit) + { + num4 = (float)this.Props.exponentialRatioLimit; + flag = true; + } + this.calculatedQuantity = (int)Math.Round((double)this.Props.spawnCount * (double)num4); + if (this.calculatedQuantity < 1) + { + this.calculatedQuantity = 1; + flag2 = true; + } + Tools.Warn(string.Concat(new string[] + { + " exponentialQuantity: ", + this.Props.exponentialQuantity.ToString(), + "; expoFactor: ", + num4.ToString(), + "; gotLimited: ", + flag.ToString(), + "; gotAugmented: ", + flag2.ToString() + }), this.myDebug); + } + Tools.Warn("; Props.spawnCount: " + this.Props.spawnCount.ToString() + "; calculatedQuantity: " + this.calculatedQuantity.ToString(), this.myDebug); + } + } + + private void CheckCalculatedValues() + { + if (this.calculatedQuantity > this.errorSpawnCount) + { + Tools.Warn(string.Concat(new string[] + { + ">ERROR< calculatedQuantity is too high: ", + this.calculatedQuantity.ToString(), + "(>", + this.errorSpawnCount.ToString(), + "), check and adjust your hediff props" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.calculatedMinDaysB4Next >= this.calculatedMaxDaysB4Next) + { + Tools.Warn(">ERROR< calculatedMinDaysB4Next should be lower than calculatedMaxDaysB4Next", this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.calculatedMinDaysB4Next < this.errorMinDaysB4Next) + { + Tools.Warn(string.Concat(new string[] + { + ">ERROR< calculatedMinDaysB4Next is too low: ", + this.Props.minDaysB4Next.ToString(), + "(<", + this.errorMinDaysB4Next.ToString(), + "), check and adjust your hediff props" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + } + + private void TraceCalculatedValues() + { + Tools.Warn(string.Concat(new string[] + { + "<<< ", + this.Props.ageWeightedPeriod ? ("Props.olderMoreOften: " + this.Props.olderSmallerPeriod.ToString() + "; ") : "", + this.Props.ageWeightedQuantity ? ("Props.olderBiggerquantities: " + this.Props.olderBiggerQuantity.ToString() + "; ") : "", + " Props.minDaysB4Next: ", + this.Props.minDaysB4Next.ToString(), + "; Props.maxDaysB4Next: ", + this.Props.maxDaysB4Next.ToString(), + "; calculatedMinDaysB4Next: ", + this.calculatedMinDaysB4Next.ToString(), + "; calculatedMaxDaysB4Next: ", + this.calculatedMaxDaysB4Next.ToString(), + "; Props.spawnCount: ", + this.Props.spawnCount.ToString(), + "; CalculatedQuantity: ", + this.calculatedQuantity.ToString(), + "; " + }), this.myDebug); + } + + private void CheckProps() + { + if (this.Props.spawnCount > this.errorSpawnCount) + { + Tools.Warn(string.Concat(new string[] + { + "SpawnCount is too high: ", + this.Props.spawnCount.ToString(), + "(>", + this.errorSpawnCount.ToString(), + "), some people just want to see the world burn" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.Props.minDaysB4Next >= this.Props.maxDaysB4Next) + { + Tools.Warn("minDaysB4Next should be lower than maxDaysB4Next", this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.Props.minDaysB4Next < this.errorMinDaysB4Next) + { + Tools.Warn(string.Concat(new string[] + { + "minDaysB4Next is too low: ", + this.Props.minDaysB4Next.ToString(), + "(<", + this.errorMinDaysB4Next.ToString(), + "), some people just want to see the world burn" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.Props.animalThing) + { + if (this.Props.animalToSpawn == null || this.Props.animalToSpawn.defName.NullOrEmpty()) + { + Tools.Warn("Props.animalThing=" + this.Props.animalThing.ToString() + "; but no Props.animalName", this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + Tools.Warn("Found animal PawnKindDef.defName=" + this.Props.animalToSpawn.defName, this.myDebug); + } + else + { + if ((from b in DefDatabase.AllDefs + where b == this.Props.thingToSpawn + select b).RandomElement() == null) + { + Tools.Warn("Could not find Props.thingToSpawn in DefDatabase", this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + Tools.Warn("Found ThingDef for " + this.Props.thingToSpawn.defName + "in DefDatabase", this.myDebug); + } + if (!this.Props.ageWeightedPeriod && this.Props.olderSmallerPeriod) + { + Tools.Warn("olderSmallerPeriod ignored since ageWeightedPeriod is false ", this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (!this.Props.ageWeightedQuantity) + { + if (this.Props.olderBiggerQuantity) + { + Tools.Warn("olderBiggerQuantity ignored since ageWeightedQuantity is false ", this.myDebug); + } + if (this.Props.exponentialQuantity) + { + Tools.Warn("exponentialQuantity ignored since ageWeightedQuantity is false ", this.myDebug); + } + if (this.Props.olderBiggerQuantity || this.Props.exponentialQuantity) + { + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + } + if (this.Props.exponentialQuantity && this.Props.exponentialRatioLimit > this.errorExponentialLimit) + { + Tools.Warn(string.Concat(new string[] + { + "expoRatioLimit too low while expoQuantity is set: ", + this.Props.exponentialRatioLimit.ToString(), + "(>", + this.errorExponentialLimit.ToString(), + "), some people just want to see the world burn" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + } + } + + private bool CheckShouldSpawn() + { + this.pawn = this.parent.pawn; + if (!Tools.OkPawn(this.pawn)) + { + Tools.Warn("CheckShouldSpawn pawn Null", this.myDebug); + return false; + } + this.ticksUntilSpawn--; + if (this.ticksUntilSpawn <= 0) + { + Tools.Warn("TryDoSpawn: " + this.TryDoSpawn().ToString(), this.myDebug); + return true; + } + return false; + } + + private PawnKindDef MyPawnKindDefNamed(string myDefName) + { + PawnKindDef result = null; + foreach (PawnKindDef pawnKindDef in DefDatabase.AllDefs) + { + if (pawnKindDef.defName == myDefName) + { + return pawnKindDef; + } + } + return result; + } + + public bool TryDoSpawn() + { + this.pawn = this.parent.pawn; + if (!Tools.OkPawn(this.pawn)) + { + Tools.Warn("TryDoSpawn - pawn null", this.myDebug); + return false; + } + if (this.Props.animalThing) + { + Faction faction = this.Props.factionOfPlayerAnimal ? Faction.OfPlayer : null; + PawnGenerationRequest request = new PawnGenerationRequest(this.Props.animalToSpawn, faction, PawnGenerationContext.NonPlayer, new PlanetTile?(-1), false, true, false, true, false, 1f, false, true, false, true, true, false, false, false, false, 0f, 0f, null, 1f, null, null, null, null, null, null, null, null, null, null, null, null, false, false, false, false, null, null, null, null, null, 0f, DevelopmentalStage.Adult, null, null, null, false, false, false, -1, 0, false); + for (int i = 0; i < this.calculatedQuantity; i++) + { + GenSpawn.Spawn(PawnGenerator.GeneratePawn(request), this.parent.pawn.Position, this.parent.pawn.Map, WipeMode.Vanish); + FilthMaker.TryMakeFilth(this.parent.pawn.Position, this.parent.pawn.Map, ThingDefOf.Filth_AmnioticFluid, 1, FilthSourceFlags.None, true); + } + return true; + } + if (this.Props.spawnMaxAdjacent >= 0) + { + int num = 0; + for (int j = 0; j < 9; j++) + { + IntVec3 c = this.pawn.Position + GenAdj.AdjacentCellsAndInside[j]; + if (c.InBounds(this.pawn.Map)) + { + List thingList = c.GetThingList(this.pawn.Map); + for (int k = 0; k < thingList.Count; k++) + { + if (thingList[k].def == this.Props.thingToSpawn) + { + num += thingList[k].stackCount; + if (num >= this.Props.spawnMaxAdjacent) + { + return false; + } + } + } + } + } + } + int l = 0; + int num2 = this.calculatedQuantity; + int num3 = 0; + while (l < this.calculatedQuantity) + { + IntVec3 center; + if (this.TryFindSpawnCell(out center)) + { + Thing thing = ThingMaker.MakeThing(this.Props.thingToSpawn, null); + thing.stackCount = num2; + if (thing.def.stackLimit > 0 && thing.stackCount > thing.def.stackLimit) + { + thing.stackCount = thing.def.stackLimit; + } + l += thing.stackCount; + num2 -= thing.stackCount; + Thing t; + GenPlace.TryPlaceThing(thing, center, this.pawn.Map, ThingPlaceMode.Direct, out t, null, null, null, 1); + if (this.Props.spawnForbidden) + { + t.SetForbidden(true, true); + } + } + if (num3++ > 10) + { + Tools.Warn("Had to break the loop", this.myDebug); + return false; + } + } + return num2 <= 0; + } + + private bool TryFindSpawnCell(out IntVec3 result) + { + this.pawn = this.parent.pawn; + if (!Tools.OkPawn(this.pawn)) + { + result = IntVec3.Invalid; + Tools.Warn("TryFindSpawnCell Null - pawn null", this.myDebug); + return false; + } + foreach (IntVec3 intVec in GenAdj.CellsAdjacent8Way(this.pawn).InRandomOrder(null)) + { + if (intVec.Walkable(this.pawn.Map)) + { + Building edifice = intVec.GetEdifice(this.pawn.Map); + if (edifice == null || !this.Props.thingToSpawn.IsEdifice()) + { + Building_Door building_Door = edifice as Building_Door; + if ((building_Door == null || building_Door.FreePassage) && GenSight.LineOfSight(this.pawn.Position, intVec, this.pawn.Map, false, null, 0, 0)) + { + bool flag = false; + List thingList = intVec.GetThingList(this.pawn.Map); + for (int i = 0; i < thingList.Count; i++) + { + Thing thing = thingList[i]; + if (thing.def.category == ThingCategory.Item && (thing.def != this.Props.thingToSpawn || thing.stackCount > this.Props.thingToSpawn.stackLimit - this.calculatedQuantity)) + { + flag = true; + break; + } + } + if (!flag) + { + result = intVec; + return true; + } + } + } + } + } + Tools.Warn("TryFindSpawnCell Null - no spawn cell found", this.myDebug); + result = IntVec3.Invalid; + return false; + } + + private void ResetCountdown() + { + this.ticksUntilSpawn = (this.initialTicksUntilSpawn = (int)(this.RandomDays2wait() * 60000f)); + } + + private float RandomDays2wait() + { + return Rand.Range(this.calculatedMinDaysB4Next, this.calculatedMaxDaysB4Next); + } + + private float RandomGraceDays() + { + return this.Props.graceDays * Rand.Range(0f, 1f); + } + + public override string CompTipStringExtra + { + get + { + string text; + if (this.graceTicks > 0) + { + if (this.Props.animalThing) + { + text = " No " + this.Props.animalToSpawn.defName + " for " + this.graceTicks.ToStringTicksToPeriod(true, false, true, true, false); + } + else + { + text = " No " + this.Props.thingToSpawn.label + " for " + this.graceTicks.ToStringTicksToPeriod(true, false, true, true, false); + } + if (this.hungerReset > 0) + { + text += "(hunger)"; + } + else if (this.healthReset > 0) + { + text += "(injury)"; + } + else + { + text += "(grace period)"; + } + } + else + { + text = this.ticksUntilSpawn.ToStringTicksToPeriod(true, false, true, true, false) + " before "; + if (this.Props.animalThing) + { + text += this.Props.animalToSpawn.defName; + } + else + { + text += this.Props.thingToSpawn.label; + } + text = string.Concat(new string[] + { + text, + " ", + this.Props.spawnVerb, + "(", + this.calculatedQuantity.ToString(), + "x)" + }); + } + return text; + } + } + + private int ticksUntilSpawn; + + private int initialTicksUntilSpawn; + + private int hungerReset; + + private int healthReset; + + private int graceTicks; + + private Pawn pawn; + + private float calculatedMaxDaysB4Next = 2f; + + private float calculatedMinDaysB4Next = 1f; + + private int calculatedQuantity = 1; + + private bool blockSpawn; + + private bool myDebug; + + private readonly float errorMinDaysB4Next = 0.001f; + + private readonly int errorExponentialLimit = 20; + + private readonly int errorSpawnCount = 750; + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/Microsoft/CodeAnalysis/EmbeddedAttribute.cs b/1.6/Core/Assemblies/MoharHediffs/Microsoft/CodeAnalysis/EmbeddedAttribute.cs new file mode 100644 index 0000000..c933444 --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/Microsoft/CodeAnalysis/EmbeddedAttribute.cs @@ -0,0 +1,11 @@ +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.CodeAnalysis +{ + [CompilerGenerated] + [Embedded] + internal sealed class EmbeddedAttribute : Attribute + { + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/MoharHediffs.csproj b/1.6/Core/Assemblies/MoharHediffs/MoharHediffs.csproj new file mode 100644 index 0000000..f91f7e6 --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/MoharHediffs.csproj @@ -0,0 +1,65 @@ + + + + Debug + x64 + {F992C1F9-4E11-4987-9E00-D665B2E34CBB} + Library + Properties + MoharHediffs + MoharHediffs + v4.8 + 512 + + + x64 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x64 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\..\..\..\..\..\..\..\..\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll + + + ..\..\..\..\..\..\..\..\..\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\System.Core.dll + + + ..\..\..\..\..\..\..\..\..\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/1.6/Core/Assemblies/MoharHediffs/Properties/AssemblyInfo.cs b/1.6/Core/Assemblies/MoharHediffs/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5bc658b --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/Properties/AssemblyInfo.cs @@ -0,0 +1,8 @@ +using System; +using System.Diagnostics; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.Versioning; + +[assembly: AssemblyVersion("0.0.0.0")] +[module: RefSafetyRules(11)] diff --git a/1.6/Core/Assemblies/MoharHediffs/System/Runtime/CompilerServices/RefSafetyRulesAttribute.cs b/1.6/Core/Assemblies/MoharHediffs/System/Runtime/CompilerServices/RefSafetyRulesAttribute.cs new file mode 100644 index 0000000..8d5136d --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/System/Runtime/CompilerServices/RefSafetyRulesAttribute.cs @@ -0,0 +1,18 @@ +using System; +using Microsoft.CodeAnalysis; + +namespace System.Runtime.CompilerServices +{ + [CompilerGenerated] + [Embedded] + [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] + internal sealed class RefSafetyRulesAttribute : Attribute + { + public RefSafetyRulesAttribute(int A_1) + { + this.Version = A_1; + } + + public readonly int Version; + } +} diff --git a/1.6/Core/Assemblies/MoharHediffs/Tools.cs b/1.6/Core/Assemblies/MoharHediffs/Tools.cs new file mode 100644 index 0000000..b58ba36 --- /dev/null +++ b/1.6/Core/Assemblies/MoharHediffs/Tools.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections.Generic; +using AlienRace; +using RimWorld; +using UnityEngine; +using Verse; + +namespace MoharHediffs +{ + public static class Tools + { + public static float Clamp(this float value, float min, float max) + { + return Math.Min(Math.Max(value, min), max); + } + + public static void DestroyParentHediff(Hediff parentHediff, bool debug = false) + { + if (parentHediff.pawn != null && parentHediff.def.defName != null && debug) + { + Log.Warning(parentHediff.pawn.Label + "'s Hediff: " + parentHediff.def.defName + " says goodbye."); + } + parentHediff.Severity = 0f; + } + + public static void DestroyHediff(this Pawn pawn, Hediff hediff, bool debug = false) + { + if (hediff.pawn != null && hediff.def.defName != null && debug) + { + Log.Warning(hediff.pawn.Label + "'s Hediff: " + hediff.def.defName + " says goodbye."); + } + pawn.health.RemoveHediff(hediff); + } + + public static float GetPawnAgeOverlifeExpectancyRatio(Pawn pawn, bool debug = false) + { + float result = 1f; + if (pawn == null) + { + if (debug) + { + Log.Warning("GetPawnAgeOverlifeExpectancyRatio pawn NOT OK"); + } + return result; + } + result = pawn.ageTracker.AgeBiologicalYearsFloat / pawn.RaceProps.lifeExpectancy; + if (debug) + { + Log.Warning(string.Concat(new string[] + { + pawn.Label, + " Age: ", + pawn.ageTracker.AgeBiologicalYearsFloat.ToString(), + "; lifeExpectancy: ", + pawn.RaceProps.lifeExpectancy.ToString(), + "; ratio:", + result.ToString() + })); + } + return result; + } + + public static float GetPawnAdultRatio(Pawn pawn, bool debug = false) + { + if (!Tools.OkPawn(pawn)) + { + if (debug) + { + Log.Warning("GetPawnAgeOverlifeExpectancyRatio pawn NOT OK"); + } + return 1f; + } + List lifeStageAges = pawn.RaceProps.lifeStageAges; + int index = lifeStageAges.Count - 1; + float minAge = lifeStageAges[index].minAge; + float lifeExpectancy = pawn.RaceProps.lifeExpectancy; + return (pawn.ageTracker.AgeBiologicalYearsFloat - minAge) / (lifeExpectancy - minAge); + } + + public static bool IsInjured(this Pawn pawn, bool debug = false) + { + if (pawn == null) + { + if (debug) + { + Log.Warning("pawn is null - wounded "); + } + return false; + } + float num = 0f; + List hediffs = pawn.health.hediffSet.hediffs; + for (int i = 0; i < hediffs.Count; i++) + { + if (hediffs[i] is Hediff_Injury && !hediffs[i].IsPermanent()) + { + num += hediffs[i].Severity; + } + } + if (debug && num > 0f) + { + Log.Warning(pawn.Label + " is wounded "); + } + return num > 0f; + } + + public static bool IsHungry(this Pawn pawn, bool debug = false) + { + if (pawn == null) + { + if (debug) + { + Log.Warning("pawn is null - IsHungry "); + } + return false; + } + bool flag = pawn.needs.food != null && pawn.needs.food.CurCategory == HungerCategory.Starving; + if (debug && flag) + { + Log.Warning(pawn.Label + " is hungry "); + } + return flag; + } + + public static bool Negligible(this Pawn p) + { + if (p != null && p.Spawned && p.Map != null) + { + IntVec3 position = p.Position; + return false; + } + return true; + } + + public static bool Negligible(this Thing thing) + { + if (thing != null && thing.Spawned && thing.Map != null) + { + IntVec3 position = thing.Position; + return false; + } + return true; + } + + public static bool OkPawn(Pawn pawn) + { + return pawn != null && pawn.Map != null; + } + + public static void Warn(string warning, bool debug = false) + { + if (debug) + { + Log.Warning(warning); + } + } + + public static bool IsAlien(this Pawn pawn) + { + return pawn.def.race.Humanlike && pawn.def != ThingDefOf.Human; + } + + public static bool IsHuman(this Pawn pawn) + { + return pawn.def.race.Humanlike && pawn.def == ThingDefOf.Human; + } + + public static AlienPartGenerator.AlienComp GetAlien(Pawn pawn = null) + { + if (pawn == null) + { + return null; + } + return pawn.TryGetComp(); + } + + public static bool ForbiddenMote(this Vector3 loc, Map map) + { + return !loc.ShouldSpawnMotesAt(map, true) || map.moteCounter.SaturatedLowPriority; + } + } +} diff --git a/1.6/Core/Assemblies/MoharThoughts.sln b/1.6/Core/Assemblies/MoharThoughts.sln new file mode 100644 index 0000000..bf272d5 --- /dev/null +++ b/1.6/Core/Assemblies/MoharThoughts.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoharThoughts", "MoharThoughts\MoharThoughts.csproj", "{20289CFE-6B75-4BAA-ABEC-2EE00128C17C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {20289CFE-6B75-4BAA-ABEC-2EE00128C17C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20289CFE-6B75-4BAA-ABEC-2EE00128C17C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20289CFE-6B75-4BAA-ABEC-2EE00128C17C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20289CFE-6B75-4BAA-ABEC-2EE00128C17C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/1.6/Core/Assemblies/MoharThoughts/BodyPartUtils.cs b/1.6/Core/Assemblies/MoharThoughts/BodyPartUtils.cs new file mode 100644 index 0000000..b9e1bff --- /dev/null +++ b/1.6/Core/Assemblies/MoharThoughts/BodyPartUtils.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace MoharThoughts +{ + public static class BodyPartUtils + { + public static bool ValidateBP(this MTWDef mtwDef, BodyPartRecord BPR) + { + bool hasBodyPartDefTarget = mtwDef.HasBodyPartDefTarget; + bool result; + if (hasBodyPartDefTarget) + { + result = (mtwDef.bodyPart == BPR.def); + } + else + { + bool hasBodyPartLabelTarget = mtwDef.HasBodyPartLabelTarget; + result = (hasBodyPartLabelTarget && mtwDef.bodyPartLabel == BPR.customLabel); + } + return result; + } + + public static bool BodyPartHasHediff(this Pawn p, BodyPartRecord bpr, List HDL) + { + return p.health.hediffSet.hediffs.Any((Hediff h) => h.Part == bpr && HDL.Contains(h.def)); + } + + public static bool PartOrAnyAncestorHasHediff(this Pawn p, BodyPartRecord bpr, List HDL) + { + bool flag = p.BodyPartHasHediff(bpr, HDL); + bool result; + if (flag) + { + result = true; + } + else + { + bool flag2 = bpr.parent != null && p.PartOrAnyAncestorHasHediff(bpr.parent, HDL); + result = flag2; + } + return result; + } + + public static bool IsAccessListCompatible(this Pawn p, BodyPartRecord bpr, MTWDef mTWDef, bool debug = false) + { + bool flag = mTWDef.HasApplyList && p.PartOrAnyAncestorHasHediff(bpr, mTWDef.applyThoughtHediffList); + bool result; + if (flag) + { + if (debug) + { + Log.Warning(p.LabelShort + " " + bpr.Label + " is in apply list"); + } + result = true; + } + else + { + bool flag2 = mTWDef.HasIgnoreList && p.PartOrAnyAncestorHasHediff(bpr, mTWDef.ignoreThoughtHediffList); + if (flag2) + { + if (debug) + { + Log.Warning(p.LabelShort + " " + bpr.Label + " is in ignore list"); + } + result = false; + } + else + { + if (debug) + { + Log.Warning(p.LabelShort + " " + bpr.Label + " is ACL compatible"); + } + result = true; + } + } + return result; + } + } +} diff --git a/1.6/Core/Assemblies/MoharThoughts/MTWDef.cs b/1.6/Core/Assemblies/MoharThoughts/MTWDef.cs new file mode 100644 index 0000000..2fafa6f --- /dev/null +++ b/1.6/Core/Assemblies/MoharThoughts/MTWDef.cs @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using RimWorld; +using Verse; + +namespace MoharThoughts +{ + public class MTWDef : Def + { + public override string ToString() + { + return this.defName; + } + + public MTWDef Named(string searchedDN) + { + return DefDatabase.GetNamed(searchedDN, true); + } + + public override int GetHashCode() + { + return this.defName.GetHashCode(); + } + + public bool HasBodyPartDefTarget + { + get + { + return this.bodyPart != null; + } + } + + public bool HasBodyPartLabelTarget + { + get + { + return !this.bodyPartLabel.NullOrEmpty(); + } + } + + public bool HasTarget + { + get + { + return this.HasBodyPartDefTarget || this.HasBodyPartLabelTarget; + } + } + + public bool HasRequiredBpNum + { + get + { + return this.bpNum.min != 0 || this.bpNum.max != 0; + } + } + + public bool HasLifeStages + { + get + { + return !this.lifeStages.NullOrEmpty(); + } + } + + public bool HasApplyList + { + get + { + return !this.applyThoughtHediffList.NullOrEmpty(); + } + } + + public bool HasIgnoreList + { + get + { + return !this.ignoreThoughtHediffList.NullOrEmpty(); + } + } + + public bool HasAccessList + { + get + { + return this.HasApplyList || this.HasIgnoreList; + } + } + + public ThoughtDef thought; + + public ThingDef race; + + public BodyPartDef bodyPart; + + public string bodyPartLabel; + + public HediffDef hediff; + + public IntRange bpNum = new IntRange(0, 0); + + public List lifeStages; + + public List applyThoughtHediffList; + + public List ignoreThoughtHediffList; + + public bool ignoreThoughtIfAddedPart = false; + + public bool debug = false; + } +} diff --git a/1.6/Core/Assemblies/MoharThoughts/MoharThoughts.csproj b/1.6/Core/Assemblies/MoharThoughts/MoharThoughts.csproj new file mode 100644 index 0000000..57b3c2d --- /dev/null +++ b/1.6/Core/Assemblies/MoharThoughts/MoharThoughts.csproj @@ -0,0 +1,52 @@ + + + + Debug + AnyCPU + {20289CFE-6B75-4BAA-ABEC-2EE00128C17C} + Library + Properties + MoharThoughts + MoharThoughts + v4.7.2 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\..\..\..\..\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll + + + ..\..\..\..\..\..\..\..\..\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\System.Core.dll + + + + + + + + + + + + + + \ No newline at end of file diff --git a/1.6/Core/Assemblies/MoharThoughts/Properties/AssemblyInfo.cs b/1.6/Core/Assemblies/MoharThoughts/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..73fe074 --- /dev/null +++ b/1.6/Core/Assemblies/MoharThoughts/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System; +using System.Diagnostics; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; + +[assembly: AssemblyVersion("0.15.1.0")] +[assembly: AssemblyTitle("MoharThoughts")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MoharThoughts")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: ComVisible(false)] +[assembly: Guid("a8e081b6-8768-4fe9-817f-f0ee42cf13ef")] +[assembly: AssemblyFileVersion("0.15.1.0")] diff --git a/1.6/Core/Assemblies/MoharThoughts/RaceBPHediff.cs b/1.6/Core/Assemblies/MoharThoughts/RaceBPHediff.cs new file mode 100644 index 0000000..f002362 --- /dev/null +++ b/1.6/Core/Assemblies/MoharThoughts/RaceBPHediff.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using Verse; + +namespace MoharThoughts +{ + public class RaceBPHediff : ThoughtWorker + { + protected override ThoughtState CurrentStateInternal(Pawn p) + { + MTWDef myTWD = (from m in DefDatabase.AllDefs + where m.race == p.def && this.def == m.thought && m.HasTarget && (!m.HasLifeStages || m.lifeStages.Contains(p.ageTracker.CurLifeStage)) + select m).SingleOrDefault(); + bool flag = myTWD == null; + ThoughtState result; + if (flag) + { + result = false; + } + else + { + IEnumerable enumerable = from h in p.health.hediffSet.hediffs + where h.Part != null && myTWD.ValidateBP(h.Part) && (h.def == myTWD.hediff || (myTWD.HasApplyList && myTWD.applyThoughtHediffList.Contains(h.def))) + select h; + bool flag2 = enumerable.EnumerableNullOrEmpty(); + if (flag2) + { + result = false; + } + else + { + bool ignoreThoughtIfAddedPart = myTWD.ignoreThoughtIfAddedPart; + if (ignoreThoughtIfAddedPart) + { + enumerable = from h in enumerable + where !p.health.hediffSet.PartOrAnyAncestorHasDirectlyAddedParts(h.Part) + select h; + } + else + { + bool hasAccessList = myTWD.HasAccessList; + if (hasAccessList) + { + enumerable = from h in enumerable + where p.IsAccessListCompatible(h.Part, myTWD, myTWD.debug) + select h; + } + } + bool flag3 = enumerable.EnumerableNullOrEmpty(); + if (flag3) + { + result = false; + } + else + { + bool hasRequiredBpNum = myTWD.HasRequiredBpNum; + if (hasRequiredBpNum) + { + result = myTWD.bpNum.Includes(enumerable.EnumerableCount()); + } + else + { + result = false; + } + } + } + } + return result; + } + } +} diff --git a/1.6/Core/Assemblies/MoharThoughts/Tools.cs b/1.6/Core/Assemblies/MoharThoughts/Tools.cs new file mode 100644 index 0000000..3a916a0 --- /dev/null +++ b/1.6/Core/Assemblies/MoharThoughts/Tools.cs @@ -0,0 +1,13 @@ +using System; +using Verse; + +namespace MoharThoughts +{ + public static class Tools + { + public static bool Includes(this IntRange intRange, int value) + { + return value >= intRange.min && value <= intRange.max; + } + } +} diff --git a/1.6/Core/Assemblies/SYS.dll b/1.6/Core/Assemblies/SYS.dll new file mode 100644 index 0000000..bdfed0d Binary files /dev/null and b/1.6/Core/Assemblies/SYS.dll differ diff --git a/1.6/Core/Assemblies/WearSetting.dll b/1.6/Core/Assemblies/WearSetting.dll new file mode 100644 index 0000000..7ac29cc Binary files /dev/null and b/1.6/Core/Assemblies/WearSetting.dll differ diff --git a/1.6/Core/Defs/AbilityDef/AbilityDefs_Base.xml b/1.6/Core/Defs/AbilityDef/AbilityDefs_Base.xml new file mode 100644 index 0000000..5bb2285 --- /dev/null +++ b/1.6/Core/Defs/AbilityDef/AbilityDefs_Base.xml @@ -0,0 +1,138 @@ + + + + + + + PNModule_2day + 120000 + + + + PNModule_1day + 60000 + + + + PNModule_12hour + 30000 + + + + PNModule_6hour + 15000 + + + + PNModule_3hour + 7500 + + + PNModule_rightoff + 120 + + + + HediffWithComps + +
  • +
  • + +
  • PN_ModuleUnstable_Industrial
  • + + +
    + false +
    + + + HediffWithComps + +
  • +
  • + +
  • PN_ModuleUnstable_Spacer
  • + + +
    + false +
    + + + + + + + PN_ModuleUnstable_Industrial + + module system (unstable) + The module system is unstable. The module cannot be mounted until the system is stable. + HediffWithComps + false + +
  • + 20000 + True +
  • +
  • +
  • + +
  • PN_OfficerCommand
  • +
  • PN_MeisterAdvice
  • +
  • PN_IntensiveMedical
  • +
  • PN_FieldMedic
  • + +
  • PN_RapidFire
  • +
  • PN_CQC
  • + + false + +
    + + + +
    + + PN_ModuleUnstable_Spacer + + module system (unstable) + The module system is unstable. The module cannot be mounted until the system is stable. + HediffWithComps + false + +
  • + 120000 + True +
  • +
  • +
  • + +
  • PN_OfficerCommand
  • +
  • PN_MeisterAdvice
  • +
  • PN_IntensiveMedical
  • +
  • PN_FieldMedic
  • + +
  • PN_RapidFire
  • +
  • PN_CQC
  • + + false + +
    + + + +
    + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/AutomataQualityProperty.xml b/1.6/Core/Defs/AutomataRace/AutomataQualityProperty.xml new file mode 100644 index 0000000..dfacb23 --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/AutomataQualityProperty.xml @@ -0,0 +1,231 @@ + + + + PN_AutomataQualityProperty_Awful + Awful + +
  • + PN_Specialization_Combat + Paniel_Randombox_Awful +
  • +
  • + PN_Specialization_Engineer + Paniel_Randombox_Awful +
  • +
  • + PN_Specialization_Domestic + Paniel_Randombox_Awful +
  • +
    + + +
  • (0,0)
  • +
  • (256,13)
  • +
  • (424,2)
  • +
  • (592,1)
  • +
  • (760,0)
  • +
    +
    +
    + + + PN_AutomataQualityProperty_Poor + Poor + +
  • + PN_Specialization_Combat + Paniel_Randombox_Poor +
  • +
  • + PN_Specialization_Engineer + Paniel_Randombox_Poor +
  • +
  • + PN_Specialization_Domestic + Paniel_Randombox_Poor +
  • +
    + + +
  • (0,0)
  • +
  • (256,902)
  • +
  • (424,333)
  • +
  • (592,186)
  • +
  • (760,99)
  • +
  • (928,39)
  • +
  • (1096,24)
  • +
  • (1264,0)
  • +
    +
    +
    + + + PN_AutomataQualityProperty_Normal + Normal + +
  • + PN_Specialization_Combat + Paniel_Soldier_Normal +
  • +
  • + PN_Specialization_Engineer + Paniel_Worker_Normal +
  • +
  • + PN_Specialization_Domestic + Paniel_Maid_Normal +
  • +
    + + +
  • (0,0)
  • +
  • (256,5082)
  • +
  • (424,4023)
  • +
  • (592,3221)
  • +
  • (760,2455)
  • +
  • (928,1579)
  • +
  • (1096,1225)
  • +
  • (1264,942)
  • +
  • (1432,503)
  • +
  • (1600,246)
  • +
  • (2064,0)
  • +
    +
    +
    + + + PN_AutomataQualityProperty_Good + Good + +
  • + PN_Specialization_Combat + Paniel_Soldier_Good +
  • +
  • + PN_Specialization_Engineer + Paniel_Worker_Good +
  • +
  • + PN_Specialization_Domestic + Paniel_Maid_Good +
  • +
    + + +
  • (0,0)
  • +
  • (256,3347)
  • +
  • (424,4375)
  • +
  • (592,4907)
  • +
  • (760,5262)
  • +
  • (928,5428)
  • +
  • (1096,5377)
  • +
  • (1264,5242)
  • +
  • (1432,4762)
  • +
  • (1600,3741)
  • +
  • (2064,335)
  • +
  • (2232,187)
  • +
  • (2400,99)
  • +
    +
    +
    + + + PN_AutomataQualityProperty_Excellent + Excellent + +
  • + PN_Specialization_Combat + Paniel_Soldier_Excellent +
  • +
  • + PN_Specialization_Engineer + Paniel_Worker_Excellent +
  • +
  • + PN_Specialization_Domestic + Paniel_Maid_Excellent +
  • +
    + + +
  • (0,0)
  • +
  • (256,640)
  • +
  • (424,1223)
  • +
  • (592,1612)
  • +
  • (760,2064)
  • +
  • (928,2740)
  • +
  • (1096,3091)
  • +
  • (1264,3448)
  • +
  • (1432,4129)
  • +
  • (1600,5062)
  • +
  • (2064,4023)
  • +
  • (2232,3221)
  • +
  • (2400,2455)
  • +
    +
    +
    + + + PN_AutomataQualityProperty_Masterwork + Masterwork + +
  • + PN_Specialization_Combat + Paniel_Soldier_Masterwork +
  • +
  • + PN_Specialization_Engineer + Paniel_Worker_Masterwork +
  • +
  • + PN_Specialization_Domestic + Paniel_Maid_Masterwork +
  • +
    + + +
  • (0,0)
  • +
  • (256,16)
  • +
  • (424,44)
  • +
  • (592,73)
  • +
  • (760,119)
  • +
  • (928,214)
  • +
  • (1096,283)
  • +
  • (1264,368)
  • +
  • (1432,606)
  • +
  • (1600,951)
  • +
  • (2064,4375)
  • +
  • (2232,4907)
  • +
  • (2400,5262)
  • +
    +
    +
    + + + PN_AutomataQualityProperty_Legendary + Legendary + +
  • + PN_Specialization_Combat + Paniel_Soldier_Legendary +
  • +
  • + PN_Specialization_Engineer + Paniel_Worker_Legendary +
  • +
  • + PN_Specialization_Domestic + Paniel_Maid_Legendary +
  • +
    + + +
  • (1665,0)
  • +
  • (2064,1268)
  • +
  • (2232,1686)
  • +
  • (2400,2183)
  • +
    +
    +
    + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/AutomataRaceSettings.xml b/1.6/Core/Defs/AutomataRace/AutomataRaceSettings.xml new file mode 100644 index 0000000..c7d2182 --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/AutomataRaceSettings.xml @@ -0,0 +1,78 @@ + + + + Paniel_Race + +
  • Outdoors
  • +
  • DrugDesire
  • +
  • RoomSize
  • +
  • Comfort
  • +
  • Bladder
  • +
    + true + false + false + false + +
  • + KnowColonistDied + PN_KnowColonyAutomatonDied +
  • +
  • + PawnWithGoodOpinionDied + PN_AutomatonWithGoodOpinionDied +
  • +
  • + PawnWithBadOpinionDied + PN_AutomatonWithBadOpinionDied +
  • +
  • + ColonistLost + PN_ColonyAutomatonLost +
  • +
  • + PawnWithGoodOpinionLost + PN_AutomatonWithGoodOpinionLost +
  • +
  • + PawnWithBadOpinionLost + PN_AutomatonWithBadOpinionLost +
  • +
  • + WitnessedDeathAlly + PN_WitnessedDestroyedAlly +
  • +
  • + WitnessedDeathNonAlly +
  • +
  • + ColonistBanished + PN_AutomatonBanished +
  • +
  • + ColonistBanishedToDie + PN_AutomatonBanishedToDie +
  • +
  • + PrisonerBanishedToDie +
  • +
    + +
  • Shooting
  • +
  • Melee
  • +
  • Construction
  • +
  • Mining
  • +
  • Cooking
  • +
  • Plants
  • +
  • Animals
  • +
  • Crafting
  • +
  • Artistic
  • +
  • Medicine
  • +
  • Social
  • +
  • Intellectual
  • +
    + + PN_indistryFaction +
    + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/AutomataSpecializations.xml b/1.6/Core/Defs/AutomataRace/AutomataSpecializations.xml new file mode 100644 index 0000000..f65d2d0 --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/AutomataSpecializations.xml @@ -0,0 +1,26 @@ + + + + PN_Specialization_Combat + UI/Icons/Combat + make combat model.\n\nspecialized skills : shooting, melee, animals. + make combat automaton + packaged combat automaton + + + + PN_Specialization_Engineer + UI/Icons/Engineer + make engineer model.\n\nspecialized skills : construction, mining, crafting. + make engineer automaton + packaged engineer automaton + + + + PN_Specialization_Domestic + make domestic model.\n\nspecialized skills : cooking, plants, medical. + UI/Icons/Domestic + make domestic automaton + packaged domestic automaton + + \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/AutomataStatOverrideDef.xml b/1.6/Core/Defs/AutomataRace/AutomataStatOverrideDef.xml new file mode 100644 index 0000000..493e06b --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/AutomataStatOverrideDef.xml @@ -0,0 +1,48 @@ + + + + PN_PackagedAutomaton_MarketValue + Packaged_NormalAutomaton + MarketValue + + + + + + PN_Paniel_Race_MarketValue + Paniel_Race + MarketValue + + 1.00 + + + + + PN_Paniel_Race_ArmorRating_Sharp + Paniel_Race + ArmorRating_Sharp + + 0 + 0.68 + + + + + PN_Paniel_Race_ArmorRating_Blunt + Paniel_Race + ArmorRating_Blunt + + 0 + 0.68 + + + + + PN_Paniel_Race_ArmorRating_Heat + Paniel_Race + ArmorRating_Heat + + 1.0 + + + \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/AutomataWearSetting.xml b/1.6/Core/Defs/AutomataRace/AutomataWearSetting.xml new file mode 100644 index 0000000..66ecbb0 --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/AutomataWearSetting.xml @@ -0,0 +1,346 @@ + + + + PN_WearSetting_OfficerModule + +
  • Paniel_Race
  • +
    + + + +
  • + +
  • PN_OfficerModule
  • + + + +
  • PN_SyncLegendary_Combat
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_MeisterModule
  • + + + +
  • PN_SyncLegendary_Engineer
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_IntensiveMedicalModule
  • + + + +
  • PN_SyncLegendary_Domestic
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_FieldMedicModule
  • + + + +
  • PN_SyncLegendary_Combat
  • +
  • PN_SyncLegendary_Domestic
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_RapidFireModule
  • + + + +
  • PN_SyncLegendary_Combat
  • +
  • PN_SyncMasterwork_Combat
  • +
  • PN_SyncExcellent_Combat
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_CQCModule
  • + + + +
  • PN_SyncLegendary_Combat
  • +
  • PN_SyncMasterwork_Combat
  • +
  • PN_SyncExcellent_Combat
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_MiningModule
  • + + + +
  • PN_SyncLegendary_Engineer
  • +
  • PN_SyncMasterwork_Engineer
  • +
  • PN_SyncExcellent_Engineer
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_ConstructionModule
  • + + + +
  • PN_SyncLegendary_Engineer
  • +
  • PN_SyncMasterwork_Engineer
  • +
  • PN_SyncExcellent_Engineer
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_CraftingModule
  • + + + +
  • PN_SyncLegendary_Engineer
  • +
  • PN_SyncMasterwork_Engineer
  • +
  • PN_SyncExcellent_Engineer
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_PlantsModule
  • + + + +
  • PN_SyncLegendary_Domestic
  • +
  • PN_SyncMasterwork_Domestic
  • +
  • PN_SyncExcellent_Domestic
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_CookingModule
  • + + + +
  • PN_SyncLegendary_Domestic
  • +
  • PN_SyncMasterwork_Domestic
  • +
  • PN_SyncExcellent_Domestic
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_NursingModule
  • + + + +
  • PN_SyncLegendary_Domestic
  • +
  • PN_SyncMasterwork_Domestic
  • +
  • PN_SyncExcellent_Domestic
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + + +
  • + +
  • PN_ArrayModule
  • + + + +
  • PN_SyncLegendary_Combat
  • +
  • PN_SyncMasterwork_Combat
  • +
  • PN_SyncExcellent_Combat
  • +
  • PN_SyncLegendary_Engineer
  • +
  • PN_SyncMasterwork_Engineer
  • +
  • PN_SyncExcellent_Engineer
  • +
  • PN_SyncLegendary_Domestic
  • +
  • PN_SyncMasterwork_Domestic
  • +
  • PN_SyncExcellent_Domestic
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + +
  • + +
  • PN_IntegratorModule
  • + + + +
  • PN_SyncLegendary_Combat
  • +
  • PN_SyncLegendary_Engineer
  • +
  • PN_SyncLegendary_Domestic
  • +
    + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    +
    + PN_CantReason_orhediff + +
  • PN_ModuleUnstable_Industrial
  • +
  • PN_ModuleUnstable_Spacer
  • +
    + true + + +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/Bodies/Body.xml b/1.6/Core/Defs/AutomataRace/Bodies/Body.xml new file mode 100644 index 0000000..d9290e7 --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/Bodies/Body.xml @@ -0,0 +1,632 @@ + + + + PNBody + + + + PNTorso + torso case + Middle + Outside + +
  • Torso
  • +
    + +
  • + PNRibcage + ribcage frame + 0.036 + Inside + +
  • Torso
  • + + +
  • + PNSternum + sternum frame + 0.015 + Inside + +
  • Torso
  • + + +
  • + PNPelvis + pelvis frame + 0.025 + Bottom + Inside + +
  • Torso
  • + + +
  • + PNSpine + spine frame + 0.025 + Inside + +
  • Torso
  • + + +
  • + PNTail + tail + 0.017 + Bottom + +
  • Torso
  • + + + +
  • + PNStomach + energy absorbing part + 0.025 + Inside + +
  • Torso
  • + + +
  • + PNCore + engine core + 0.020 + Inside + +
  • Torso
  • + + +
  • + PNLung + left breathing part + 0.025 + Inside + +
  • Torso
  • + + +
  • + PNLung + right breathing part + 0.025 + Inside + +
  • Torso
  • + + +
  • + PNKidney + left oil filter + 0.017 + Inside + +
  • Torso
  • + + +
  • + PNKidney + right oil filter + 0.017 + Inside + +
  • Torso
  • + + +
  • + PNLiver + water filter + 0.025 + Inside + +
  • Torso
  • + + + +
  • + PNNeck + neck + 0.075 + Top + +
  • Neck
  • + + +
  • + PNHead + head case + 0.80 + +
  • UpperHead
  • +
  • FullHead
  • +
  • HeadAttackTool
  • + + +
  • + PNSkull + skull frame + 0.18 + Inside + +
  • UpperHead
  • +
  • FullHead
  • + + +
  • + PNBrain + brain core + 0.8 + +
  • UpperHead
  • +
  • FullHead
  • + + +
    + +
  • + PNEye + left visual sensor + 0.07 + +
  • FullHead
  • +
  • Eyes
  • + + LeftEye + +
  • + PNEye + right visual sensor + 0.07 + +
  • FullHead
  • +
  • Eyes
  • + + RightEye + +
  • + PNEar + left auditory sensor + 0.07 + +
  • UpperHead
  • +
  • FullHead
  • + + +
  • + PNEar + right auditory sensor + 0.07 + +
  • UpperHead
  • +
  • FullHead
  • + + +
  • + PNNose + olfactory sensor + 0.10 + +
  • FullHead
  • + + +
  • + PNJaw + jaw frame + 0.15 + +
  • Teeth
  • +
  • FullHead
  • + + +
  • + PNTongue + gustatory sensor + 0.001 + Inside + +
  • FullHead
  • + + +
    + +
    + +
    + +
  • + + PNShoulder + left shoulder + 0.12 + +
  • Shoulders
  • + + LeftShoulder + true + +
  • + PNClavicle + left clavicle frame + 0.09 + Top + Inside + +
  • Torso
  • + + true + +
  • + PNArm + left arm + 0.77 + +
  • Arms
  • + + true + +
  • + PNHumerus + left humerus frame + 0.1 + Inside + +
  • Arms
  • + + +
  • + PNRadius + left radius frame + 0.1 + Inside + +
  • Arms
  • + + +
  • + PNHand + left hand + 0.14 + Bottom + true + +
  • Hands
  • + + +
  • + PNFinger + left pinky + 0.06 + +
  • Hands
  • +
  • LeftHand
  • + + +
  • + PNFinger + left ring finger + 0.07 + +
  • Hands
  • +
  • LeftHand
  • + + +
  • + PNFinger + left middle finger + 0.08 + +
  • Hands
  • +
  • LeftHand
  • +
  • MiddleFingers
  • + + +
  • + PNFinger + left index finger + 0.07 + +
  • Hands
  • +
  • LeftHand
  • + + +
  • + PNFinger + left thumb + 0.08 + +
  • Hands
  • +
  • LeftHand
  • + + +
    + +
    + +
    + +
  • + + PNShoulder + right shoulder + 0.12 + +
  • Shoulders
  • + + RightShoulder + +
  • + PNClavicle + right clavicle frame + 0.09 + Top + Inside + +
  • Torso
  • + + +
  • + PNArm + right arm + 0.77 + +
  • Arms
  • + + +
  • + PNHumerus + right humerus frame + 0.1 + Inside + +
  • Arms
  • + + +
  • + PNRadius + right radius frame + 0.1 + Inside + +
  • Arms
  • + + +
  • + PNHand + right hand + 0.14 + Bottom + +
  • Hands
  • + + +
  • + PNFinger + right pinky + 0.06 + +
  • Hands
  • +
  • RightHand
  • + + +
  • + PNFinger + right ring finger + 0.07 + +
  • Hands
  • +
  • RightHand
  • + + +
  • + PNFinger + right middle finger + 0.08 + +
  • Hands
  • +
  • RightHand
  • +
  • MiddleFingers
  • + + +
  • + PNFinger + right index finger + 0.07 + +
  • Hands
  • +
  • RightHand
  • + + +
  • + PNFinger + right thumb + 0.08 + +
  • Hands
  • +
  • RightHand
  • + + +
    + +
    + +
    + +
  • + PNWaist + waist + 0 + Bottom + +
  • Waist
  • + + +
  • + + PNLeg + left leg + 0.14 + Bottom + +
  • Legs
  • + + LeftLeg + true + +
  • + PNFemur + left femur frame + 0.1 + Inside + +
  • Legs
  • + + +
  • + PNTibia + left tibia frame + 0.1 + Inside + +
  • Legs
  • + + +
  • + PNFoot + left foot + 0.1 + +
  • Feet
  • + + true + +
  • + PNToe + left little toe + 0.06 + +
  • Feet
  • + + +
  • + PNToe + left fourth toe + 0.07 + +
  • Feet
  • + + +
  • + PNToe + left middle toe + 0.08 + +
  • Feet
  • + + +
  • + PNToe + left second toe + 0.09 + +
  • Feet
  • + + +
  • + PNToe + left big toe + 0.09 + +
  • Feet
  • + + +
    + +
    + + +
  • + PNLeg + right leg + 0.14 + Bottom + +
  • Legs
  • + + RightLeg + +
  • + PNFemur + right femur frame + 0.1 + Inside + +
  • Legs
  • + + +
  • + PNTibia + right tibia frame + 0.1 + Inside + +
  • Legs
  • + + +
  • + PNFoot + right foot + 0.1 + +
  • Feet
  • + + +
  • + PNToe + right little toe + 0.06 + +
  • Feet
  • + + +
  • + PNToe + right fourth toe + 0.07 + +
  • Feet
  • + + +
  • + PNToe + right middle toe + 0.08 + +
  • Feet
  • + + +
  • + PNToe + right second toe + 0.09 + +
  • Feet
  • + + +
  • + PNToe + right big toe + 0.09 + +
  • Feet
  • + + +
    + +
    + +
    +
    +
    + +
    diff --git a/1.6/Core/Defs/AutomataRace/Bodies/Bodyparts.xml b/1.6/Core/Defs/AutomataRace/Bodies/Bodyparts.xml new file mode 100644 index 0000000..902cd5b --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/Bodies/Bodyparts.xml @@ -0,0 +1,427 @@ + + + + + 0 + false + + + + + PNTorso + + 40 + true + false + + + + PNRibcage + + 30 + 0 + false + true + 0 + +
  • BreathingSourceCage
  • +
    + false +
    + + + PNSternum + + 20 + 0 + false + true + 0 + +
  • BreathingSourceCage
  • +
    + false +
    + + + PNPelvis + + 25 + 0 + false + true + 0 + +
  • Pelvis
  • +
    + false +
    + + + PNSpine + + 25 + 6 + false + true + 0 + false + +
  • Spine
  • +
    +
    + + + PNTail + + 30 + 3 + true + true + true + + + + + + PNStomach + + 20 + false + +
  • MetabolismSource
  • +
    + false +
    + + + PNCore + + 15 + 5 + false + +
  • BloodPumpingSource
  • +
    + false +
    + + + PNLung + + 15 + false + +
  • BreathingSource
  • +
    + false +
    + + + PNKidney + + 15 + false + +
  • BloodFiltrationKidney
  • +
    + false +
    + + + PNLiver + + 20 + false + +
  • BloodFiltrationLiver
  • +
  • MetabolismSource
  • +
    + false +
    + + + + + PNNeck + + 25 + 4 + true + +
  • BreathingPathway
  • +
  • EatingPathway
  • +
  • TalkingPathway
  • +
    + false +
    + + + PNHead + + 25 + true + false + 2 + + + + PNSkull + + 25 + 0 + false + true + false + 0 + false + + + + PNBrain + + 10 + 9999999 + true + false + +
  • ConsciousnessSource
  • +
    + false +
    + + + PNEye + + 10 + 15 + true + false + true + true + +
  • SightSource
  • +
    + +
  • + Blunt + 0 +
  • +
    +
    + + + PNEar + + 12 + 5 + true + true + +
  • HearingSource
  • +
    +
    + + + PNNose + + 10 + 5 + true + true + true + 0 + 0 + + + + PNJaw + + 20 + 2 + 0 + false + true + true + 0 + +
  • EatingSource
  • +
  • TalkingSource
  • +
    +
    + + + PNTongue + + false + 0 + true + true + remove + +
  • Tongue
  • +
    +
    + + + + + PNShoulder + + 30 + true + +
  • ManipulationLimbSegment
  • +
  • Mirrored
  • +
    +
    + + + PNClavicle + + 25 + 0 + false + true + 0 + +
  • ManipulationLimbSegment
  • +
  • Mirrored
  • +
    + false +
    + + + PNArm + + 30 + true + +
  • ManipulationLimbCore
  • +
  • Mirrored
  • +
    +
    + + + PNHumerus + + 25 + 0 + false + true + 0 + +
  • ManipulationLimbSegment
  • +
  • Mirrored
  • +
    +
    + + + PNRadius + + 20 + 0 + false + true + 0 + +
  • ManipulationLimbSegment
  • +
  • Mirrored
  • +
    +
    + + + PNHand + + 20 + 0.5 + true + +
  • ManipulationLimbSegment
  • +
    +
    + + + PNFinger + + 8 + 8 + true + true + +
  • ManipulationLimbDigit
  • +
  • Mirrored
  • +
    +
    + + + + + PNWaist + + true + + + + PNLeg + + 30 + true + +
  • MovingLimbCore
  • +
    +
    + + + PNFemur + + 25 + 0 + false + true + 0 + +
  • MovingLimbSegment
  • +
  • Mirrored
  • +
    +
    + + + PNTibia + + 25 + 0 + false + true + 0 + +
  • MovingLimbSegment
  • +
  • Mirrored
  • +
    +
    + + + PNFoot + + 25 + 0.5 + true + +
  • MovingLimbSegment
  • +
    +
    + + + PNToe + + 8 + 10 + true + true + +
  • MovingLimbDigit
  • +
  • Mirrored
  • +
    +
    + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/HeadTypeDefs/HeadTypeDefs.xml b/1.6/Core/Defs/AutomataRace/HeadTypeDefs/HeadTypeDefs.xml new file mode 100644 index 0000000..9ba6a84 --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/HeadTypeDefs/HeadTypeDefs.xml @@ -0,0 +1,74 @@ + + + + PNHead1 + Paniel/Heads/PNHead/PNHead1 + None + + + + PNHead2 + Paniel/Heads/PNHead/PNHead2 + None + + + + PNHead3 + Paniel/Heads/PNHead/PNHead3 + None + + + + PNHead4 + Paniel/Heads/PNHead/PNHead4 + None + + + + PNHead5 + Paniel/Heads/PNHead/PNHead5 + None + + + + PNHead6 + Paniel/Heads/PNHead/PNHead6 + None + + + + PNHead7 + Paniel/Heads/PNHead/PNHead7 + None + + + + PNHead8 + Paniel/Heads/PNHead/PNHead8 + None + + + + PNHead9 + Paniel/Heads/PNHead/PNHead9 + None + + + + PNHead10 + Paniel/Heads/PNHead/PNHead10 + None + + + + PNHead11 + Paniel/Heads/PNHead/PNHead11 + None + + + + PNHead12 + Paniel/Heads/PNHead/PNHead12 + None + + \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/PanielBackstoryDef.xml b/1.6/Core/Defs/AutomataRace/PanielBackstoryDef.xml new file mode 100644 index 0000000..1709827 --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/PanielBackstoryDef.xml @@ -0,0 +1,1209 @@ + + + + + +
  • PanielBaseHediff
  • +
  • PN_Immune_System
  • +
  • PN_Learning_Limit_System
  • +
  • PN_AutomatonFuel_Addiction
  • +
  • PN_Maintenance
  • +
    + +
  • + Kind +
  • +
  • + Asexual +
  • +
  • + PN_PerfectMemory +
  • +
    + +
  • + ShootingAccuracy +
  • +
  • + Tough +
  • +
  • + DrugDesire +
  • +
  • + Cannibal +
  • +
  • + Greedy +
  • +
  • + Jealous +
  • +
  • + DislikesMen +
  • +
  • + DislikesWomen +
  • +
  • + AnnoyingVoice +
  • +
  • + CreepyBreathing +
  • +
  • + Wimp +
  • +
  • + Nudist +
  • +
  • + Abrasive +
  • +
  • + Masochist +
  • +
  • + Ascetic +
  • +
  • + Gay +
  • +
  • + Bisexual +
  • +
  • + Transhumanist +
  • +
  • + BodyPurist +
  • +
  • + GreatMemory +
  • +
  • + Gourmand +
  • +
  • + Beauty +
  • +
  • + Beauty +
  • +
  • + Immunity +
  • +
  • + Delicate +
  • +
  • + Recluse +
  • +
    + +
  • PN_storys
  • +
    +
    + + + + + PN_Test1 + test1 + test1 + aa + Childhood + + +
  • PN_Test1
  • +
    + + +
    + + + + PN_Test2 + test2 + test2 + aa + Adulthood + + +
  • PN_Test2
  • +
    + +
    + + + Paniel_Awful_Backstory + Automaton (awful) + Automaton (awfl) + This automaton is made wrong. Seriously. + Childhood + + + + + + + +
  • Paniel_Story_Awful
  • +
    + + + +
    + + + Paniel_Poor_Backstory + Automaton (poor) + Automaton (poor) + This automaton is made wrong. + Childhood + + + + + + +
  • Paniel_Story_Poor
  • +
    + + + +
    + + + Paniel_Normal_Backstory + Automaton (normal) + Automaton (norm) + It's an ordinary automaton. + Childhood + + + + + + +
  • Paniel_Story_Start
  • +
  • Paniel_Story_Normal
  • +
    + + + +
    + + + Paniel_Good_Backstory + Automaton (good) + Automaton (good) + It's a well-made automaton. + Childhood + + + + + + +
  • Paniel_Story_Good
  • +
  • Paniel_Story_Testsubject
  • +
    + + + +
    + + + Paniel_Excellent_Backstory + Automaton (excellent) + Automaton (exc) + It's a very well-made automaton. It is mainly used by nobles. + Childhood + + + + + + +
  • Paniel_Story_Excellent
  • +
    + + + +
    + + + Paniel_Masterwork_Backstory + Automaton (masterwork) + Automaton (mast) + It's an automaton perfected by Meister. Everything works perfectly. It is mainly used by nobles. + Childhood + + + + + + +
  • Paniel_Story_Masterwork
  • +
    + + + +
    + + + Paniel_Legendary_Backstory + Automaton (legendary) + Automaton (legd) + It's an incredibly perfect automaton. It's showing performance that goes beyond its original intentions. It is mainly used by royalty. + Childhood + + + + + + +
  • Paniel_Story_Legendary
  • +
  • Paniel_Story_testStart
  • +
    + + + +
    + + + + Paniel_Automaton_Backstory + Automaton + Automaton + backstory + Adulthood + + + +
  • Artistic
  • +
  • Social
  • +
  • Intellectual
  • +
    + +
  • Paniel_Story_Basic
  • +
    + + + +
    + + + Paniel_AutomatonB_Backstory + Automaton for Noble + Noble Automaton + backstory + Adulthood + + + + +
  • Artistic
  • +
  • Social
  • +
  • Intellectual
  • +
    + +
  • Paniel_Story_Noble
  • +
    + + + +
    + + + Paniel_Royalmaiden_Backstory + Automaton for Royal + Royal Automaton + backstory + Adulthood + + + + + + +
  • Paniel_Story_Royal
  • +
    + + + +
    + + + + Paniel_FailureA_Backstory + Automaton Failure + Failure + This automaton is made wrong. Seriously. + Adulthood + +
  • ManualSkilled
  • +
  • Caring
  • +
  • Social
  • +
  • Intellectual
  • +
  • Animals
  • +
  • Violent
  • +
  • Cleaning
  • +
  • Firefighting
  • +
  • Hauling
  • +
  • ManualDumb
  • +
    + + 20 + + +
  • Paniel_Story_FailureA
  • +
    + +
  • PN_Give_Awful_Failure
  • +
    +
    + + + Paniel_FailureB_Backstory + Automaton Failure + Failure + This automaton is made wrong. + Adulthood + +
  • ManualSkilled
  • +
  • Caring
  • +
  • Social
  • +
  • Intellectual
  • +
  • Animals
  • +
  • Artistic
  • +
    + +
  • Paniel_Story_FailureB
  • +
    + +
  • PN_Give_Poor_Failure
  • +
    +
    + + + + +
  • + Industriousness +
  • +
  • + TorturedArtist +
  • +
    + +
  • Artistic
  • +
  • Social
  • +
  • Intellectual
  • +
  • Cooking
  • +
  • Crafting
  • +
  • PlantWork
  • +
    +
    + + + +
  • + TooSmart +
  • +
  • + FastLearner +
  • +
  • + SlowLearner +
  • +
    +
    + + + Paniel_MilitiaA_Backstory + Automaton Militia + Militia + This automaton is mainly used by militias. + Adulthood + + 3 + 3 + 3 + + +
  • Paniel_Story_Start
  • +
  • Paniel_Story_MilitiaA
  • +
    + +
  • PN_Give_Normal_Combat
  • +
    +
    + + + Paniel_MilitiaB_Backstory + Automaton Militia + Militia + This automaton is mainly used by militias. + Adulthood + + 3 + 3 + 3 + 1 + + +
  • Paniel_Story_MilitiaB
  • +
    + +
  • PN_Give_Good_Combat
  • +
    +
    + + + Paniel_SoldierA_Backstory + Automaton Soldier + Soldier + This automaton is used as a soldier in the military. + Adulthood + + 9 + 9 + 9 + 3 + + +
  • Paniel_Story_SoldierA
  • +
    + +
  • PN_Give_Excellent_Combat
  • +
    +
    + + + Paniel_SoldierB_Backstory + Automaton Soldier + Soldier + This automaton is used as a soldier in the military. + Adulthood + + 12 + 12 + 12 + 5 + + +
  • Paniel_Story_SoldierB
  • +
    + +
  • PN_Give_Masterwork_Combat
  • +
    +
    + + + Paniel_Royalguard_Backstory + Automaton Royal guard + Royal guard + This automaton is used by the Royal Guard. + Adulthood + + 18 + 18 + 18 + 7 + + +
  • Paniel_Story_Royalguard
  • +
    + +
  • PN_Give_Legendary_Combat
  • +
    +
    + + + + +
  • + Brawler +
  • +
    + +
  • Animals
  • +
  • Social
  • +
  • Cooking
  • +
  • Caring
  • +
  • PlantWork
  • +
    +
    + + + +
  • + TooSmart +
  • +
  • + FastLearner +
  • +
  • + SlowLearner +
  • +
    +
    + + + Paniel_ApprenticeA_Backstory + Automaton Apprentice + Apprentice + This automaton is used in many workshops for chores. + Adulthood + + 3 + 3 + 3 + + +
  • Paniel_Story_Start
  • +
  • Paniel_Story_ApprenticeA
  • +
    + +
  • PN_Give_Normal_Engineer
  • +
    +
    + + + Paniel_ApprenticeB_Backstory + Automaton Apprentice + Apprentice + This automaton is used in many workshops for chores. + Adulthood + + 3 + 3 + 3 + 1 + + +
  • Paniel_Story_ApprenticeB
  • +
    + +
  • PN_Give_Good_Engineer
  • +
    +
    + + + Paniel_JourneymanA_Backstory + Automaton journeyman + Journeyman + This automaton is used to assist the meister. + Adulthood + + 9 + 9 + 9 + 3 + + +
  • Paniel_Story_journeymanA
  • +
    + +
  • PN_Give_Excellent_Engineer
  • +
    +
    + + + Paniel_JourneymanB_Backstory + Automaton journeyman + Journeyman + This automaton is used to assist the meister. + Adulthood + + 12 + 12 + 12 + 5 + + +
  • Paniel_Story_journeymanB
  • +
    + +
  • PN_Give_Masterwork_Engineer
  • +
    +
    + + + Paniel_Meister_Backstory + Automaton Meister + Meister + This automaton has better crafting skills than humans. + Adulthood + + 18 + 18 + 18 + 7 + + +
  • Paniel_Story_Meister
  • +
    + +
  • PN_Give_Legendary_Engineer
  • +
    +
    + + + + +
  • + Brawler +
  • +
  • + TorturedArtist +
  • +
    + +
  • Animals
  • +
  • Mining
  • +
  • Intellectual
  • +
    +
    + + + +
  • + TooSmart +
  • +
  • + FastLearner +
  • +
  • + SlowLearner +
  • +
    +
    + + + Paniel_MaidA_Backstory + Automaton Maid + Maid + This automaton is used as a maid in many homes. + Adulthood + + 3 + 3 + 3 + + +
  • Paniel_Story_Start
  • +
  • Paniel_Story_MaidA
  • +
    + +
  • PN_Give_Normal_Domestic
  • +
    +
    + + + Paniel_MaidB_Backstory + Automaton Maid + Maid + This automaton is used as a maid in many homes. + Adulthood + + 6 + 6 + 6 + 1 + + +
  • Paniel_Story_MaidB
  • +
    + +
  • PN_Give_Good_Domestic
  • +
    +
    + + + Paniel_HousemaidA_Backstory + Automaton Housekeeper maid + Housekeeper Maid + This automaton leads the other maids in the noble mansion. + Adulthood + + 9 + 9 + 9 + 3 + + +
  • Paniel_Story_HousemaidA
  • +
    + +
  • PN_Give_Excellent_Domestic
  • +
    +
    + + + Paniel_HousemaidB_Backstory + Automaton Housekeeper maid + Housekeeper + This automaton leads the other maids in the noble mansion. + Adulthood + + 12 + 12 + 12 + 5 + + +
  • Paniel_Story_HousemaidB
  • +
    + +
  • PN_Give_Masterwork_Domestic
  • +
    +
    + + + Paniel_Ladysmaid_Backstory + Automaton Lady's maid + Lady's maid + This automaton is used as a royal servant. + Adulthood + + 18 + 18 + 18 + 7 + + +
  • Paniel_Story_Ladysmaid
  • +
    + +
  • PN_Give_Legendary_Domestic
  • +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
  • + Pyromaniac +
  • +
  • + TooSmart +
  • +
  • + FastLearner +
  • +
  • + SlowLearner +
  • +
    +
    + + + Paniel_MilitiaA_Backstory_PA + Automaton Militia (PA) + Militia + This automaton is mainly used by militias.\n\n(PA) : PnL authenticated + Adulthood + + 3 + 3 + 3 + + +
  • Paniel_Story_MilitiaA_PA
  • +
    + +
  • PN_Give_Normal_Combat_PA
  • +
    +
    + + + Paniel_MilitiaB_Backstory_PA + Automaton Militia (PA) + Militia + This automaton is mainly used by militias.\n\n(PA) : PnL authenticated + Adulthood + + 6 + 6 + 6 + 1 + + +
  • Paniel_Story_MilitiaB_PA
  • +
    + +
  • PN_Give_Good_Combat_PA
  • +
    +
    + + + Paniel_SoldierA_Backstory_PA + Automaton Soldier (PA) + Soldier + This automaton is used as a soldier in the military.\n\n(PA) : PnL authenticated + Adulthood + + 9 + 9 + 9 + 3 + + +
  • Paniel_Story_SoldierA_PA
  • +
    + +
  • PN_Give_Excellent_Combat_PA
  • +
    +
    + + + Paniel_SoldierB_Backstory_PA + Automaton Soldier (PA) + Soldier + This automaton is used as a soldier in the military.\n\n(PA) : PnL authenticated + Adulthood + + 12 + 12 + 12 + 5 + + +
  • Paniel_Story_SoldierB_PA
  • +
    + +
  • PN_Give_Masterwork_Combat_PA
  • +
    +
    + + + Paniel_Royalguard_Backstory_PA + Automaton Royal guard (PA) + Royal guard + This automaton is used by the Royal Guard.\n\n(PA) : PnL authenticated + Adulthood + + 18 + 18 + 18 + 7 + + +
  • Paniel_Story_Royalguard_PA
  • +
    + +
  • PN_Give_Legendary_Combat_PA
  • +
    +
    + + + + +
  • + Pyromaniac +
  • +
  • + TooSmart +
  • +
  • + FastLearner +
  • +
  • + SlowLearner +
  • +
    +
    + + + Paniel_ApprenticeA_Backstory_PA + Automaton Apprentice (PA) + Apprentice + This automaton is used in many workshops for chores.\n\n(PA) : PnL authenticated + Adulthood + + 3 + 3 + 3 + + +
  • Paniel_Story_ApprenticeA_PA
  • +
    + +
  • PN_Give_Normal_Engineer_PA
  • +
    +
    + + + Paniel_ApprenticeB_Backstory_PA + Automaton Apprentice (PA) + Apprentice + This automaton is used in many workshops for chores.\n\n(PA) : PnL authenticated + Adulthood + + 6 + 6 + 6 + 1 + + +
  • Paniel_Story_ApprenticeB_PA
  • +
    + +
  • PN_Give_Good_Engineer_PA
  • +
    +
    + + + Paniel_JourneymanA_Backstory_PA + Automaton journeyman (PA) + Journeyman + This automaton is used to assist the meister.\n\n(PA) : PnL authenticated + Adulthood + + 9 + 9 + 9 + 3 + + +
  • Paniel_Story_journeymanA_PA
  • +
    + +
  • PN_Give_Excellent_Engineer_PA
  • +
    +
    + + + Paniel_JourneymanB_Backstory_PA + Automaton journeyman (PA) + Journeyman + This automaton is used to assist the meister.\n\n(PA) : PnL authenticated + Adulthood + + 12 + 12 + 12 + 5 + + +
  • Paniel_Story_journeymanB_PA
  • +
    + +
  • PN_Give_Masterwork_Engineer_PA
  • +
    +
    + + + Paniel_Meister_Backstory_PA + Automaton Meister (PA) + Meister + This automaton has better crafting skills than humans.\n\n(PA) : PnL authenticated + Adulthood + + 18 + 18 + 18 + 7 + + +
  • Paniel_Story_Meister_PA
  • +
    + +
  • PN_Give_Legendary_Engineer_PA
  • +
    +
    + + + + +
  • + Pyromaniac +
  • +
  • + TooSmart +
  • +
  • + FastLearner +
  • +
  • + SlowLearner +
  • +
    +
    + + + Paniel_MaidA_Backstory_PA + Automaton Maid (PA) + Maid + This automaton is used as a maid in many homes.\n\n(PA) : PnL authenticated + Adulthood + + 3 + 3 + 3 + + +
  • Paniel_Story_MaidA_PA
  • +
    + +
  • PN_Give_Normal_Domestic_PA
  • +
    +
    + + + Paniel_MaidB_Backstory_PA + Automaton Maid (PA) + Maid + This automaton is used as a maid in many homes.\n\n(PA) : PnL authenticated + Adulthood + + 6 + 6 + 6 + 1 + + +
  • Paniel_Story_MaidB_PA
  • +
    + +
  • PN_Give_Good_Domestic_PA
  • +
    +
    + + + Paniel_HousemaidA_Backstory_PA + Automaton Housekeeper maid (PA) + Housekeeper Maid + This automaton leads the other maids in the noble mansion.\n\n(PA) : PnL authenticated + Adulthood + + 9 + 9 + 9 + 3 + + +
  • Paniel_Story_HousemaidA_PA
  • +
    + +
  • PN_Give_Excellent_Domestic_PA
  • +
    +
    + + + Paniel_HousemaidB_Backstory_PA + Automaton Housekeeper maid (PA) + Housekeeper + This automaton leads the other maids in the noble mansion.\n\n(PA) : PnL authenticated + Adulthood + + 12 + 12 + 12 + 5 + + +
  • Paniel_Story_HousemaidB_PA
  • +
    + +
  • PN_Give_Masterwork_Domestic_PA
  • +
    +
    + + + Paniel_Ladysmaid_Backstory_PA + Automaton Lady's maid (PA) + Lady's maid + This automaton is used as a royal servant.\n\n(PA) : PnL authenticated + Adulthood + + 18 + 18 + 18 + 7 + + +
  • Paniel_Story_Ladysmaid_PA
  • +
    + +
  • PN_Give_Legendary_Domestic_PA
  • +
    +
    + + + + + Paniel_Testsubject_Backstory + Automaton Test subject (PA) + Test subject + This automaton was built to test a new module at PnL industry. It is showing signs of mental instability.\n\n(PA) : PnL authenticated + Adulthood + + 4 + 4 + 4 + 4 + 4 + 4 + 4 + + +
  • Artistic
  • +
    + +
  • Paniel_Story_Testsubject
  • +
    + +
  • PN_Give_Testsubject
  • +
    + + + + +
  • + NaturalMood +
  • +
  • + NaturalMood +
  • +
  • + Nerves +
  • +
  • + Nerves +
  • +
  • + PsychicSensitivity +
  • +
  • + PsychicSensitivity +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/PanielRaceDef.xml b/1.6/Core/Defs/AutomataRace/PanielRaceDef.xml new file mode 100644 index 0000000..2e30751 --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/PanielRaceDef.xml @@ -0,0 +1,982 @@ + + + + Paniel_Race + + This pawn is automaton designed by PnL Industry. + BulletImpact_Metal + None + + + 0 + false + 8 + 0 + + + +
  • + Psychite + false +
  • +
  • + GoJuice + false +
  • +
    + + + +
  • + Kind +
  • +
  • + Asexual +
  • +
  • + PN_PerfectMemory +
  • +
    + + + +
  • + ShootingAccuracy +
  • +
  • + Tough +
  • +
  • + DrugDesire +
  • +
  • + Cannibal +
  • +
  • + Greedy +
  • +
  • + Jealous +
  • +
  • + DislikesMen +
  • +
  • + DislikesWomen +
  • +
  • + AnnoyingVoice +
  • +
  • + CreepyBreathing +
  • +
  • + Wimp +
  • +
  • + Nudist +
  • +
  • + Abrasive +
  • +
  • + Masochist +
  • +
  • + Ascetic +
  • +
  • + Gay +
  • +
  • + Bisexual +
  • +
  • + Transhumanist +
  • +
  • + BodyPurist +
  • +
  • + GreatMemory +
  • +
  • + Gourmand +
  • +
  • + Beauty +
  • +
  • + Beauty +
  • +
  • + Immunity +
  • +
  • + Delicate +
  • +
  • + Recluse +
  • +
    + + 1 + true + + 4 + 1 + +
  • PNHead1
  • +
  • PNHead2
  • +
  • PNHead3
  • +
  • PNHead4
  • +
  • PNHead5
  • +
  • PNHead6
  • +
  • PNHead7
  • +
  • PNHead8
  • +
  • PNHead9
  • +
  • PNHead10
  • +
  • PNHead11
  • +
  • PNHead12
  • +
    + +
  • Female
  • +
    + (-0.1, 0.0) + (1, 1) + (1, 1) + PNHead + + + +
  • + skin + + 0 + 0 + +
  • +
  • + hair + + +
  • + 100 + (255,255,255) +
  • + + + +
    + + + +
  • + 1 + Paniel/Hairs/Addon/Hair + CutoutComplex + false + hair + true + + + PNHead + + + + + -0.275 + + (0,0) + + + + -0.326 + + (0,0) + + + + -0.326 + + (0,0) + + + +
  • + + +
  • + 1 + Paniel/Heads/Face/RareFace/AwflFace + CutoutComplex + true + false + skin + true + + + PNHead + + + Paniel_Awful_Backstory + + + true + false + false + + + + + -0.276 + + (0,0) + + + + -0.276 + + (0,0) + + + + -0.276 + + (0,0) + + + +
  • + + +
  • + 1 + Paniel/Heads/PNSleep/PNSleep + CutoutComplex + true + false + skin + true + + Fresh,Rotting,Dessicated + + PNHead + + + false + true + true + + + + + Paniel/Heads/Face/RareFace/AwflSleep + + + + + + -0.276 + + (0,0) + + + + -0.276 + + (0,0) + + + + -0.276 + + (0,0) + + + +
  • + +
  • + 1 + Paniel/Ear/PanielLeftEar + CutoutComplex + false + skin + true + + + left auditory sensor + + + + + -0.279 + + (0,0) + + + + -0.324 + + (0,0) + + + + -0.327 + + (0,0) + + + +
  • + +
  • + 1 + Paniel/Ear/PanielRightEar + CutoutComplex + false + skin + true + + + right auditory sensor + + + + + -0.279 + + (0,0) + + + + -0.324 + + (0,0) + + + + -0.327 + + (0,0) + + + +
  • + +
  • + 1 + Paniel/Tail/PanielTail + CutoutComplex + false + skin + Tail + + + PNTail + + + + + 0 + + (0,0.55) + + + + 0 + + (-0.42,0.22) + + + + 0 + + (-0.42,0.22) + + + +
  • + +
    +
    +
    + + + Paniel/Body/Naked_Female + + + Paniel/Heads/PNHead/PNHead1 + + Things/Pawn/Humanlike/Bodies/Dessicated/Dessicated_Thin + + +
  • + HairDef + + false + +
  • +
  • + BeardDef + + false + +
  • +
  • + TattooDef + + false + +
  • +
    + + + +
  • + PN_KnowColonyAutomatonDied + PN_KnowColonyAutomatonDiedforPN +
  • +
  • + PN_AutomatonWithGoodOpinionDied + PN_AutomatonWithGoodOpinionDiedforPN +
  • +
  • + PN_AutomatonWithBadOpinionDied + PN_AutomatonWithBadOpinionDiedforPN +
  • +
  • + PN_ColonyAutomatonLost + PN_ColonyAutomatonLostforPN +
  • +
  • + PN_AutomatonWithGoodOpinionLost + PN_AutomatonWithGoodOpinionLostforPN +
  • +
  • + PN_AutomatonWithBadOpinionLost + PN_AutomatonWithBadOpinionLostforPN +
  • +
  • + PN_WitnessedDestroyedAlly + PN_WitnessedDestroyedAllyforPN +
  • +
  • + PN_AutomatonBanished + PN_AutomatonBanishedforPN +
  • +
  • + PN_AutomatonBanishedToDie + PN_AutomatonBanishedToDieforPN +
  • + + +
  • + AteLavishMeal + PN_AteLavishMeal +
  • +
  • + AteFineMeal + PN_AteFineMeal +
  • + + +
  • + DefeatedMechCluster + PN_DefeatedMechCluster +
  • + + + +
    + + + +
  • KnowGuestExecuted
  • +
  • KnowPrisonerDiedInnocent
  • + +
  • AteRawFood
  • +
  • AteNutrientPasteMeal
  • + +
  • AteWithoutTable
  • +
  • SleepDisturbed
  • +
  • SleptOutside
  • +
  • SleptOnGround
  • +
  • SleptInCold
  • +
  • SleptInHeat
  • +
  • KnowPrisonerSold
  • +
  • ReleasedHealthyPrisoner
  • +
  • KnowGuestOrganHarvested
  • +
  • SoakingWet
  • +
  • ButcheredHumanlikeCorpse
  • +
  • KnowButcheredHumanlikeCorpse
  • +
  • ButcheredHumanlikeCorpseOpinion
  • +
  • ObservedLayingCorpse
  • +
  • ObservedLayingRottingCorpse
  • +
  • DeniedJoining
  • +
  • PrisonerBanishedToDie
  • + +
  • SleptInBarracks
  • + + +
  • EnvironmentDark
  • +
  • Sick
  • +
  • EnvironmentCold
  • +
  • EnvironmentHot
  • + +
  • NeedRoomSize
  • +
  • NeedOutdoors
  • +
  • DrugDesireFascination
  • +
  • DrugDesireFascinationSatisfied
  • +
  • DrugDesireInterest
  • +
  • DrugDesireInterestSatisfied
  • + +
  • PrisonBarracks
  • + +
  • Incestuous
  • +
  • Disfigured
  • +
  • HardWorkerVsLazy
  • +
  • TeetotalerVsChemicalInterest
  • +
  • TeetotalerVsAddict
  • +
  • ChemicalInterestVsTeetotaler
  • +
  • Drunk
  • +
  • Pretty
  • +
  • Ugly
  • +
  • AnnoyingVoice
  • +
  • CreepyBreathing
  • +
  • Man
  • +
  • Woman
  • +
  • TranshumanistAppreciation
  • +
  • BodyPuristDisgust
  • +
  • ButcheredHumanlikeCorpseOpinion
  • +
  • AteRawHumanlikeMeat
  • +
  • KilledColonyAnimal
  • +
  • NotBondedAnimalMaster
  • + +
  • SharedBed
  • +
  • Naked
  • +
  • Pain
  • +
  • Joywire
  • +
  • DoingPassionateWork
  • + +
  • MasochistPain
  • +
  • ProsthophileNoProsthetic
  • +
  • ProsthophileHappy
  • +
  • ProsthophobeUnhappy
  • +
  • ClothedNudist
  • +
  • HappyNude
  • +
  • Greedy
  • +
  • Jealous
  • +
  • Ascetic
  • + +
  • PN_Atefuel_nopn
  • +
  • PsychiteWithdrawal
  • +
  • YayoHigh
  • +
  • PsychiteTeaHigh
  • +
  • FlakeHigh
  • +
  • GoJuiceHigh
  • +
  • GoJuiceWithdrawal
  • + + + + + + + + + + +
  • IdeoRoleLost
  • +
  • IdeoRoleEmpty
  • +
  • IdeoLeaderResentmentStandard
  • +
  • IdeoLeaderResentmentDisapproved
  • +
  • IdeoLeaderResentmentHorrible
  • +
  • IdeoLeaderResentmentAbhorrent
  • +
  • IdeoRoleApparelRequirementNotMet
  • + + +
  • ObservedTerror
  • +
  • ObservedGibbetCage
  • +
  • ObservedSkullspike
  • + + + +
  • LookChangeDesired
  • + + +
  • PN_OfficerCommandThought
  • +
  • PN_MeisterAdviceThought
  • +
  • AgeReversalDemanded
  • +
    +
    + + + false + false + false + false + true + + + + + + + + + + +
  • PN_ApparelBasic
  • +
  • PN_ApparelBasicHat
  • + +
  • PN_ApparelCape
  • + +
  • PN_ApparelMilitia
  • +
  • PN_ApparelMilitiaHat
  • + +
  • PN_ApparelSoldier
  • +
  • PN_ApparelSoldierHat
  • + +
  • PN_ApparelWorker
  • +
  • PN_ApparelWorkerHat
  • + +
  • PN_ApparelMaid
  • +
  • PN_ApparelMaidHat
  • + +
  • PN_ApparelRoyalguard
  • +
  • PN_ApparelRoyalguardHat
  • + +
  • PN_ApparelRoyalmeister
  • +
  • PN_ApparelRoyalmeisterHat
  • +
  • PN_ApparelRoyalmeisterHatWithMonocle
  • +
  • PN_ApparelRoyalmeisterMonocle
  • + +
  • PN_ApparelRoyalmaid
  • +
  • PN_ApparelRoyalmaidHat
  • + +
  • PN_EliteSecurityUniform
  • +
  • PN_EliteSecurityHat
  • + + +
  • PN_OfficerModule
  • +
  • PN_MeisterModule
  • +
  • PN_IntensiveMedicalModule
  • +
  • PN_FieldMedicModule
  • + +
  • PN_RapidFireModule
  • +
  • PN_CQCModule
  • +
  • PN_MiningModule
  • +
  • PN_ConstructionModule
  • +
  • PN_CraftingModule
  • +
  • PN_PlantsModule
  • +
  • PN_CookingModule
  • +
  • PN_NursingModule
  • + +
  • PN_ArrayModule
  • +
  • PN_IntegratorModule
  • + +
    + + + +
  • Apparel_ShieldBelt
  • +
  • Apparel_PsychicShockLance
  • +
  • Apparel_PsychicInsanityLance
  • +
  • Apparel_SmokepopBelt
  • +
  • Apparel_FirefoampopPack
  • +
  • OrbitalTargeterBombardment
  • +
  • OrbitalTargeterPowerBeam
  • +
  • TornadoGenerator
  • +
  • Apparel_PackJump
  • +
  • Apparel_PackBroadshield
  • +
  • OrbitalTargeterMechCluster
  • +
  • Apparel_PackTox
  • + + +
  • Eccentric_PhasedShieldBelt
  • +
  • Eccentric_ModulatedShieldBelt
  • +
  • Eccentric_LayeredShieldBelt
  • + +
    + + +
  • PN_Chainsword
  • +
  • PN_Chainlongsword
  • +
  • PN_TwinPistol
  • +
  • PN_RoyalRifle
  • +
  • PN_RoyalRifle_Point
  • +
  • PN_RoyalHeavySlug
  • +
  • PN_RoyalMachinegun
  • +
  • PN_RoyalMachinegun_Mount
  • +
  • PN_RoyalMachinegun_Overheated
  • +
  • PN_RoyalLSW
  • +
  • PN_RoyalLSW_IE
  • +
  • PN_RoyalLSW_EMP
  • +
  • PN_RoyalLSW_Smoke
  • +
  • PN_RoyalLSW_FF
  • +
  • PN_RoyalSaber_Bladelink
  • +
  • PN_Chainsword_Bladelink
  • +
  • PN_RoyalHammer_Bladelink
  • +
  • PN_StormLance_Bladelink
  • + +
    + +
  • PN_AutomatonFuel
  • +
  • PN_antibiotics
  • +
    + + + +
    + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + +
    + + + 2000 + 70 + 4.6 + 0.7 + 0 + 38 + 4 + 1.00 + 1 + 1.20 + 100 + 0.99 + 0.8 + 0.75 + 0.6 + 0.00 + 0.0 + 0 + 0 + + 1.0 + 1.0 + 1.0 + 1.0 + 0 + 0 + 0 + + 0.8 + 1.0 + 1.0 + 0.30 + + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + + 1.0 + 0.1 + + 0 + + + +
  • + + +
  • Blunt
  • + + 12 + 2 + LeftHand + + +
  • + Stun + 14 +
  • +
    +
    + +
  • + + +
  • Blunt
  • + + 12 + 2 + RightHand + + +
  • + Stun + 14 +
  • +
    +
    + +
  • + + +
  • Bite
  • + + 10.25 + 2 + Teeth + 0.07 + Pawn_Melee_HumanBite_Hit + Pawn_Melee_HumanBite_Miss + +
  • + + +
  • Blunt
  • + + 9 + 2 + HeadAttackTool + true + 0.2 + +
    + + Humanlike + HumanlikeConstant + Humanlike + true + 50 + + Leather_Automaton + Human + Paniel_Oil + PN_Flesh + 0.8 + (255, 255, 255) + + HumanStandard + false + PNBody + 1 + 1 + 1.0 + OmnivoreHuman + 30 + PN_NamerFemale + PN_NamerFemale + + +
  • (0, 0)
  • +
    +
    + +
  • + PNAdult + 0 + Pawn_DogSmall_Injured + Pawn_DogSmall_Dead + Pawn_DogSmall_Call + Pawn_DogSmall_Angry +
  • +
  • + HumanlikeBaby + 999995 +
  • +
  • + HumanlikeChild + 999996 +
  • +
  • + HumanlikePreTeenager + 999997 +
  • +
  • + HumanlikeTeenager + 999998 +
  • +
  • + HumanlikeAdult + 999999 +
  • +
    + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + Pawn_Melee_SmallScratch_HitPawn + Pawn_Melee_SmallScratch_HitBuilding + Pawn_Melee_SmallScratch_Miss + + (0.3, 0.8, 0.4) + (0,0,-0.3) + + + +
  • (20,0)
  • +
  • (21,100)
  • +
  • (22,40)
  • +
  • (23,0)
  • +
    +
    + +
  • PN_HediffGiverSet
  • +
    + Humanlike +
    + + 75 + 4 + 25 + + +
  • Anesthetize
  • +
  • SurgicalInspection
  • +
  • PN_Disassemble
  • +
  • PN_Repair
  • +
  • PN_Maintenance
  • +
    + +
  • +
    + +
    + + + PNAdult + + false + + Things/Pawn/Humanlike/Silhouettes/Silhouette_HumanAdult + Graphic_Single + 1 + + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/PanielRaceSettings.xml b/1.6/Core/Defs/AutomataRace/PanielRaceSettings.xml new file mode 100644 index 0000000..c54349e --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/PanielRaceSettings.xml @@ -0,0 +1,122 @@ + + + + Paniel_Race_Setting + + +
  • + +
  • + +
  • PN_Testsubject
  • + + 100.0 + + + +
  • Paniel_PlayerFaction
  • +
    + +
    + +
  • + +
  • Slave
  • + + 100.0 + +
    + +
  • + +
  • Slave
  • + + 100.0 + +
    + +
  • + +
  • + +
  • Colonist
  • + + 100.0 + + + +
  • OutlanderCivil
  • +
    + +
    +
    +
    + + + Paniel_Oil + + LiquidFuel + true + Normal + + -30 + -15 + 150 + 2.0 + + + Things/Filth/Spatter + (51, 51, 51, 180) + + + true + 35~40 + true + 70 + true + 1 + Interact_CleanFilth_Fluid + + + + + PN_CorpseCategory + + Corpses + + + + PN_Flesh + PN_CorpseCategory + Damage_HitMechanoid + true + + + + + Comp_CorpseSelfDestruct_Inject + +
  • + Corpse_Paniel_Race +
  • +
    + +
  • + 200 + PN_ResurrectModule + true +
  • + +
  • + 1.9 + Flame + Flame + Filth_Fuel + 0.5 + 200~750 + 5.0 + 2.0 +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/AutomataRace/PanielRulePacks.xml b/1.6/Core/Defs/AutomataRace/PanielRulePacks.xml new file mode 100644 index 0000000..558fc65 --- /dev/null +++ b/1.6/Core/Defs/AutomataRace/PanielRulePacks.xml @@ -0,0 +1,55 @@ + + + + PN_NamerUtility + + +
  • PNSN->Names/Automaton/PNSN
  • +
  • PN09->Names/Automaton/PN09
  • +
  • PNAZ->Names/Automaton/PNAZ
  • +
  • PNNick->Names/Automaton/PNNick
  • +
  • PNDbPnL->Names/Automaton/PNDbPnL
  • +
  • PNPbar->Names/Automaton/PNPBAR
  • +
  • PNName->Names/Automaton/PNName
  • +
    +
    +
    + + + PN_NamerFirst + +
  • PN_NamerUtility
  • +
    + + +
  • PNFirstNamer->[PNName]
  • +
    +
    +
    + + + PN_NamerNick + +
  • PN_NamerUtility
  • +
    + + +
  • PNNickNamer->[PNSN][PN09][PN09][PN09][PNAZ][PNAZ]
  • +
    +
    +
    + + + PN_NamerFemale + +
  • PN_NamerUtility
  • +
  • PN_NamerFirst
  • +
  • PN_NamerNick
  • +
    + + +
  • r_name->[PNFirstNamer] '[PNNickNamer]' [PNDbPnL]
  • +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/Drugs/DrugPolicyDefs.xml b/1.6/Core/Defs/Drugs/DrugPolicyDefs.xml new file mode 100644 index 0000000..66fbf24 --- /dev/null +++ b/1.6/Core/Defs/Drugs/DrugPolicyDefs.xml @@ -0,0 +1,16 @@ + + + + PN_fuelOneDrinkPerDay + + +
  • + PN_AutomatonFuel + true + true + 1 + 1 +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/Drugs/Drugs_Antibiotics.xml b/1.6/Core/Defs/Drugs/Drugs_Antibiotics.xml new file mode 100644 index 0000000..a126745 --- /dev/null +++ b/1.6/Core/Defs/Drugs/Drugs_Antibiotics.xml @@ -0,0 +1,218 @@ + + + + + PN_antibiotics + + Warning: Do not use on humans.\nThis antibiotics is for automaton only.\n\nAutomaton antibiotics for unknown diseases.\n(Used for diseases added by mod.) + + Things/Item/PNAntibiotics + Graphic_StackCount + 1 + + 25 + false + + 600 + 18 + 0.005 + 0.7 + + + 2 + 4 + + Industrial + + Processed + 30 + Ingest_Inject + + + (0.18,0,0) + + + Inject {0} + Injecting {0}. + false + 0 + Medical + +
  • + PN_AB_Bridge + 1 +
  • +
    +
    + +
  • + 1034 + 0 +
  • +
    + + + + + DrugSynthesisSpeed + Intellectual + Cook + PNRP_Production + +
  • PN_AutomatonBench
  • +
    + Recipe_Drug +
    +
    + + + + PN_AB_Bridge + HediffWithComps + + ... + (1,1,0.5) + false + 1.0 + false + +
  • + +
  • + PN_ateFuel +
  • +
  • + PN_AB_EffectBridge +
  • +
    + false + + +
    + + + PN_AB_EffectBridge + HediffWithComps + + ... + (1,1,0.5) + false + 1.0 + false + +
  • + PN_AB_Effect + +
  • PNBody
  • + + false + +
    +
    + + + PN_AB_Effect + Hediff_High + + Antibiotics are working. + + PN_antibiotics + + (1,0,0.5) + false + 1.00 + 1.0 + false + +
  • + -0.5 + true +
  • +
    + +
  • + + +
  • + Consciousness + 0.8 +
  • +
  • + Moving + 0.8 +
  • +
  • + Manipulation + 0.8 +
  • + + + 1.5 + + +
  • + + 0.25 + +
  • + Consciousness + 0.6 +
  • +
  • + Moving + 0.6 +
  • +
  • + Manipulation + 0.6 +
  • + + + 5 + + +
  • + + 0.75 + +
  • + Consciousness + 0.6 +
  • +
  • + Moving + 0.6 +
  • +
  • + Manipulation + 0.6 +
  • + + + 3 + + +
  • + + 0.9 + +
  • + Consciousness + 0.8 +
  • +
  • + Moving + 0.8 +
  • +
  • + Manipulation + 0.8 +
  • + + + 1 + + +
    +
    + \ No newline at end of file diff --git a/1.6/Core/Defs/Drugs/Drugs_Fuel.xml b/1.6/Core/Defs/Drugs/Drugs_Fuel.xml new file mode 100644 index 0000000..b70985e --- /dev/null +++ b/1.6/Core/Defs/Drugs/Drugs_Fuel.xml @@ -0,0 +1,205 @@ + + + + PN_Fuel + + Drugs + UI/Icons/PNCT_PNFuel + + + + + PN_AutomatonFuel + + Warning: Do not use on humans.\nThis fuel is for automaton only.\n\nThe fuel used by the automaton. Added a large amount of Psychite for mental stability. + Normal + + Things/Item/PNFuel + Graphic_StackCount + 1.0 + + 1 + 150 + false + + 50 + 6.1 + 0.05 + 2.0 + 1.0 + + Ultra + + Medical + 210 + Ingest_Drink + + + (0.18,0,0) + + + Drink {0} + Drinking {0}. + false + 25 + +
  • + PN_ateFuel + 1 + true +
  • +
  • + PN_deletFuel + 1 + true +
  • +
    + PN_Atefuel_nopn +
    + +
  • + PN_Chemical_Fuel + 0.000000001 + 0.20 + 1028 +
  • +
  • + 1.1 + Flame + 0.037 + +
  • Flame
  • + + 0.333 + Filth_Fuel + 1 + 70~150 + +
    + +
  • PN_Fuel
  • +
    + Buyable + +
  • PN_Fuel
  • +
    +
    + + + PN_Atefuel_nopn + 1 + +
  • + + ... + -4 +
  • +
    +
    + + + + + PN_ateFuel + HediffWithComps + + Ate Automaton Fuel + ... + (1,0,0.5) + false + 1.0 + false + +
  • + +
  • + PsychiteAddiction +
  • +
  • + FoodPoisoning +
  • +
  • + PN_deletFuel +
  • +
    + +
  • PNBody
  • +
    + false + + +
    + + + PN_deletFuel + HediffWithComps + + Ate Automaton Fuel + ... + (1,0,0.5) + false + 1.0 + false + +
  • + +
  • PN_AutomatonFuel_Addiction
  • + + +
  • PNBody
  • +
    + +
    +
    + + + PN_Chemical_Fuel + + PN_AutomatonFuel_Addiction + false + 0 + false + + + + PN_AutomatonFuel_Addiction + Hediff_Addiction + + A condition that requires PnL fuel. + (222,90,90) + PN_Need_Fuel + false + false + false + + + + +
  • + +
  • +
  • + + +
  • + Consciousness + 0.3 +
  • +
  • + Moving + 0.3 +
  • +
  • + Sight + 0.3 +
  • +
  • + Manipulation + 0.3 +
  • + + 8.0 + +
    +
    + \ No newline at end of file diff --git a/1.6/Core/Defs/Factions_PnL/Factions_Player.xml b/1.6/Core/Defs/Factions_PnL/Factions_Player.xml new file mode 100644 index 0000000..690c490 --- /dev/null +++ b/1.6/Core/Defs/Factions_PnL/Factions_Player.xml @@ -0,0 +1,40 @@ + + + + Icon/Paniel_PlayerIcon + +
  • (255, 255, 255)
  • +
    +
    + + + + Paniel_PlayerFaction + + This is the settlement where PnL industry is experimenting. + true + PN_ColonistPawn + colonist + colonists + Industrial + +
  • Astropolitan
  • +
    + +
  • Offworld
  • +
    + Icon/Paniel_PlayerIcon + NamerInitialSettlementColony + NamerFactionOutlander + NamerSettlementOutlander + +
  • ClassicStart
  • +
    + + +
  • Cloth
  • +
    +
    + 0 +
    +
    diff --git a/1.6/Core/Defs/Factions_PnL/Factions_PnL.xml b/1.6/Core/Defs/Factions_PnL/Factions_PnL.xml new file mode 100644 index 0000000..8578fe8 --- /dev/null +++ b/1.6/Core/Defs/Factions_PnL/Factions_PnL.xml @@ -0,0 +1,404 @@ + + + + + + PN_indistryFaction + + Automaton + Automata + 1 + PnL Industry + Icon/Paniel_HQ + true + false + Spacer + false + +
  • Offworld
  • +
    + +
  • PN_PnLindistryCulture
  • +
    + +
  • PN_Structure
  • +
  • Loyalist
  • +
  • Collectivist
  • +
  • Transhumanist
  • +
  • HumanPrimacy
  • +
    + +
  • PN_Structure
  • +
  • Loyalist
  • +
  • Collectivist
  • +
  • Transhumanist
  • +
  • HumanPrimacy
  • +
    + +
  • ApparelDesired_Strong_Subordinate
  • +
  • ApparelDesired_Soft_Subordinate
  • +
    + 0 +
    + + + + PN_SubsidiaryFaction + + It is a subsidiary established by PnL industry to sell more products on the planet's surface. It is composed of rimworld locals and automaton.\n\nIts main job is to set up a logistics center on the planet's surface and receive products from orbit and transport them to settlements on the planet's surface.\n\nThey are concerned with the practical matters of trade, trust.\n\nThis particular group holds civil behavior in high regard. + Employee + Employees + 50 + 0.20 + 1 + 1 + true + true + true + CEO + true + +
  • PN_CEO
  • +
    + Icon/Paniel_Logi + +
  • (1, 1, 1)
  • +
  • (1, 1, 1)
  • +
    + false + 9999 + 50 + Spacer + PnL Logistics + NamerSettlementPnLSub + +
  • PN_PnLindistryCulture
  • +
    + +
  • PN_Structure
  • +
  • Loyalist
  • +
  • Collectivist
  • +
  • Transhumanist
  • +
  • HumanPrimacy
  • +
    + +
  • PN_Structure
  • +
  • Loyalist
  • +
  • Collectivist
  • +
  • Transhumanist
  • +
  • HumanPrimacy
  • +
    + +
  • ApparelDesired_Strong_Subordinate
  • +
  • ApparelDesired_Soft_Subordinate
  • +
    + 0 + +
  • Offworld
  • +
    + +
  • PN_Caravan_PnLindustry
  • +
    + +
  • Visitor_Outlander_Standard
  • +
    + +
  • PN_Base_PnLindustry
  • +
    + -40~45 + PN_SubsidiaryRaidLootMaker + + +
  • (0,35)
  • +
  • (70, 50)
  • +
  • (700, 100)
  • +
  • (1300, 150)
  • +
  • (100000, 10000)
  • +
    +
    + + + + +
  • + Trader + + 1 + + + 6 + 5 + 2 + 1 + + + 6 + 1 + 1 + 1 + 1 + + 1.5 + + 4 + 6 + 3 + 4 + + 6 + 4 + +
  • + +
  • + Trader + + 1 + + + 6 + 5 + 2 + 1 + + + 6 + 1 + 1 + 1 + 1 + + 1.5 + + 4 + 6 + 3 + 4 + + 6 + 4 + +
  • + +
  • + Settlement + + 12 + 3 + 3 + 3 + 3 + + 3 + 3 + 3 + + 3 + + 6 + + 2 + + 4 + 6 + 2 + 4 + + 6 + 2 + 2 + 2 + +
  • + +
  • + Peaceful + + 10 + 2 + 1 + 2 + 1 + + 1 + 1 + 1 + + 1 + + 10 + +
  • + + + +
  • + Combat + 100 + + 6 + 4 + + 0.25 + 0.25 + 2 + + 6 + 2 + 4 + 2 + + + 2 + 2 + 6 + + 2 + 2 + 2 + 2 + +
  • +
    + + +
  • Metallic
  • +
  • Fabric
  • +
  • Leathery
  • +
    + +
  • Leather_Thrumbo
  • +
  • Hyperweave
  • +
  • Gold
  • +
  • Silver
  • +
    +
    + Icon/Paniel_Logi +
    + + + PN_SubsidiaryRaidLootMaker + + + + +
  • Silver
  • +
  • MedicineIndustrial
  • +
  • PN_RepairKit
  • +
  • PN_Component
  • +
  • Gold
  • +
    +
    +
    +
    +
    + + + NamerSettlementPnLSub + +
  • PN_NamerUtility
  • +
    + + +
  • r_name->[PNAZ][PN09][PN09] logistics center
  • +
    +
    +
    + + + PN_PnLindistryCulture + + The corporate culture of PnL Industry. + NamerIdeoAstropolitan + NamerDeityAstropolitan + DeityTypeMakerAstropolitan + LeaderTitleMaker_Astropolitan + NamerFestivalAstropolitan + +
  • OriginSpacer
  • +
    + Icon/Paniel_Icon + (1, 1, 1) + +
  • + Urban + 1 + 1 +
  • +
  • + NoBeard + 1 + 1 +
  • +
  • + NoTattoo + 1 + 1 +
  • +
    +
    + + + NamerIdeo_PnLindistry + + +
  • r_ideoName->PnL bylaws
  • +
  • r_ideoAdjective->PnL
  • +
  • r_memberName->PnL Employee
  • +
    +
    +
    + + + NamerDeity_PnLindistry + + +
  • r_deityName->PnL
  • +
    +
    +
    + + + DeityTypeMaker_PnLindistry + + +
  • r_deityType->God of Capitalism
  • +
    +
    +
    + + + LeaderTitleMaker_PnLindistry + + +
  • r_leaderTitle->CEO
  • +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/HediffDefs/Hediffs_AutomatonBase.xml b/1.6/Core/Defs/HediffDefs/Hediffs_AutomatonBase.xml new file mode 100644 index 0000000..818ab38 --- /dev/null +++ b/1.6/Core/Defs/HediffDefs/Hediffs_AutomatonBase.xml @@ -0,0 +1,299 @@ + + + + + PN_Immune_System + + Automaton immune system + HediffWithComps + (0.8, 0.8, 0.8) + false + 1 + 1 + false + true + +
  • + false + +
  • Malaria
  • +
  • SleepingSickness
  • +
  • Plague
  • +
  • FibrousMechanites
  • +
  • WoundInfection
  • +
  • GutWorms
  • +
  • Flu
  • +
  • MuscleParasites
  • +
  • Scaria
  • +
  • FoodPoisoning
  • + + +
    + + + +
    + + + + PN_Learning_Limit_System + + Automaton learning limit system + HediffWithComps + (0.8, 0.8, 0.8) + false + 1 + 1 + false + true + +
  • + false + + 0 + +
  • +
    + + + +
    + + + + PanielBaseHediff + HediffWithComps + + This pawn is Automaton. + (1,1,0.5) + false + 1 + 1 + false + true + +
  • Outdoors
  • +
  • DrugDesire
  • +
  • RoomSize
  • +
  • Comfort
  • +
  • Bladder
  • +
    + +
  • + false + 0 + 0 + 0 + -0.75 + + 0 + 0 + +
  • +
    + +
  • + +
  • Carcinoma
  • +
  • BadBack
  • +
  • Frail
  • +
  • Cataract
  • +
  • Blindness
  • +
  • HearingLoss
  • +
  • Asthma
  • +
  • HeartArteryBlockage
  • +
  • WoundInfection
  • +
  • Cirrhosis
  • +
  • ResurrectionSickness
  • +
  • DeathRefusalSickness
  • +
  • PsychiteAddiction
  • +
  • YayoHigh
  • +
  • PsychiteTolerance
  • +
  • PsychiteTeaHigh
  • +
  • FlakeHigh
  • +
  • GoJuiceHigh
  • +
  • GoJuiceAddiction
  • +
  • GoJuiceTolerance
  • +
  • Pregnant
  • +
  • PregnantHuman
  • + + true + PN_HediffNullifier + +
    + +
  • + Paniel_Race +
  • +
    +
    + + + + PN_OilLoss + + A reduction in the normal oil volume. Minor oil loss has relatively mild effects, but when oil loss becomes severe, internal device becomes badly impaired and the victim loses the ability to move. Extreme oil loss leads to explosion. + 1 + +
  • + + false +
  • +
  • + 0.15 + + +
  • + Consciousness + -0.2 +
  • + + +
  • + 0.30 + + +
  • + Consciousness + -0.4 +
  • + + +
  • + 0.45 + + +
  • + Consciousness + -0.6 +
  • + + +
  • + 0.60 + + true + +
  • + Consciousness + 0.3 +
  • + + +
    +
    + + + + PN_Overheating + + A generalized disruption to body functioning caused by excessive exposure to heat and sun. The victim becomes dizzy, weak, and confused. Recovery is quick once in a cool area, but if heat exposure continues, overheating gets worse until death. + (0.8, 0.8, 0.35) + 1 + HeatstrokeRevealed + +
  • + + false +
  • +
  • + + 0.04 + +
  • + Consciousness + -0.1 +
  • + + +
  • + + 0.2 + +
  • + Consciousness + -0.2 +
  • + + +
  • + + 0.35 + +
  • + Consciousness + -0.4 +
  • + + +
  • + + 0.62 + true + +
  • + Consciousness + -0.6 +
  • + + +
    +
    + + + + PN_OverCooling + + Dangerously low core body temperature. Unless re-warmed, overcooling gets worse and ends in death. Recovery is quick once the victim is re-warmed. Avoid overcooling by wearing warm clothes in cold environments. + (0.8, 0.8, 1) + 1 + HypothermiaRevealed + +
  • + + false +
  • +
  • + + 0.04 + +
  • + Consciousness + -0.1 +
  • + + +
  • + + 0.2 + +
  • + Consciousness + -0.2 +
  • + + +
  • + + 0.35 + +
  • + Consciousness + -0.4 +
  • + + +
  • + + 0.62 + true + +
  • + Consciousness + -0.6 +
  • + + +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/HediffDefs/Hediffs_AutomatonGrade.xml b/1.6/Core/Defs/HediffDefs/Hediffs_AutomatonGrade.xml new file mode 100644 index 0000000..daaa919 --- /dev/null +++ b/1.6/Core/Defs/HediffDefs/Hediffs_AutomatonGrade.xml @@ -0,0 +1,809 @@ + + + + + + + + + HediffWithComps + (1,1,0.5) + false + 1 + 1 + false + true + + + + + + + ... + +
  • + false +
  • +
    +
    + + + + + This pawn is an automaton.\nAfter production, it was rated awful grade. + +
  • + +
  • + Consciousness + -0.30 +
  • + + +
    +
    + + + This pawn is an automaton.\nAfter production, it was rated poor grade. + +
  • + +
  • + Consciousness + -0.10 +
  • + + + + +
    +
    + + + This pawn is an automaton.\nAfter production, it was rated normal grade. + +
  • + +
  • + Moving + 0.05 +
  • +
  • + Sight + 0.05 +
  • +
  • + Manipulation + 0.05 +
  • + + + + +
    +
    + + + This pawn is an automaton.\nAfter production, it was rated good grade. + +
  • + +
  • + Consciousness + 0.05 +
  • +
  • + Moving + 0.10 +
  • +
  • + Sight + 0.10 +
  • +
  • + Manipulation + 0.10 +
  • + + +
    +
    + + + + + This pawn is an automaton.\nAfter production, it was rated normal grade. + +
  • + +
  • + Moving + 0.05 +
  • +
  • + Sight + 0.05 +
  • +
  • + Manipulation + 0.05 +
  • + + +
    +
    + + + This pawn is an automaton.\nAfter production, it was rated good grade. + +
  • + +
  • + Consciousness + 0.05 +
  • +
  • + Moving + 0.10 +
  • +
  • + Sight + 0.10 +
  • +
  • + Manipulation + 0.10 +
  • + + +
    +
    + + + This pawn is an automaton.\nAfter production, it was rated excellent grade. + +
  • + +
  • + Consciousness + 0.10 +
  • +
  • + Moving + 0.20 +
  • +
  • + Sight + 0.20 +
  • +
  • + Manipulation + 0.20 +
  • + + + -0.10 + 0.10 + + +
    +
    + + + This pawn is an automaton.\nAfter production, it was rated masterwork grade. + +
  • + +
  • + Consciousness + 0.20 +
  • +
  • + Moving + 0.30 +
  • +
  • + Sight + 0.30 +
  • +
  • + Manipulation + 0.30 +
  • + + + -0.20 + 0.20 + -0.10 + -0.04 + + +
    +
    + + + This pawn is an automaton.\nAfter production, it was rated legendary grade. + +
  • + +
  • + Consciousness + 0.30 +
  • +
  • + Moving + 0.50 +
  • +
  • + Sight + 0.50 +
  • +
  • + Manipulation + 0.50 +
  • + + + -0.35 + 0.35 + -0.25 + -0.08 + + +
    +
    + + + + + This pawn is an automaton.\nAfter production, it was rated excellent grade. + +
  • + +
  • + Consciousness + 0.10 +
  • +
  • + Moving + 0.20 +
  • +
  • + Sight + 0.20 +
  • +
  • + Manipulation + 0.20 +
  • + + + 0.05 + + +
    +
    + + + This pawn is an automaton.\nAfter production, it was rated masterwork grade. + +
  • + +
  • + Consciousness + 0.20 +
  • +
  • + Moving + 0.30 +
  • +
  • + Sight + 0.30 +
  • +
  • + Manipulation + 0.30 +
  • + + + 0.10 + -0.04 + + +
    +
    + + + This pawn is an automaton.\nAfter production, it was rated legendary grade. + +
  • + +
  • + Consciousness + 0.30 +
  • +
  • + Moving + 0.50 +
  • +
  • + Sight + 0.50 +
  • +
  • + Manipulation + 0.50 +
  • + + + 0.20 + -0.08 + + +
    +
    + + + + + + + + PN_Give_Normal_Combat + +
  • + PNBody + +
  • + PN_SyncNormal_Combat +
  • +
  • + PN_Learning_Limit_System +
  • +
    + + +
    + + + PN_SyncNormal_Combat + + + + + + + + PN_Give_Good_Combat + +
  • + PNBody + +
  • + PN_SyncGood_Combat +
  • +
  • + PN_Learning_Limit_System +
  • +
    + + +
    + + + PN_SyncGood_Combat + + + + + + + + PN_Give_Excellent_Combat + +
  • + PNBody + +
  • + PN_SyncExcellent_Combat +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncExcellent_Combat + + + + + + + + PN_Give_Masterwork_Combat + +
  • + PNBody + +
  • + PN_SyncMasterwork_Combat +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncMasterwork_Combat + + + + + + + + PN_Give_Legendary_Combat + +
  • + PNBody + +
  • + PN_SyncLegendary_Combat +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncLegendary_Combat + + + + + + + + + + PN_Give_Normal_Engineer + +
  • + PNBody + +
  • + PN_SyncNormal_Engineer +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncNormal_Engineer + + + + + + + + PN_Give_Good_Engineer + +
  • + PNBody + +
  • + PN_SyncGood_Engineer +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncGood_Engineer + + + + + + + + PN_Give_Excellent_Engineer + +
  • + PNBody + +
  • + PN_SyncExcellent_Engineer +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncExcellent_Engineer + + + + + + + + PN_Give_Masterwork_Engineer + +
  • + PNBody + +
  • + PN_SyncMasterwork_Engineer +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncMasterwork_Engineer + + + + + + + + PN_Give_Legendary_Engineer + +
  • + PNBody + +
  • + PN_SyncLegendary_Engineer +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncLegendary_Engineer + + + + + + + + + + PN_Give_Normal_Domestic + +
  • + PNBody + +
  • + PN_SyncNormal_Domestic +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncNormal_Domestic + + + + + + + + PN_Give_Good_Domestic + +
  • + PNBody + +
  • + PN_SyncGood_Domestic +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncGood_Domestic + + + + + + + + PN_Give_Excellent_Domestic + +
  • + PNBody + +
  • + PN_SyncExcellent_Domestic +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncExcellent_Domestic + + + + + + + + PN_Give_Masterwork_Domestic + +
  • + PNBody + +
  • + PN_SyncMasterwork_Domestic +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncMasterwork_Domestic + + + + + + + + PN_Give_Legendary_Domestic + +
  • + PNBody + +
  • + PN_SyncLegendary_Domestic +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncLegendary_Domestic + + + + + + + + + + PN_SyncNormal_Modified + + This pawn is an automaton.\nAfter production, It has been modified in an unauthorized way. + +
  • + +
  • + Moving + 0.05 +
  • +
  • + Sight + 0.05 +
  • +
  • + Manipulation + 0.05 +
  • + + + 0.08 + + +
    +
    + + + + + + PN_Give_Awful_Failure + +
  • + PNBody + +
  • + PN_SyncAwful_Failure +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncAwful_Failure + + + + + + + + PN_Give_Poor_Failure + +
  • + PNBody + +
  • + PN_SyncPoor_Failure +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncPoor_Failure + + + \ No newline at end of file diff --git a/1.6/Core/Defs/HediffDefs/Hediffs_AutomatonGrade_PA.xml b/1.6/Core/Defs/HediffDefs/Hediffs_AutomatonGrade_PA.xml new file mode 100644 index 0000000..e635365 --- /dev/null +++ b/1.6/Core/Defs/HediffDefs/Hediffs_AutomatonGrade_PA.xml @@ -0,0 +1,526 @@ + + + + + PN_PnLAuthenticated + + This automaton was made by PnL. + HediffWithComps + (1,1,0.5) + false + 1 + 1 + false + true + +
  • + +
  • + Consciousness + 0.05 +
  • + + + -0.10 + 0.10 + -0.04 + + +
    + +
  • + +
  • PN_Ex_filterA
  • + + +
    +
    + + + + + + + + PN_Give_Normal_Combat_PA + +
  • + PNBody + +
  • + PN_SyncNormal_Combat +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncNormal_Combat_PA + + + + + + + + PN_Give_Good_Combat_PA + +
  • + PNBody + +
  • + PN_SyncGood_Combat +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncGood_Combat_PA + + + + + + + + PN_Give_Excellent_Combat_PA + +
  • + PNBody + +
  • + PN_SyncExcellent_Combat +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncExcellent_Combat_PA + + + + + + + + PN_Give_Masterwork_Combat_PA + +
  • + PNBody + +
  • + PN_SyncMasterwork_Combat +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncMasterwork_Combat_PA + + + + + + + + PN_Give_Legendary_Combat_PA + +
  • + PNBody + +
  • + PN_SyncLegendary_Combat +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncLegendary_Combat_PA + + + + + + + + + + PN_Give_Normal_Engineer_PA + +
  • + PNBody + +
  • + PN_SyncNormal_Engineer +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncNormal_Engineer_PA + + + + + + + + PN_Give_Good_Engineer_PA + +
  • + PNBody + +
  • + PN_SyncGood_Engineer +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncGood_Engineer_PA + + + + + + + + PN_Give_Excellent_Engineer_PA + +
  • + PNBody + +
  • + PN_SyncExcellent_Engineer +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncExcellent_Engineer_PA + + + + + + + + PN_Give_Masterwork_Engineer_PA + +
  • + PNBody + +
  • + PN_SyncMasterwork_Engineer +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncMasterwork_Engineer_PA + + + + + + + + PN_Give_Legendary_Engineer_PA + +
  • + PNBody + +
  • + PN_SyncLegendary_Engineer +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncLegendary_Engineer_PA + + + + + + + + + + PN_Give_Normal_Domestic_PA + +
  • + PNBody + +
  • + PN_SyncNormal_Domestic +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncNormal_Domestic_PA + + + + + + + + PN_Give_Good_Domestic_PA + +
  • + PNBody + +
  • + PN_SyncGood_Domestic +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncGood_Domestic_PA + + + + + + + + PN_Give_Excellent_Domestic_PA + +
  • + PNBody + +
  • + PN_SyncExcellent_Domestic +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncExcellent_Domestic_PA + + + + + + + + PN_Give_Masterwork_Domestic_PA + +
  • + PNBody + +
  • + PN_SyncMasterwork_Domestic +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncMasterwork_Domestic_PA + + + + + + + + PN_Give_Legendary_Domestic_PA + +
  • + PNBody + +
  • + PN_SyncLegendary_Domestic +
  • +
  • + PN_PnLAuthenticated +
  • +
  • + PN_Learning_Limit_System +
  • + + +
    +
    + + + PN_SyncLegendary_Domestic_PA + + + + + + + + + + PN_Give_Testsubject + +
  • + PNBody + +
  • + PN_SyncGood_Testsubject +
  • +
  • + PN_PnLAuthenticated +
  • + + +
  • + PN_SyncGood_Testsubject + +
  • PN_Learning_Limit_System
  • + + PNBody + +
    +
    + + + PN_SyncGood_Testsubject + + +
  • + +
  • + Consciousness + 0.05 +
  • +
  • + Moving + 0.10 +
  • +
  • + Sight + 0.10 +
  • +
  • + Manipulation + 0.10 +
  • + + + 1.0 + 0.9 + 1.50 + 0.12 + + +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/HediffDefs/Hediffs_BodyParts.xml b/1.6/Core/Defs/HediffDefs/Hediffs_BodyParts.xml new file mode 100644 index 0000000..b574c5d --- /dev/null +++ b/1.6/Core/Defs/HediffDefs/Hediffs_BodyParts.xml @@ -0,0 +1,380 @@ + + + + + Hediff_Implant + (0.6, 0.6, 1.0) + false + true + true + + + + Hediff_AddedPart + true + + + + PN_BodyPartsAutomaton + + BodyParts + Things/Item/Health/HealthItem + + + + ThingWithComps + Item + true + true + Item + Never + true + true + 14 + Buyable + + 50 + 0.7 + -4 + 2.0 + 1 + + +
  • PN_BodyParts
  • +
    + +
  • + + + + + Industrial + +
  • PN_BodyPartsAutomaton
  • + + + Things/Item/Health/HealthItem + Graphic_Single + 0.80 + (247,180,130) + + +
  • PN_BodyPartsNormal
  • +
    + + 15000 + + + GeneralLaborSpeed + Crafting + Smith + Recipe_Smith + UnfinishedHealthItemProsthetic + + 5 + + + +
  • PN_AutomatonBench
  • +
    +
    +
    + + + Spacer + +
  • PN_BodyPartsAutomaton
  • +
    + + Things/Item/Health/HealthItem + Graphic_Single + 0.80 + (189,169,118) + + +
  • PN_BodyPartsRoyal
  • +
    + + 26000 + + + GeneralLaborSpeed + Crafting + Smith + Recipe_Smith + UnfinishedHealthItemBionic + + 8 + + + +
  • PN_AutomatonBench
  • +
    +
    +
    + + + Recipe_InstallImplant + 2500 + + 5 + + +
  • Paniel_Race
  • +
    +
    + + + Recipe_InstallArtificialBodyPart + + + + + 4 + + + + + Recipe_RemoveImplant + 2500 + true + + 5 + + +
  • Paniel_Race
  • +
    +
    + + + + PN_ExperimentalModuleHediff + + Warning: This implant is not a PnL licensed implant. When installed, the performance of the Automaton will decrease.\n\n + +This implant makes the automaton learn like a human, but makes it mentally unstable.\n\n + +This implant cannot be removed after installation. + + PN_ExperimentalModule + + +
  • + + 1.0 + 0.80 + 0.12 + +
  • +
    + +
  • + +
  • PN_Learning_Limit_System
  • + + +
  • + +
  • PN_Learning_Limit_System
  • + + +
    +
    + + + PN_Ex_filterA + HediffWithComps + + This pawn is Automaton. + (1,1,0.5) + false + 1 + 1 + false + + + + +
  • + PNBody + +
  • + PN_Ex_filterB +
  • +
  • + PN_SyncNormal_Modified +
  • + + +
    +
    + + + PN_Ex_filterB + HediffWithComps + + This pawn is Automaton. + (1,1,0.5) + false + 1 + 1 + false + + + + +
  • + +
  • PN_SyncNormal_Combat
  • +
  • PN_SyncGood_Combat
  • +
  • PN_SyncExcellent_Combat
  • +
  • PN_SyncMasterwork_Combat
  • +
  • PN_SyncLegendary_Combat
  • + +
  • PN_SyncNormal_Engineer
  • +
  • PN_SyncGood_Engineer
  • +
  • PN_SyncExcellent_Engineer
  • +
  • PN_SyncMasterwork_Engineer
  • +
  • PN_SyncLegendary_Engineer
  • + +
  • PN_SyncNormal_Domestic
  • +
  • PN_SyncGood_Domestic
  • +
  • PN_SyncExcellent_Domestic
  • +
  • PN_SyncMasterwork_Domestic
  • +
  • PN_SyncLegendary_Domestic
  • + +
  • PN_SyncGood_Testsubject
  • + +
  • PN_Learning_Limit_System
  • + + +
    +
    + + + PN_ExperimentalModule + + Warning: This implant is not a PnL licensed implant. When installed, the performance of the Automaton will decrease.\n\n + +This implant makes the automaton learn like a human, but makes it mentally unstable.\n\n + +This implant cannot be removed after installation. + + PN_InstallExperimentalModule + + None + + 2 + 1 + 1 + + + 0.3 + + + PNRP_ExperimentalModule + + + + + PN_InstallExperimentalModule + + Install a custom core implant. + + PN_ExperimentalModule + PN_ExperimentalModuleHediff + + Installing custom core implant. + +
  • + + +
  • PN_ExperimentalModule
  • + + + 1 + +
    + + + +
  • PNBrain
  • +
    + PN_ExperimentalModuleHediff +
    + + + + PN_ResurrectModule + + a resurrect implant + This is the implant using resurrector mech serum.\nAn automaton equipped with this implant resurrection after death in a few seconds. + + PN_ResurrectModule + + + + + PN_ResurrectModule + + + + PN_ResurrectModule + + This is the implant using resurrector mech serum.\nAn automaton equipped with this implant resurrection after death in a few seconds. + + PN_InstallResurrectModule + + + 1 + 1 + + + 0.3 + + + PNRP_ResurrectModule + + + + + PN_InstallResurrectModule + + Install a resurrect implant. + + PN_ResurrectModule + PN_ResurrectModule + + Installing resurrect implant. + +
  • + + +
  • PN_ResurrectModule
  • + + + 1 + +
    + + + +
  • PNCore
  • +
    + PN_ResurrectModule +
    + + + PN_RemoveResurrectModule + + Remove the resurrect implant. + + PN_ResurrectModule + PN_ResurrectModule + + Removing resurrect implant. + PN_ResurrectModule + + + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/HediffDefs/Hediffs_ContDamPN.xml b/1.6/Core/Defs/HediffDefs/Hediffs_ContDamPN.xml new file mode 100644 index 0000000..d541478 --- /dev/null +++ b/1.6/Core/Defs/HediffDefs/Hediffs_ContDamPN.xml @@ -0,0 +1,110 @@ + + + + PN_ChainCutManeuver + PN_ChainCutTool + + Verb_MeleeAttackDamage + PN_ChainCutDamage + + MeleeAttack + Maneuver_Slash_MeleeHit + Maneuver_Slash_MeleeDeflect + Maneuver_Slash_MeleeMiss + Maneuver_Slash_MeleeDodge + + + + PN_ChainCutTool + + + + + PN_ChainCutDamage + PN_ChainCutHediff + PN_ChainCutHediff + PN_ChainCrackHediff + 1.4 + DamageWorker_AddInjury + Sharp + Slice + + + + PN_ChainCutHediff + + a cut + a cut. + +
  • + bandaged + sutured + set +
  • +
  • + 0.15 +
  • +
  • + cut scar +
  • +
  • + PN_ChainCutDamage_Con + 6 + 2 + 18 +
  • +
    + + 0.0125 + 0.00625 + 0.06 + false + Cut off + Cut off + +
    + + + PN_ChainCutDamage_Con + 1.4 + DamageWorker_AddInjury + Sharp + Slice + + + + PN_ChainCrackHediff + + a crack wound + A crack. + +
  • + set + set + set +
  • +
  • + permanent crack +
  • +
  • + PN_ChainCrackDamage_Con + 6 + 1 + 12 +
  • +
    + + 0.01 + 0.00625 + Shattered + +
    + + + PN_ChainCrackDamage_Con + 1.4 + DamageWorker_AddInjury + Sharp + Slice + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/HediffDefs/Hediffs_HediffGiver.xml b/1.6/Core/Defs/HediffDefs/Hediffs_HediffGiver.xml new file mode 100644 index 0000000..1a31616 --- /dev/null +++ b/1.6/Core/Defs/HediffDefs/Hediffs_HediffGiver.xml @@ -0,0 +1,64 @@ + + + + PN_HediffGiverSet + +
  • + PN_OilLoss +
  • + +
  • + PN_OverCooling +
  • + +
  • + PN_Overheating +
  • + +
  • + Paniel_Joy +
  • + +
  • + Dementia + +
  • Brain
  • + + + +
  • (0.85, 0)
  • +
  • (0.95, 0.0093)
  • +
  • (1.15, 0.093)
  • +
    +
    + + +
  • + Alzheimers + +
  • PNBrain
  • + + + +
  • (0.42, 0)
  • +
  • (0.7, 0.00061)
  • +
  • (0.9, 0.0012)
  • +
  • (1, 0.002)
  • +
  • (1.5, 0.003)
  • +
    +
    + 0.001 + + +
  • + TraumaSavant + +
  • PNBrain
  • + + 0.12 + Trauma savant + [PAWN_nameDef]'s brain injury has caused [PAWN_objective] to develop strange savant-like abilities. + +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/HediffDefs/Hediffs_Joy.xml b/1.6/Core/Defs/HediffDefs/Hediffs_Joy.xml new file mode 100644 index 0000000..b596049 --- /dev/null +++ b/1.6/Core/Defs/HediffDefs/Hediffs_Joy.xml @@ -0,0 +1,57 @@ + + + + Paniel_Joy + + (0.8, 0.8, 0.8) + State affected by recreation.\n\nA high recreation has a beneficial effect. + false + +
  • + + true +
  • +
  • + + 0.15 + +
  • + Consciousness + -0.05 +
  • + + +
  • + + 0.3 + +
  • + Consciousness + 0.0 +
  • + + +
  • + + 0.7 + +
  • + Consciousness + 0.05 +
  • + + +
  • + + 0.85 + +
  • + Consciousness + 0.1 +
  • + + +
    +
    + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/HediffDefs/Hediffs_Maintenance.xml b/1.6/Core/Defs/HediffDefs/Hediffs_Maintenance.xml new file mode 100644 index 0000000..5b1130e --- /dev/null +++ b/1.6/Core/Defs/HediffDefs/Hediffs_Maintenance.xml @@ -0,0 +1,152 @@ + + + + PN_Maintenance + + (0.8, 0.8, 0.8) + The maintenance status of the automaton.\nIf it is low, it will cause malfunction.\n\nMaintenance is required every year (60 rimworld days). + + PN_RepairKit + PN_SelfRepairKit + PN_Maintenance + PN_Repair + + false + true + false + +
  • + + 0.1 + true + 1.50 + +
  • + Consciousness + 0.5 +
  • +
  • + Moving + 0.5 +
  • +
  • + Sight + 0.5 +
  • +
  • + Manipulation + 0.5 +
  • + + + 0.80 + 0.16 + -0.20 + -0.8 + + +
  • PN_Need_Maintenance
  • +
    + +
  • + + 0.2 + 1.25 + +
  • + Consciousness + 0.75 +
  • +
  • + Moving + 0.75 +
  • +
  • + Sight + 0.75 +
  • +
  • + Manipulation + 0.75 +
  • + + + 0.40 + 0.08 + -0.10 + -0.4 + + +
  • PN_Need_Maintenance
  • +
    + +
  • + + 0.80 + + + + + + + +
  • PN_Need_Maintenance
  • + + +
  • + + 1 + + + + + -0.20 + -0.04 + 0.10 + 0.2 + + +
  • PN_Need_Maintenance
  • + + +
    + +
  • + Paniel_Race +
  • +
    +
    + + + PN_Maintenance_Thought + ThoughtWorker_Hediff + PN_Maintenance + true + +
  • + + I feel weird. I don't think my body is mine. + -15 +
  • +
  • + + I can't move my body well. + -5 +
  • +
  • + false +
  • +
  • + + I feel like I'm made new! + 5 +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/NeedDefs/Needs.xml b/1.6/Core/Defs/NeedDefs/Needs.xml new file mode 100644 index 0000000..b73554a --- /dev/null +++ b/1.6/Core/Defs/NeedDefs/Needs.xml @@ -0,0 +1,25 @@ + + + + PN_Need_Fuel + Need_Chemical + + The amount of fuel used by the automaton. When the gauge reaches zero, The automaton will enter emergency power mode and become very slow. + 984 + 0.20 + true + true + true + + + + PN_Need_Maintenance + AutomataRace.Need_Maintenance + + The maintenance status of the automaton.\n\nIf it is low, it will cause malfunction.\n\nMaintenance is required every year (60 rimworld days). + true + 985 + 0.01333 + true + + \ No newline at end of file diff --git a/1.6/Core/Defs/PawnKindDefs_PnL/PawnKind_Faction.xml b/1.6/Core/Defs/PawnKindDefs_PnL/PawnKind_Faction.xml new file mode 100644 index 0000000..a730b19 --- /dev/null +++ b/1.6/Core/Defs/PawnKindDefs_PnL/PawnKind_Faction.xml @@ -0,0 +1,735 @@ + + + + + + Paniel_Race + PN_SubsidiaryFaction + 0 + 0 + 1 + 20 + 25 + 2~4 + 13~21 + 0 + 0 + 0 + + + + PN_AutomatonFuel + 3~5 + + false + + + + Human + PN_SubsidiaryFaction + 0 + 0.05 + 2.55 + 0 + +
  • IndustrialBasic
  • +
  • IndustrialAdvanced
  • +
    +
    + + + + + PN_AssociateH + + 45 + Poor + false + 0.2~2.0 + +
  • Gun
  • +
  • PN_Shovel
  • +
    + 250~400 + 200~400 + 0.4 + 0.06 + 50~600 + +
  • Poor
  • +
  • Simple
  • +
  • ImplantEmpireCommon
  • +
    + 1~3 + 6~10 + 0 + false + + + 0.1 + 0.1 + 0.1 + 0.05 + 0.1 + 0.05 + + +
    + + + PN_AssociateP_EngineerA + + 60 + Poor + false + 0.2~2.0 + +
  • Gun
  • +
  • PN_Shovel
  • +
    + 250~400 + 200~400 + 0.4 + +
  • PN_ApparelBasic
  • +
    + +
  • Paniel_Basic
  • +
    + +
  • + +
  • Paniel_Story_Normal
  • +
  • Paniel_Story_ApprenticeA_PA
  • + + +
    + 11~14 + 38~58 + +
  • ShootingAccuracy
  • +
  • Brawler
  • +
  • Tough
  • +
    +
    + + + PN_AssociateP_EngineerB + + 65 + Normal + false + 0.7~3.2 + +
  • Gun
  • +
  • PN_Shovel
  • +
    + 250~400 + 400~600 + 0.6 + +
  • PN_ApparelBasic
  • +
    + +
  • Paniel_Basic
  • +
    + +
  • + +
  • Paniel_Story_Good
  • +
  • Paniel_Story_ApprenticeB_PA
  • + + +
    + 11~14 + 38~58 + +
  • ShootingAccuracy
  • +
  • Brawler
  • +
  • Tough
  • +
    +
    + + + + PN_AssociateP_DomesticA + + 60 + Poor + false + 0.2~2.0 + +
  • Gun
  • +
    + 250~400 + 200~400 + 0.4 + +
  • PN_ApparelBasic
  • +
    + +
  • Paniel_Basic
  • +
    + +
  • + +
  • Paniel_Story_Normal
  • +
  • Paniel_Story_MaidA_PA
  • + + +
    + 11~14 + 38~58 + +
  • ShootingAccuracy
  • +
  • Brawler
  • +
  • TorturedArtist
  • +
  • Tough
  • +
    +
    + + + PN_AssociateP_DomesticB + + 65 + Normal + false + 0.7~3.2 + +
  • Gun
  • +
    + 250~400 + 400~600 + 0.6 + +
  • PN_ApparelBasic
  • +
    + +
  • Paniel_Basic
  • +
    + +
  • + +
  • Paniel_Story_Good
  • +
  • Paniel_Story_MaidB_PA
  • + + +
    + 11~14 + 38~58 + +
  • ShootingAccuracy
  • +
  • Brawler
  • +
  • TorturedArtist
  • +
  • Tough
  • +
    +
    + + + + + PN_ManagerH + + true + 45 + false + 1~1 + Normal + +
  • Gun
  • +
    + 250~400 + 400~600 + +
  • IndustrialMilitaryBasic
  • +
  • IndustrialMilitaryAdvanced
  • +
  • BeltDefensePop
  • +
    + +
  • Apparel_BowlerHat
  • +
    + 0.15 + 600~1500 + +
  • Poor
  • +
  • Simple
  • +
  • Advanced
  • +
  • ImplantEmpireCommon
  • +
    + 5~7 + 26~40 + 0 + false + + + 0.2 + 0.2 + 0.2 + + +
    + + + PN_ManageUnit_Enginer + + 65 + Normal + false + 1~1 + +
  • Gun
  • +
  • PN_Shovel
  • +
    + 250~400 + 400~600 + 0.4 + +
  • PN_ApparelWorker
  • +
  • PN_ApparelWorkerHat
  • +
    + +
  • Paniel_Engineer
  • +
    + +
  • + +
  • Paniel_Story_Excellent
  • +
  • Paniel_Story_journeymanA_PA
  • + + +
    + 11~14 + 38~58 + +
  • ShootingAccuracy
  • +
  • Brawler
  • +
  • TorturedArtist
  • +
  • Tough
  • +
    +
    + + + PN_ManageUnit_Domestic + + 65 + true + Normal + false + 1~1 + +
  • Gun
  • +
    + 250~400 + 400~600 + 0.4 + +
  • PN_ApparelMaid
  • +
  • PN_ApparelMaidHat
  • +
    + +
  • Paniel_Housekeeper
  • +
    + +
  • + +
  • Paniel_Story_Excellent
  • +
  • Paniel_Story_HousemaidA_PA
  • + + +
    + 11~14 + 38~58 + +
  • ShootingAccuracy
  • +
  • Brawler
  • +
  • TorturedArtist
  • +
  • Tough
  • +
    +
    + + + PN_Director + + 40 + 30 + false + 1~1 + Good + 200~200 + +
  • Gun
  • +
    + 700~1200 + +
  • IndustrialMilitaryBasic
  • +
  • BeltDefensePop
  • +
    + +
  • Apparel_BowlerHat
  • +
    + 0.15 + 600~1500 + +
  • Simple
  • +
  • Advanced
  • +
  • ImplantEmpireCommon
  • +
    + 8~11 + 38~58 + false + + + 0.2 + 0.2 + 0.2 + + +
    + + + + 40 + 30 + false + 1~1 + Good + 200~200 + +
  • Gun
  • +
    + 700~1200 + +
  • IndustrialMilitaryBasic
  • +
  • BeltDefensePop
  • +
    + +
  • Apparel_BowlerHat
  • +
    + 0.15 + 600~1500 + +
  • Simple
  • +
  • Advanced
  • +
  • ImplantEmpireCommon
  • +
    + false + + + 0.2 + 0.2 + 0.2 + + +
    + + + + PN_SeniorDirector + + 10~13 + 38~58 + + + + PN_VP + + 11~14 + 38~58 + + + + PN_SVP + + 12~15 + 25~39 + + + + PN_CEO + + 13~16 + 38~58 + + + + + + PN_SecurityGuardH + + 60 + true + 0.6~2 + +
  • IndustrialMilitaryBasic
  • +
  • BeltDefensePop
  • +
    + 400~600 + 0.4 + +
  • Gun
  • +
    + 250~400 + 0.04 + 200~700 + +
  • Poor
  • +
  • Simple
  • +
  • ImplantEmpireCommon
  • +
    + 1~3 + 15~24 + + + 0.25 + 0.25 + + +
    + + + PN_SecurityUnit + + 70 + true + 0.7~3.2 + +
  • Gun
  • +
    + 250~400 + 400~600 + 0.6 + +
  • PN_ApparelBasic
  • +
    + +
  • Paniel_Basic
  • +
  • BeltDefensePop
  • +
    + +
  • + +
  • Paniel_Story_Normal
  • +
  • Paniel_Story_MilitiaA_PA
  • + + +
    + 15~18 + 38~58 + +
  • Industriousness
  • +
  • TorturedArtist
  • +
  • Brawler
  • +
    +
    + + + + + + true + Normal + 0.7~3.2 + 0.2 + 1 + +
  • PN_ApparelMilitia
  • +
  • PN_ApparelMilitiaHat
  • +
    + +
  • Paniel_Militia
  • +
    + +
  • + +
  • Paniel_Story_Good
  • +
  • Paniel_Story_MilitiaB_PA
  • + + +
    + +
  • Industriousness
  • +
  • TorturedArtist
  • +
    + 14~17 + 38~58 +
    + + + + + 500~500 + 400~700 + +
  • Brawler
  • +
    +
    + + + + PN_GrenadeUnit_Destructive + 80 + true + true + +
  • GrenadeDestructive
  • +
    +
    + + + PN_GrenadeUnit_EMP + 65 + +
  • GrenadeEMP
  • +
    +
    + + + PN_GrenadeUnit_Smoke + 65 + +
  • GrenadeSmoke
  • +
    +
    + + + + + PN_Mid_CloseUnit + true + 150 + +
  • MedievalMeleeDecent
  • +
  • MedievalMeleeAdvanced
  • +
  • PN_Shovel
  • +
    + 200~500 + 1000~1500 + +
  • Apparel_ShieldBelt
  • +
    + +
  • ShootingAccuracy
  • +
    +
    + + + PN_Mid_RangeUnit + 95 + +
  • Gun
  • +
  • PN_Rifle
  • +
  • PN_Revolver
  • +
    + 450~650 + 1000~1500 + +
  • BeltDefensePop
  • +
    + +
  • Brawler
  • +
    +
    + + + + + + true + Good + 1~1 + 0.3 + 1 + 7000~10000 + +
  • PN_EliteSecurityUniform
  • +
  • PN_EliteSecurityHat
  • +
    + +
  • Paniel_EliteSecurity
  • +
    + +
  • + +
  • Paniel_Story_Excellent
  • +
  • Paniel_Story_SoldierA_PA
  • + + +
    + +
  • Industriousness
  • +
  • TorturedArtist
  • +
    + 15~18 + 38~58 +
    + + + PN_EliteCloseUnit + 190 + +
  • PN_Chainsword
  • +
    + 200~500 + +
  • ShootingAccuracy
  • +
    + +
  • Apparel_ShieldBelt
  • + +
    +
    + + + PN_EliteRangeUnit + 145 + +
  • PN_Rifle
  • +
    + +
  • BeltDefensePop
  • +
    + + + + 1100~2500 + +
  • Brawler
  • +
    +
    + + + PN_EliteHeavyUnit + 190 + +
  • PN_Machinegun
  • +
    + +
  • BeltDefensePop
  • +
    + + + + 1100~2500 + +
  • Brawler
  • +
    +
    + + + PN_EliteCannonUnit + 170 + +
  • PN_Cannon
  • +
    + +
  • BeltDefensePop
  • +
    + + + + 1100~2500 + +
  • Brawler
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/PawnKindDefs_PnL/PawnKind_Randombox.xml b/1.6/Core/Defs/PawnKindDefs_PnL/PawnKind_Randombox.xml new file mode 100644 index 0000000..b2517f4 --- /dev/null +++ b/1.6/Core/Defs/PawnKindDefs_PnL/PawnKind_Randombox.xml @@ -0,0 +1,348 @@ + + + + + Paniel_Randombox_Awful + + 0 + false + +
  • + +
  • Paniel_Story_Awful
  • +
  • Paniel_Story_FailureA
  • + + +
    + 0 + 0 + 0 + + + + 2~4 + 13~21 +
    + + + Paniel_Randombox_Poor + + 0 + false + +
  • + +
  • Paniel_Story_Poor
  • +
  • Paniel_Story_FailureB
  • + + +
    + 0 + 0 + 0 + + + + 2~4 + 13~21 +
    + + + Paniel_Randombox_Normal + + 0 + false + +
  • + +
  • Paniel_Story_Normal
  • +
  • Paniel_Story_Basic
  • + + +
    + 0 + 0 + 0 + + + + 11~14 + 38~58 +
    + + + + 0 + true + 0 + 0 + 0 + + + + +
  • Industriousness
  • +
  • TorturedArtist
  • +
    +
    + + + Paniel_Soldier_Normal + + +
  • + +
  • Paniel_Story_Normal
  • +
  • Paniel_Story_MilitiaA
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Soldier_Good + + +
  • + +
  • Paniel_Story_Good
  • +
  • Paniel_Story_MilitiaB
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Soldier_Excellent + + +
  • + +
  • Paniel_Story_Excellent
  • +
  • Paniel_Story_SoldierA
  • + + +
    + 14~17 + 38~58 +
    + + + Paniel_Soldier_Masterwork + + +
  • + +
  • Paniel_Story_Masterwork
  • +
  • Paniel_Story_SoldierB
  • + + +
    + 15~18 + 38~58 +
    + + + Paniel_Soldier_Legendary + + +
  • + +
  • Paniel_Story_Legendary
  • +
  • Paniel_Story_Royalguard
  • + + +
    + 16~19 + 38~58 +
    + + + + 0 + true + 0 + 0 + 0 + + + + +
  • ShootingAccuracy
  • +
  • Brawler
  • +
  • Tough
  • +
    +
    + + + Paniel_Worker_Normal + + +
  • + +
  • Paniel_Story_Normal
  • +
  • Paniel_Story_ApprenticeA
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Worker_Good + + +
  • + +
  • Paniel_Story_Good
  • +
  • Paniel_Story_ApprenticeB
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Worker_Excellent + + +
  • + +
  • Paniel_Story_Excellent
  • +
  • Paniel_Story_journeymanA
  • + + +
    + 14~17 + 38~58 +
    + + + Paniel_Worker_Masterwork + + +
  • + +
  • Paniel_Story_Masterwork
  • +
  • Paniel_Story_journeymanB
  • + + +
    + 15~18 + 38~58 +
    + + + Paniel_Worker_Legendary + + +
  • + +
  • Paniel_Story_Legendary
  • +
  • Paniel_Story_Meister
  • + + +
    + 16~19 + 38~58 +
    + + + + 0 + true + 0 + 0 + 0 + + + + +
  • ShootingAccuracy
  • +
  • Brawler
  • +
  • TorturedArtist
  • +
  • Tough
  • +
    +
    + + + Paniel_Maid_Normal + + +
  • + +
  • Paniel_Story_Normal
  • +
  • Paniel_Story_MaidA
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Maid_Good + + +
  • + +
  • Paniel_Story_Good
  • +
  • Paniel_Story_MaidB
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Maid_Excellent + + +
  • + +
  • Paniel_Story_Excellent
  • +
  • Paniel_Story_HousemaidA
  • + + +
    + 14~17 + 38~58 +
    + + + Paniel_Maid_Masterwork + + +
  • + +
  • Paniel_Story_Masterwork
  • +
  • Paniel_Story_HousemaidB
  • + + +
    + 15~18 + 38~58 +
    + + + Paniel_Maid_Legendary + + +
  • + +
  • Paniel_Story_Legendary
  • +
  • Paniel_Story_Ladysmaid
  • + + +
    + 16~19 + 38~58 +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/PawnKindDefs_PnL/PawnKind_Randombox_PA.xml b/1.6/Core/Defs/PawnKindDefs_PnL/PawnKind_Randombox_PA.xml new file mode 100644 index 0000000..3d4994c --- /dev/null +++ b/1.6/Core/Defs/PawnKindDefs_PnL/PawnKind_Randombox_PA.xml @@ -0,0 +1,230 @@ + + + + + Paniel_Soldier_Normal_PA + + +
  • + +
  • Paniel_Story_Normal
  • +
  • Paniel_Story_MilitiaA_PA
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Soldier_Good_PA + + +
  • + +
  • Paniel_Story_Good
  • +
  • Paniel_Story_MilitiaB_PA
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Soldier_Excellent_PA + + +
  • + +
  • Paniel_Story_Excellent
  • +
  • Paniel_Story_SoldierA_PA
  • + + +
    + 14~17 + 38~58 +
    + + + Paniel_Soldier_Masterwork_PA + + +
  • + +
  • Paniel_Story_Masterwork
  • +
  • Paniel_Story_SoldierB_PA
  • + + +
    + 15~18 + 38~58 +
    + + + Paniel_Soldier_Legendary_PA + + +
  • + +
  • Paniel_Story_Legendary
  • +
  • Paniel_Story_Royalguard_PA
  • + + +
    + 16~19 + 38~58 +
    + + + + Paniel_Worker_Normal_PA + + +
  • + +
  • Paniel_Story_Normal
  • +
  • Paniel_Story_ApprenticeA_PA
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Worker_Good_PA + + +
  • + +
  • Paniel_Story_Good
  • +
  • Paniel_Story_ApprenticeB_PA
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Worker_Excellent_PA + + +
  • + +
  • Paniel_Story_Excellent
  • +
  • Paniel_Story_journeymanA_PA
  • + + +
    + 14~17 + 38~58 +
    + + + Paniel_Worker_Masterwork_PA + + +
  • + +
  • Paniel_Story_Masterwork
  • +
  • Paniel_Story_journeymanB_PA
  • + + +
    + 15~18 + 38~58 +
    + + + Paniel_Worker_Legendary_PA + + +
  • + +
  • Paniel_Story_Legendary
  • +
  • Paniel_Story_Meister_PA
  • + + +
    + 16~19 + 38~58 +
    + + + + Paniel_Maid_Normal_PA + + +
  • + +
  • Paniel_Story_Normal
  • +
  • Paniel_Story_MaidA_PA
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Maid_Good_PA + + +
  • + +
  • Paniel_Story_Good
  • +
  • Paniel_Story_MaidB_PA
  • + + +
    + 11~14 + 38~58 +
    + + + Paniel_Maid_Excellent_PA + + +
  • + +
  • Paniel_Story_Excellent
  • +
  • Paniel_Story_HousemaidA_PA
  • + + +
    + 14~17 + 38~58 +
    + + + Paniel_Maid_Masterwork_PA + + +
  • + +
  • Paniel_Story_Masterwork
  • +
  • Paniel_Story_HousemaidB_PA
  • + + +
    + 15~18 + 38~58 +
    + + + Paniel_Maid_Legendary_PA + + +
  • + +
  • Paniel_Story_Legendary
  • +
  • Paniel_Story_Ladysmaid_PA
  • + + +
    + 16~19 + 38~58 +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/PawnKindDefs_PnL/PawnKinds_PNPlayer.xml b/1.6/Core/Defs/PawnKindDefs_PnL/PawnKinds_PNPlayer.xml new file mode 100644 index 0000000..5b693f4 --- /dev/null +++ b/1.6/Core/Defs/PawnKindDefs_PnL/PawnKinds_PNPlayer.xml @@ -0,0 +1,90 @@ + + + + Paniel_Race + 30 + false + true + true + +
  • PN_ApparelBasic
  • +
    + + 130 + 130 + + +
  • PN_Apparel
  • +
    + Paniel_PlayerFaction + 0 + 20 + 23 + 10~13 + 38~58 + 0 + false +
    + + + + PN_ColonistPawn + + 0 + true + +
  • PN_ApparelBasicHat
  • +
  • PN_ApparelCape
  • +
    + + 330 + 2000 + + +
  • PN_Apparel
  • +
    + +
  • + +
  • Paniel_Story_Start
  • + + +
    + 0 + 0 + 0 + + +
    + + + + PN_Testsubject + + 0 + true + +
  • PN_ApparelBasicHat
  • +
  • PN_ApparelCape
  • +
    + + 330 + 2000 + + +
  • PN_Apparel
  • +
    + +
  • + +
  • Paniel_Story_Testsubject
  • + + +
    + 0 + 0 + 0 + + +
    +
    diff --git a/1.6/Core/Defs/RecipeDefs/Recipes_Drugs.xml b/1.6/Core/Defs/RecipeDefs/Recipes_Drugs.xml new file mode 100644 index 0000000..591cc1e --- /dev/null +++ b/1.6/Core/Defs/RecipeDefs/Recipes_Drugs.xml @@ -0,0 +1,79 @@ + + + + + PN_Make_AutomatonFuel + + Make Automaton fuel. + make Automaton fuel. + Cremate + 1200 + GeneralLaborSpeed + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • PsychoidLeaves
  • + + + 8 + +
  • + + +
  • Chemfuel
  • + + + 4 + +
    + + + + + 4 + + PNRP_Production +
    + + + PN_Make_AutomatonFuel_bulk + + Make Automaton fuel. + make Automaton fuel. + Cremate + 4800 + GeneralLaborSpeed + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • PsychoidLeaves
  • + + + 32 + +
  • + + +
  • Chemfuel
  • + + + 16 + +
    + + + + + 16 + + PNRP_Production +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/RecipeDefs/Recipes_Production.xml b/1.6/Core/Defs/RecipeDefs/Recipes_Production.xml new file mode 100644 index 0000000..bdbb916 --- /dev/null +++ b/1.6/Core/Defs/RecipeDefs/Recipes_Production.xml @@ -0,0 +1,184 @@ + + + + + PN_upgrade_SelfRepairKit + + upgrade automaton repair kit + Upgrading automaton repair kit. + GeneralLaborSpeed + Cook + Recipe_Machining + 800 + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • PN_RepairKit
  • + + + 1 + +
  • + + +
  • MechSerumHealer
  • + + + 1 + +
    + + +
  • PN_RepairKit
  • +
  • MechSerumHealer
  • +
    +
    + + 1 + + + 8 + + Crafting + PNRP_SelfRepairKit +
    + + + + PN_Make_Leather_Automaton + + make automaton skin x10 + Making automaton skin. + GeneralLaborSpeed + Cook + Recipe_Machining + 2000 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • Leathers
  • + + +
  • Leather_Automaton
  • +
    + + 10 + +
  • + + +
  • Chemfuel
  • + + + 5 + +
    + + +
  • Leathers
  • +
    + +
  • Leather_Automaton
  • +
    +
    + + 10 + + + 4 + + Crafting + PNRP_Production +
    + + + + + PN_Disassemble_AutomatonPackage + + disassemble automaton package + disassembling package. + GeneralLaborSpeed + Cook + Recipe_Machining + 8000 + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • PN_PackagedCatagory
  • + + + 1 + +
    + + +
  • PN_PackagedCatagory
  • +
    + +
    + + +
  • Packaged_NormalAutomaton
  • +
    +
    + + 75 + 4 + 25 + + + 6 + + Crafting + +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/RecipeDefs/Recipes_Randombox.xml b/1.6/Core/Defs/RecipeDefs/Recipes_Randombox.xml new file mode 100644 index 0000000..774a0c6 --- /dev/null +++ b/1.6/Core/Defs/RecipeDefs/Recipes_Randombox.xml @@ -0,0 +1,325 @@ + + + + PN_Make_Automaton + + make automaton + Making automaton. + GeneralLaborSpeed + Cook + Recipe_Machining + 48000 + UnfinishedAutomaton + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • PN_BrainCoreCatagory
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 8 + +
  • + + +
  • Steel
  • + + + 150 + +
  • + + +
  • Leather_Automaton
  • + + + 50 + +
  • + + +
  • Chemfuel
  • + + + 20 + +
    + + +
  • PN_BrainCoreCatagory
  • +
    +
    + + 1 + + + 1 + + Crafting + + + + + 150 + 8 + 32 + 200 + 800 + 6 + 16 + + + Steel + 8 + 0 + false + +
  • + + +
  • PN_BrainCoreCatagory
  • + + + 1 + +
  • + + +
  • Leather_Automaton
  • + + + 50 + +
  • + + +
  • Chemfuel
  • + + + 20 + +
    +
    +
    + + + PN_Make_AutomatonSoldier + + make packaged automaton (Soldier) + Making automaton. + GeneralLaborSpeed + Cook + Recipe_Machining + 48000 + UnfinishedAutomaton + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • PN_BrainCoreCatagory
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 8 + +
  • + + +
  • Steel
  • + + + 150 + +
  • + + +
  • Leather_Automaton
  • + + + 50 + +
  • + + +
  • Chemfuel
  • + + + 20 + +
    + + +
  • PN_BrainCoreCatagory
  • +
    +
    + + 1 + + + 8 + + Crafting + +
    + + + PN_Make_AutomatonEngineer + + make packaged automaton (Engineer) + Making automaton. + GeneralLaborSpeed + Cook + Recipe_Machining + 48000 + UnfinishedAutomaton + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • PN_BrainCoreCatagory
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 8 + +
  • + + +
  • Steel
  • + + + 150 + +
  • + + +
  • Leather_Automaton
  • + + + 50 + +
  • + + +
  • Chemfuel
  • + + + 20 + +
    + + +
  • PN_BrainCoreCatagory
  • +
    +
    + + 1 + + + 8 + + Crafting + +
    + + + PN_Make_AutomatonDomestic + + make packaged automaton (Domestic) + Making automaton. + GeneralLaborSpeed + Cook + Recipe_Machining + 48000 + UnfinishedAutomaton + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • PN_BrainCoreCatagory
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 8 + +
  • + + +
  • Steel
  • + + + 150 + +
  • + + +
  • Leather_Automaton
  • + + + 50 + +
  • + + +
  • Chemfuel
  • + + + 20 + +
    + + +
  • PN_BrainCoreCatagory
  • +
    +
    + + 1 + + + 8 + + Crafting + +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/RecipeDefs/Recipes_Surgery.xml b/1.6/Core/Defs/RecipeDefs/Recipes_Surgery.xml new file mode 100644 index 0000000..b7ff8df --- /dev/null +++ b/1.6/Core/Defs/RecipeDefs/Recipes_Surgery.xml @@ -0,0 +1,141 @@ + + + + Repair + Interact_Repair + MedicalOperationSpeed + Medicine + 16 + +
  • + + +
  • PN_RepairKit
  • + + + 1 + + +
    + +
    + + + PN_Disassemble + + Disassembling. + AutomataRace.Recipe_Disassemble + Disasembling. + Interact_Repair + Repair + 2000 + true + true + false + 5 + + + + + PN_Repair + + Reparing. + AutomataRace.Recipe_Repair + Reparing. + Interact_Repair + Repair + 2000 + true + false + false + 1.0 + +
  • + + +
  • PN_RepairKit
  • + + + 2 + +
    +
    + + + PN_Maintenance + + Maintenance. + AutomataRace.Recipe_Maintenance + Maintenance. + Interact_Repair + Repair + 2000 + true + false + false + 1.0 + + + + Recipe_PN_RemoveBrain_Inject + +
  • +
  • +
  • + true + Paniel_Race +
  • +
    + +
  • PN_ExtractBrain
  • +
    +
    + + + PN_ExtractBrain + + extract central nervous. + AutomataRace.Recipe_RemoveBrain + Remove central nervous. + 2000 + true + 1.0 + Adult + PNRP_Brain + PN_Brain + +
  • + + +
  • Medicine
  • + + + 1 + +
  • + + +
  • PN_BrainEmpty
  • + + + 1 + +
    + + +
  • Medicine
  • +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ReserchDefs/Reserch_ProjectDefs.xml b/1.6/Core/Defs/ReserchDefs/Reserch_ProjectDefs.xml new file mode 100644 index 0000000..c2c71f5 --- /dev/null +++ b/1.6/Core/Defs/ReserchDefs/Reserch_ProjectDefs.xml @@ -0,0 +1,351 @@ + + + + PanielStart + + + + PN_technology + + + + + + + PNRP_Production + + Research how to craft an automaton. + PN_technology + 1000 + Industrial + +
  • BiofuelRefining
  • +
  • NutrientPaste
  • +
  • PsychiteRefining
  • +
  • Machining
  • +
    + 0 + 0 + +
  • PanielStart
  • +
    +
    + + + PNRP_Brain + + Researching methods of extracting the central nervous system to make automata. + PN_technology + 2000 + Industrial + HiTechResearchBench + +
  • PNRP_Production
  • +
  • Prosthetics
  • +
  • MicroelectronicsBasics
  • +
    + 2.0 + 0 + + + +
    + + + PNRP_ExperimentalModule + + Research how to make custom core implants. This implant makes the automaton learn like a human, but makes it mentally unstable.\n\nWarning: This implant is not a PnL licensed implant. When installed, the performance of the Automaton will decrease. + PN_technology + 1500 + Industrial + HiTechResearchBench + +
  • PNRP_Brain
  • +
    + 3.0 + 0.7 +
    + + + PNRP_BrainCasing + + Researching methods of long-term storage of the central nervous system. + PN_technology + 2000 + Spacer + HiTechResearchBench + +
  • MultiAnalyzer
  • +
    + +
  • PNRP_Brain
  • +
  • Bionics
  • +
  • BrainWiring
  • +
    + 4.0 + 0 +
    + + + + + PNRP_TierB_Parts + + Research how to craft basic Paniel parts. + PN_technology + 1000 + Industrial + HiTechResearchBench + +
  • PNRP_Production
  • +
  • MicroelectronicsBasics
  • +
    + 2.0 + 1.4 +
    + + + PNRP_TierC_Parts + + Research how to craft special Paniel parts. + PN_technology + 1000 + Industrial + HiTechResearchBench + +
  • PNRP_TierB_Parts
  • +
    + 3.0 + 1.4 +
    + + + + + PNRP_SelfRepairKit + + Research how to combine healer mech serum with repair kits. + PN_technology + 500 + Industrial + HiTechResearchBench + +
  • PNRP_Production
  • +
  • MicroelectronicsBasics
  • +
    + 2.0 + 1.4 +
    + + + PNRP_ResurrectModule + + Research how to embed the resurrector mech serum into the Automaton. + PN_technology + 500 + Industrial + HiTechResearchBench + +
  • PNRP_Production
  • +
  • MicroelectronicsBasics
  • +
    + 2.0 + 0.7 +
    + + + + + PNRP_TierA_Apparel + + Research how to craft a militia uniform. + PN_technology + 500 + Industrial + +
  • PNRP_Production
  • +
  • FlakArmor
  • +
    + 1.0 + 2.1 +
    + + + PNRP_TierB_Apparel + + Research how to make specialized uniforms. + PN_technology + 2000 + Industrial + HiTechResearchBench + +
  • PNRP_TierA_Apparel
  • +
  • MicroelectronicsBasics
  • +
  • Devilstrand
  • +
    + 2.0 + 2.1 +
    + + + PNRP_TierC_Apparel + + Research how to craft royal uniforms. + PN_technology + 6500 + Spacer + HiTechResearchBench + +
  • MultiAnalyzer
  • +
    + +
  • PNRP_TierB_Apparel
  • +
  • PoweredArmor
  • +
    + 4.0 + 2.1 +
    + + + + + PNRP_AutomatonWeapons + + Research how to craft basic PnL weapons. + PN_technology + 500 + Industrial + +
  • PNRP_Production
  • +
  • Gunsmithing
  • +
    + 1.0 + 3.5 +
    + + + PNRP_MachineGun + + Research how to craft basic PnL machine gun. + PN_technology + 500 + Industrial + HiTechResearchBench + +
  • PNRP_AutomatonWeapons
  • +
  • MultibarrelWeapons
  • +
    + 2.0 + 4.2 +
    + + + PNRP_Cannon + + Research how to craft basic PnL portable cannon. + PN_technology + 500 + Industrial + HiTechResearchBench + +
  • PNRP_AutomatonWeapons
  • +
  • Mortars
  • +
  • PrecisionRifling
  • +
    + 2.0 + 4.9 +
    + + + PNRP_AutoArtillery + + Research how to craft basic PnL Howitzer. + PN_technology + 1500 + Industrial + HiTechResearchBench + +
  • PNRP_Cannon
  • +
  • HeavyTurrets
  • +
    + 3.0 + 4.9 +
    + + + PNRP_RoyalWeapons + + Research how to craft Royal PnL weapons.\n\n[caution] : Royal weapons are exclusively for Paniel. + PN_technology + 500 + Spacer + HiTechResearchBench + +
  • MultiAnalyzer
  • +
    + +
  • ChargedShot
  • +
  • PNRP_AutomatonWeapons
  • +
  • PNRP_MachineGun
  • +
  • PNRP_Cannon
  • +
    + 4.0 + 3.5 +
    + + + PNRP_Railgun + + Research how to craft basic PnL Railgun. + PN_technology + 2000 + Spacer + HiTechResearchBench + +
  • MultiAnalyzer
  • +
    + +
  • SniperTurret
  • +
  • PNRP_AutoArtillery
  • +
  • PNRP_RoyalWeapons
  • +
    + 5.0 + 4.9 +
    + + + + PNRP_TierB_Module + + Research the ability modules available for (lged), (mast), (exc) model. + PN_technology + 1000 + Industrial + HiTechResearchBench + +
  • PNRP_TierB_Apparel
  • +
    + 3.0 + 2.8 +
    + + + PNRP_TierC_Module + + Research the ability modules available for (lged) model. (need Ideology or Biotech DLC) + PN_technology + 3250 + Spacer + HiTechResearchBench + +
  • MultiAnalyzer
  • +
    + +
  • PNRP_TierC_Apparel
  • +
  • PNRP_TierB_Module
  • +
    + 5.0 + 2.8 +
    + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/Scenarios/Scenarios.xml b/1.6/Core/Defs/Scenarios/Scenarios.xml new file mode 100644 index 0000000..148b57c --- /dev/null +++ b/1.6/Core/Defs/Scenarios/Scenarios.xml @@ -0,0 +1,98 @@ + + + + Paniel_Scenarios + + PnL Industry has launched their newest product with superior intelligence capability. They scheduled initial testing program to measure its survivability under extreme(or harsh) conditions such as Rim World.\n\nParticipating test subject can perform researches and acquire skills identical to typical human beings. However, under harsh circumstances, these test subjects seem to be "mentally unstable."\n\nTip : Boomabear produces chemfuel. + + PnL Industry wants to test a new type of automaton. + + PlayerFaction + Paniel_PlayerFaction + + + + +
  • + ConfigPage_ConfigureStartingPawns + 1 + 1 +
  • + + + +
  • + PlayerPawnsArriveMethod + false + DropPods +
  • + + +
  • + StartingResearch + PNRP_Production +
  • + + +
  • + GameStartDialog + +to. Experiment Manager + +Hello Manager. Thank you for participating in the test program. +Experimental automaton is a model that can study and acquire skills like humans. However, there have been a number of reports of mental instability. + +Only one test subject is provided. It cannot be resupplied in case of loss or destroy. + +As a spare, we provided one year's worth of fuel and three brain cores. It is up to the manager to decide how to use it. + +Please take part in the experiment diligently. + +from. PnL Industry Research Department. + GameStartSting +
  • + + +
  • + StartingThing_Defined + PN_BrainCasing + 3 +
  • + +
  • + StartingThing_Defined + PN_AutomatonFuel + 60 +
  • + +
  • + StartingThing_Defined + PN_SelfRepairKit + 5 +
  • + +
  • + StartingThing_Defined + PN_Shovel + Steel +
  • + + +
  • + DisableIncident + WandererJoin +
  • + +
  • + DisableIncident + StrangerInBlackJoin +
  • + +
  • + DisableIncident + WandererJoinAbasia +
  • +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/SoundDefs/Sounds.xml b/1.6/Core/Defs/SoundDefs/Sounds.xml new file mode 100644 index 0000000..8f69416 --- /dev/null +++ b/1.6/Core/Defs/SoundDefs/Sounds.xml @@ -0,0 +1,163 @@ + + + + + + PNRifleSound + + MapOnly + 1 + +
  • + +
  • + Things/PNRifleSound +
  • + + + 0.9152174 + 1.042391 + + +
    +
    + + + + PNRoyalMachinegunSound + + MapOnly + 1 + +
  • + +
  • + Things/PNRoyalMachinegunSound +
  • + + + 0.9152174 + 1.042391 + + +
    +
    + + + + PNCannonSound + + MapOnly + 1 + +
  • + +
  • + Things/PNCannonSound +
  • + + + 0.9152174 + 1.042391 + + +
    +
    + + + + PNRoyalRifleSound + + MapOnly + 1 + +
  • + +
  • + Things/PNRoyalRifleSound +
  • + + + 0.9152174 + 1.042391 + + +
    +
    + + + + PNRoyalHCSound + + MapOnly + 1 + +
  • + +
  • + Things/PNRoyalHCSound +
  • + + + 0.9152174 + 1.042391 + + +
    +
    + + + + PNChainswordSound + + MapOnly + 1 + +
  • + +
  • + Things/PNChainsword +
  • + + + 0.9152174 + 1.042391 + + +
    +
    + + + + PN_PrototypeRailGun_Warmup_Sound + true + MapOnly + 2 + PrioritizeNearest + +
  • + +
  • + Things/PNPrototypeRailGun_warmup +
  • + + +
    +
    + + + PN_PrototypeRailGun_Fire_Sound + + MapOnly + 1 + +
  • + +
  • + Things/PNPrototypeRailGun_fire +
  • + + +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Arm.xml b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Arm.xml new file mode 100644 index 0000000..67ea496 --- /dev/null +++ b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Arm.xml @@ -0,0 +1,12 @@ + + + + 2 + + 1 + + + + + + \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Base.xml b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Base.xml new file mode 100644 index 0000000..13eb339 --- /dev/null +++ b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Base.xml @@ -0,0 +1,76 @@ + + + + + PN_PartCatagory + + PN_AutomatonCatagory + UI/Icons/PNCT_PnL + + + + ThingWithComps + Item + MapMeshOnly + Middle + true + true + Item + Never + 2 + + 50 + 0.7 + -4 + 2.0 + + +
  • PN_PanielParts
  • +
    + +
  • + + true + true + false + 14 + + + + + (0.6, 0.6, 1.0) + false + true + true + + + + \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Body.xml b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Body.xml new file mode 100644 index 0000000..80edb6d --- /dev/null +++ b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Body.xml @@ -0,0 +1,12 @@ + + + + 2 + + 1 + + + + + + \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Head.xml b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Head.xml new file mode 100644 index 0000000..55a10f2 --- /dev/null +++ b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Head.xml @@ -0,0 +1,12 @@ + + + + 2 + + 1 + + + + + + \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Leg.xml b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Leg.xml new file mode 100644 index 0000000..5010eec --- /dev/null +++ b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Leg.xml @@ -0,0 +1,12 @@ + + + + 2 + + 1 + + + + + + \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Shell.xml b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Shell.xml new file mode 100644 index 0000000..61d8722 --- /dev/null +++ b/1.6/Core/Defs/ThingDef_PanielPart/ThingDef_Part_Shell.xml @@ -0,0 +1,12 @@ + + + + 2 + + 1 + + + + + + \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Apparel_TierA.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Apparel_TierA.xml new file mode 100644 index 0000000..2be56a0 --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Apparel_TierA.xml @@ -0,0 +1,406 @@ + + + + PNApparel + + Apparel + + + + PNHeadgear + + PNApparel + + + + + +
  • PN_Apparel
  • + + +
  • PNApparel
  • +
    + false + + +
  • PNApparel
  • +
    + + false + + + + +
    + + + +
  • PNHeadgear
  • +
    + + + +
    + + + + PN_ApparelBasic + + + +
  • PN_AutomatonBench
  • +
    +
    + This is a basic paniel costume. It consists of a shirt and boots. + + Things/Apparel/PNBasic1 + Graphic_Single + CutoutComplex + + Industrial + 80 + +
  • Fabric
  • +
  • Leathery
  • +
    + + 200 + 2800 + 0.75 + 0.2 + 0.42 + 0.18 + 2 + + + +
  • Torso
  • +
  • Neck
  • +
  • Shoulders
  • +
  • Arms
  • +
  • Legs
  • +
    + Things/Apparel/PNBasic + true + +
  • OnSkin
  • +
  • Middle
  • +
    + +
  • Paniel_Basic
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_ApparelBasicHat + + + +
  • PN_AutomatonBench
  • +
    +
    + This is a basic paniel hat. + + Things/Apparel/hats/PNbasichat1 + Graphic_Single + CutoutComplex + + Industrial + 25 + +
  • Fabric
  • +
  • Leathery
  • +
    + + 80 + 1800 + 0.14 + 0.2 + 0.60 + 0.50 + 0.8 + + + + + + +
  • UpperHead
  • +
    + Things/Apparel/hats/PNbasichat + true + +
  • Overhead
  • +
    + +
  • Paniel_Basic
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + + PN_ApparelCape + This is a basic paniel cape. It has excellent performance in heat dissipation and insulation. + + + ComplexClothing + +
  • PN_AutomatonBench
  • +
    +
    + + Things/Apparel/PNCape1 + Graphic_Single + CutoutComplex + + Industrial + 80 + +
  • Fabric
  • +
  • Leathery
  • +
    + +
  • PNApparel
  • +
    + + 200 + 10000 + 2 + 0.3 + 2.00 + 0.85 + 3 + + + +
  • Torso
  • +
  • Neck
  • +
  • Shoulders
  • +
  • Arms
  • +
    + Things/Apparel/PNCape + true + +
  • Shell
  • +
    + +
  • Paniel_Basic
  • +
  • Paniel_Militia
  • +
  • Paniel_Engineer
  • +
  • Paniel_Housekeeper
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + + PN_ApparelMilitia + + A uniform worn by the militia on automata.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give it a decent defense. + + Things/Apparel/PNMilitia1 + Graphic_Single + CutoutComplex + 1 + + +
  • Metallic
  • +
    + 60 + + 2 + 80 + + + +
  • PN_AutomatonBench
  • +
    + + 5 + + PNRP_TierA_Apparel +
    + + 200 + 21000 + 3 + 0.4 + 0.68 + 8.4 + 4.3 + 3 + + + -0.10 + + + +
  • Torso
  • +
  • Neck
  • +
  • Shoulders
  • +
  • Arms
  • +
  • Legs
  • +
    + Things/Apparel/PNMilitia + true + +
  • OnSkin
  • +
  • Middle
  • +
    + +
  • Paniel_Militia
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_ApparelMilitiaHat + + A goggles worn by the militia on automata.\n\nThe built-in parts work with the automaton to give it a decent defense. + + Things/Apparel/hats/PNMilitiahat1 + Graphic_Single + CutoutComplex + + +
  • Metallic
  • +
    + 40 + + 2 + 10 + + + +
  • PN_AutomatonBench
  • +
    + + 5 + + PNRP_TierA_Apparel +
    + + 8000 + 120 + 1.2 + 0.68 + 12 + 12 + 1.5 + + + -0.05 + + + +
  • UpperHead
  • +
  • Eyes
  • +
    + Things/Apparel/hats/PNMilitiahat + true + +
  • Overhead
  • +
    + +
  • Paniel_Militia
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Apparel_TierB.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Apparel_TierB.xml new file mode 100644 index 0000000..c6347c1 --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Apparel_TierB.xml @@ -0,0 +1,645 @@ + + + + + + PN_ApparelSoldier + + This is the uniform worn by the military on automata.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nBuilt-in parts work in conjunction with the automaton to provide good defense. But it doesn't help in situations other than combat. + + Things/Apparel/PNSoldier1 + Graphic_Single + CutoutComplex + 1 + + +
  • Metallic
  • +
    + 100 + + 4 + 50 + + + +
  • PN_AutomatonBench
  • +
    + + 7 + + PNRP_TierB_Apparel +
    + + 60000 + 340 + 12 + 0.6 + 0.81 + 32 + 9 + 10 + + + -0.15 + 1 + -0.60 + + + +
  • Torso
  • +
  • Neck
  • +
  • Shoulders
  • +
  • Arms
  • +
  • Legs
  • +
    + Things/Apparel/PNSoldier + true + +
  • OnSkin
  • +
  • Middle
  • +
  • Shell
  • +
    + +
  • Paniel_Soldier
  • +
  • Royal
  • +
  • RoyalTier2
  • +
  • RoyalTier3
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_ApparelSoldierHat + + This is the hat worn by the military on automata.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nBuilt-in parts work in conjunction with the automaton to provide good defense. But it doesn't help in situations other than combat. + + Things/Apparel/hats/PNSoldierhat1 + Graphic_Single + CutoutComplex + + +
  • Metallic
  • +
    + 40 + + 2 + 20 + + + +
  • PN_AutomatonBench
  • +
    + + 7 + + PNRP_TierB_Apparel +
    + + 150 + 21000 + 1.5 + 0.6 + 0.81 + 4 + 2 + 3 + + + -0.10 + -0.10 + 1 + 1 + + + +
  • FullHead
  • +
    + Things/Apparel/hats/PNSoldierhat + true + +
  • Overhead
  • +
    + +
  • Paniel_Soldier
  • +
  • Royal
  • +
  • RoyalTier2
  • +
  • RoyalTier3
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + + PN_ApparelWorker + + This is the uniform worn by the Automaton at the factory.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give you adequate defense. It also has a function to assist the user's work. + + Things/Apparel/PNWorker1 + Graphic_Single + CutoutComplex + 1 + + +
  • Metallic
  • +
    + 80 + + 3 + 40 + + + +
  • PN_AutomatonBench
  • +
    + + 6 + + PNRP_TierB_Apparel +
    + + 45000 + 280 + 9 + 0.6 + 0.69 + 32 + 9 + 7 + + + 0.10 + 0.10 + 0.10 + 0.10 + + + +
  • Torso
  • +
  • Neck
  • +
  • Shoulders
  • +
  • Arms
  • +
  • Legs
  • +
    + Things/Apparel/PNWorker + true + +
  • OnSkin
  • +
  • Middle
  • +
    + +
  • Paniel_Engineer
  • +
  • Royal
  • +
  • RoyalTier2
  • +
  • RoyalTier3
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_ApparelWorkerHat + + This is the hat worn by the Automaton at the factory.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give you adequate defense. It also has a function to assist the user's work. + + Things/Apparel/hats/PNWorkerhat1 + Graphic_Single + CutoutComplex + + +
  • Metallic
  • +
    + 30 + + 1 + 15 + + + +
  • PN_AutomatonBench
  • +
    + + 6 + + PNRP_TierB_Apparel +
    + + 15750 + 120 + 1 + 0.6 + 0.69 + 4 + 2 + 1 + + + 0.05 + 0.05 + 0.05 + 0.05 + + + +
  • FullHead
  • +
    + Things/Apparel/hats/PNWorkerhat + true + +
  • Overhead
  • +
    + +
  • Paniel_Engineer
  • +
  • Royal
  • +
  • RoyalTier2
  • +
  • RoyalTier3
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + + PN_ApparelMaid + + This is the uniform worn by the automaton in the noble mansion.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give you adequate defense. It also has a function that assists users in their work. + + Things/Apparel/PNHousekeeper1 + Graphic_Single + CutoutComplex + 1 + + +
  • Metallic
  • +
    + 80 + + 3 + 40 + + + +
  • PN_AutomatonBench
  • +
    + + 6 + + PNRP_TierB_Apparel +
    + + 45000 + 280 + 9 + 0.6 + 0.69 + 32 + 9 + 7 + + + 0.10 + 0.10 + 0.15 + 0.10 + 0.10 + 0.10 + + + +
  • Torso
  • +
  • Neck
  • +
  • Shoulders
  • +
  • Arms
  • +
  • Legs
  • +
    + Things/Apparel/PNHousekeeper + true + +
  • OnSkin
  • +
  • Middle
  • +
    + +
  • Paniel_Housekeeper
  • +
  • Royal
  • +
  • RoyalTier2
  • +
  • RoyalTier3
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_ApparelMaidHat + + This is the hat worn by the automaton in the noble mansion.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give you adequate defense. It also has a function that assists users in their work. + + Things/Apparel/hats/PNHousekeeperhat1 + Graphic_Single + CutoutComplex + + +
  • Metallic
  • +
    + 30 + + 1 + 15 + + + +
  • PN_AutomatonBench
  • +
    + + 6 + + PNRP_TierB_Apparel +
    + + 15750 + 120 + 1 + 0.6 + 0.69 + 4 + 2 + 1 + + + 0.05 + 0.05 + 0.10 + 0.05 + 0.05 + 0.05 + + + +
  • FullHead
  • +
    + Things/Apparel/hats/PNHousekeeperhat + true + +
  • Overhead
  • +
    + +
  • Paniel_Housekeeper
  • +
  • Royal
  • +
  • RoyalTier2
  • +
  • RoyalTier3
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + + + PN_EliteSecurityUniform + + This is the uniform worn by the PnL security on automata.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nBuilt-in parts work in conjunction with the automaton to provide good defense. + + Things/Apparel/PNEliteSecurity1 + Graphic_Single + CutoutComplex + 1 + + + 3 + 80 + 10 + + + + + + 45000 + 280 + 9 + 0.4 + 0.92 + 0.4 + 0.46 + 32 + 9 + 11 + + + 1 + -0.20 + + + +
  • Torso
  • +
  • Neck
  • +
  • Shoulders
  • +
  • Arms
  • +
  • Legs
  • +
    + Things/Apparel/PNEliteSecurity + true + +
  • OnSkin
  • +
  • Middle
  • +
  • Shell
  • +
    + +
  • Paniel_EliteSecurity
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_EliteSecurityHat + + This is the hat worn by the PnL security on automata.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nBuilt-in parts work in conjunction with the automaton to provide good defense. + + Things/Apparel/hats/PNEliteSecurityhat1 + Graphic_Single + CutoutComplex + + + 1 + 30 + + + + + + 15750 + 120 + 1 + 0.4 + 0.92 + 0.4 + 0.46 + 4 + 2 + 2 + + + -0.10 + 1 + 1 + + + +
  • FullHead
  • +
    + Things/Apparel/hats/PNEliteSecurityhat + true + +
  • Overhead
  • +
    + +
  • Paniel_EliteSecurity
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Apparel_TierC.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Apparel_TierC.xml new file mode 100644 index 0000000..4189d87 --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Apparel_TierC.xml @@ -0,0 +1,692 @@ + + + + + + PNRoyalApparel + + PNApparel + + + + PNRoyalHeadgear + + PNHeadgear + + + + + +
  • PN_RoyalApparel
  • +
  • Royal
  • +
  • RoyalTier2
  • +
  • RoyalTier3
  • +
  • RoyalTier4
  • +
  • RoyalTier5
  • +
  • RoyalTier6
  • +
  • RoyalTier7
  • +
    + false +
    + +
  • PNRoyalApparel
  • +
    +
    + + + +
  • PNRoyalHeadgear
  • +
    + + + +
    + + + + PN_ApparelRoyalguard + + A uniform worn by the royal guards on Automaton.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nBuilt-in parts work with the automaton to provide excellent defense. But it doesn't help in situations other than combat. + + Things/Apparel/PNRoyalguard1 + Graphic_Single + CutoutComplex + 1 + + +
  • Metallic
  • +
    + 150 + + 6 + 2 + 50 + + + +
  • PN_AutomatonBench
  • +
    + + 8 + + PNRP_TierC_Apparel +
    + + 75000 + 400 + 15 + 0.4 + 0.93 + 36 + 12 + 13 + + + -0.35 + 3 + -0.1 + -0.60 + + + +
  • Torso
  • +
  • Neck
  • +
  • Shoulders
  • +
  • Arms
  • +
  • Legs
  • +
    + Things/Apparel/PNRoyalguard + true + +
  • OnSkin
  • +
  • Middle
  • +
  • Shell
  • +
    + +
  • Paniel_Royalguard
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_ApparelRoyalguardHat + + A hat worn by the royal guards on Automaton.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nBuilt-in parts work with the automaton to provide excellent defense. But it doesn't help in situations other than combat. + + Things/Apparel/hats/PNRoyalguardhat1 + Graphic_Single + CutoutComplex + + +
  • Metallic
  • +
    + 50 + + 2 + 1 + 25 + + + +
  • PN_AutomatonBench
  • +
    + + 8 + + PNRP_TierC_Apparel +
    + + 26250 + 180 + 2 + 0.4 + 0.93 + 4 + 2 + 4 + + + -0.15 + -0.15 + 3 + 3 + + + +
  • FullHead
  • +
    + Things/Apparel/hats/PNRoyalguardhat + true + +
  • Overhead
  • +
    + +
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + + PN_ApparelRoyalmeister + + This is the uniform worn by the automaton in the royal Workshop.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give you excellent defense. It also has a function that assists users in their work. + + Things/Apparel/PNRoyalmeister1 + Graphic_Single + CutoutComplex + 1 + + +
  • Metallic
  • +
    + 100 + + 4 + 2 + 30 + + + +
  • PN_AutomatonBench
  • +
    + + 8 + + PNRP_TierC_Apparel +
    + + 75000 + 400 + 15 + 0.4 + 0.81 + 36 + 12 + 10 + + + 0.20 + 0.20 + 0.20 + 0.20 + -0.20 + + + +
  • Torso
  • +
  • Neck
  • +
  • Shoulders
  • +
  • Arms
  • +
  • Legs
  • +
    + Things/Apparel/PNRoyalmeister + true + +
  • OnSkin
  • +
  • Middle
  • +
  • Shell
  • +
    + +
  • Paniel_Meister
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_ApparelRoyalmeisterHat + + This is the hat worn by the automaton in the royal Workshop.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give you excellent defense. It also has a function that assists users in their work. + + Things/Apparel/hats/PNRoyalmeisterhat1 + Graphic_Single + CutoutComplex + + +
  • Metallic
  • +
    + 40 + + 2 + 1 + 10 + + + +
  • PN_AutomatonBench
  • +
    + + 8 + + PNRP_TierC_Apparel +
    + + 26250 + 180 + 2 + 0.4 + 0.81 + 4 + 2 + 3 + + + 0.10 + 0.10 + 0.10 + 0.10 + + + +
  • FullHead
  • +
    + Things/Apparel/hats/PNRoyalmeisterhat + true + +
  • Overhead
  • +
    + +
  • Paniel_Meister
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_ApparelRoyalmeisterHatWithMonocle + + This is the hat with monocle worn by the automaton in the royal Workshop.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give you excellent defense. It also has a function that assists users in their work. + + Things/Apparel/hats/PNRoyalmeisterhatwm1 + Graphic_Single + CutoutComplex + + +
  • Metallic
  • +
    + 40 + + 2 + 1 + 10 + + + +
  • PN_AutomatonBench
  • +
    + + 8 + + PNRP_TierC_Apparel +
    + + 26250 + 180 + 2 + 0.4 + 0.81 + 4 + 2 + 3 + + + 0.10 + 0.10 + 0.10 + 0.10 + + + +
  • FullHead
  • +
    + Things/Apparel/hats/PNRoyalmeisterhatwm + true + +
  • Overhead
  • +
    + +
  • Paniel_Meister
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_ApparelRoyalmeisterMonocle + + This is the monocle worn by the automaton in the royal Workshop.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give you excellent defense. It also has a function that assists users in their work. + + Things/Apparel/hats/PNRoyalmeistermonocle1 + Graphic_Single + CutoutComplex + + +
  • Metallic
  • +
    + 40 + + 2 + 1 + 10 + + + +
  • PN_AutomatonBench
  • +
    + + 8 + + PNRP_TierC_Apparel +
    + + 26250 + 180 + 2 + 0.4 + 0.81 + 4 + 2 + 3 + + + 0.10 + 0.10 + 0.10 + 0.10 + + + +
  • FullHead
  • +
    + Things/Apparel/hats/PNRoyalmeistermonocle + true + +
  • Overhead
  • +
    + +
  • Paniel_Meister
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + + PN_ApparelRoyalmaid + + This is the uniform worn by the automaton in the royal palace.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give you excellent defense. It also has a function that assists users in their work. + + Things/Apparel/PNRoyalmaid1 + Graphic_Single + CutoutComplex + 1 + + +
  • Metallic
  • +
    + 100 + + 4 + 2 + 30 + + + +
  • PN_AutomatonBench
  • +
    + + 8 + + PNRP_TierC_Apparel +
    + + 75000 + 400 + 15 + 0.4 + 0.81 + 36 + 12 + 10 + + + 0.10 + 0.20 + 0.20 + 0.30 + 0.20 + 0.20 + 0.20 + -0.20 + + + +
  • Torso
  • +
  • Neck
  • +
  • Shoulders
  • +
  • Arms
  • +
  • Legs
  • +
    + Things/Apparel/PNRoyalmaid + true + +
  • OnSkin
  • +
  • Middle
  • +
  • Shell
  • +
    + +
  • Paniel_Royalmaid
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    + + + PN_ApparelRoyalmaidHat + + This is the hat worn by the automaton in the royal palace.\n\nThis clothing is made with PnL industry's unique technology that combines metal and fabric.\n\nThe built-in parts work with the automaton to give you excellent defense. It also has a function that assists users in their work. + + Things/Apparel/hats/PNRoyalmaidhat1 + Graphic_Single + CutoutComplex + + +
  • Metallic
  • +
    + 40 + + 2 + 1 + 10 + + + +
  • PN_AutomatonBench
  • +
    + + 8 + + PNRP_TierC_Apparel +
    + + 26250 + 180 + 2 + 0.4 + 0.81 + 4 + 2 + 3 + + + 0.05 + 0.10 + 0.10 + 0.15 + 0.10 + 0.10 + 0.10 + + + +
  • FullHead
  • +
    + Things/Apparel/hats/PNRoyalmaidhat + true + +
  • Overhead
  • +
    + +
  • Paniel_Royalmaid
  • +
    + + + +
    + + +
  • + 10 + (255,255,255) +
  • +
  • + 15 + (255,255,255) +
  • +
  • + 20 + (255,255,255) +
  • +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Buildings.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Buildings.xml new file mode 100644 index 0000000..67a4a7f --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Buildings.xml @@ -0,0 +1,77 @@ + + + + + PN_AutomatonBench + + automaton fabrication bench + Building_WorkTable + Building + PassThroughOnly + 50 + + 300 + 5000 + 1.0 + + + + (5,2) + + 200 + 8 + + +
  • + +
  • ToolCabinet
  • + + +
  • + CompPowerTrader + 250 + true +
  • +
  • +
  • + + + + + + Things/Building/PNAutomatonBench + Graphic_Multi + CutoutComplex + (7,4) + + Damage/Corner + Damage/Corner + Damage/Corner + Damage/Corner + + + true + 0.20 + +
  • ITab_Bills
  • + + + BillsTab + + 0.5 + (0,0,-1) + true + Heavy + Production + Item + Misc12 + 6 + +
  • PlaceWorker_ShowFacilitiesConnections
  • +
  • PlaceWorker_PreventInteractionSpotOverlap
  • +
    + + + +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Item.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Item.xml new file mode 100644 index 0000000..3ce64ad --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Item.xml @@ -0,0 +1,464 @@ + + + + PN_AutomatonCatagory + + Manufactured + UI/Icons/PNCT_PnL + + + + + UnfinishedAutomaton + + An unfinished automaton. + + 0.5 + + + Things/Item/UnfinishedAutomaton + Graphic_Single + + + + + + + Leather_Automaton + + leather made for automaton production. looks like human leather. + + (255,240,227) + + + 4.2 + 0.64 + 12 + 12 + + +
  • PN_AutomatonCatagory
  • +
    + + + + Buyable + + (255,240,227) + 0.0025 + +
    + + + + + PN_BrainCoreCatagory + + PN_AutomatonCatagory + Things/Item/PNBrainCore + + + + + PN_BrainEmpty + + A case specially designed to contain the central nervous system. + + Things/Item/PNCentralnervous_empty + Graphic_Single + 1 + + false + +
  • PN_AutomatonCatagory
  • +
    + + 1 + 700 + 0.7 + + 10 + 1 + true + + 1 + 5 + 1 + + + + + Buyable + + GeneralLaborSpeed + Crafting + Smith + Recipe_Smith + UnfinishedComponent + + 6 + + PNRP_Brain + +
  • PN_AutomatonBench
  • +
    +
    + + + +
    + + + PN_Brain + + A biological human central nervous. It doesn't look like it can be stored for long. + + Things/Item/PNCentralnervous + Graphic_Single + 1 + + +
  • PN_BrainCoreCatagory
  • +
    + + 548 + 1 + 0.7 + + false + + + + +
  • + 240000 + RaisedRock_Collapse +
  • +
    + Buyable + Normal +
    + + + PN_BrainCasing + + A brain core used to make automata. + + Things/Item/PNBrainCore + Graphic_Single + 1 + + false + +
  • PN_BrainCoreCatagory
  • +
    + Middle + + 1 + 13000 + 0.7 + + + 1 + 1 + 15 + 2 + + + + + Buyable + + + + + GeneralLaborSpeed + Crafting + Smith + Recipe_Smith + UnfinishedHealthItemBionic + + 8 + + PNRP_BrainCasing + +
  • PN_AutomatonBench
  • +
    +
    +
    + + + PN_BrainCasingAntigrain + + A brain core used to Railgun. + + Things/Item/PNAntigrainCore + Graphic_Single + 1 + + false + +
  • PN_AutomatonCatagory
  • +
    + Middle + + 1 + 13000 + 0.7 + + + 1 + 2 + 2 + 15 + 1 + + + + + Buyable + Normal + +
  • + 14.9 + BombSuper + 0.4 + 0.7 + 0.22 + true + GiantExplosion + Explosion_GiantBomb + 60~120 +
  • +
    + + GeneralLaborSpeed + Crafting + Smith + Recipe_Smith + UnfinishedHealthItemBionic + + 8 + + PNRP_Railgun + +
  • PN_AutomatonBench
  • +
    +
    +
    + + + + PN_Component + + This is a component used in special products of PnL Industry. It's tightly sealed, so reverse engineering looks difficult. + + Things/Item/PNComponent + Graphic_StackCount + + Metal_Drop + Standard_Drop + 50 + 1 + false + + 70 + 800 + 0.6 + 0.6 + 2.0 + + true + +
  • PN_AutomatonCatagory
  • +
    + +
  • PN_RoyalComp
  • +
    + Buyable + + + +
    + + + + PN_OTPCard + + A disposable OTP card used to connect to a secure line in the PnL industry. \n\nIt is used to request a PnL trader ship by contacting PnL logistics from the Comms console. + + Things/Item/PNOTPCard + Graphic_Single + + 10 + false + + 70 + 1500 + 0.1 + 0.6 + 2.0 + + true + +
  • PN_AutomatonCatagory
  • +
    + +
  • PN_OTPCard
  • +
    + Buyable + + + +
    + + + + PNKit + + PN_AutomatonCatagory + UI/Icons/PNCT_PNRepairkit + + + + PN_RepairKit + + A kit containing various materials to repair the automaton. + + Things/Item/PNRepairkit + Graphic_StackCount + 1.0 + + Industrial + 25 + 1 + false + + 60 + 2 + 0.7 + 700 + + +
  • PNKit
  • +
    + + 2 + 30 + 10 + 20 + + + GeneralLaborSpeed + Crafting + +
  • PN_AutomatonBench
  • +
    + PNRP_Production + + 4 + +
    + + + + + + + Buyable +
    + + + + PN_SelfRepairKit + + Repair kit combined with healer mech serum. It can be used alone without an operator, and the user can self-repair. + + Things/Item/PNSelfRepairkit + Graphic_StackCount + 1.0 + + Spacer + 25 + 1 + + 2 + 60 + 0.7 + 1500 + + +
  • PNKit
  • +
    + + 1 + 1 + 15 + 2 + 5 + + + GeneralLaborSpeed + Crafting + +
  • PN_AutomatonBench
  • +
    + PNRP_SelfRepairKit + + 8 + +
    + + + + +
  • + UseItem + Use self repair kit + 600 +
  • +
  • + +
  • Paniel_Race
  • + + false + +
  • + CompUseEffect_DestroySelf +
  • +
    + Buyable +
    + + + PN_AdministerSelfRepairKit + + Administer a self repair kit. + Recipe_AdministerUsableItem + Administering self repair kit. + false + false + 600 + false + true + 99999 + +
  • + + +
  • PN_SelfRepairKit
  • + + + 1 + +
    + + +
  • PN_SelfRepairKit
  • +
    +
    + +
  • Paniel_Race
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Module.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Module.xml new file mode 100644 index 0000000..d6d33c2 --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Module.xml @@ -0,0 +1,573 @@ + + + + PNModule + + -5 + + + + PNApparelModule + + PNApparel + Things/Item/PNModuleIndustrial + + + + + 250 + 4 + 0.4 + 25 + + + UnfinishedHealthItemBionic + GeneralLaborSpeed + Crafting + Smith + Recipe_Machining + +
  • PN_AutomatonBench
  • +
    + false + + 4 + +
    + + false + false + false + true + 0 + +
  • Torso
  • +
    + +
  • PNModule
  • +
    +
    + +
  • PNApparelModule
  • +
    + + +
  • + 10 + (255,255,255) +
  • +
    +
    + true + None + + + +
    + + + + Graphic_Single + Things/Item/PNModuleIndustrial + + Industrial + + 45000 + + + + + + Graphic_Single + Things/Item/PNModuleSpacer + + Spacer + + 60000 + + + + + + + + PN_RapidFireModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nCombat model (legd), (mast), (exc)\n\nThis module allows automaton to use rapid fire ability. + + PN_RapidFireAbility + PN_RapidFireModuleHediff + + + 45 + 5 + 2 + 1 + + + PNRP_TierB_Module + + 6 + + + + + + + + +
  • + PN_RapidFireModuleHediff + PNTorso +
  • +
    +
    + + + PN_RapidFireModuleHediff + + The hediff created by installing rapid fire module. + + PN_RapidFireModule + + +
  • + + -2 + -0.20 + +
  • +
    + +
  • + PN_RapidFireAbility +
  • +
    +
    + + + + PN_CQCModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nCombat model (legd), (mast), (exc)\n\nThis module increases the automaton's close quarters combat stat, and allows automaton to use CQC ability. + + PN_CQCAbility + PN_CQCModuleHediff + + + 45 + 5 + 2 + 1 + + + PNRP_TierB_Module + + 6 + + + + + + + + +
  • + PN_CQCModuleHediff + PNTorso +
  • +
    +
    + + + PN_CQCModuleHediff + + The hediff created by installing close quarters combat module. + + PN_CQCModule + + +
  • + + 3 + 3 + -12 + 0.40 + -0.20 + 0.15 + +
  • +
    + +
  • + PN_CQCAbility +
  • +
    +
    + + + + PN_MiningModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nEngineer model (legd), (mast), (exc)\n\nThis module increases the automaton's miner speed stat. + + PN_MiningModuleHediff + + + 45 + 5 + 2 + 1 + + + PNRP_TierB_Module + + 6 + + + + + + + + +
  • + PN_MiningModuleHediff + PNTorso +
  • +
    +
    + + + PN_MiningModuleHediff + + The hediff created by installing mining module. + + PN_MiningModule + + +
  • + + 1.20 + 1.20 + 0.70 + 0.70 + 0.70 + +
  • +
    + + + +
    + + + + PN_ConstructionModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nEngineer model (legd), (mast), (exc)\n\nThis module increases the automaton's construction speed stat. + + PN_ConstructionModuleHediff + + + 45 + 5 + 2 + 1 + + + PNRP_TierB_Module + + 6 + + + + + + + + +
  • + PN_ConstructionModuleHediff + PNTorso +
  • +
    +
    + + + PN_ConstructionModuleHediff + + The hediff created by installing construction module. + + PN_ConstructionModule + + +
  • + + 0.70 + 0.70 + 0.70 + 1.20 + 0.70 + +
  • +
    + + + +
    + + + + PN_CraftingModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nEngineer model (legd), (mast), (exc)\n\nThis module increases the automaton's general labor speed stat. + + PN_CraftingModuleHediff + + + 45 + 5 + 2 + 1 + + + PNRP_TierB_Module + + 6 + + + + + + + + +
  • + PN_CraftingModuleHediff + PNTorso +
  • +
    +
    + + + PN_CraftingModuleHediff + + The hediff created by installing crafting module. + + PN_CraftingModule + + +
  • + + 0.70 + 0.70 + 1.20 + 0.70 + 1.20 + +
  • +
    + + + +
    + + + + PN_PlantsModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nDomestic model (legd), (mast), (exc)\n\nThis module increases the automaton's plant work speed stat. + + PN_PlantsModuleHediff + + + 45 + 5 + 2 + 1 + + + PNRP_TierB_Module + + 6 + + + + + + + + +
  • + PN_PlantsModuleHediff + PNTorso +
  • +
    +
    + + + PN_PlantsModuleHediff + + The hediff created by installing plants module. + + PN_PlantsModule + + +
  • + + 1.20 + 0.70 + 0.70 + 0.70 + 0.70 + +
  • +
    + + + +
    + + + + PN_CookingModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nDomestic model (legd), (mast), (exc)\n\nThis module increases the automaton's cooking speed stat. + + PN_CookingModuleHediff + + + 45 + 5 + 2 + 1 + + + PNRP_TierB_Module + + 6 + + + + + + + + +
  • + PN_CookingModuleHediff + PNTorso +
  • +
    +
    + + + PN_CookingModuleHediff + + The hediff created by installing cooking module. + + PN_CookingModule + + +
  • + + 0.70 + 0.70 + 0.70 + 1.20 + 1.20 + +
  • +
    + + + +
    + + + + PN_NursingModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nDomestic model (legd), (mast), (exc)\n\nThis module increases the automaton's medical speed stat. + + PN_NursingModuleHediff + + + 45 + 5 + 2 + 1 + + + PNRP_TierB_Module + + 6 + + + + + + + + +
  • + PN_NursingModuleHediff + PNTorso +
  • +
    +
    + + + PN_NursingModuleHediff + + The hediff created by installing nursing module. + + PN_NursingModule + + +
  • + + 0.70 + 1.20 + 1.20 + 0.70 + 0.70 + +
  • +
    + + + +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Randombox.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Randombox.xml new file mode 100644 index 0000000..a599ed2 --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Randombox.xml @@ -0,0 +1,495 @@ + + + + PN_PackagedCatagory + + PN_AutomatonCatagory + UI/Icons/ThingCategories/Manufactured + + + + PN_TMPackagedCatagory + + PN_PackagedCatagory + UI/Icons/ThingCategories/Manufactured + + + + ThingWithComps + Item + MapMeshOnly + + Things/Item/PNAutomatonbox + Graphic_Single + + true + true + Item + 1 + + 100 + 80.0 + 0.2 + 48000 + + +
  • + + true + true + false + 14 + -1 + Buyable + +
  • PN_TMPackagedCatagory
  • + + + 75 + 75 + 4 + 4 + 1 + 50 + 20 + +
    + + + + Packaged_NormalAutomaton + + It's a box packed with automaton. + None + + 2000 + + +
  • + CompQuality +
  • +
  • +
  • + UseItem + Unpackage +
  • +
  • + Paniel in black + Sensing trouble, a mysterious [PAWN_kind] has arrived.\n\nWill [PAWN_pronoun] be able to set things right in these parts? +
  • +
  • + CompUseEffect_DestroySelf +
  • +
    + +
  • PN_PackagedCatagory
  • +
    +
    + + + + Packaged_AutomatonSoldier + + A box containing a combat model automaton. Unpacking will reveal an automaton of a random grade.\n\n[Random Table]\nPoor : 0.39%\nNormal : 15.79%\nGood : 54.28%\nExcellent : 27.40%\nMasterwork : 2.14% + + + + +
  • + UseItem + Unpackage +
  • +
  • + Paniel in black + Sensing trouble, a mysterious [PAWN_kind] has arrived.\n\nWill [PAWN_pronoun] be able to set things right in these parts? + +
  • + 39 + Paniel_Randombox_Poor +
  • +
  • + 1579 + Paniel_Soldier_Normal +
  • +
  • + 5428 + Paniel_Soldier_Good +
  • +
  • + 2740 + Paniel_Soldier_Excellent +
  • +
  • + 214 + Paniel_Soldier_Masterwork +
  • + + +
  • + CompUseEffect_DestroySelf +
  • +
    +
    + + + + Packaged_AutomatonWorker + + A box containing a engineer model automaton. Unpacking will reveal an automaton of a random grade.\n\n[Random Table]\nPoor : 0.39%\nNormal : 15.79%\nGood : 54.28%\nExcellent : 27.40%\nMasterwork : 2.14% + + + + +
  • + UseItem + Unpackage +
  • +
  • + Paniel in black + Sensing trouble, a mysterious [PAWN_kind] has arrived.\n\nWill [PAWN_pronoun] be able to set things right in these parts? + +
  • + 39 + Paniel_Randombox_Poor +
  • +
  • + 1579 + Paniel_Worker_Normal +
  • +
  • + 5428 + Paniel_Worker_Good +
  • +
  • + 3740 + Paniel_Worker_Excellent +
  • +
  • + 214 + Paniel_Worker_Masterwork +
  • + + +
  • + CompUseEffect_DestroySelf +
  • +
    +
    + + + + Packaged_AutomatonMaid + + A box containing a domestic model automaton. Unpacking will reveal an automaton of a random grade.\n\n[Random Table]\nPoor : 0.39%\nNormal : 15.79%\nGood : 54.28%\nExcellent : 27.40%\nMasterwork : 2.14% + + + + +
  • + UseItem + Unpackage +
  • +
  • + Paniel in black + Sensing trouble, a mysterious [PAWN_kind] has arrived.\n\nWill [PAWN_pronoun] be able to set things right in these parts? + +
  • + 39 + Paniel_Randombox_Poor +
  • +
  • + 1579 + Paniel_Maid_Normal +
  • +
  • + 5428 + Paniel_Maid_Good +
  • +
  • + 2740 + Paniel_Maid_Excellent +
  • +
  • + 214 + Paniel_Maid_Masterwork +
  • + + +
  • + CompUseEffect_DestroySelf +
  • +
    +
    + + + + + Packaged_NormalAutomatonSoldier + + A box containing a combat model automaton. Unpacking will reveal an automaton of a random grade.\n\n[Random Table]\nPoor : 0.39%\nNormal : 15.79%\nGood : 54.28%\nExcellent : 27.40%\nMasterwork : 2.14% + + + + +
  • + UseItem + Unpackage +
  • +
  • + Paniel in black + Sensing trouble, a mysterious [PAWN_kind] has arrived.\n\nWill [PAWN_pronoun] be able to set things right in these parts? + +
  • + 39 + Paniel_Randombox_Poor +
  • +
  • + 1579 + Paniel_Soldier_Normal_PA +
  • +
  • + 5428 + Paniel_Soldier_Good_PA +
  • +
  • + 2740 + Paniel_Soldier_Excellent_PA +
  • +
  • + 214 + Paniel_Soldier_Masterwork_PA +
  • + + +
  • + CompUseEffect_DestroySelf +
  • +
    +
    + + + + Packaged_NormalAutomatonWorker + + A box containing a engineer model automaton. Unpacking will reveal an automaton of a random grade.\n\n[Random Table]\nPoor : 0.39%\nNormal : 15.79%\nGood : 54.28%\nExcellent : 27.40%\nMasterwork : 2.14% + + + + +
  • + UseItem + Unpackage +
  • +
  • + Paniel in black + Sensing trouble, a mysterious [PAWN_kind] has arrived.\n\nWill [PAWN_pronoun] be able to set things right in these parts? + +
  • + 39 + Paniel_Randombox_Poor +
  • +
  • + 1579 + Paniel_Worker_Normal_PA +
  • +
  • + 5428 + Paniel_Worker_Good_PA +
  • +
  • + 3740 + Paniel_Worker_Excellent_PA +
  • +
  • + 214 + Paniel_Worker_Masterwork_PA +
  • + + +
  • + CompUseEffect_DestroySelf +
  • +
    +
    + + + + Packaged_NormalAutomatonMaid + + A box containing a domestic model automaton. Unpacking will reveal an automaton of a random grade.\n\n[Random Table]\nPoor : 0.39%\nNormal : 15.79%\nGood : 54.28%\nExcellent : 27.40%\nMasterwork : 2.14% + + + + +
  • + UseItem + Unpackage +
  • +
  • + Paniel in black + Sensing trouble, a mysterious [PAWN_kind] has arrived.\n\nWill [PAWN_pronoun] be able to set things right in these parts? + +
  • + 39 + Paniel_Randombox_Poor +
  • +
  • + 1579 + Paniel_Maid_Normal_PA +
  • +
  • + 5428 + Paniel_Maid_Good_PA +
  • +
  • + 2740 + Paniel_Maid_Excellent_PA +
  • +
  • + 214 + Paniel_Maid_Masterwork_PA +
  • + + +
  • + CompUseEffect_DestroySelf +
  • +
    +
    + + + + + 150 + 2 + 6 + 1 + 50 + 20 + 1 + + + + + + Packaged_PremiumAutomatonSoldier + + A box containing a combat model automaton. Unpacking will reveal an automaton of a random grade.\n\n[Random Table]\nGood : 9.14%\nExcellent : 50.76%\nMasterwork : 33.52%\nLegendary : 6.58% + + + + +
  • + UseItem + Unpackage +
  • +
  • + Paniel in black + Sensing trouble, a mysterious [PAWN_kind] has arrived.\n\nWill [PAWN_pronoun] be able to set things right in these parts? + +
  • + 914 + Paniel_Soldier_Good_PA +
  • +
  • + 5076 + Paniel_Soldier_Excellent_PA +
  • +
  • + 3352 + Paniel_Soldier_Masterwork_PA +
  • +
  • + 658 + Paniel_Soldier_Legendary_PA +
  • + + +
  • + CompUseEffect_DestroySelf +
  • +
    +
    + + + + Packaged_PremiumAutomatonWorker + + A box containing a engineer model automaton. Unpacking will reveal an automaton of a random grade.\n\n[Random Table]\nGood : 9.14%\nExcellent : 50.76%\nMasterwork : 33.52%\nLegendary : 6.58% + + + + +
  • + UseItem + Unpackage +
  • +
  • + Paniel in black + Sensing trouble, a mysterious [PAWN_kind] has arrived.\n\nWill [PAWN_pronoun] be able to set things right in these parts? + +
  • + 914 + Paniel_Worker_Good_PA +
  • +
  • + 5076 + Paniel_Worker_Excellent_PA +
  • +
  • + 3352 + Paniel_Worker_Masterwork_PA +
  • +
  • + 658 + Paniel_Worker_Legendary_PA +
  • + + +
  • + CompUseEffect_DestroySelf +
  • +
    +
    + + + + Packaged_PremiumAutomatonMaid + + A box containing a domestic model automaton. Unpacking will reveal an automaton of a random grade.\n\n[Random Table]\nGood : 9.14%\nExcellent : 50.76%\nMasterwork : 33.52%\nLegendary : 6.58% + + + + +
  • + UseItem + Unpackage +
  • +
  • + Paniel in black + Sensing trouble, a mysterious [PAWN_kind] has arrived.\n\nWill [PAWN_pronoun] be able to set things right in these parts? + +
  • + 914 + Paniel_Maid_Good_PA +
  • +
  • + 5076 + Paniel_Maid_Excellent_PA +
  • +
  • + 3352 + Paniel_Maid_Masterwork_PA +
  • +
  • + 658 + Paniel_Maid_Legendary_PA +
  • + + +
  • + CompUseEffect_DestroySelf +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Security.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Security.xml new file mode 100644 index 0000000..643361d --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Security.xml @@ -0,0 +1,342 @@ + + + + + PN_Artillery_Base_Core + + Howitzer designed by PnL Industry. Using an automaton brain core, it has very good accuracy. However, it is necessary to periodically change the brain core due to excessive load in calculations. + + Building_TurretGun + MapMeshAndRealTime + + Things/Building/PN_Artillery_Base + Graphic_Single + CutoutComplex + (3,3) + + + + Building + True + (0,0,-3) + false + (3,3) + PassThroughOnly + 50 + 0.4 + + +
  • Metallic
  • +
    + Normal + Misc4 + Heavy + Security + 150 + 5 + + 150 + 6 + 2 + 1 + + +
  • ITab_Shells
  • +
    + +
  • +
  • + Violent +
  • +
  • + 240 + 5.9 + Bomb + 0.5 +
  • +
  • + Shots until core overload + Core overload + Cannot shoot: Needs new core + + +
  • PN_BrainCasing
  • + + + true + 10 + 10 + 1 + true + 1 + true + true + 0 + Things/Building/PN_cannoncore + +
    + + 520 + 0.7 + 15000 + 200 + -20 + 1.00 + + + PN_Artillery_Turret + 3.0 + (0, 0.35) + 1.0 + 14.0 + + + + +
  • PlaceWorker_TurretTop
  • +
  • PlaceWorker_PreventInteractionSpotOverlap
  • +
    + +
  • PNRP_AutoArtillery
  • +
    + Things/Building/PN_Artillery_Ui + 0.9 +
    + + + PN_Artillery_Turret + + Howitzer designed by PnL Industries. Using an automaton brain core, it has very good accuracy. However, it is necessary to periodically change the brain core due to excessive load in calculations. + + Things/Building/PN_Artillery_Turret + Graphic_Single + (6.0,6.0) + + 30 + MoteOverhead + + + + +
  • + Verb_Shoot + false + 2.0 + 0 + 0 + + false + 29.9 + 500 + 1 + PNCannonSound + 16 + 1 + + true + +
  • +
    + +
  • + + + + + +
  • PN_Shell_HE
  • +
  • PN_Shell_CI
  • +
  • PN_Shell_EMP
  • +
  • PN_Shell_FF
  • +
  • PN_Shell_Smoke
  • +
  • PN_Shell_AG
  • + + + + + + +
  • PN_Shell
  • +
    + +
  • PN_Shell_EMP
  • +
  • PN_Shell_FF
  • +
  • PN_Shell_Smoke
  • +
  • PN_Shell_AG
  • +
    +
    +
    + +
    + + + + PN_Railgun_Base_Core + + Railgun designed by PnL Industry. It uses an automaton brain core to control antigrain to generate huge amounts of power to charge the railgun.\nHowever, it is necessary to periodically change the brain core due to excessive load in antigrain control.\n\nUnlike PnL Howitzer, there is no aiming correction function. The component built into the shell replace the aiming correction function, but not perfect. + + Building_TurretGun + MapMeshAndRealTime + + Things/Building/PN_Artillery_Base + Graphic_Single + CutoutComplex + (3,3) + + + + Building + True + (0,0,-3) + false + (3,3) + PassThroughOnly + 50 + 0.4 + + +
  • Metallic
  • +
    + Normal + Misc4 + Heavy + Security + 150 + 5 + + 150 + 6 + 6 + 1 + + +
  • ITab_Shells
  • +
    + +
  • +
  • +
  • +
  • + Violent +
  • +
  • + 14.9 + BombSuper + 0.4 + 0.7 + 0.22 + true + GiantExplosion + Explosion_GiantBomb + 60~120 +
  • +
  • + Shots until core overload + Core overload + Cannot shoot: Needs new antigrain core + + +
  • PN_BrainCasingAntigrain
  • + + + true + 10 + 10 + 1 + true + 1 + true + true + 0 + Things/Building/PN_cannonAGcore + +
    + + 520 + 0.7 + 15000 + 200 + -20 + 1.00 + + + PN_Railgun_Turret + 3.0 + (0, 0.35) + 4.5 + 14.0 + + + + +
  • PlaceWorker_TurretTop
  • +
  • PlaceWorker_PreventInteractionSpotOverlap
  • +
    + +
  • PNRP_Railgun
  • +
    + Things/Building/PN_Railgun_Ui + 0.9 +
    + + + PN_Railgun_Turret + + Railgun designed by PnL Industries. + + Things/Building/PN_Railgun_Turret + Graphic_Single + (6.0,6.0) + + 30 + MoteOverhead + + + +
  • + Verb_Shoot + false + 4.5 + 0 + 0 + + true + 4.9 + 500 + 1 + PN_PrototypeRailGun_Warmup_Sound + PN_PrototypeRailGun_Fire_Sound + GunTail_Heavy + 16 + 1 + + true + +
  • +
    + +
  • + + + + + +
  • PN_Shell_RG
  • + + + + + + +
  • PN_Shell_RG
  • +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Shell.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Shell.xml new file mode 100644 index 0000000..021ab83 --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Shell.xml @@ -0,0 +1,568 @@ + + + + + + PN_Shell + + PN_AutomatonCatagory + UI/Icons/PNCT_PNShell + + + + + Graphic_StackCount + 1.0 + + Industrial + 25 + 1 + false + Metal_Drop + Standard_Drop + +
  • PN_Shell
  • +
    + Buyable + Normal + + GeneralLaborSpeed + Cook + Recipe_Machining + 800 + 5 + Crafting + +
  • PN_AutomatonBench
  • +
    + PNRP_AutoArtillery + + 4 + +
    +
    + + + + true + + + + + TorguePN.Projectile_Torgue_Rocket + + PN_CLbomb + 205 + 0.9 + Artillery_HitThickRoof + MortarBomb_Explode + MortarRound_PreImpact + MortarRound_Ambient + + + + + + PN_CLbomb + 10 + 5.0 + 1.30 + 1 + 1 + 1 + + + + + + PN_Shell_HE + + A high explosion cluster bomb that scatters submunitions when it hits a target. Explodes when damaged. + + Things/Item/PNShell/PNShellHE + + PN_Bullet_Shell_HE + + 60 + 1.25 + 1.0 + 1.5 + + +
  • + 3.9 + Bomb + 0.4 + 0.7 + 30~60 +
  • +
    + + 10 + 20 + 1 + + +
  • PN_Shell
  • +
    +
    + + + PN_Bullet_Shell_HE + + + Things/Projectile/ShellHighExplosive + Graphic_Single + TransparentPostLight + + + PN_Bullet_Shell_HE_Sub + 16 + 6.9 + + + + + PN_Bullet_Shell_HE_Sub + + + Things/Projectile/ShellHighExplosive + Graphic_Single + TransparentPostLight + + Projectile_Explosive + + Bomb + 6.5 + 2.1 + 10 + 60 + 0.6 + true + Artillery_HitThickRoof + MortarIncendiary_Explode + MortarRound_PreImpact + MortarRound_Ambient + true + + + + + PN_CL_Bomb + + + + + + + PN_Shell_CI + + A cluster incendiary bomb that scatters submunitions when it hits a target. Explodes when damaged. + + Things/Item/PNShell/PNShellIN + + PN_Bullet_Shell_CI + + 60 + 1.25 + 1.0 + 1.5 + + +
  • + 3.9 + Flame + 0.4 + 0.7 + 30~60 +
  • +
    + + 10 + 20 + 1 + + +
  • PN_Shell
  • +
    +
    + + + PN_Bullet_Shell_CI + + + Things/Projectile/ShellHighExplosive + Graphic_Single + TransparentPostLight + + + PN_Bullet_Shell_CI_Sub + 16 + 8.1 + + + + + PN_Bullet_Shell_CI_Sub + + + Things/Projectile/ShellIncendiary + Graphic_Single + TransparentPostLight + + Projectile_Explosive + + Flame + 6.5 + 2.4 + 10 + 60 + 0.6 + Filth_Fuel + 0.27 + true + Artillery_HitThickRoof + MortarIncendiary_Explode + MortarRound_PreImpact + MortarRound_Ambient + true + + + + + + + PN_Shell_EMP + + A cluster EMP bomb that scatters submunitions when it hits a target. Explodes when damaged. + + Things/Item/PNShell/PNShellEM + + PN_Bullet_Shell_EMP + + 60 + 1.25 + 1.0 + 1.5 + + +
  • + 12.9 + EMP + 0.4 + 0.7 + 30~60 +
  • +
    + + 5 + 20 + 1 + + +
  • PN_Shell
  • +
    +
    + + + PN_Bullet_Shell_EMP + + + Things/Projectile/ShellHighExplosive + Graphic_Single + TransparentPostLight + + + EMP + PN_Bullet_Shell_EMP_Sub + 10 + 14.9 + Artillery_HitThickRoof + Explosion_EMP + MortarRound_PreImpact + MortarRound_Ambient + + + + + PN_Bullet_Shell_EMP_Sub + + + Things/Projectile/ShellEMP + Graphic_Single + TransparentPostLight + + Projectile_Explosive + + EMP + 6.5 + 5.9 + 60 + 0.6 + true + Artillery_HitThickRoof + Explosion_EMP + MortarRound_PreImpact + MortarRound_Ambient + true + + + + + + + PN_Shell_FF + + A cluster firefoam bomb that scatters submunitions when it hits a target. Explodes when damaged. + + Things/Item/PNShell/PNShellFF + + PN_Bullet_Shell_FF + + 60 + 1.25 + 1.0 + 1.5 + + +
  • + 10.9 + Extinguish + 0.4 + 0.7 + Filth_FireFoam + 1 + 3 + true + ExtinguisherExplosion + 30~60 +
  • +
    + + 5 + 20 + 1 + + +
  • PN_Shell
  • +
    +
    + + + PN_Bullet_Shell_FF + + + Things/Projectile/ShellHighExplosive + Graphic_Single + TransparentPostLight + + + Extinguish + PN_Bullet_Shell_FF_Sub + 10 + 14.9 + Artillery_HitThickRoof + Explosion_EMP + MortarRound_PreImpact + MortarRound_Ambient + + + + + PN_Bullet_Shell_FF_Sub + + + Things/Projectile/ShellFirefoam + Graphic_Single + TransparentPostLight + + Projectile_Explosive + + Extinguish + 6.5 + 5.9 + 60 + 0.6 + true + Artillery_HitThickRoof + Explosion_EMP + MortarRound_PreImpact + MortarRound_Ambient + Filth_FireFoam + 1 + 3 + true + ExtinguisherExplosion + + + + + + + PN_Shell_Smoke + + A cluster smoke bomb that scatters submunitions when it hits a target. Explodes when damaged. + + Things/Item/PNShell/PNShellSM + + PN_Bullet_Shell_Smoke + + 60 + 1.25 + 1.0 + 1.5 + + +
  • + Smoke + 11 + BlindSmoke + 30~60 +
  • +
    + + 5 + 20 + 1 + + +
  • PN_Shell
  • +
    +
    + + + PN_Bullet_Shell_Smoke + + + Things/Projectile/ShellHighExplosive + Graphic_Single + TransparentPostLight + + + Smoke + PN_Bullet_Shell_Smoke_Sub + 10 + 14.9 + Artillery_HitThickRoof + Explosion_Smoke + MortarRound_PreImpact + MortarRound_Ambient + + + + + PN_Bullet_Shell_Smoke_Sub + + + Things/Projectile/ShellSmoke + Graphic_Single + TransparentPostLight + + Projectile_Explosive + + Smoke + 6.5 + 5.9 + 60 + 0.6 + true + Artillery_HitThickRoof + Explosion_Smoke + MortarRound_PreImpact + MortarRound_Ambient + BlindSmoke + + + + + + + PN_Shell_AG + + An ultra-tech warhead powered by a grain of antimatter. Usually used by spacecraft or glitterworld war machines, it creates a huge explosion and starts fires around the target. Explodes when damaged. + + Things/Item/PNShell/PNShellAG + + PN_Bullet_Shell_AG + + 60 + 1.25 + 1.0 + 1.5 + + +
  • + 14.9 + BombSuper + 0.4 + 0.7 + 0.22 + true + GiantExplosion + Explosion_GiantBomb + 60~120 +
  • +
    + + 1 + 20 + + + 1 + +
    + + + PN_Bullet_Shell_AG + + + Things/Projectile/ShellAntigrainWarhead + Graphic_Single + TransparentPostLight + + Projectile_Explosive + + BombSuper + 205 + 14.9 + 0.22 + true + GiantExplosion + Artillery_HitThickRoof + Explosion_GiantBomb + MortarRound_PreImpact + MortarRound_Ambient + + + + + + + PN_Shell_RG + + A special shell used in railgun. + + Things/Item/PNShell/PNShellAP + + PN_Bullet_RailGun + + 60 + 1.25 + 0 + 1.5 + + + + + + 30 + 50 + 1 + + + PNRP_Railgun + + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Weapons_Industrial.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Weapons_Industrial.xml new file mode 100644 index 0000000..7a6d15a --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Weapons_Industrial.xml @@ -0,0 +1,1471 @@ + + + + + + ThingWithComps + Item + true + Item + true + Never + Primary + true + 14 + true + + 100 + 1.0 + 2 + -3 + 0.20 + + +
  • +
  • + CompEquippable +
  • +
    + + 35 + + 0 +
    + + + PN_WeaponsRanged + + WeaponsRanged + Icon/Paniel_HQ + + + + PN_WeaponsMelee + + WeaponsMelee + Icon/Paniel_HQ + + + + + Industrial + true + true + +
  • PN_WeaponsMelee
  • +
    + + GeneralLaborSpeed + Crafting + Smith + Recipe_Smith + +
  • PN_AutomatonBench
  • +
    + UnfinishedWeapon +
    + +
  • ITab_Art
  • +
    + +
  • PN_Melee
  • +
    + +
  • Melee
  • +
    +
    + + + + + +
  • Root
  • +
    + +
  • Silver
  • +
  • Gold
  • +
  • WoodLog
  • +
    +
    +
    + +
  • + CompQuality +
  • +
  • + NamerArtWeaponMelee + ArtDescription_WeaponMelee + Excellent +
  • +
    + +
  • MeleePiercer
  • +
    +
    + + + + + +
  • Root
  • +
    + +
  • Silver
  • +
  • Gold
  • +
    +
    +
    + +
  • + CompQuality +
  • +
  • + NamerArtWeaponMelee + ArtDescription_WeaponMelee + Excellent +
  • +
    + +
  • MeleeBlunt
  • +
    +
    + + + + Industrial + true + +
  • PN_WeaponsRanged
  • +
    + +
  • ITab_Art
  • +
    + + 0.5 + + +
  • PN_Gun
  • +
    + +
  • + NamerArtWeaponGun + ArtDescription_WeaponGun + Excellent +
  • +
  • + CompQuality +
  • +
    + +
  • Ranged
  • +
    +
    + + + + GeneralLaborSpeed + Crafting + Smith + Recipe_Smith + +
  • PN_AutomatonBench
  • +
    + UnfinishedGun +
    + + + +
    + + + Projectile + Normal + Projectile + Bullet + + False + True + + Transparent + + + + + + PN_Shovel + + It's a small shovel. Useful for farming, mining and construction. It looks powerful even when used as a weapon. + + Things/Weapons/PNShovel + Graphic_Single + CutoutComplex + + +
  • PN_Shovel
  • +
    + 50 + +
  • RewardStandardQualitySuper
  • +
    + + 8000 + 1.2 + + -65 + +
  • Metallic
  • +
    + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Cut
  • + + 16 + 2 + +
  • + + +
  • Blunt
  • + + 16 + 2 + +
    + + Smithing + + 5 + + +
  • ElectricSmithy
  • +
  • FueledSmithy
  • +
    +
    + + 0.15 + 0.15 + 0.15 + +
    + + + + PN_Chainsword + + [caution] : Automaton exclusive weapon.\n\nA sword with a rotating chain saw blade. It works by linking with the automaton and receiving power. + + Things/Weapons/PNSword + Graphic_Single + CutoutComplex + + PNChainswordSound + +
  • PN_Chainsword
  • +
    + 50 + + + + + 18000 + 2 + + -65 + +
  • Metallic
  • +
    + + 1 + + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Stab
  • + + 16 + 2 + +
  • + + +
  • PN_ChainCutTool
  • + + 16 + 2 + +
    + + PNRP_AutomatonWeapons + + 5 + + + + 0.25 + +
    + + + + PN_Revolver + + A revolver similar to a shotgun that fires from six barrels at once. + + Things/Weapons/PNRevolver + Graphic_Single + 1 + + 1 + Interact_Revolver + +
  • RewardStandardQualitySuper
  • +
    + + 18000 + 1.6 + 0.75 + 0.45 + 0.15 + 0.05 + 1.8 + + +
  • PN_Revolver
  • +
    + + 50 + 2 + + + + 3 + + PNRP_AutomatonWeapons + + + + +
  • + TorguePN.Verb_Shoot_ShotGun + true + PN_Bullet_Revolver_Volley + 0.5 + 12.9 + 1 + 10 + Shot_Revolver + GunTail_Light + 9 + 6 +
  • +
    + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • + + 12 + 2 + +
    + +
  • ShortShots
  • +
    +
    + + + PN_Bullet_Revolver_Volley + + + Things/Projectile/Bullet_Small + Graphic_Single + + + Bullet + 6 + 0.5 + 0.12 + 55 + + + + + + PN_Rifle + + Lever action rifle produced by PnL industry. Users can choose between burst shot mode and point shot mode. + + Things/Weapons/PNRifle + Graphic_Single + + Interact_Rifle + + PNRP_AutomatonWeapons + + 6 + + + +
  • RewardStandardQualitySuper
  • +
    + + 40000 + 3.5 + 0.65 + 0.70 + 0.65 + 0.55 + 0.7 + + + 75 + 5 + + +
  • + + Things/Weapons/SYS/PNRifle_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRifle_Full + Graphic_Multi + + Back + + (0.15,0.3,0) + -45 + + + (-0.15,-0.3,0) + -45 + + + (-0.15,-0.3,0) + -30 + + + (0.15,-0.3,0) + 30 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + It fires slowly, but has a high accuracy and range. + PN_Rifle_Point + 30 + Interact_Rifle + UI/Commands/Snipe + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_Rifle + 0.7 + 30.9 + PNRifleSound + GunTail_Heavy + 9 +
  • +
    + +
  • PN_Rifle
  • +
    + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 9 + 2 + +
    + 45 +
    + + + + + PN_Rifle_Point + + Lever action rifle produced by PnL industry. Users can choose between burst shot mode and point shot mode. + + Things/Weapons/PNRifle + Graphic_Single + + Interact_Rifle + + + + + + + + 40000 + 3.5 + 0.65 + 0.95 + 0.90 + 0.80 + 0.7 + + + 75 + 5 + + +
  • + + Things/Weapons/SYS/PNRifle_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRifle_Full + Graphic_Multi + + Back + + (0.15,0.3,0) + -45 + + + (-0.15,-0.3,0) + -45 + + + (-0.15,-0.3,0) + -30 + + + (0.15,-0.3,0) + 30 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + It fires quickly, but has a low accuracy and range. + PN_Rifle + 30 + Interact_Rifle + UI/Commands/Pew + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_Rifle + 2.3 + 36.9 + PNRifleSound + GunTail_Heavy + 9 +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 9 + 2 + +
    + 45 +
    + + + PN_Bullet_Rifle + + + Bullet + 16 + 1.0 + 70 + + + Things/Projectile/Bullet_big + Graphic_Single + + + + + + PN_Machinegun + + Machine gun produced by PnL industry. + + Things/Weapons/PNMachinegun_carry + Graphic_Single + + Interact_Rifle + + PNRP_MachineGun + + 7 + + + +
  • RewardStandardLowFreq
  • +
  • RewardStandardQualitySuper
  • +
    + + 60000 + 10 + 0.15 + 0.25 + 0.25 + 0.18 + 1.8 + + + 150 + 10 + + +
  • + + Things/Weapons/SYS/PNMachinegun_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNMachinegun_Full + Graphic_Multi + + Back + + (0,0.3,0.05) + 25 + + + (0,-0.3,0.05) + -25 + + + (-0.15,-0.3,0.05) + 70 + + + (0.15,-0.3,0.05) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + Mount machinegun on the ground. It moves very slowly, but it can unleash heavy firepower. + PN_Machinegun_Mount + 120 + Interact_Rifle + UI/Commands/MG_Mount + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_Machinegun + 1.8 + 30.9 + 12 + 4 + Shot_AssaultRifle + GunTail_Medium + 9 +
  • +
    + +
  • PN_Machinegun
  • +
    + +
  • + + +
  • Blunt
  • + + 11.7 + 2.6 + +
    + 45 + + -0.25 + + +
  • RangedHeavy
  • +
    +
    + + + + + PN_Machinegun_Mount + + Machine gun produced by PnL industry. + + Things/Weapons/PNMachinegun + Graphic_Single + + Interact_Rifle + + + + + + + + 60000 + 10 + 0.25 + 0.35 + 0.35 + 0.28 + 0.03 + + + 150 + 10 + + +
  • + + Things/Weapons/SYS/PNMachinegun_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNMachinegun_Full + Graphic_Multi + + Back + + (0,0.3,0.05) + 25 + + + (0,-0.3,0.05) + -25 + + + (-0.15,-0.3,0.05) + 70 + + + (0.15,-0.3,0.05) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + + + If it overheats, will change to cooling mode. + PN_Machinegun_Overheated + 800 + 2000 + UI/Commands/MG_overheat + 1 + + +
  • + + Fold the mount and move urgently. Cooling penalty still applies. + PN_Machinegun_Overheated + 2000 + Interact_Rifle + UI/Commands/MG_withdrawal + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_Machinegun + 0.03 + 30.9 + 10 + 4 + Shot_AssaultRifle + GunTail_Medium + 9 +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 11.7 + 2.6 + +
    + 45 + + -99 + + +
  • RangedHeavy
  • +
    +
    + + + + + PN_Machinegun_Overheated + + Machine gun produced by PnL industry. + + Things/Weapons/PNMachinegun_carry + Graphic_Single + + Interact_Rifle + + + + + + + + 60000 + 10 + 0.25 + 0.35 + 0.35 + 0.28 + 1.8 + + + 150 + 10 + + +
  • + + Things/Weapons/SYS/PNMachinegun_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNMachinegun_Full + Graphic_Multi + + Back + + (0,0.3,0.05) + 25 + + + (0,-0.3,0.05) + -25 + + + (-0.15,-0.3,0.05) + 70 + + + (0.15,-0.3,0.05) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + + + Performance returns to normal when cooling is complete. + PN_Machinegun + 1700 + 2500 + UI/Commands/MG_cooling + 1 + + +
    + +
  • + Verb_Shoot + true + PN_Bullet_Machinegun + 1.8 + 30.9 + 6 + 8 + Shot_AssaultRifle + GunTail_Medium + 9 +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 11.7 + 2.6 + +
    + 45 + + -1.00 + + +
  • RangedHeavy
  • +
    +
    + + + PN_Bullet_Machinegun + + + Bullet + 8 + 1.0 + 70 + + + Things/Projectile/Bullet_Small + Graphic_Single + + + + + + PN_Cannon + + portable cannon produced by PnL industry. It can fire high-explosive and penetrating rounds. + + Things/Weapons/PNCannon + Graphic_Single + + Interact_Rifle + + PNRP_Cannon + + 8 + + + +
  • RewardStandardQualitySuper
  • +
    + + 68000 + 9.5 + 0.65 + 0.65 + 0.85 + 0.75 + 4.5 + + + 150 + 10 + + +
  • + + Things/Weapons/SYS/PNCannon_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNCannon_Full + Graphic_Multi + + Back + + (0,0.3,-0.05) + 25 + + + (0,-0.3,-0.05) + -25 + + + (-0.15,-0.3,-0.05) + 70 + + + (0.15,-0.3,-0.05) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + use HE bullet. + PN_Cannon_HE + 120 + Interact_Rifle + UI/Commands/HE + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_AP + 3.5 + 4.9 + 44.9 + PNCannonSound + GunTail_Heavy + 14 +
  • +
    + +
  • PN_Cannon
  • +
    + +
  • + + +
  • Blunt
  • + + 15.7 + 2 + +
    + 45 + + -0.25 + + +
  • RangedHeavy
  • +
  • LongShots
  • +
    +
    + + + + + PN_Cannon_HE + + portable cannon produced by PnL industry. It can fire high-explosive and penetrating rounds. + + Things/Weapons/PNCannon + Graphic_Single + + Interact_Rifle + + + + + + + + 68000 + 9.5 + 0.65 + 0.65 + 0.85 + 0.75 + 4.5 + + + 150 + 10 + + +
  • + + Things/Weapons/SYS/PNCannon_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNCannon_Full + Graphic_Multi + + Back + + (0,0.3,-0.05) + 25 + + + (0,-0.3,-0.05) + -25 + + + (-0.15,-0.3,-0.05) + 70 + + + (0.15,-0.3,-0.05) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + use AP bullet. + PN_Cannon + 120 + Interact_Rifle + UI/Commands/AP + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_HE + 0.01 + 3.5 + 4.9 + 44.9 + PNCannonSound + GunTail_Heavy + 14 + + true + +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 15.7 + 2 + +
    + 45 + + -0.25 + + +
  • RangedHeavy
  • +
  • LongShots
  • +
    +
    + + + PN_Bullet_HE + + + Things/Projectile/ShellHighExplosive + Graphic_Single + TransparentPostLight + + Projectile_Explosive + + PN_Bomb_Cannon + 100 + 1.9 + + + + + PN_Bullet_AP + + + Bullet + 40 + 3 + 0.70 + 100 + + + Things/Projectile/ShellHighExplosive + Graphic_Single + + + + + PN_Bomb_Cannon + + 50 + + + + + PN_PrototypeRailGun + + An experimental railgun that fires powerful explosions in a narrow area.\nOnce fired, it will break down and cannot be used. + Normal + Spacer + false + + Things/Weapons/PNPrototypeRailGun + Graphic_Single + + + 1250 + 8 + 4.5 + + +
  • PN_PrototypeRailGun
  • +
  • PN_SingleUse
  • +
    + +
  • ExoticMisc
  • +
    + +
  • SingleUseWeapon
  • +
  • RewardStandardLowFreq
  • +
    + +
  • + Verb_ShootOneUse + true + PN_Bullet_RailGun + 0.1 + 4.5 + 8 + 4.9 + 500 + 1 + PN_PrototypeRailGun_Warmup_Sound + PN_PrototypeRailGun_Fire_Sound + GunTail_Heavy + true + + true + + 14 +
  • +
    + +
  • + + +
  • Blunt
  • + + 11.7 + 2.6 + +
    + +
  • +
  • + CompEquippable +
  • +
  • +
  • + NamerArtWeaponMelee + ArtDescription_WeaponMelee + Excellent +
  • +
  • + 7.8 + Bomb + Flame +
  • +
  • + + Things/Weapons/SYS/PNPrototypeRailGun_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNPrototypeRailGun_Full + Graphic_Multi + + Back + + (0,0.3,0.05) + 25 + + + (0,-0.3,0.05) + -25 + + + (-0.15,-0.3,0.05) + 70 + + + (0.15,-0.3,0.05) + -70 + +
  • +
    + 45 +
    + + + PN_Bullet_RailGun + + + Things/Projectile/ChargeLanceShot + Graphic_Single + TransparentPostLight + + Projectile_Explosive + + PN_BombRG + 615 + 1.9 + + + + + PN_BombRG + DamageWorker_Blunt + 1.0 + 0.6~1.0 + Sharp + 550 + 700 + 5.0 + 2.00 + 0.1 + 0.1 + 1 + true + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThingDefs/ThingDef_Weapons_Royal.xml b/1.6/Core/Defs/ThingDefs/ThingDef_Weapons_Royal.xml new file mode 100644 index 0000000..dcfa4a7 --- /dev/null +++ b/1.6/Core/Defs/ThingDefs/ThingDef_Weapons_Royal.xml @@ -0,0 +1,1891 @@ + + + + + PN_Chainlongsword + + [caution] : Automaton exclusive weapon.\n\nA long sword with a rotating chain saw blade. It works by linking with the automaton and receiving power. + + Things/Weapons/PNSwordLong + Graphic_Single + CutoutComplex + + +
  • PN_RoyalChainsword
  • +
    + 100 + +
  • RewardStandardQualitySuper
  • +
    + + 18000 + 4 + + 45 + +
  • Metallic
  • +
    + + 1 + + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Stab
  • + + 23 + 2.4 + +
  • + + +
  • PN_ChainCutTool
  • + + 23 + 2.4 + +
    + + PNRP_RoyalWeapons + + 5 + + + +
  • + True + + (0.2,0,0.25) + -45 + + + (-0.25,0.3,0.2) + 45 + + + (0.15,0.3,0.2) + -45 + + + (-0.15,-0.3,0.2) + 45 + +
  • +
    + + + +
    + + + + PN_WarHammer + + A luxurious war hammer made by PnL industry. There is no special function. + + Things/Weapons/PNWarHammer + Graphic_Single + CutoutComplex + + +
  • PN_WarHammer
  • +
    + 150 + +
  • RewardStandardQualitySuper
  • +
    + + 18000 + 4 + + +
  • Metallic
  • +
    + + 1 + + +
  • + + +
  • Poke
  • + + 11 + 2.6 + +
  • + + false + +
  • Blunt
  • + + 22 + 2.4 + +
    + + PNRP_RoyalWeapons + + 5 + + + + + + + + +
    + + + + PN_TwinPistol + + [caution] : Automaton exclusive weapon.\n\nA dual pistol that fires a lot of bullets at a close range. Used by the Royal Guard's Special Forces Automaton. In conjunction with the automaton, it enables fast reloading and gives the user high melee combat ability. + Spacer + 1 + + Things/Weapons/PNTwinpistol + Graphic_Single + + Interact_Rifle + + PNRP_RoyalWeapons + + 7 + + + +
  • RewardStandardQualitySuper
  • +
    + + 45000 + 3.2 + 0.57 + 0.45 + 0.14 + 0.03 + 0.85 + + + 75 + 2 + 1 + + +
  • +
    + +
  • + Verb_Shoot + true + PN_Bullet_TwinPistol + 0.35 + 12.9 + 2 + 12 + Shot_Revolver + GunTail_Light + 9 +
  • +
    + +
  • PN_RoyalRifle
  • +
    + +
  • + + +
  • Blunt
  • + + 9 + 1 + +
  • + + +
  • Blunt
  • + + 18 + 2 + +
  • + + +
  • Poke
  • + + 20 + 2 + 0.09 + +
    + +
  • ShortShots
  • +
  • Ultratech
  • +
    +
    + + + PN_Bullet_TwinPistol + + + Bullet + 4 + 0.5 + 0.15 + 70 + + + Things/Projectile/Bullet_Small + Graphic_Single + + + + + + PN_RoyalRifle + + [caution] : Automaton exclusive weapon.\n\nroyal guard rifle produced by PnL industry. Users can choose between burst shot mode and point shot mode. + Spacer + 1 + + Things/Weapons/PNRoyalRifle + Graphic_Single + + Interact_Rifle + + PNRP_RoyalWeapons + + 7 + + + +
  • RewardStandardQualitySuper
  • +
    + + 45000 + 4.6 + 0.65 + 0.70 + 0.65 + 0.55 + 0.7 + + + 75 + 2 + 1 + + +
  • +
  • + + Things/Weapons/SYS/PNRoyalRifle_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalRifle_Full + Graphic_Multi + + Back + + (0.15,0.3,0.05) + -45 + + + (-0.15,-0.3,0.05) + -45 + + + (-0.15,-0.3,0.05) + -30 + + + (0.15,-0.3,0.05) + 30 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + It fires slowly, but has a high accuracy and range. + PN_RoyalRifle_Point + 30 + Interact_Rifle + UI/Commands/Snipe + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_RoyalRifle + 0.7 + 30.9 + PNRoyalRifleSound + GunTail_Heavy + 9 +
  • +
    + +
  • PN_RoyalRifle
  • +
    + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 9 + 2 + +
    + 45 + +
  • Ultratech
  • +
    +
    + + + + + PN_RoyalRifle_Point + + [caution] : Automaton exclusive weapon.\n\nroyal guard rifle produced by PnL industry. Users can choose between bust shot mode and point shot mode. + Spacer + 1 + + Things/Weapons/PNRoyalRifle + Graphic_Single + + Interact_Rifle + + + + + + + + 45000 + 4.6 + 0.65 + 0.95 + 0.90 + 0.80 + 0.7 + + + 75 + 2 + 1 + + +
  • +
  • + + Things/Weapons/SYS/PNRoyalRifle_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalRifle_Full + Graphic_Multi + + Back + + (0.15,0.3,0.05) + -45 + + + (-0.15,-0.3,0.05) + -45 + + + (-0.15,-0.3,0.05) + -30 + + + (0.15,-0.3,0.05) + 30 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + It fires quickly, but has a low accuracy and range. + PN_RoyalRifle + 30 + Interact_Rifle + UI/Commands/Pew + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_RoyalRifle + 2.3 + 36.9 + PNRoyalRifleSound + GunTail_Heavy + 9 +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 9 + 2 + +
    + 45 + +
  • Ultratech
  • +
    +
    + + + PN_Bullet_RoyalRifle + + + Bullet + 20 + 1.5 + 0.38 + 100 + + + Things/Projectile/Bullet_big + Graphic_Single + + + + + + + PN_RoyalHeavySlug + + [caution] : Automaton exclusive weapon.\n\nheavy slug rifle produced by PnL industry. They fire huge bullets, but it have a short range. + Spacer + 1 + + Things/Weapons/PNRoyalHeavyslug + Graphic_Single + + Interact_Rifle + + PNRP_RoyalWeapons + + 7 + + + +
  • RewardStandardQualitySuper
  • +
    + + 45000 + 4.6 + 0.57 + 0.64 + 0.55 + 0.45 + 1.2 + + + 140 + 3 + 2 + + +
  • +
  • + + Things/Weapons/SYS/PNRoyalHeavyslug_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalHeavyslug_Full + Graphic_Multi + + Back + + (0,0.3,0.05) + 25 + + + (0,-0.3,0.05) + -25 + + + (-0.15,-0.3,0.05) + 70 + + + (0.15,-0.3,0.05) + -70 + +
  • +
    + +
  • + Verb_Shoot + true + PN_Bullet_HeavySlug + 0.7 + 12.9 + PNRoyalHCSound + GunTail_Medium + 14 +
  • +
    + +
  • PN_Royalslug
  • +
    + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 9 + 2 + +
    + 45 + +
  • Ultratech
  • +
    +
    + + + PN_Bullet_HeavySlug + + + Bullet + 40 + 3 + 0.38 + 100 + + + Things/Projectile/ShellHighExplosive + Graphic_Single + + + + + + PN_RoyalMachinegun + + [caution] : Automaton exclusive weapon.\n\nroyal machine gun produced by PnL industry. + Spacer + 1 + + Things/Weapons/PNRoyalMachinegun_carry + Graphic_Single + + Interact_Rifle + + PNRP_RoyalWeapons + + 7 + + + +
  • RewardStandardQualitySuper
  • +
    + + 75000 + 10 + 0.15 + 0.25 + 0.25 + 0.18 + 1.8 + + + 150 + 8 + 2 + + +
  • +
  • + + Things/Weapons/SYS/PNRoyalMachinegun_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalMachinegun_Full + Graphic_Multi + + Back + + (0,0.3,0.05) + 25 + + + (0,-0.3,0.05) + -25 + + + (-0.15,-0.3,0.05) + 70 + + + (0.15,-0.3,0.05) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + Mount machine gun on the ground. It moves very slowly, but it can unleash heavy firepower. + PN_RoyalMachinegun_Mount + 120 + Interact_Rifle + UI/Commands/MG_Mount + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_RoyalMachinegun + 1.8 + 30.9 + 6 + 9 + PNRoyalMachinegunSound + GunTail_Medium + 9 +
  • +
    + +
  • PN_RoyalMachinegun
  • +
    + +
  • + + +
  • Blunt
  • + + 11.7 + 2.6 + +
    + 45 + + -0.25 + + +
  • RangedHeavy
  • +
    +
    + + + + + PN_RoyalMachinegun_Mount + + [caution] : Automaton exclusive weapon.\n\nroyal machine gun produced by PnL industry. + Spacer + 1 + + Things/Weapons/PNRoyalMachinegun + Graphic_Single + + Interact_Rifle + + + + + + + + 75000 + 10 + 0.15 + 0.25 + 0.25 + 0.18 + 0.07 + + + 150 + 8 + 2 + + +
  • +
  • + + Things/Weapons/SYS/PNRoyalMachinegun_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalMachinegun_Full + Graphic_Multi + + Back + + (0,0.3,0.05) + 25 + + + (0,-0.3,0.05) + -25 + + + (-0.15,-0.3,0.05) + 70 + + + (0.15,-0.3,0.05) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + + + If it overheats, will change to cooling mode. + PN_RoyalMachinegun_Overheated + 800 + 2000 + UI/Commands/MG_overheat + 1 + + +
  • + + Fold the mount and move urgently. Cooling penalty still applies. + PN_RoyalMachinegun_Overheated + 2000 + Interact_Rifle + UI/Commands/MG_withdrawal + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_RoyalMachinegun + 0.07 + 30.9 + 6 + 9 + PNRoyalMachinegunSound + GunTail_Medium + 9 +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 11.7 + 2.6 + +
    + 45 + + -99 + + +
  • RangedHeavy
  • +
    +
    + + + + + PN_RoyalMachinegun_Overheated + + [caution] : Automaton exclusive weapon.\n\nroyal machine gun produced by PnL industry. + Spacer + 1 + + Things/Weapons/PNRoyalMachinegun_carry + Graphic_Single + + Interact_Rifle + + + + + + + + 75000 + 10 + 0.15 + 0.25 + 0.25 + 0.18 + 1.8 + + + 150 + 8 + 2 + + +
  • +
  • + + Things/Weapons/SYS/PNRoyalMachinegun_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalMachinegun_Full + Graphic_Multi + + Back + + (0,0.3,0.05) + 25 + + + (0,-0.3,0.05) + -25 + + + (-0.15,-0.3,0.05) + 70 + + + (0.15,-0.3,0.05) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + + + Performance returns to normal when cooling is complete. + PN_RoyalMachinegun + 1700 + 2500 + UI/Commands/MG_cooling + 1 + + +
    + +
  • + Verb_Shoot + true + PN_Bullet_RoyalMachinegun + 1.8 + 30.9 + 3 + 18 + PNRoyalMachinegunSound + GunTail_Medium + 9 +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 11.7 + 2.6 + +
    + 45 + + -1.00 + + +
  • RangedHeavy
  • +
    +
    + + + PN_Bullet_RoyalMachinegun + + + Bullet + 20 + 1.5 + 0.38 + 100 + + + Things/Projectile/Bullet_big + Graphic_Single + + + + + + + PN_RoyalLSW + + [caution] : Automaton exclusive weapon.\n\nA launcher that can fire a variety of grenades. Users can fire Frag, Incendiary, EMP, Smoke, and Firefoam grenades. + Spacer + + Things/Weapons/PNRoyalLSW + Graphic_Single + + Interact_Rifle + + PNRP_RoyalWeapons + + 7 + + + +
  • RewardStandardLowFreq
  • +
  • RewardStandardQualitySuper
  • +
    + + 75000 + 7 + 3.0 + + + 100 + 3 + 2 + + +
  • + + Things/Weapons/SYS/PNRoyalLSW_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalLSW_Full + Graphic_Multi + + Back + + (0,0.3,0) + 25 + + + (0,-0.3,0) + -25 + + + (-0.15,-0.3,0) + 70 + + + (0.15,-0.3,0) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + use Incendiary shell + PN_RoyalLSW_IE + 30 + Interact_Rifle + UI/Commands/Flame + 1 +
  • +
  • + + use EMP shell + PN_RoyalLSW_EMP + 30 + Interact_Rifle + UI/Commands/EMP + 1 +
  • +
  • + + use Smoke shell + PN_RoyalLSW_Smoke + 30 + Interact_Rifle + UI/Commands/Smoke + 1 +
  • +
  • + + use Firefoam shell + PN_RoyalLSW_FF + 30 + Interact_Rifle + UI/Commands/FF + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_LSW_bomb + 3.0 + 23.9 + 0.9 + 1 + Shot_IncendiaryLauncher + GunTail_Heavy + 14 + + true + +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 9 + 2 + +
    + +
  • Ultratech
  • +
    +
    + + + + + PN_RoyalLSW_IE + + [caution] : Automaton exclusive weapon.\n\nA launcher that can fire a variety of grenades. Users can fire Frag, Incendiary, EMP, Smoke, and Firefoam grenades. + Spacer + + Things/Weapons/PNRoyalLSW + Graphic_Single + + Interact_Rifle + + + + + + + + 75000 + 7 + 3.0 + + + 100 + 3 + 2 + + +
  • + + Things/Weapons/SYS/PNRoyalLSW_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalLSW_Full + Graphic_Multi + + Back + + (0,0.3,0) + 25 + + + (0,-0.3,0) + -25 + + + (-0.15,-0.3,0) + 70 + + + (0.15,-0.3,0) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + use HE shell + PN_RoyalLSW + 30 + Interact_Rifle + UI/Commands/HE + 1 +
  • +
  • + + use EMP shell + PN_RoyalLSW_EMP + 30 + Interact_Rifle + UI/Commands/EMP + 1 +
  • +
  • + + use Smoke shell + PN_RoyalLSW_Smoke + 30 + Interact_Rifle + UI/Commands/Smoke + 1 +
  • +
  • + + use Firefoam shell + PN_RoyalLSW_FF + 30 + Interact_Rifle + UI/Commands/FF + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_LSW_Flame + 3.0 + 23.9 + 0.9 + 1 + Shot_IncendiaryLauncher + GunTail_Heavy + 14 + + true + +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 9 + 2 + +
    + +
  • Ultratech
  • +
    +
    + + + + + PN_RoyalLSW_EMP + + [caution] : Automaton exclusive weapon.\n\nA launcher that can fire a variety of grenades. Users can fire Frag, Incendiary, EMP, Smoke, and Firefoam grenades. + Spacer + + Things/Weapons/PNRoyalLSW + Graphic_Single + + Interact_Rifle + + + + + + + + 75000 + 7 + 3.0 + + + 100 + 3 + 2 + + +
  • + + Things/Weapons/SYS/PNRoyalLSW_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalLSW_Full + Graphic_Multi + + Back + + (0,0.3,0) + 25 + + + (0,-0.3,0) + -25 + + + (-0.15,-0.3,0) + 70 + + + (0.15,-0.3,0) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + use HE shell + PN_RoyalLSW + 30 + Interact_Rifle + UI/Commands/HE + 1 +
  • +
  • + + use Incendiary shell + PN_RoyalLSW_IE + 30 + Interact_Rifle + UI/Commands/Flame + 1 +
  • +
  • + + use Smoke shell + PN_RoyalLSW_Smoke + 30 + Interact_Rifle + UI/Commands/Smoke + 1 +
  • +
  • + + use Firefoam shell + PN_RoyalLSW_FF + 30 + Interact_Rifle + UI/Commands/FF + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_LSW_EMP + 3.0 + 23.9 + 0.9 + 1 + Shot_IncendiaryLauncher + GunTail_Heavy + 14 + + true + +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 9 + 2 + +
    + +
  • Ultratech
  • +
    +
    + + + + + PN_RoyalLSW_Smoke + + [caution] : Automaton exclusive weapon.\n\nA launcher that can fire a variety of grenades. Users can fire Frag, Incendiary, EMP, Smoke, and Firefoam grenades. + Spacer + + Things/Weapons/PNRoyalLSW + Graphic_Single + + Interact_Rifle + + + + + + + + 75000 + 7 + 3.0 + + + 100 + 3 + 2 + + +
  • + + Things/Weapons/SYS/PNRoyalLSW_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalLSW_Full + Graphic_Multi + + Back + + (0,0.3,0) + 25 + + + (0,-0.3,0) + -25 + + + (-0.15,-0.3,0) + 70 + + + (0.15,-0.3,0) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + use HE shell + PN_RoyalLSW + 30 + Interact_Rifle + UI/Commands/HE + 1 +
  • +
  • + + use Incendiary shell + PN_RoyalLSW_IE + 30 + Interact_Rifle + UI/Commands/Flame + 1 +
  • +
  • + + use EMP shell + PN_RoyalLSW_EMP + 30 + Interact_Rifle + UI/Commands/EMP + 1 +
  • +
  • + + use Firefoam shell + PN_RoyalLSW_FF + 30 + Interact_Rifle + UI/Commands/FF + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_LSW_Smoke + 3.0 + 23.9 + 0.9 + 1 + Shot_IncendiaryLauncher + GunTail_Heavy + 14 + + true + +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 9 + 2 + +
    + +
  • Ultratech
  • +
    +
    + + + + + PN_RoyalLSW_FF + + [caution] : Automaton exclusive weapon.\n\nA launcher that can fire a variety of grenades. Users can fire Frag, Incendiary, EMP, Smoke, and Firefoam grenades. + Spacer + + Things/Weapons/PNRoyalLSW + Graphic_Single + + Interact_Rifle + + + + + + + + 75000 + 7 + 3.0 + + + 100 + 3 + 2 + + +
  • + + Things/Weapons/SYS/PNRoyalLSW_Sheath + Graphic_Single + + + Things/Weapons/SYS/PNRoyalLSW_Full + Graphic_Multi + + Back + + (0,0.3,0) + 25 + + + (0,-0.3,0) + -25 + + + (-0.15,-0.3,0) + 70 + + + (0.15,-0.3,0) + -70 + +
  • +
  • + +
  • RimWorld.CompProperties_Styleable
  • +
  • RimWorld.CompStyleable
  • +
  • RimWorld.CompProperties_Biocodable
  • +
  • RimWorld.CompBiocodable
  • +
  • RimWorld.CompQuality
  • +
  • RimWorld.CompProperties_Art
  • +
  • RimWorld.CompArt
  • +
  • RimWorld.CompReloadable
  • + + +
  • + + use HE shell + PN_RoyalLSW + 30 + Interact_Rifle + UI/Commands/HE + 1 +
  • +
  • + + use Incendiary shell + PN_RoyalLSW_IE + 30 + Interact_Rifle + UI/Commands/Flame + 1 +
  • +
  • + + use EMP shell + PN_RoyalLSW_EMP + 30 + Interact_Rifle + UI/Commands/EMP + 1 +
  • +
  • + + use Smoke shell + PN_RoyalLSW_Smoke + 30 + Interact_Rifle + UI/Commands/Smoke + 1 +
  • +
    + +
    + +
  • + Verb_Shoot + true + PN_Bullet_LSW_FF + 3.0 + 23.9 + 0.9 + 1 + Shot_IncendiaryLauncher + GunTail_Heavy + 14 + + true + +
  • +
    + + + + +
  • + + +
  • Blunt
  • + + 9 + 2 + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 9 + 2 + +
    + +
  • Ultratech
  • +
    +
    + + + PN_Bullet_LSW_bomb + + Projectile_Explosive + + 1.9 + Bomb + 40 + true + 0.2 + 0.6 + + + Things/Projectile/LauncherShot + Graphic_Single + + + + + PN_Bullet_LSW_Flame + + Projectile_Explosive + + 1.9 + Flame + 40 + Filth_Fuel + 0.6 + true + 0.2 + 0.6 + + + Things/Projectile/LauncherShot + Graphic_Single + + + + + PN_Bullet_LSW_EMP + + Projectile_Explosive + + 1.9 + EMP + 40 + 0.2 + 0.6 + + + Things/Projectile/LauncherShot + Graphic_Single + + + + + PN_Bullet_LSW_Smoke + + Projectile_Explosive + + 40 + Smoke + + 2.4 + BlindSmoke + true + 0.2 + 0.6 + 0.5 + + + Things/Projectile/LauncherShot + Graphic_Single + + + + + PN_Bullet_LSW_FF + + Projectile_Explosive + + 2.4 + Extinguish + 40 + 0.2 + 0.6 + Filth_FireFoam + 1 + 3 + ExtinguisherExplosion + + + Things/Projectile/LauncherShot + Graphic_Single + + +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThoughtDefs/Thoughts_LostDeath.xml b/1.6/Core/Defs/ThoughtDefs/Thoughts_LostDeath.xml new file mode 100644 index 0000000..216f08d --- /dev/null +++ b/1.6/Core/Defs/ThoughtDefs/Thoughts_LostDeath.xml @@ -0,0 +1,203 @@ + + + + + PN_KnowColonyAutomatonDied + 6 + 5 + +
  • Psychopath
  • +
  • Bloodlust
  • +
    + +
  • + + One of our automaton destroyed. That automaton was our property. + -2 +
  • +
    +
    + + + PN_AutomatonWithGoodOpinionDied + 20 + 5 + 1 + +
  • Psychopath
  • +
    + +
  • + + Such a wonderful automaton, gone forever. The universe gets darker every day. + -5 +
  • +
    +
    + + + PN_AutomatonWithBadOpinionDied + 10 + 5 + 1 + +
  • + + That scrap was finally destroyed. + 5 +
  • +
    +
    + + + PN_WitnessedDestroyedAlly + Things/Mote/ThoughtSymbol/Skull + true + 2 + 5 + +
  • Psychopath
  • +
  • Bloodlust
  • +
    + +
  • + + I saw one of our automaton destroyed. That automaton was our property. + -2 +
  • +
    +
    + + + + PN_ColonyAutomatonLost + 6 + 5 + true + +
  • Psychopath
  • +
    + +
  • + + One of our automaton lost. That automaton was our property. + -2 +
  • +
    +
    + + + PN_AutomatonWithGoodOpinionLost + 10 + 5 + 1 + +
  • Psychopath
  • +
    + +
  • + + Such a wonderful automaton, lost. The universe gets darker every day. + -5 +
  • +
    +
    + + + PN_AutomatonWithBadOpinionLost + 10 + 5 + 1 + +
  • + + That scrap was finally disappeared. + 5 +
  • +
    +
    + + + + PN_ColonyAutomatondisassemble + 6 + 5 + true + +
  • Psychopath
  • +
    + +
  • + + One of our automaton disassembled. it's a pity we won't be able to see it again. + -1 +
  • +
    +
    + + + PN_AutomatonWithGoodOpiniondisassemble + 10 + 5 + 1 + +
  • Psychopath
  • +
    + +
  • + + Such a wonderful automaton, disassembled. It was a colony decision, but I can't stand the disappointment. + -3 +
  • +
    +
    + + + PN_AutomatonWithBadOpiniondisassemble + 10 + 5 + 1 + +
  • + + That scrap was finally disassembled. + 3 +
  • +
    +
    + + + + PN_AutomatonBanished + 6 + 5 + true + +
  • Psychopath
  • +
    + +
  • + + We just banished automaton. I hope they can meet their new master. + -1 +
  • +
    +
    + + + PN_AutomatonBanishedToDie + 6 + 5 + true + +
  • Psychopath
  • +
    + +
  • + + We banished automaton in such a way that there's almost no way they'll survive. + -2 +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/ThoughtDefs/Thoughts_PanielReplace.xml b/1.6/Core/Defs/ThoughtDefs/Thoughts_PanielReplace.xml new file mode 100644 index 0000000..7be71f9 --- /dev/null +++ b/1.6/Core/Defs/ThoughtDefs/Thoughts_PanielReplace.xml @@ -0,0 +1,244 @@ + + + + + PN_KnowColonyAutomatonDiedforPN + 6 + 5 + +
  • Psychopath
  • +
  • Bloodlust
  • +
    + +
  • + + My colleague was destroyed. Did she fulfill her duties? + -2 +
  • +
    +
    + + + PN_AutomatonWithGoodOpinionDiedforPN + 20 + 5 + 1 + +
  • Psychopath
  • +
    + +
  • + + My friend was destroyed. It's so sad that we can't carry out our duties with her. + -5 +
  • +
    +
    + + + PN_AutomatonWithBadOpinionDiedforPN + 10 + 5 + 1 + +
  • + + That scrap was finally destroyed. + 5 +
  • +
    +
    + + + PN_WitnessedDestroyedAllyforPN + Things/Mote/ThoughtSymbol/Skull + true + 2 + 5 + +
  • Psychopath
  • +
  • Bloodlust
  • +
    + +
  • + + I saw one of our colleague destroyed. Did she fulfill her duties? + -2 +
  • +
    +
    + + + + PN_ColonyAutomatonLostforPN + 6 + 5 + true + +
  • Psychopath
  • +
    + +
  • + + My colleague was lost. Did she do her duty? + -2 +
  • +
    +
    + + + PN_AutomatonWithGoodOpinionLostforPN + 10 + 5 + 1 + +
  • Psychopath
  • +
    + +
  • + + My friend was lost. It's so sad that we can't carry out our duties with her. + -5 +
  • +
    +
    + + + PN_AutomatonWithBadOpinionLostforPN + 10 + 5 + 1 + +
  • + + That scrap was finally disappeared. + 5 +
  • +
    +
    + + + + PN_ColonyAutomatondisassembleforPN + 6 + 5 + true + +
  • Psychopath
  • +
    + +
  • + + My colleague was disassembled. Did she do her duty? + -2 +
  • +
    +
    + + + PN_AutomatonWithGoodOpiniondisassembleforPN + 10 + 5 + 1 + +
  • Psychopath
  • +
    + +
  • + + My friend was disassemble. It's so sad that we can't carry out our duties with her. + -5 +
  • +
    +
    + + + PN_AutomatonWithBadOpiniondisassembleforPN + 10 + 5 + 1 + +
  • + + That scrap was finally disassembled. + 5 +
  • +
    +
    + + + + PN_AutomatonBanishedforPN + 6 + 5 + true + +
  • Psychopath
  • +
    + +
  • + + We just banished colleague. I hope they can meet their new master. + -2 +
  • +
    +
    + + + PN_AutomatonBanishedToDieforPN + 6 + 5 + true + +
  • Psychopath
  • +
    + +
  • + + We banished colleague in such a way that there's almost no way they'll survive. + -3 +
  • +
    +
    + + + + PN_AteLavishMeal + 2 + +
  • + + I've heard that lavish meal feels like nourished body and soul. I'm not sure, but it feels like something good! + 12 +
  • +
    +
    + + + PN_AteFineMeal + 2 + +
  • + + I heard that fine meal is delicious. Yum? + 5 +
  • +
    +
    + + + + PN_DefeatedMechCluster + Things/Mote/ThoughtSymbol/Skull + true + 10 + 5 + +
  • + + Stupid murder cans who know neither duty nor honor! + 4 +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Defs/TraderKindDefs/TraderKinds_Base.xml b/1.6/Core/Defs/TraderKindDefs/TraderKinds_Base.xml new file mode 100644 index 0000000..7078b28 --- /dev/null +++ b/1.6/Core/Defs/TraderKindDefs/TraderKinds_Base.xml @@ -0,0 +1,251 @@ + + + + PN_Base_PnLindustry + + + +
  • + Silver + 2000~4000 +
  • +
  • + ComponentIndustrial + 20~70 +
  • +
  • + ComponentSpacer + 1~6 +
  • +
  • + Steel + 500~800 +
  • +
  • + Plasteel + 100~400 +
  • +
  • + Uranium + 40~200 +
  • +
  • + Chemfuel + 200~600 +
  • +
  • + Neutroamine + 50~100 +
  • +
  • + MedicineIndustrial + 25~50 +
  • +
  • + Hyperweave + 10~25 +
  • +
  • + DevilstrandCloth + 10~25 +
  • +
  • + FoodRaw + +
  • EggsFertilized
  • + + 2~4 + 400~800 + +
  • + FoodMeals + 1~2 + 12~50 +
  • +
  • + ResourcesRaw + 2~4 + 400~800 +
  • +
  • + Textiles + 1~2 + 400~800 +
  • +
  • + 1~4 +
  • +
  • + MortarShell + 1~2 + 20~40 +
  • +
  • + PN_Shell + 1~2 + 3~6 +
  • +
  • + Chocolate + -30~70 +
  • +
  • + Beer + -40~100 +
  • + + +
  • + PN_AutomatonFuel + 200~600 +
  • +
  • + PN_antibiotics + 2~6 +
  • + + +
  • + PN_RepairKit + 10~20 +
  • +
  • + PN_BrainCasing + 3~6 +
  • +
  • + Leather_Automaton + 50~200 +
  • +
  • + PN_Component + 4~8 +
  • + +
  • + Packaged_NormalAutomatonSoldier + 0~1 +
  • +
  • + Packaged_NormalAutomatonWorker + 0~1 +
  • +
  • + Packaged_NormalAutomatonMaid + 0~1 +
  • + + +
  • + BasicClothing + 7~15 +
  • +
  • + Clothing + 3~5 +
  • +
  • + Armor + 8~10 +
  • + + +
  • + WeaponRanged + 3~6 +
  • +
  • + WeaponsMelee + 3~4 + 1~2 +
  • + + +
  • + PN_ResurrectModule + -1~1 +
  • +
  • + TechHediff + 2~4 + 1~1 +
  • + + +
  • + BuildingsFurniture + 3~4 + 1~2 +
  • +
  • + Art + 4~8 +
  • +
  • + Television + 1~2 + 1~2 +
  • +
  • + Telescope + 0~1 +
  • + + +
  • + +
  • + 2 + 0.5 +
  • +
  • + 3 + 0.5 +
  • + + + + + +
  • + Artifact + 1~4 + 1~1 +
  • +
  • + ExoticMisc + 1~4 + 1~2 + +
  • ComponentSpacer
  • + + + 2~15 + 50~200 + 3~4 + + + + +
  • + +
  • AnimalFarm
  • +
  • AnimalPet
  • + + +
  • AnimalUncommon
  • +
  • AnimalExotic
  • +
    + 2~4 + 3~8 + +
  • AnimalFarm
  • +
    + + + +
  • + + + + \ No newline at end of file diff --git a/1.6/Core/Defs/TraderKindDefs/TraderKinds_CaravanPnL.xml b/1.6/Core/Defs/TraderKindDefs/TraderKinds_CaravanPnL.xml new file mode 100644 index 0000000..07636f5 --- /dev/null +++ b/1.6/Core/Defs/TraderKindDefs/TraderKinds_CaravanPnL.xml @@ -0,0 +1,74 @@ + + + + PN_Caravan_PnLindustry + + + + +
  • + Silver + 750~1200 +
  • +
  • + ComponentIndustrial + 8~16 +
  • +
  • + ComponentSpacer + -1~2 +
  • +
  • + Steel + 75~150 +
  • +
  • + Chemfuel + 50~150 +
  • + + +
  • + PN_AutomatonFuel + 50~150 +
  • +
  • + PN_antibiotics + 1~2 +
  • + + +
  • + PN_RepairKit + 2~6 +
  • +
  • + PN_BrainCasing + 1~3 +
  • +
  • + Leather_Automaton + 20~60 +
  • + +
  • + PN_OTPCard + -3~1 +
  • + + + + + + + + + + + + +
  • + + + + \ No newline at end of file diff --git a/1.6/Core/Defs/TraderKindDefs/TraderKinds_OrbitalPnL.xml b/1.6/Core/Defs/TraderKindDefs/TraderKinds_OrbitalPnL.xml new file mode 100644 index 0000000..8f80cee --- /dev/null +++ b/1.6/Core/Defs/TraderKindDefs/TraderKinds_OrbitalPnL.xml @@ -0,0 +1,133 @@ + + + + PN_Orbital_PnLindustry + + true + PN_SubsidiaryFaction + + + +
  • + Silver + 2000~4000 +
  • +
  • + ComponentIndustrial + 15~30 +
  • +
  • + ComponentSpacer + 1~2 +
  • +
  • + Steel + 500~800 +
  • +
  • + Plasteel + 100~400 +
  • +
  • + Uranium + 40~200 +
  • +
  • + Chemfuel + 200~600 +
  • +
  • + Neutroamine + 50~100 +
  • +
  • + MedicineIndustrial + 10~15 +
  • +
  • + Hyperweave + 10~25 +
  • +
  • + DevilstrandCloth + 10~25 +
  • + + +
  • + PN_AutomatonFuel + 200~600 +
  • +
  • + PN_antibiotics + 2~6 +
  • + + +
  • + PN_RepairKit + 10~20 +
  • +
  • + PN_BrainCasing + 3~6 +
  • +
  • + Leather_Automaton + 50~200 +
  • +
  • + PN_Component + 4~8 +
  • + +
  • + Packaged_NormalAutomatonSoldier + 0~1 +
  • +
  • + Packaged_NormalAutomatonWorker + 0~1 +
  • +
  • + Packaged_NormalAutomatonMaid + 0~1 +
  • + +
  • + PN_PrototypeRailGun + -3~1 +
  • +
  • + PN_WeaponsMeleeBladelink + 1 + -4~1 +
  • + + + +
  • + PN_ResurrectModule + -1~1 +
  • + + +
  • + Techprint_CataphractArmor + -4~1 +
  • +
  • + Techprint_BrainWiring + -4~1 +
  • + + + + + + +
  • + + + + \ No newline at end of file diff --git a/1.6/Core/Defs/TraitDefs/PN_Traits.xml b/1.6/Core/Defs/TraitDefs/PN_Traits.xml new file mode 100644 index 0000000..76fc7c6 --- /dev/null +++ b/1.6/Core/Defs/TraitDefs/PN_Traits.xml @@ -0,0 +1,14 @@ + + + + + PN_PerfectMemory + 0 + +
  • + + {PAWN_nameDef} is automata, automata auto memory system logging all things she saw. {PAWN_possessive} skills will never decay. +
  • + + +
    \ No newline at end of file diff --git a/1.6/Core/Patches/Anomaly.xml b/1.6/Core/Patches/Anomaly.xml new file mode 100644 index 0000000..54a2c8e --- /dev/null +++ b/1.6/Core/Patches/Anomaly.xml @@ -0,0 +1,88 @@ + + + + +
  • Anomaly
  • +
    + + Always + +
  • + Defs/AlienRace.ThingDef_AlienRace[defName="Paniel_Race"]/race + + true + Basic + 3 + +
  • + +
  • + Defs/AlienRace.ThingDef_AlienRace[defName="Paniel_Race"]/comps + +
  • + 8 + true +
  • +
  • + 120000 + 1 + true +
  • + + + +
  • + Defs/AlienRace.ThingDef_AlienRace[defName="Paniel_Race"]/alienRace/graphicPaths/body + + + + Paniel/Body/Naked_Female + + + +
  • + +
  • + Defs/AlienRace.ThingDef_AlienRace[defName="Paniel_Race"]/alienRace/graphicPaths/head + + + + Paniel/Heads/PNHead/PNHead1 + + + +
  • + +
  • + Defs/MutantDef[defName="Ghoul"]/drugWhitelist + +
  • PN_AutomatonFuel
  • + + + +
  • + Defs/AutomataRace.ThingDefInjectDef[defName="Comp_CorpseSelfDestruct_Inject"]/comps + +
  • + 200 + DeathRefusal + true +
  • + + + +
  • + Defs/AutomataRace.ThingDefInjectDef[defName="Comp_CorpseSelfDestruct_Inject"]/comps + +
  • + 200 + DeathRefusalCreepJoiner + true +
  • + + + +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Patches/Ideology.xml b/1.6/Core/Patches/Ideology.xml new file mode 100644 index 0000000..a0ed5ac --- /dev/null +++ b/1.6/Core/Patches/Ideology.xml @@ -0,0 +1,86 @@ + + + + +
  • Ideology
  • +
    + + Always + + + + + + +
  • + /Defs/ThingDef[defName = "Apparel_Burka"]/apparel/tags + + /Defs/ThingDef[defName = "Apparel_Burka"]/apparel + + +
  • PN_Burka
  • + + + + + /Defs/ThingDef[defName = "Apparel_Burka"]/apparel/tags + +
  • PN_Burka
  • +
    +
    + + + +
  • + /Defs/HediffDef[defName = PN_RapidFireModuleHediff]/comps + +
  • +
  • + PN_RapidFireAbility +
  • + + + + +
  • + /Defs/ThingDef[defName = PN_RapidFireModule]/descriptionHyperlinks + +
  • + PN_RapidFireAbility +
  • + + + +
  • + /Defs/HediffDef[defName = PN_CQCModuleHediff]/comps + +
  • +
  • + PN_CQCAbility +
  • + + + + +
  • + /Defs/ThingDef[defName = PN_CQCModule]/descriptionHyperlinks + +
  • + PN_CQCAbility +
  • + + + +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Patches/Royalty.xml b/1.6/Core/Patches/Royalty.xml new file mode 100644 index 0000000..9e9fd51 --- /dev/null +++ b/1.6/Core/Patches/Royalty.xml @@ -0,0 +1,208 @@ + + + + +
  • Royalty
  • +
    + + Always + + +
  • + /Defs/HediffDef[defName = "PanielBaseHediff"]/comps/li[@Class = "MoharHediffs.HediffCompProperties_HediffNullifier"]/hediffToNullify + + +
  • PsychicLove
  • +
  • Joyfuzz
  • + + + + +
  • + /Defs/FactionDef[defName = "Empire"]/permanentEnemyToEveryoneExcept + +
  • Paniel_PlayerFaction
  • +
  • PN_indistryFaction
  • +
  • PN_SubsidiaryFaction
  • + + + + +
  • + /Defs/ResearchProjectDef[defName = "PNRP_TierC_Apparel"]/baseCost + + 500 + +
  • +
  • + /Defs/ResearchProjectDef[defName = "PNRP_TierC_Apparel"]/prerequisites + + +
  • PNRP_TierB_Apparel
  • +
  • CataphractArmor
  • + + + + + +
  • + /Defs/TraderKindDef[defName = "PN_Orbital_PnLindustry"]/stockGenerators + +
  • + Techprint_CataphractArmor + -2~1 +
  • +
  • + Techprint_BrainWiring + -2~1 +
  • + + + +
  • + /Defs/TraderKindDef[defName = "PN_Base_PnLindustry"]/stockGenerators + +
  • + Techprint_CataphractArmor + -1~1 +
  • +
  • + Techprint_BrainWiring + -1~1 +
  • + + + + +
  • + /Defs/FactionDef[defName = "PN_SubsidiaryFaction"] + + +
  • PN_PnLCareerTitleTag
  • + + RoyalTitleInheritanceWorker + + + PnL result point + Icon/Paniel_PlayerIcon + + + +
  • + /Defs/FactionDef[defName = "PN_SubsidiaryFaction"]/caravanTraderKinds + +
  • PN_Caravan_TributeCollector
  • + + + + + +
  • + /Defs/QuestScriptDef[defName="Util_ChooseRandomQuestLodgerKind"]/root[@Class="QuestNode_Sequence"]/nodes/li[@Class="QuestNode_IsSet"]/node[@Class="QuestNode_GetRandomPawnKindForFaction"]/choices + +
  • + PN_SubsidiaryFaction + +
  • PN_AssociateH
  • +
  • PN_AssociateP_EngineerA
  • +
  • PN_AssociateP_EngineerB
  • +
  • PN_AssociateP_DomesticA
  • +
  • PN_AssociateP_DomesticB
  • + + + + + +
  • + /Defs/QuestScriptDef[defName="Util_ChooseRandomQuestHelperKind"]/root[@Class="QuestNode_Sequence"]/nodes/li[@Class="QuestNode_GetRandomPawnKindForFaction"]/choices + +
  • + PN_SubsidiaryFaction + +
  • PN_Mid_CloseUnit
  • +
  • PN_Mid_RangeUnit
  • +
  • PN_EliteCloseUnit
  • +
  • PN_EliteRangeUnit
  • + + + + + + +
  • + /Defs/PawnKindDef[defName = "PN_AssociateH"] + + 1 + +
  • PN_Title_Associate
  • +
  • PN_Title_Senior
  • + + + + +
  • + /Defs/PawnKindDef[defName = "PN_ManagerH"] + + 1 + +
  • PN_Title_Manager
  • +
  • PN_Title_SeniorManager
  • + + + + +
  • + /Defs/PawnKindDef[defName = "PN_Director"] + + 1 + +
  • PN_Title_Director
  • + + + + +
  • + /Defs/PawnKindDef[defName = "PN_SeniorDirector"] + + 1 + +
  • PN_Title_SeniorDirector
  • + + + + +
  • + /Defs/PawnKindDef[defName = "PN_VP"] + + 1 + +
  • PN_TitleVP
  • + + + + +
  • + /Defs/PawnKindDef[defName = "PN_SVP"] + + 1 + +
  • PN_TitleSVP
  • + + + + +
  • + /Defs/PawnKindDef[defName = "PN_CEO"] + + 1 + +
  • PN_TitleCEO
  • + + + + +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Core/Patches/Vanilla.xml b/1.6/Core/Patches/Vanilla.xml new file mode 100644 index 0000000..e77d5f2 --- /dev/null +++ b/1.6/Core/Patches/Vanilla.xml @@ -0,0 +1,36 @@ + + + + + */WorkGiverDef[defName="DoBillsFabricationBench"]/fixedBillGiverDefs + +
  • PN_AutomatonBench
  • +
    +
    + + + + + +
    \ No newline at end of file diff --git a/1.6/Ideology/Defs/AbilityDefs/Ideo_AbilityDef_Industrial.xml b/1.6/Ideology/Defs/AbilityDefs/Ideo_AbilityDef_Industrial.xml new file mode 100644 index 0000000..9b9133e --- /dev/null +++ b/1.6/Ideology/Defs/AbilityDefs/Ideo_AbilityDef_Industrial.xml @@ -0,0 +1,106 @@ + + + + + + + + + + PN_RapidFireAbility + + This ability allows users to shoot quickly, but lowers the shooting accuracy. + + PN_RapidFire + + CastAbilityOnThing + False + False + UI/Abilities/PNTriggerHappy + UI/Abilities/PNTriggerHappy + True + False + True + False + PNModule_1day + Misc12 + 3 + CombatCommand_Warmup + + 167 + + + Verb_CastAbility + 0.5 + -1 + False + False + + true + false + false + false + false + false + + + +
  • + CompAbilityEffect_GiveHediff + PN_RapidFire + True + true +
  • +
    +
    + + + + PN_CQCAbility + + This ability increases users to close quarters combat stat, but lowers the shooting accuracy. + + PN_CQC + + CastAbilityOnThing + False + False + UI/Abilities/PNCQC + UI/Abilities/PNCQC + True + False + True + False + PNModule_1day + Misc12 + 3 + CombatCommand_Warmup + + 167 + + + Verb_CastAbility + 0.5 + -1 + False + False + + true + false + false + false + false + false + + + +
  • + CompAbilityEffect_GiveHediff + PN_CQC + True + true +
  • +
    +
    + +
    \ No newline at end of file diff --git a/1.6/Ideology/Defs/AbilityDefs/Ideo_AbilityDef_Spacer.xml b/1.6/Ideology/Defs/AbilityDefs/Ideo_AbilityDef_Spacer.xml new file mode 100644 index 0000000..4b20329 --- /dev/null +++ b/1.6/Ideology/Defs/AbilityDefs/Ideo_AbilityDef_Spacer.xml @@ -0,0 +1,291 @@ + + + + + + + + + + PN_OfficerCommandAbility + + Create an aura that boosts the combat skills of everyone nearby. The effect lasts 6 hours and remains attached to the user for the duration. + + PN_OfficerCommandBuff + + CastAbilityOnThing + False + False + UI/Abilities/PNOfficerCommand + UI/Abilities/PNOfficerCommand + True + False + True + False + PNModule_2day + Misc12 + 3 + CombatCommand_Warmup + + 250 + 9.9 + + + Verb_CastAbility + 0.5 + 9.9 + False + False + + true + false + false + false + false + false + + + +
  • + CompAbilityEffect_GiveHediff + PN_OfficerCommand + True + True + true +
  • +
    +
    + + + + PN_MeisterAdviceAbility + + Create an aura that boosts the engineer skills of everyone nearby. The effect lasts 12 hours and remains attached to the user for the duration. + + PN_MeisterAdviceBuff + + CastAbilityOnThing + False + False + UI/Abilities/PNMeisterAdvice + UI/Abilities/PNMeisterAdvice + True + False + True + False + PNModule_2day + Misc12 + 3 + CombatCommand_Warmup + + 500 + 9.9 + + + Verb_CastAbility + 0.5 + 9.9 + False + False + + true + false + false + false + false + false + + + +
  • + CompAbilityEffect_GiveHediff + PN_MeisterAdvice + True + True + true +
  • +
    +
    + + + + PN_IntensiveMedicalAbility + + This ability makes users more proficient in medical work. + + PN_IntensiveMedical + + CastAbilityOnThing + False + False + UI/Abilities/PNIntensiveMedical + UI/Abilities/PNIntensiveMedical + True + False + True + False + PNModule_1day + Misc12 + 3 + CombatCommand_Warmup + + 84 + + + Verb_CastAbility + 0.5 + -1 + False + False + + true + false + false + false + false + false + + + +
  • + CompAbilityEffect_GiveHediff + PN_IntensiveMedical + True + true +
  • +
    +
    + + + + PN_ImmunityDriveAbility + + Offer module support that energizes the body, boosting someone's immunity gain for one day. + + PN_ImmunityDrive + PN_ImmunityDriveAbility + + PNModule_rightoff + UI/Abilities/PNImmunityDrive + UI/Abilities/PNImmunityDrive + Misc12 + CastAbilityOnThingMelee + True + False + True + False + ImmunityDrive_Resolve + + 1000 + + +
  • + CompAbilityEffect_GiveHediff + PN_ImmunityDrive + true +
  • +
    + + Verb_CastAbilityTouch + False + -1 + 1.5 + + False + True + + +
    + + + + PN_FieldMedicAbility + + This ability enables users to provide rapid medical support in the field. + + PN_FieldMedic + PN_StimPackAbility + + CastAbilityOnThing + False + False + UI/Abilities/PNFieldMedic + UI/Abilities/PNFieldMedic + True + False + True + False + PNModule_2day + Misc12 + 3 + CombatCommand_Warmup + + 250 + + + Verb_CastAbility + 0.5 + -1 + False + False + + true + false + false + false + false + false + + + +
  • + CompAbilityEffect_GiveHediff + PN_FieldMedic + True + true +
  • +
    +
    + + + + PN_StimPackAbility + + Inject drugs that increase physical stat into the target. It is not addictive, but side effects occur when the effect is over. + + PN_StimPack + PN_StimPackSideEffect + + PNModule_rightoff + UI/Abilities/PNStimPack + UI/Abilities/PNStimPack + Misc12 + CastAbilityOnThingMelee + True + False + True + False + ImmunityDrive_Resolve + + 250 + + +
  • + CompAbilityEffect_GiveHediff + PN_StimPack + true +
  • +
    + + Verb_CastAbilityTouch + False + -1 + 1.5 + + False + True + + +
    + +
    \ No newline at end of file diff --git a/1.6/Ideology/Defs/HediffDefs/Ideo_Hediffs_Cast_Industrial.xml b/1.6/Ideology/Defs/HediffDefs/Ideo_Hediffs_Cast_Industrial.xml new file mode 100644 index 0000000..f6c777a --- /dev/null +++ b/1.6/Ideology/Defs/HediffDefs/Ideo_Hediffs_Cast_Industrial.xml @@ -0,0 +1,146 @@ + + + + + + + + PN_RapidFire + + The hediff created by activating rapid fire ability. + HediffWithComps + +
  • + + -4 + + + 0.70 + +
  • +
    + +
  • + True +
  • +
  • +
  • + +
  • PN_RapidFireOverload
  • + + +
    + false +
    + + + PN_RapidFireOverload + + module overloaded + module overloaded + HediffWithComps + +
  • + 5000 + True +
  • +
  • + + +
  • + +
  • + Moving + 0.10 +
  • + + + -3 + + + 1.3 + + + +
    + + + + PN_CQC + + The hediff created by activating close quarters combat ability. + HediffWithComps + +
  • + +
  • + Moving + 0.10 +
  • + + + 2 + 2 + -0.15 + 0.10 + + +
    + +
  • + True +
  • +
  • +
  • + +
  • PN_CQCOverload
  • + + +
    + false +
    + + + PN_CQCOverload + + module overloaded + module overloaded + HediffWithComps + +
  • + 5000 + True +
  • +
  • + + +
  • + +
  • + Moving + -0.10 +
  • +
  • + Manipulation + -0.10 +
  • + + + -4 + -4 + -0.25 + -0.20 + + + +
    +
    \ No newline at end of file diff --git a/1.6/Ideology/Defs/HediffDefs/Ideo_Hediffs_Cast_Spacer.xml b/1.6/Ideology/Defs/HediffDefs/Ideo_Hediffs_Cast_Spacer.xml new file mode 100644 index 0000000..68ae75e --- /dev/null +++ b/1.6/Ideology/Defs/HediffDefs/Ideo_Hediffs_Cast_Spacer.xml @@ -0,0 +1,504 @@ + + + + + + PN_OfficerCommand + + By encouraging and commanding nearby allies, this person can enhance their focus in combat and thus their battle performance. + HediffWithComps + +
  • + True +
  • +
  • +
  • + 9.9 + Mote_CombatCommand + true + + false + false + false + true + + PN_OfficerCommandBuff +
  • +
  • + +
  • PN_OfficerCommandOverload
  • + + +
    + +
  • + + 2 + 0.10 + + + 0.80 + + +
  • + Moving + 0.20 +
  • + + +
    + false +
    + + + PN_OfficerCommandBuff + + Combat abilities are boosted thanks to being near someone who is using the officer command ability. + HediffWithComps + +
  • + false +
  • +
  • +
  • +
    + false + +
  • + + 2 + 0.10 + + + 0.80 + + +
  • + Moving + 0.20 +
  • + + +
    +
    + + + PN_OfficerCommandThought + ThoughtWorker_Hediff + PN_OfficerCommandBuff + true + +
  • + + I can't believe I have to follow the commands of an automaton. + -5 +
  • +
    +
    + + + PN_OfficerCommandThoughtforPN + AutomataRace.ThoughtWorker_RaceBPHediff + +
  • + + The officer is with us. We will be able to win this battle under the officer's command. + 5 +
  • +
    + +
  • + Paniel_Race + PN_OfficerCommandBuff + PNBrain + + 1 + 999 + +
  • +
    +
    + + + PN_OfficerCommandOverload + + module overloaded + module overloaded + HediffWithComps + +
  • + 60000 + True +
  • +
  • + + +
  • + +
  • + Consciousness + -0.30 +
  • +
  • + Moving + -0.50 +
  • +
  • + Sight + -0.50 +
  • +
  • + Manipulation + -0.50 +
  • + + + +
    + + + + PN_MeisterAdvice + + By encouraging and advising nearby allies, this person can enhance their focus in engineer work performance. + HediffWithComps + +
  • + True +
  • +
  • +
  • + 9.9 + Mote_WorkCommand + true + + false + false + false + true + + PN_MeisterAdviceBuff +
  • +
  • + +
  • PN_OfficerCommandOverload
  • + + +
    + +
  • + + + + + + + + 1.25 + 1.25 + 1.25 + 1.25 + 1.25 + +
  • +
    + false +
    + + + PN_MeisterAdviceBuff + + work abilities are boosted thanks to being near someone who is using the meister's advice ability. + HediffWithComps + +
  • + false +
  • +
  • +
  • +
    + false + +
  • + + 1.25 + 1.25 + 1.25 + 1.25 + 1.25 + + +
  • + Moving + 0.20 +
  • + + +
    +
    + + + PN_MeisterAdviceThought + ThoughtWorker_Hediff + PN_MeisterAdviceBuff + true + +
  • + + I can't believe I have to follow the advice of an automaton. + -5 +
  • +
    +
    + + + + PN_IntensiveMedical + + The hediff created by activating intensive medical ability. + HediffWithComps + +
  • + + 0.2 + + + 1.50 + 1.50 + 1.50 + 1.50 + +
  • +
    + +
  • + True +
  • +
  • +
  • + +
  • PN_OfficerCommandOverload
  • + + +
  • + PN_ImmunityDriveAbility +
  • +
    + false +
    + + + + PN_ImmunityDrive + + immunity drive + HediffWithComps + +
  • + + 1.25 + +
  • +
    + +
  • + True +
  • +
    + false +
    + + + + PN_FieldMedic + + The hediff created by activating field medic ability. + HediffWithComps + +
  • + + 0.4 + + + 1.50 + +
  • +
    + +
  • + True +
  • +
  • +
  • + +
  • PN_OfficerCommandOverload
  • + + +
  • + PN_StimPackAbility +
  • +
    + false +
    + + + + PN_StimPack + + stim pack injected + HediffWithComps + +
  • + 0.5 + 0.5 + +
  • + Consciousness + 0.10 +
  • +
  • + Sight + 0.20 +
  • +
  • + Moving + 0.30 +
  • + + + -0.12 + + +
    + +
  • + True +
  • +
  • + +
  • PN_StimPackSideEffect
  • + + +
  • + +
  • PN_StimPackSideEffect
  • + + +
    + false +
    + + + PN_StimPackThought + ThoughtWorker_Hediff + PN_StimPack + true + +
  • + + Feeling pumped! Let's do this! + 20 +
  • +
    +
    + + + PN_StimPackSideEffect + + stim pack side effect + stim pack side effect + HediffWithComps + 1.0 + 1.0 + +
  • + -1 + true +
  • +
  • + + +
  • + + 0 + 3 + 0.3 + 0.5 + +
  • + Consciousness + -0.20 +
  • +
  • + Moving + -0.50 +
  • +
  • + Sight + -0.20 +
  • +
  • + BloodPumping + -0.20 +
  • +
  • + Manipulation + -0.10 +
  • + + +
  • + + 0.80 + +
  • + Consciousness + -0.15 +
  • +
  • + Moving + -0.20 +
  • +
  • + Sight + -0.10 +
  • +
  • + BloodPumping + -0.10 +
  • +
  • + Manipulation + -0.05 +
  • + + +
  • + + 0.90 +
  • + +
    + + + PN_StimPackSideEffectThought + ThoughtWorker_Hediff + PN_StimPackSideEffect + true + +
  • + + I'm all fuzzy and can't think straight. My limbs feel heavy, I'm tired and hungry, everything hurts. And why won't my eyes focus properly? + -15 +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Ideology/Defs/MemeDefs/Memes_PnL.xml b/1.6/Ideology/Defs/MemeDefs/Memes_PnL.xml new file mode 100644 index 0000000..e3c3fa3 --- /dev/null +++ b/1.6/Ideology/Defs/MemeDefs/Memes_PnL.xml @@ -0,0 +1,111 @@ + + + + + + + PN_Structure + + Bylaws of PnL industry. An exemplary PnL employee would not break bylaws. + Structure + Icon/Paniel_bylaw + 0 + Conference room + 0 + + +
  • memeLeaderNoun->CEO
  • +
  • memeMoralist->Personnel Manager
  • +
    +
    + + + +
  • episode(tag=meme_PN_Structure) ->...PnL Industry, founded by Paul and Lauren, has evolved from a small industrial company in Glitterworld to a giant interstellar company.\n\n...\n\nEven though we were kicked out of Rimworld for an "unfortunate incident," we're going back to Glitterworld.
  • +
    +
    + +
  • + PN_IdeoStoryPattern +
  • +
    + +
  • + PN_Structure + true +
  • +
    +
    + +
  • + PnL bylaws + PnL + PnL + PnL Employee +
  • +
    + +
  • +
  • BodyMod_Approved
  • + +
  • +
  • OrganUse_Acceptable
  • + +
  • +
  • DrugUse_MedicalOrSocial
  • + +
  • +
  • Apostasy_Abhorrent
  • + +
  • +
  • IdeoDiversity_Abhorrent
  • + +
  • +
  • Nudity_Female_UncoveredGroinOrChestDisapproved
  • + +
  • +
  • Nudity_Male_UncoveredGroinOrChestDisapproved
  • + +
  • +
  • Execution_DontCare
  • + +
  • +
  • Scarification_Horrible
  • + +
  • +
  • Slavery_Abhorrent
  • + +
  • +
  • HAR_AlienSlavery_Abhorrent
  • + +
  • +
  • Cannibalism_Horrible
  • + +
  • +
  • NutrientPasteEating_DontMind
  • + + +
    +
    + + + PN_IdeoStoryPattern + +
  • episode
  • +
    + + +
  • IdeoDescriptionGlobal
  • +
    +
    +
    + + + PN_IdeoIcon + Icon/Paniel_Icon + +
  • PN_Structure
  • +
    +
    + +
    \ No newline at end of file diff --git a/1.6/Ideology/Defs/ThingDefs/Ideo_ThingDef_Module_Spacer.xml b/1.6/Ideology/Defs/ThingDefs/Ideo_ThingDef_Module_Spacer.xml new file mode 100644 index 0000000..9d8049c --- /dev/null +++ b/1.6/Ideology/Defs/ThingDefs/Ideo_ThingDef_Module_Spacer.xml @@ -0,0 +1,211 @@ + + + + + + PN_OfficerModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nCombat model (legd)\n\nThis module allows automaton to use officer command ability. + + PN_OfficerCommandAbility + + + 75000 + + + 45 + 5 + 3 + + + PNRP_TierC_Module + + 6 + + + + + + + + +
  • + PN_OfficerModuleHediff + PNTorso +
  • +
    +
    + + + PN_OfficerModuleHediff + + The hediff created by installing officer module. + + PN_OfficerModule + + + + + +
  • + PN_OfficerCommandAbility +
  • +
    +
    + + + + PN_MeisterModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nEngineer model (legd)\n\nThis module allows automaton to use meister's advice ability. + + PN_MeisterAdviceAbility + + + 75000 + + + 45 + 5 + 3 + + + PNRP_TierC_Module + + 6 + + + + + + + + +
  • + PN_MeisterModuleHediff + PNTorso +
  • +
    +
    + + + PN_MeisterModuleHediff + + The hediff created by installing meister module. + + PN_MeisterModule + + + + + +
  • + PN_MeisterAdviceAbility +
  • +
    +
    + + + + PN_IntensiveMedicalModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nDomestic model (legd)\n\nThis module allows automaton to use intensive medical mode ability.\nAnd if automaton activates intensive medical mode, immunity drive ability can be used. + + PN_IntensiveMedicalAbility + + + 75000 + + + 45 + 5 + 3 + + + PNRP_TierC_Module + + 6 + + + + + + + + +
  • + PN_IntensiveMedicalModuleHediff + PNTorso +
  • +
    +
    + + + PN_IntensiveMedicalModuleHediff + + The hediff created by installing intensive medical module. + + PN_IntensiveMedicalModule + + + + + +
  • + PN_IntensiveMedicalAbility +
  • +
    +
    + + + + PN_FieldMedicModule + + [CAUTION]\nThis module can only be installed on compatible models.\nAlso, the module system must be stable.\n\n[compatible models list]\n\nDomestic model (legd)\nCombat model (legd)\n\nThis module allows automaton to use field medic mode ability.\nAnd if automaton activates field medic mod, injection stim pack ability can be used. + + PN_FieldMedicAbility + + + 75000 + + + 45 + 5 + 3 + + + PNRP_TierC_Module + + 6 + + + + + + + + +
  • + PN_FieldMedicModuleHediff + PNTorso +
  • +
    +
    + + + PN_FieldMedicModuleHediff + + The hediff created by installing intensive field medical module. + + PN_FieldMedicModule + + + + + +
  • + PN_FieldMedicAbility +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Mods/Paniel_Experimental/Defs/HediffDefs/HediffDef_PNE_BodyParts.xml b/1.6/Mods/Paniel_Experimental/Defs/HediffDefs/HediffDef_PNE_BodyParts.xml new file mode 100644 index 0000000..e06d358 --- /dev/null +++ b/1.6/Mods/Paniel_Experimental/Defs/HediffDefs/HediffDef_PNE_BodyParts.xml @@ -0,0 +1,161 @@ + + + + PN_ExperimentalEngineCore + + a experimental engine core + An experimental engine core. allow automata to power without fuel. using this can be extrame dangerous.\n\n + + Warning: This implant cannot be safety removed after installation. + + PN_ExperimentalEngineCore + + + true + 1.1 + true + + +
  • PN_Need_Fuel
  • +
    + +
  • + 0.75 +
  • +
    +
    + + + PN_ExperimentalEngineCore + + An experimental engine core. allow automata to power without fuel. using this can be extrame dangerous. + + PN_InstallExperimentalEngineCore + + + 1 + 1 + 1000 + + + 0.3 + + + PNRP_TierC_Parts + + + + + PN_InstallExperimentalEngineCore + + Install an experimental engine core. + + PN_ExperimentalEngineCore + PN_ExperimentalEngineCore + + Installing experimental engine core. + +
  • + + +
  • PN_ExperimentalEngineCore
  • + + + 1 + +
    + + + +
  • PNCore
  • +
    + PN_ExperimentalEngineCore +
    + + + PN_RemoveExperimentalEngineCore + + Remove the experimental engine core. + + PN_ExperimentalEngineCore + PN_ExperimentalEngineCore + + Removing experimental engine core. + PN_ExperimentalEngineCore + + + + PN_AutoRepairSystem + + An automata auto repair system. allow automaton slowly repair damaged body part. + + PN_InstallAutoRepairSystem + + + 1 + 1 + + + 0.3 + + + PNRP_TierC_Parts + + + + + PN_InstallAutoRepairSystem + + Install an auto repair system. + + PN_AutoRepairSystem + PN_AutoRepairSystem + + Installing auto repair system. + +
  • + + +
  • PN_AutoRepairSystem
  • + + + 1 + +
    + + + +
  • PNTorso
  • +
    + PN_AutoRepairSystem +
    + + + PN_RemoveAutoRepairSystem + + Remove the auto repair system. + + PN_AutoRepairSystem + PN_AutoRepairSystem + + Removing auto repair system. + PN_AutoRepairSystem + + + + PN_AutoRepairSystem + + An auto repair system. slowly repair damaged body part. + + PN_AutoRepairSystem + + +
  • + 0 + 10 + true +
  • +
    +
    + +
    \ No newline at end of file diff --git a/1.6/Mods/Paniel_Experimental/Languages/ChineseSimplified/DefInjected/HediffDef/HediffDef_PNE_BodyParts.xml b/1.6/Mods/Paniel_Experimental/Languages/ChineseSimplified/DefInjected/HediffDef/HediffDef_PNE_BodyParts.xml new file mode 100644 index 0000000..826766b --- /dev/null +++ b/1.6/Mods/Paniel_Experimental/Languages/ChineseSimplified/DefInjected/HediffDef/HediffDef_PNE_BodyParts.xml @@ -0,0 +1,12 @@ + + + + 实验型动力核心 + 一个已安装的实验型动力核心,能驱动姬关人形而无需额外燃料消耗。使用可能伴随巨大潜在风险。 + 实验型动力核心 + + 自动修复系统 + 已安装的姬关人形自动修复系统,能缓慢修复身体部件的损伤。 + 自动修复系统 + + \ No newline at end of file diff --git a/1.6/Mods/Paniel_Experimental/Languages/ChineseSimplified/DefInjected/RecipeDef/RecipeDef_PNE_BodyParts.xml b/1.6/Mods/Paniel_Experimental/Languages/ChineseSimplified/DefInjected/RecipeDef/RecipeDef_PNE_BodyParts.xml new file mode 100644 index 0000000..cae0222 --- /dev/null +++ b/1.6/Mods/Paniel_Experimental/Languages/ChineseSimplified/DefInjected/RecipeDef/RecipeDef_PNE_BodyParts.xml @@ -0,0 +1,18 @@ + + + + 安装实验型动力核心 + 安装实验型动力核心 + 安装实验型动力核心中 + 移除实验型动力核心 + 移除实验型动力核心 + 移除实验型动力核心中 + + 安装自动修复系统 + 安装自动修复系统 + 安装自动修复系统中 + 移除自动修复系统 + 移除自动修复系统 + 移除自动修复系统中 + + \ No newline at end of file diff --git a/1.6/Mods/Paniel_Experimental/Languages/ChineseSimplified/DefInjected/ThingDef/ThingDef_PNE_BodyParts.xml b/1.6/Mods/Paniel_Experimental/Languages/ChineseSimplified/DefInjected/ThingDef/ThingDef_PNE_BodyParts.xml new file mode 100644 index 0000000..21cbfcf --- /dev/null +++ b/1.6/Mods/Paniel_Experimental/Languages/ChineseSimplified/DefInjected/ThingDef/ThingDef_PNE_BodyParts.xml @@ -0,0 +1,10 @@ + + + + 姬关人形实验型动力核心 + 一个实验性的动力核心。允许姬关人形在不使用燃料的情况下提供动力。使用可能伴随巨大潜在风险。 + + 姬关人形自动修复系统 + 一个实验性的姬关人形自动修复系统模块。允许姬关人形缓慢的自我修复损伤。 + + \ No newline at end of file diff --git a/1.6/Mods/Paniel_Misc_Compatibility_Patch/1.5/Core/Patches/SOS2.xml b/1.6/Mods/Paniel_Misc_Compatibility_Patch/1.5/Core/Patches/SOS2.xml new file mode 100644 index 0000000..36a091b --- /dev/null +++ b/1.6/Mods/Paniel_Misc_Compatibility_Patch/1.5/Core/Patches/SOS2.xml @@ -0,0 +1,364 @@ + + + + +
  • Save Our Ship 2
  • +
    + + Always + + + + +
  • + Defs/ThingDef[defName = "PN_ApparelMaid"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelMaid"]/statBases/Insulation_Cold + + 100 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelMaid"]/statBases/Insulation_Heat + + 25 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelMaidHat"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelMaidHat"]/statBases/Insulation_Cold + + 50 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelMaidHat"]/statBases/Insulation_Heat + + 25 + +
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelWorker"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelWorker"]/statBases/Insulation_Cold + + 100 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelWorker"]/statBases/Insulation_Heat + + 25 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelWorkerHat"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelWorkerHat"]/statBases/Insulation_Cold + + 50 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelWorkerHat"]/statBases/Insulation_Heat + + 25 + +
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelSoldier"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelSoldier"]/statBases/Insulation_Cold + + 100 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelSoldier"]/statBases/Insulation_Heat + + 25 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelSoldierHat"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelSoldierHat"]/statBases/Insulation_Cold + + 50 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelSoldierHat"]/statBases/Insulation_Heat + + 25 + +
  • + + + +
  • + Defs/ThingDef[defName = "PN_EliteSecurityUniform"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_EliteSecurityUniform"]/statBases/Insulation_Cold + + 100 + +
  • + +
  • + Defs/ThingDef[defName = "PN_EliteSecurityUniform"]/statBases/Insulation_Heat + + 25 + +
  • + +
  • + Defs/ThingDef[defName = "PN_EliteSecurityHat"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_EliteSecurityHat"]/statBases/Insulation_Cold + + 50 + +
  • + +
  • + Defs/ThingDef[defName = "PN_EliteSecurityHat"]/statBases/Insulation_Heat + + 25 + +
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalguard"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalguard"]/statBases/Insulation_Cold + + 100 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalguard"]/statBases/Insulation_Heat + + 25 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalguardHat"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalguardHat"]/statBases/Insulation_Cold + + 50 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalguardHat"]/statBases/Insulation_Heat + + 25 + +
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeister"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeister"]/statBases/Insulation_Cold + + 100 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeister"]/statBases/Insulation_Heat + + 25 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeisterHat"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeisterHat"]/statBases/Insulation_Cold + + 50 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeisterHat"]/statBases/Insulation_Heat + + 25 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeisterHatWithMonocle"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeisterHatWithMonocle"]/statBases/Insulation_Cold + + 50 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeisterHatWithMonocle"]/statBases/Insulation_Heat + + 25 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeisterMonocle"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeisterMonocle"]/statBases/Insulation_Cold + + 50 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmeisterMonocle"]/statBases/Insulation_Heat + + 25 + +
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmaid"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmaid"]/statBases/Insulation_Cold + + 100 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmaid"]/statBases/Insulation_Heat + + 25 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmaidHat"]/apparel/tags + +
  • EVA
  • + + + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmaidHat"]/statBases/Insulation_Cold + + 50 + +
  • + +
  • + Defs/ThingDef[defName = "PN_ApparelRoyalmaidHat"]/statBases/Insulation_Heat + + 25 + +
  • + +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Mods/Paniel_Misc_Compatibility_Patch/1.5/Core/Patches/Yayo_combat_3.xml b/1.6/Mods/Paniel_Misc_Compatibility_Patch/1.5/Core/Patches/Yayo_combat_3.xml new file mode 100644 index 0000000..eead124 --- /dev/null +++ b/1.6/Mods/Paniel_Misc_Compatibility_Patch/1.5/Core/Patches/Yayo_combat_3.xml @@ -0,0 +1,36 @@ + + + + +
  • Yayo's Combat 3
  • +
  • Yayo's Combat 3 [Adopted]
  • +
    + + Always + + + +
  • + Defs/ThingDef[defName = "PN_Chainlongsword"]/equippedAngleOffset + + 0 + +
  • +
  • + Defs/ThingDef[defName = "PN_Chainlongsword"]/comps +
  • + + +
  • + Defs/ThingDef[defName = "PN_StormLance_Bladelink"]/equippedAngleOffset + + 0 + +
  • +
  • + Defs/ThingDef[defName = "PN_StormLance_Bladelink"]/comps +
  • +
    +
    +
    +
    \ No newline at end of file diff --git a/1.6/Mods/Paniel_Misc_Compatibility_Patch/1.5/Mods/RimImmortal/Defs/PN_RI_Items_Special.xml b/1.6/Mods/Paniel_Misc_Compatibility_Patch/1.5/Mods/RimImmortal/Defs/PN_RI_Items_Special.xml new file mode 100644 index 0000000..bd0537a --- /dev/null +++ b/1.6/Mods/Paniel_Misc_Compatibility_Patch/1.5/Mods/RimImmortal/Defs/PN_RI_Items_Special.xml @@ -0,0 +1,232 @@ + + + + + PN_EnergyRoot + + A cyan middle quality energy root. The energy root is a benign neuroma the size of a mung bean, located inside the prefrontal lobe, an organ that only a very small number of people have. Once you have the energy root, you can feel the Qi in the atmosphere, and indirectly receive a large amount of memory information in a moment. + + Things/Health/EnergyRoot + Graphic_Single + + + 2000 + 2.5 + + +
  • +
  • + WhoXiuXian.CompUsableRoot + InstallEnergyRoot + Inject {0_label} to become a cultivator +
  • +
  • + Hediff_RI_EnergyRoot + 0.5 + PNBrain + false +
  • +
    +
    + + + PN_Make_PN_EnergyRoot + + make 【Medium quality】Energy root for Automata. + Making 【Medium quality】Energy root for Automata. + GeneralLaborSpeed + Cook + Recipe_Machining + 1 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • EnergyRoot
  • + + + 1 + +
    + + 1 + + Crafting +
    + + + PN_EnergyRootHigh + + A cyan high quality energy root. The energy root is a benign neuroma the size of a mung bean, located inside the prefrontal lobe, an organ that only a very small number of people have. Once you have the energy root, you can feel the Qi in the atmosphere, and indirectly receive a large amount of memory information in a moment.\n\nThis energy root is extremely active and can speed up the efficiency of Qi acquisition. + + Things/Health/EnergyRootHigh + Graphic_Single + + + 3000 + 2.5 + + +
  • +
  • + WhoXiuXian.CompUsableRoot + InstallEnergyRoot + Inject {0_label} to become a cultivator +
  • +
  • + Hediff_RI_EnergyRoot + PNBrain + 1 + false +
  • +
    +
    + + + PN_Make_PN_EnergyRootHigh + + make 【Best quality】Energy root for Automata. + Making 【Best quality】Energy root for Automata. + GeneralLaborSpeed + Cook + Recipe_Machining + 1 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • EnergyRootHigh
  • + + + 1 + +
    + + 1 + + Crafting +
    + + + PN_EnergyRootLow + + A cyan low quality energy root. The energy root is a benign neuroma the size of a mung bean, located inside the prefrontal lobe, an organ that only a very small number of people have. Once you have the energy root, you can feel the Qi in the atmosphere, and indirectly receive a large amount of memory information in a moment.\n\nThis energy root is not very active, and the acquisition of Qi is slower than the average cultivator. + + Things/Health/EnergyRootLow + Graphic_Single + + + 1000 + 2.5 + + +
  • +
  • + WhoXiuXian.CompUsableRoot + InstallEnergyRoot + Inject {0_label} to become a cultivator +
  • +
  • + Hediff_RI_EnergyRoot + 0.3 + PNBrain + false +
  • +
    +
    + + + PN_Make_PN_EnergyRootLow + + make 【Low quality】Energy root for Automata. + Making 【Low quality】Energy root for Automata. + GeneralLaborSpeed + Cook + Recipe_Machining + 1 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • EnergyRootLow
  • + + + 1 + +
    + + 1 + + Crafting +
    + + + PN_RI_Things_JadeLiquid + + A medicinal wine that makes you feel wonderful. After drinking, one can briefly gain a connection with the celestial deity and receive a soul shock directly from the celestial deity. This will forcibly activate a person's energy root, and if there is no energy root, part of the Qi in the wine will be used to create a lower energy root. The effect of this medicinal wine is varied, and it seems that the effect of all people is not the same. Most people have heard a man who named Thran's laugh, or a few gossip, or a hiccup. For a moment their souls seem to travel through the endless darkness and see themselves from birth to the present, and when they come to their senses, it seems as if they have had a dream, but the slightly sore forehead reminds them that they have become cultivator. + + Things/Health/RI_Things_JadeLiquid + Graphic_Single + + + 1000 + 2.5 + + +
  • +
  • + WhoXiuXian.CompUsableRoot + InstallEnergyRoot + Drink {0_label} to please the Thran and become a cultivator +
  • +
  • + Hediff_RI_EnergyRoot + 0.3 + PNBrain + false +
  • +
    +
    + + + PN_Make_PN_RI_Things_JadeLiquid + + make QingMing jade wine for Automata. + Making QingMing jade wine for Automata. + GeneralLaborSpeed + Cook + Recipe_Machining + 1 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • RI_Things_JadeLiquid
  • + + + 1 + +
    + + 1 + + Crafting +
    + +
    \ No newline at end of file diff --git a/1.6/Mods/Paniel_Misc_Compatibility_Patch/About/About.xml b/1.6/Mods/Paniel_Misc_Compatibility_Patch/About/About.xml new file mode 100644 index 0000000..62d9276 --- /dev/null +++ b/1.6/Mods/Paniel_Misc_Compatibility_Patch/About/About.xml @@ -0,0 +1,25 @@ + + + Paniel Misc Compatibility Patch + Kalo + kalospacer.PanielMiscCompatibilityPatch + +
  • 1.5
  • +
    + Icon/Paniel_Logi + +Miscellaneous compatibility patch for Paniel the Automata. + + + + + +
  • AhnDemi.PanieltheAutomata
  • +
  • kalospacer.AhnDemi.PanieltheAutomata
  • +
  • RI.RimImmortal.Core
  • +
    +
    \ No newline at end of file diff --git a/1.6/Mods/Paniel_Misc_Compatibility_Patch/About/preview.png b/1.6/Mods/Paniel_Misc_Compatibility_Patch/About/preview.png new file mode 100644 index 0000000..6798ac3 Binary files /dev/null and b/1.6/Mods/Paniel_Misc_Compatibility_Patch/About/preview.png differ diff --git a/1.6/Mods/Paniel_Misc_Compatibility_Patch/Content/Languages/ChineseSimplified/DefInjected/RecipeDef/PN_RI_Items_Special_Recipe.xml b/1.6/Mods/Paniel_Misc_Compatibility_Patch/Content/Languages/ChineseSimplified/DefInjected/RecipeDef/PN_RI_Items_Special_Recipe.xml new file mode 100644 index 0000000..b16f13d --- /dev/null +++ b/1.6/Mods/Paniel_Misc_Compatibility_Patch/Content/Languages/ChineseSimplified/DefInjected/RecipeDef/PN_RI_Items_Special_Recipe.xml @@ -0,0 +1,20 @@ + + + + 制作【中品】姬关人形用灵芽 + 将【中品】灵芽改造为【中品】姬关人形用灵芽。 + 正在制作【中品】姬关人形用灵芽。 + + 制作【上品】姬关人形用灵芽 + 将【上品】灵芽改造为【上品】姬关人形用灵芽。 + 正在制作【上品】姬关人形用灵芽。 + + 制作【下品】姬关人形用灵芽 + 将【下品】灵芽改造为【下品】姬关人形用灵芽。 + 正在制作【下品】姬关人形用灵芽。 + + 制作姬关人形用青玉仙露 + 将青玉仙露改造为姬关人形用青玉仙露。 + 正在制作姬关人形用青玉仙露。 + + \ No newline at end of file diff --git a/1.6/Mods/Paniel_Misc_Compatibility_Patch/Content/Languages/ChineseSimplified/DefInjected/ThingDef/PN_RI_Items_Special.xml b/1.6/Mods/Paniel_Misc_Compatibility_Patch/Content/Languages/ChineseSimplified/DefInjected/ThingDef/PN_RI_Items_Special.xml new file mode 100644 index 0000000..941c650 --- /dev/null +++ b/1.6/Mods/Paniel_Misc_Compatibility_Patch/Content/Languages/ChineseSimplified/DefInjected/ThingDef/PN_RI_Items_Special.xml @@ -0,0 +1,32 @@ + + + + + 【中品】姬关人形用灵芽 + + 一颗青色的中品灵芽。\n\n灵芽是一个绿豆大小的良性神经瘤,位于前额叶内部,只有极少数人拥有此器官。而一旦拥有灵芽,就可以感受到大气中灵气的存在,并在一瞬间接收到大量的记忆信息。 + + 注入{0_label},变成修炼者 + + + 【上品】姬关人形用灵芽 + + 一颗青色的上品灵芽。\n\n灵芽是一个绿豆大小的良性神经瘤,位于前额叶内部,只有极少数人拥有此器官。而一旦拥有灵芽,就可以感受到大气中灵气的存在,并在一瞬间接收到大量的记忆信息。这颗灵芽极其活跃,可以加快灵气获取的效率。 + + 注入{0_label},变成修炼者 + + + 【下品】姬关人形用灵芽 + + 一颗青色的下品灵芽。\n\n灵芽是一个绿豆大小的良性神经瘤,位于前额叶内部,只有极少数人拥有此器官。而一旦拥有灵芽,就可以感受到大气中灵气的存在,并在一瞬间接收到大量的记忆信息。这颗灵芽不太活跃,对灵气的获取比一般修炼者慢一些。 + + 注入{0_label},变成修炼者 + + + 姬关人形用青玉仙露 + + 一种能让人产生奇妙感觉的药酒。喝下后可以令人短暂获得与天仙的连接,并直接从天仙那里受到一股灵魂冲击。这将会强行激活一个人的灵芽,如果没有灵芽,则会用药酒中的部分灵气制造一颗下品灵芽。\n\n这种药酒的效果众说纷纭,似乎所有人的效果都不相同。大部分人都听到了一个自称为喰仙的人的笑声,抑或是几句闲言碎语,或者是打嗝声。他们的灵魂在一瞬间仿佛穿越到了一望无际的黑暗中,并看到了自己从出生到现在的景象,而等他们回过神来,似乎又觉得是做了一场梦,但微微作痛的前额会提醒他们,他们已经成为了修炼者。 + + 喝下{0_label}以取悦喰仙,成为修炼者 + + \ No newline at end of file diff --git a/1.6/Mods/Paniel_Misc_Compatibility_Patch/LoadFolders.xml b/1.6/Mods/Paniel_Misc_Compatibility_Patch/LoadFolders.xml new file mode 100644 index 0000000..573969a --- /dev/null +++ b/1.6/Mods/Paniel_Misc_Compatibility_Patch/LoadFolders.xml @@ -0,0 +1,8 @@ + + + +
  • 1.5/Core
  • +
  • Content
  • +
  • 1.5/Mods/RimImmortal
  • +
    +
    \ No newline at end of file diff --git a/1.6/Mods/Paniel_Misc_Compatibility_Patch/readme.md b/1.6/Mods/Paniel_Misc_Compatibility_Patch/readme.md new file mode 100644 index 0000000..f73226c --- /dev/null +++ b/1.6/Mods/Paniel_Misc_Compatibility_Patch/readme.md @@ -0,0 +1,12 @@ +This Mod is for compatibility with other mods.To use this,Copy the entire folder "Paniel_Misc_Compatibility_Patch" to your Mods folder and active it. +Now Contain: +RimImmoral:Core +Save our Ship 2 +Yayo's Combat 3 + +//这个Mod是为了与其他Mod兼容。要使用这个,将整个"Paniel_Misc_Compatibility_Patch"文件夹复制到你的Mods文件夹并激活它。 + +现在包含: +边缘仙路-羽化登仙 RimImmortal-Core[1.5] +Save our Ship 2 +Yayo's Combat 3 \ No newline at end of file diff --git a/1.6/Royalty/Defs/PnLCareerLevel/Royal_Permits.xml b/1.6/Royalty/Defs/PnLCareerLevel/Royal_Permits.xml new file mode 100644 index 0000000..e4bb866 --- /dev/null +++ b/1.6/Royalty/Defs/PnLCareerLevel/Royal_Permits.xml @@ -0,0 +1,418 @@ + + + + + PN_TradeBenefit + + + + + + PN_SubsidiaryFaction + 1 + 60 + + + + + RoyalTitlePermitWorker_DropResources + true + + 39.9 + + + + + + PN_AnnualSalary_A + + This is the annual salary (800 Silver) paid to PnL Logistics employees. can use PnL result point to receive advance salary. + PN_Title_Associate + 1 + (0,0) + + + 800 + + 1 + + + + + PN_AnnualSalary_B + + This is the annual salary (3200 Silver) paid to PnL Logistics employees. can use PnL result point to receive advance salary. + PN_Title_Manager + 1 + PN_AnnualSalary_A + (1,0) + + + 3200 + + 4 + + + + + + PN_RequestSecurityUnitClose + + Request 4 melee combat security unit to aid in your battle. + RoyalTitlePermitWorker_CallAid + PN_Title_Senior + 1 + (0,1) + PN_SubsidiaryFaction + + 2 + PN_Mid_CloseUnit + 4 + 39.9 + + 60 + + + + PN_RequestEliteSecurityUnitClose + + Request 4 melee combat elite security unit to aid in your battle. + RoyalTitlePermitWorker_CallAid + PN_Title_SeniorManager + 1 + PN_RequestSecurityUnitClose + (1,1) + PN_SubsidiaryFaction + + 4 + PN_EliteCloseUnit + 4 + 39.9 + + 60 + + + + + PN_RequestSecurityUnitRange + + Request 4 range combat security unit to aid in your battle. + RoyalTitlePermitWorker_CallAid + PN_Title_Senior + 1 + (0,2) + PN_SubsidiaryFaction + + 2 + PN_Mid_RangeUnit + 4 + 39.9 + + 60 + + + + PN_RequestEliteSecurityUnitRange + + Request 4 rifle combat elite security unit to aid in your battle. + RoyalTitlePermitWorker_CallAid + PN_Title_SeniorManager + 1 + PN_RequestSecurityUnitRange + (1,2) + PN_SubsidiaryFaction + + 4 + PN_EliteRangeUnit + 4 + 39.9 + + 60 + + + + PN_RequestEliteSecurityUnitHeavy + + Request 2 heavy combat elite security unit to aid in your battle. + RoyalTitlePermitWorker_CallAid + PN_Title_SeniorManager + 1 + (1,3) + PN_SubsidiaryFaction + + 4 + PN_EliteHeavyUnit + 2 + 39.9 + + 60 + + + + PN_RequestEliteSecurityUnitCannon + + Request 2 cannon combat elite security unit to aid in your battle. + RoyalTitlePermitWorker_CallAid + PN_Title_SeniorManager + 1 + (1,4) + PN_SubsidiaryFaction + + 4 + PN_EliteCannonUnit + 2 + 39.9 + + 60 + + + + + PN_RequestEngineerUnit + + Request a group of 4 engineer units to assist you for 4 days. These workers can only do general labor tasks. You can control them as though they were your own colonists. You are required to keep them safe. + RoyalTitlePermitWorker_CallLaborers + PN_Title_Senior + 1 + (0,5) + PN_SubsidiaryFaction + + 2 + PN_AssociateP_EngineerB + 4 + 4 + 39.9 + + 60 + + + + PN_RequestEliteEngineerUnit + + Request a group of 4 elite engineer units to assist you for 4 days. These workers can only do general labor tasks. You can control them as though they were your own colonists. You are required to keep them safe. + RoyalTitlePermitWorker_CallLaborers + PN_Title_SeniorManager + 1 + PN_RequestEngineerUnit + (1,5) + PN_SubsidiaryFaction + + 4 + PN_ManageUnit_Enginer + 4 + 4 + 39.9 + + 60 + + + + + PN_RequestDomesticUnit + + Request a group of 4 domestic units to assist you for 4 days. These workers can only do general labor tasks. You can control them as though they were your own colonists. You are required to keep them safe. + RoyalTitlePermitWorker_CallLaborers + PN_Title_Senior + 1 + (0,6) + PN_SubsidiaryFaction + + 2 + PN_AssociateP_DomesticB + 4 + 4 + 39.9 + + 60 + + + + PN_RequestEliteDomesticUnit + + Request a group of 4 elite domestic units to assist you for 4 days. These workers can only do general labor tasks. You can control them as though they were your own colonists. You are required to keep them safe. + RoyalTitlePermitWorker_CallLaborers + PN_Title_SeniorManager + 1 + PN_RequestDomesticUnit + (1,6) + PN_SubsidiaryFaction + + 4 + PN_ManageUnit_Domestic + 4 + 4 + 39.9 + + 60 + + + + + PN_DropOTPCard + + Request for a drop of PnL OTP card. + PN_Title_Manager + 1 + (0,7) + + + 1 + + 2 + + + + + + PN_DropPackagedAutomatonSoldier + + Request for a drop of PnL automaton™ (Combat) box. + PN_Title_Manager + 1 + 300 + (0,8) + + + 1 + + 4 + + + + + PN_DropPackagedAutomatonSoldierPremium + + Request for a drop of PnL automaton™ Pro (Combat) box. + PN_Title_Director + 1 + 300 + PN_DropPackagedAutomatonSoldier + (1,8) + + + 1 + + 10 + + + + + + PN_DropPackagedAutomatonWorker + + Request for a drop of PnL automaton™ (Engineer) box. + PN_Title_Manager + 1 + 300 + (0,9) + + + 1 + + 4 + + + + + PN_DropPackagedAutomatonWorkerPremium + + Request for a drop of PnL automaton™ Pro (Engineer) box. + PN_Title_Director + 1 + 300 + PN_DropPackagedAutomatonWorker + (1,9) + + + 1 + + 10 + + + + + + + PN_DropPackagedAutomatonMaid + + Request for a drop of PnL automaton™ (Domestic) box. + PN_Title_Manager + 1 + 300 + (0,10) + + + 1 + + 4 + + + + + PN_DropPackagedAutomatonMaidPremium + + Request for a drop of PnL automaton™ Pro (Domestic) box. + PN_Title_Director + 1 + 300 + PN_DropPackagedAutomatonMaid + (1,10) + + + 1 + + 10 + + + + + + PN_RequestTransportShuttle + + request a shuttle for your own use. It will transport colonists, items, and animals anywhere you like within 70 world tiles. + RoyalTitlePermitWorker_CallShuttle + PN_Title_Manager + PN_SubsidiaryFaction + 1 + 60 + true + (0,11) + + 4 + 44.9 + false + + + + + + PN_DropPnLComponent + + Request for a drop of 3 PnL Component. + PN_Title_Director + 1 + (1,11) + + + 3 + + 3 + + + + + + PN_DropBrainCore + + Request for a drop of 3 automaton brain core. + PN_Title_Director + 1 + (1,12) + + + 3 + + 3 + + + \ No newline at end of file diff --git a/1.6/Royalty/Defs/PnLCareerLevel/Royal_Thoughts.xml b/1.6/Royalty/Defs/PnLCareerLevel/Royal_Thoughts.xml new file mode 100644 index 0000000..086624b --- /dev/null +++ b/1.6/Royalty/Defs/PnLCareerLevel/Royal_Thoughts.xml @@ -0,0 +1,36 @@ + + + + + PN_TitlePromotion + 7 + Thought_MemoryRoyalTitle + +
  • Ascetic
  • +
    + +
  • + + I was promoted to {TITLE}. I love the recognition! + 8 +
  • +
    +
    + + + + PN_TitleDemotion + 7 + Thought_MemoryRoyalTitle + +
  • Ascetic
  • +
    + +
  • + + I demoted to {TITLE}. + -8 +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.6/Royalty/Defs/PnLCareerLevel/Royal_Titles.xml b/1.6/Royalty/Defs/PnLCareerLevel/Royal_Titles.xml new file mode 100644 index 0000000..d9acf8f --- /dev/null +++ b/1.6/Royalty/Defs/PnLCareerLevel/Royal_Titles.xml @@ -0,0 +1,272 @@ + + + + + +
  • PN_PnLCareerTitleTag
  • +
    + 1 + PN_TitlePromotion + PN_TitleDemotion + False + RoyalTitleAwardWorker_Instant +
    + + + + PN_Title_Intern + + Intern of PnL Logistics. + 0 + 1 + 0 + 1000 + + + + + PN_Title_Associate + + Associate of PnL Logistics. + 1 + 6 + 1 + 1200 + 10 + + + + + PN_Title_Senior + + Senior of PnL Logistics. + 2 + 8 + 2 + 1600 + 25 + Normal + + + + + PN_Title_Manager + + Manager of PnL Logistics. + 3 + 18 + 3 + Moderate + 2200 + 40 + Normal + +
  • + 16 +
  • +
  • + RoomRequirementAllFloored + +
  • Floor
  • +
  • FineFloor
  • + + +
  • + RoomRequirementNoProductionFacilities + +
  • Production
  • + + +
    + + MealSimple + Processed, Liquor + +
  • Ambrosia
  • +
  • Milk
  • +
  • RawBerries
  • +
    +
    +
    + + + + PN_Title_SeniorManager + + Senior Manager of PnL Logistics. + 4 + 24 + 4 + +
  • PN_TradeBenefit
  • +
    + Moderate + 2800 + 60 + Normal + +
  • + 24 +
  • +
  • + 40 +
  • +
  • + RoomRequirementAllFloored + +
  • Floor
  • +
  • FineFloor
  • + + +
  • + RoomRequirementNoProductionFacilities + +
  • Production
  • + + +
    + + MealSimple + Processed, Liquor + +
  • Ambrosia
  • +
  • Milk
  • +
  • RawBerries
  • +
    +
    +
    + + + + PN_Title_Director + + Director of PnL Logistics. + 500 + 54 + 5 + +
  • PN_TradeBenefit
  • +
    + High + 3500 + 75 + Normal + +
  • + 24 +
  • +
  • + 50 +
  • +
  • + RoomRequirementAllFloored + +
  • Floor
  • +
  • FineFloor
  • + + +
  • + RoomRequirementNoProductionFacilities + +
  • Production
  • + + +
    + + MealFine + Processed, Liquor + +
  • Ambrosia
  • +
  • Milk
  • +
  • RawBerries
  • +
    +
    +
    + + + + +
  • PN_TradeBenefit
  • +
    + Normal + +
  • + 30 +
  • +
  • + 70 +
  • +
  • + RoomRequirementAllFineFloored + +
  • Floor
  • +
  • FineFloor
  • + + +
  • + RoomRequirementNoProductionFacilities + +
  • Production
  • + + +
    + + MealFine + Processed, Liquor + +
  • Ambrosia
  • +
  • Milk
  • +
  • RawBerries
  • +
    +
    +
    + + + + + PN_Title_SeniorDirector + + Senior Director of PnL Logistics. + 600 + 1 + High + 125 + Normal + + + + + PN_TitleVP + + VP of PnL Logistics. + 700 + 1 + High + 150 + Normal + + + + + PN_TitleSVP + + SVP of PnL Logistics. + 800 + 0.6 + High + 200 + Normal + + + + + PN_TitleCEO + + CEO of PnL Logistics. + 900 + 0.1 + High + 300 + Normal + +
    \ No newline at end of file diff --git a/1.6/Royalty/Defs/PnLCareerLevel/Royal_TraderKinds.xml b/1.6/Royalty/Defs/PnLCareerLevel/Royal_TraderKinds.xml new file mode 100644 index 0000000..951ec0f --- /dev/null +++ b/1.6/Royalty/Defs/PnLCareerLevel/Royal_TraderKinds.xml @@ -0,0 +1,173 @@ + + + + PN_Caravan_TributeCollector + + True + 1 + Favor + PN_SubsidiaryFaction + True + + +
  • + Gold +
  • +
  • + PN_SilverCase +
  • +
    +
    + + + + + PN_Orbital_PnLbenefit + + true + PN_SubsidiaryFaction + PN_TradeBenefit + + + +
  • + Silver + 2000~4000 +
  • +
  • + ComponentIndustrial + 30~60 +
  • +
  • + ComponentSpacer + 8~16 +
  • +
  • + Steel + 500~800 +
  • +
  • + Plasteel + 200~600 +
  • +
  • + Uranium + 60~300 +
  • +
  • + Chemfuel + 200~600 +
  • +
  • + MedicineUltratech + 5~30 +
  • +
  • + Neutroamine + 100~500 +
  • +
  • + Hyperweave + 50~200 +
  • +
  • + DevilstrandCloth + 50~200 +
  • + + +
  • + PN_AutomatonFuel + 200~600 +
  • +
  • + PN_antibiotics + 6~18 +
  • + + +
  • + PN_RepairKit + 20~40 +
  • +
  • + PN_SelfRepairKit + 2~5 +
  • +
  • + PN_BrainCasing + 6~10 +
  • +
  • + Leather_Automaton + 50~200 +
  • +
  • + PN_Component + 8~16 +
  • + +
  • + Packaged_NormalAutomatonSoldier + 1~3 +
  • +
  • + Packaged_NormalAutomatonWorker + 1~3 +
  • +
  • + Packaged_NormalAutomatonMaid + 1~3 +
  • + +
  • + Packaged_PremiumAutomatonSoldier + 1 +
  • +
  • + Packaged_PremiumAutomatonWorker + 1 +
  • +
  • + Packaged_PremiumAutomatonMaid + 1 +
  • + + +
  • + PN_PrototypeRailGun + 1 +
  • +
  • + PN_WeaponsMeleeBladelink + 1 + 1 +
  • + + + + +
  • + PN_ResurrectModule + 1~3 +
  • + + +
  • + Techprint_CataphractArmor + 1 +
  • +
  • + Techprint_BrainWiring + 1 +
  • + + + + + + + +
    +
    +
    \ No newline at end of file diff --git a/1.6/Royalty/Defs/Royal_Hediffs_BodyParts_Psychic.xml b/1.6/Royalty/Defs/Royal_Hediffs_BodyParts_Psychic.xml new file mode 100644 index 0000000..d1c3386 --- /dev/null +++ b/1.6/Royalty/Defs/Royal_Hediffs_BodyParts_Psychic.xml @@ -0,0 +1,99 @@ + + + + + PN_PsychicAmplifier + + A consumable archotech-created device that forms or upgrades a psylink in the user's mind.\n\nThe user presses the device over the eyes, where it links to the brain directly and restructures part of it. Afterwards, the device disintegrates into worthless ash. + + PsychicAmplifier + + ThingWithComps + Item + Archotech + true + 14 + true + Item + Never + true + Middle + +
  • BodyPartsArchotech
  • +
    + + 100 + -4 + 1 + 2600 + 0 + + + Things/Item/Special/PsylinkNeuroformer + Graphic_Single + + +
  • PsylinkNeuroformer
  • +
    + +
  • + CompUsableImplant + UseItem + Use neuroformer to form psylink +
  • +
  • + PsychicAmplifier + PNBrain + true +
  • +
  • + PsyAmpInstalled +
  • +
  • + CompUseEffect_DestroySelf +
  • +
  • + + + + + PN_Make_PsychicAmplifier_Automaton + + make automaton psylink + Making automaton psylink. + GeneralLaborSpeed + Cook + Recipe_Machining + 2000 + true + +
  • PN_AutomatonBench
  • + + +
  • + + +
  • PsychicAmplifier
  • + + + 1 + +
  • + + +
  • ComponentIndustrial
  • + + + 2 + +
    + + 1 + + + 6 + + Crafting + PNRP_PsychicAmplifier + +
    \ No newline at end of file diff --git a/1.6/Royalty/Defs/Royal_Hediffs_BodyParts_Vanilla.xml b/1.6/Royalty/Defs/Royal_Hediffs_BodyParts_Vanilla.xml new file mode 100644 index 0000000..39a482f --- /dev/null +++ b/1.6/Royalty/Defs/Royal_Hediffs_BodyParts_Vanilla.xml @@ -0,0 +1,525 @@ + + + + + PN_InstallDrillArm + + Install a drill arm. + + DrillArm + DrillArm + + Installing drill arm. + +
  • + + +
  • DrillArm
  • + + + 1 + +
    + + +
  • DrillArm
  • +
    +
    + +
  • PNArm
  • +
    + DrillArm +
    + + + + PN_InstallFieldHand + + Install a field hand. + + FieldHand + FieldHand + + Installing field hand. + +
  • + + +
  • FieldHand
  • + + + 1 + +
    + + +
  • FieldHand
  • +
    +
    + +
  • PNHand
  • +
    + FieldHand +
    + + + + PN_InstallPowerClaw + + Install a power claw. + + PowerClaw + PowerClaw + + Installing power claw. + +
  • + + +
  • PowerClaw
  • + + + 1 + +
    + + +
  • PowerClaw
  • +
    +
    + +
  • PNHand
  • +
    + PowerClaw +
    + + + + PN_InstallHandTalon + + Install a hand talon. + + HandTalon + HandTalon + + Installing hand talon. + +
  • + + +
  • HandTalon
  • + + + 1 + +
    + + +
  • HandTalon
  • +
    +
    + +
  • PNHand
  • +
    + HandTalon +
    + + + PN_RemoveHandTalon + + Remove hand talon. + + HandTalon + HandTalon + + Removing hand talon. + HandTalon + + + + + PN_InstallElbowBlade + + Install an elbow blade. + + ElbowBlade + ElbowBlade + + Installing elbow blade. + +
  • + + +
  • ElbowBlade
  • + + + 1 + +
    + + +
  • ElbowBlade
  • +
    +
    + +
  • PNArm
  • +
    + ElbowBlade +
    + + + PN_RemoveElbowBlade + + Remove elbow blade. + + ElbowBlade + ElbowBlade + + Removing elbow blade. + ElbowBlade + + + + + PN_InstallKneeSpike + + Install a knee spike. + + KneeSpike + KneeSpike + + Installing knee spike. + +
  • + + +
  • KneeSpike
  • + + + 1 + +
    + + +
  • KneeSpike
  • +
    +
    + +
  • PNLeg
  • +
    + KneeSpike +
    + + + PN_RemoveKneeSpike + + Remove knee spike. + + KneeSpike + KneeSpike + + Removing knee spike. + KneeSpike + + + + + PN_InstallVenomFangs + + Install venom fangs. + + VenomFangs + VenomFangs + + Installing venom fangs. + +
  • + + +
  • VenomFangs
  • + + + 1 + +
    + + +
  • VenomFangs
  • +
    +
    + +
  • Teeth
  • +
    + VenomFangs +
    + + + PN_RemoveVenomFangs + + Remove venom fangs. + + VenomFangs + VenomFangs + + Removing venom fangs. + VenomFangs + + + + + PN_InstallVenomTalon + + Install a venom talon. + + VenomTalon + VenomTalon + + Installing venom talon. + +
  • + + +
  • VenomTalon
  • + + + 1 + +
    + + +
  • VenomTalon
  • +
    +
    + +
  • MiddleFingers
  • +
    + VenomTalon +
    + + + PN_RemoveVenomTalon + + Remove venom talon. + + VenomTalon + VenomTalon + + Removing venom talon. + VenomTalon + + + + + PN_InstallNeurocalculator + + Install a neurocalculator. + + Neurocalculator + Neurocalculator + + Installing neurocalculator. + +
  • + + +
  • Neurocalculator
  • + + + 1 + +
    + + +
  • Neurocalculator
  • +
    +
    + +
  • PNBrain
  • +
    + Neurocalculator +
    + + + PN_RemoveNeurocalculator + + Remove neurocalculator. + + Neurocalculator + Neurocalculator + + Removing neurocalculator. + Neurocalculator + + + + + PN_InstallCircadianAssistant + + Install a circadian assistant. + + CircadianAssistant + CircadianAssistant + + Installing circadian assistant. + +
  • + + +
  • CircadianAssistant
  • + + + 1 + +
    + + +
  • CircadianAssistant
  • +
    +
    + +
  • PNBrain
  • +
    + CircadianAssistant +
    + + + PN_RemoveCircadianAssistant + + Remove circadian assistant. + + CircadianAssistant + CircadianAssistant + + Removing circadian assistant. + CircadianAssistant + + + + + PN_InstallCircadianHalfCycler + + Install a circadian half-cycler. + + CircadianHalfCycler + CircadianHalfCycler + + Installing circadian half-cycler. + +
  • + + +
  • CircadianHalfCycler
  • + + + 1 + +
    + + +
  • CircadianHalfCycler
  • +
    +
    + +
  • PNBrain
  • +
    + CircadianHalfCycler +
    + + + PN_RemoveCircadianHalfCycler + + Remove circadian half-cycler. + + CircadianHalfCycler + CircadianHalfCycler + + Removing circadian half-cycler. + CircadianHalfCycler + + + + + PN_InstallPsychicSensitizer + + Install a psychic sensitizer. + + PsychicSensitizer + PsychicSensitizer + + Installing psychic sensitizer. + +
  • + + +
  • PsychicSensitizer
  • + + + 1 + +
    + + +
  • PsychicSensitizer
  • +
    +
    + +
  • PNBrain
  • +
    + PsychicSensitizer +
    + + + PN_RemovePsychicSensitizer + + Remove psychic sensitizer. + + PsychicSensitizer + PsychicSensitizer + + Removing psychic sensitizer. + PsychicSensitizer + + + + + PN_InstallPsychicReader + + Install a psychic reader. + + PsychicReader + PsychicReader + + Installing psychic reader. + +
  • + + +
  • PsychicReader
  • + + + 1 + +
    + + +
  • PsychicReader
  • +
    +
    + +
  • PNBrain
  • +
    + PsychicReader +
    + + + PN_RemovePsychicReader + + Remove psychic reader. + + PsychicReader + PsychicReader + + Removing psychic reader. + PsychicReader + +
    \ No newline at end of file diff --git a/1.6/Royalty/Defs/Royal_Hediffs_ContDamPN.xml b/1.6/Royalty/Defs/Royal_Hediffs_ContDamPN.xml new file mode 100644 index 0000000..10024a0 --- /dev/null +++ b/1.6/Royalty/Defs/Royal_Hediffs_ContDamPN.xml @@ -0,0 +1,302 @@ + + + + + + PN_ChainCutManeuverMono + PN_ChainCutToolMono + + Verb_MeleeAttackDamage + PN_ChainCutDamageMono + + MeleeAttack + Maneuver_Slash_MeleeHit + Maneuver_Slash_MeleeDeflect + Maneuver_Slash_MeleeMiss + Maneuver_Slash_MeleeDodge + + + + PN_ChainCutToolMono + + + + + PN_ChainCutDamageMono + PN_ChainCutHediffMono + PN_ChainCutHediffMono + PN_ChainCrackHediffMono + 1.4 + DamageWorker_AddInjury + Sharp + Slice + + + + PN_ChainCutHediffMono + + a cut + a cut. + +
  • + bandaged + sutured + set +
  • +
  • + 0.15 +
  • +
  • + cut scar +
  • +
  • + PN_ChainCutDamage_ConMono + 6 + 4 + 18 +
  • +
    + + 0.0125 + 0.00625 + 0.06 + false + Cut off + Cut off + +
    + + + PN_ChainCutDamage_ConMono + 1.4 + DamageWorker_AddInjury + Sharp + Slice + + + + PN_ChainCrackHediffMono + + a crack wound + A crack. + +
  • + set + set + set +
  • +
  • + permanent crack +
  • +
  • + PN_ChainCrackDamage_ConMono + 6 + 2 + 12 +
  • +
    + + 0.01 + 0.00625 + Shattered + +
    + + + PN_ChainCrackDamage_ConMono + 1.4 + DamageWorker_AddInjury + Sharp + Slice + + + + + + PN_ElectricalBluntManeuver + PN_ElectricalBluntTool + + Verb_MeleeAttackDamage + PN_ElectricalBluntDamage + + MeleeAttack + Maneuver_Smash_MeleeHit + Maneuver_Smash_MeleeDeflect + Maneuver_Smash_MeleeMiss + Maneuver_Smash_MeleeDodge + + + + PN_ElectricalBluntTool + + + + + PN_ElectricalBluntDamage + PN_ElectricalCrushHediff + PN_ElectricalBruiseHediff + Crack + + + + PN_ElectricalCrushHediff + + a crush wound + A crushing wound. + +
  • + bandaged + sutured + set +
  • +
  • + 0.15 +
  • +
  • + mangled scar +
  • +
  • + PN_ElectricalBurnDamage_Con + 6 + 4 + 18 +
  • +
    + + 0.0125 + 0.00625 + 0.01 + true + Crushed + +
    + + + PN_ElectricalBruiseHediff + + a bruise + A bruise. + +
  • + bandaged + tended + set +
  • +
  • + PN_ElectricalBurnDamage_Con + 6 + 4 + 18 +
  • +
    + + 0.0125 + 0.00625 + false + Destroyed + +
    + + + PN_ElectricalBurnDamage_Con + + DamageWorker_AddInjury + PN_ElectricalBurn + + + + PN_ElectricalBurn + + a electrical burn + A electrical burn. + +
  • + bandaged + tended + tended +
  • +
  • + 0.30 +
  • +
  • + burn scar +
  • +
    + + 0.01875 + 0.00625 + false + Burned off + Burned out + +
    + + + + + PN_ElectricalStabManeuver + PN_ElectricalStabTool + + Verb_MeleeAttackDamage + PN_ElectricalStabDamage + + MeleeAttack + Maneuver_Slash_MeleeHit + Maneuver_Slash_MeleeDeflect + Maneuver_Slash_MeleeMiss + Maneuver_Slash_MeleeDodge + + + + PN_ElectricalStabTool + + + + + PN_ElectricalStabDamage + + DamageWorker_Stab + true + {0} has been stabbed to death. + PN_ElectricalStabHediff + Crack + Slice + Sharp + 0.6 + 0.4~1.0 + + + + PN_ElectricalStabHediff + + a stab wound + A stab wound. + +
  • + bandaged + sutured + set +
  • +
  • + 0.15 +
  • +
  • + stab scar +
  • +
  • + PN_ElectricalBurnDamage_Con + 6 + 4 + 12 +
  • +
    + + 0.0125 + 0.00625 + 0.06 + false + Cut off + Cut out + +
    +
    \ No newline at end of file diff --git a/1.6/Royalty/Defs/Royal_Reserch_ProjectDefs.xml b/1.6/Royalty/Defs/Royal_Reserch_ProjectDefs.xml new file mode 100644 index 0000000..d24390e --- /dev/null +++ b/1.6/Royalty/Defs/Royal_Reserch_ProjectDefs.xml @@ -0,0 +1,17 @@ + + + + PNRP_PsychicAmplifier + + Research how to modify psylink for use by the Automaton. + PN_technology + 300 + Industrial + +
  • PNRP_Production
  • +
    + 1.0 + 4.2 + +
    +
    \ No newline at end of file diff --git a/1.6/Royalty/Defs/Royal_ThingDef_Misc.xml b/1.6/Royalty/Defs/Royal_ThingDef_Misc.xml new file mode 100644 index 0000000..7d1aba0 --- /dev/null +++ b/1.6/Royalty/Defs/Royal_ThingDef_Misc.xml @@ -0,0 +1,99 @@ + + + + + + + + + PN_SilverCase + + the case of 800 silvers. can get a result point by submitting it to PnL result appraiser.\n\nIt is locked with a special security device that even the maker cannot open. It takes a lot of effort to unlock, so the merchant will try to cut the price of it. + + Things/Item/PNSilverCase + Graphic_StackCount + 1.0 + + Silver_Drop + Silver_Drop + 10 + 1 + false + + 800 + 6.4 + 1 + 700 + + +
  • PN_AutomatonCatagory
  • +
    + +
  • PN_SilverChest
  • +
    + + + + + 80 + 15 + 1 + + + GeneralLaborSpeed + Crafting + Smith + Recipe_Smith + UnfinishedComponent + + 4 + + +
  • PN_AutomatonBench
  • +
    + PNRP_Production +
    +
    + + + PN_UnlockSilverCase + + unlock PnL silver case. can't get the perfect result by forcibly breaking the security device. + unlocking PnL silver case. + GeneralLaborSpeed + Smith + Recipe_Smith + 1600 + true + +
  • PN_AutomatonBench
  • +
    + +
  • + + +
  • PN_SilverCase
  • + + + 1 + +
    + + 480 + 5 + + + + Crafting + +
    + +
    \ No newline at end of file diff --git a/1.6/Royalty/Defs/Royal_ThingDef_Weapon.xml b/1.6/Royalty/Defs/Royal_ThingDef_Weapon.xml new file mode 100644 index 0000000..fb30c56 --- /dev/null +++ b/1.6/Royalty/Defs/Royal_ThingDef_Weapon.xml @@ -0,0 +1,404 @@ + + + + + + + PN_NamerChainSwordfirst + + +
  • PNof->Names/Weapon/PNof
  • +
  • PNChainSword->Names/Weapon/PNChainSword
  • +
    +
    +
    + + + PN_NamerChainSword + +
  • PN_NamerFirst
  • +
  • PN_NamerChainSwordfirst
  • +
    + + +
  • r_weapon_name->[PNChainSword] [PNof] [PNFirstNamer]
  • +
    +
    +
    + + + PN_WeaponsMeleeBladelink + + PN_WeaponsMelee + Icon/Paniel_HQ + + + + Ultra + + 2000 + 2 + + +
  • + CompQuality +
  • +
  • + NamerArtWeaponMelee + ArtDescription_WeaponMelee + Excellent +
  • +
  • + + false + true + true + +
  • PN_WeaponsMelee
  • + + +
  • PN_UltratechMelee
  • +
    + +
  • Melee
  • +
  • Ultratech
  • +
    + + + +
    + + + Ultra + true + 1 + +
  • PN_Bladelink
  • +
    + +
  • Ultratech
  • +
    + +
  • + CompQuality +
  • +
  • + true +
  • +
  • +
    + false + true + +
  • PN_WeaponsMeleeBladelink
  • +
    + + + +
    + + + + + PN_RoyalSaber_Bladelink + + [caution] : Automaton exclusive weapon.\n\nA sword that uses the Royal Guard Automaton. It can cut anything with its sharp cutting power. It also uses the power of the automaton to inflict additional burn damage with the heated blade.\nThis weapon has an onboard persona that can bond to only a single person. The wielder and intelligent weapon can synchronize their reflexes and attack with frightening speed, accuracy, and creativity. Once bonded to a wielder, the weapon's persona will refuse to be wielded by anyone else. + + 3000 + 2 + + 0 + + Graphic_Single + Things/Weapons/PNRoyalSaber + (255,255,255) + + Interact_BladelinkPlasmaSword + MeleeHit_BladelinkPlasmaSword + +
  • Melee
  • +
  • MeleePiercer
  • +
    + +
  • + + +
  • Blunt
  • + + 12 + 1.6 + +
  • + + +
  • Stab
  • + + 24 + 1.6 + 0.9 + +
  • + Burn + 20 + 1.0 +
  • +
    + +
  • + + +
  • Cut
  • + + 24 + 1.6 + 0.9 + +
  • + Burn + 20 + 1.0 +
  • +
    + +
    +
    + + + + + PN_Chainsword_Bladelink + + [caution] : Automaton exclusive weapon.\n\nA bloody chain sword that seems to have many stories. For some reason, it has a much better performance than a normal chain sword.\nThis weapon has an onboard persona that can bond to only a single person. The wielder and intelligent weapon can synchronize their reflexes and attack with frightening speed, accuracy, and creativity. Once bonded to a wielder, the weapon's persona will refuse to be wielded by anyone else. + + 3000 + 2 + + -65 + + Graphic_Single + Things/Weapons/PNSwordLink + (255,255,255) + + Interact_BladelinkMonoSword + PNChainswordSound + +
  • Melee
  • +
  • MeleePiercer
  • +
    + +
  • + + +
  • Blunt
  • + + 12 + 1.6 + +
  • + + +
  • Stab
  • + + 27 + 1.6 + 0.9 + +
  • + + +
  • PN_ChainCutToolMono
  • + + 27 + 1.6 + 0.9 + +
    + +
  • + PN_NamerChainSword +
  • +
    +
    + + + + + PN_RoyalHammer_Bladelink + + [caution] : Automaton exclusive weapon.\n\nWarhammer used by the Automaton RoyalGuards. It has a built-in overcharge core that electrocutes when attacking an enemy, causing electrical burns. + + 3000 + 4 + + 0 + + Things/Weapons/PNPersonaHammer + AutomataRace.Graphic_Sprite + (255,255,255) + 170 + +
  • + 0 + 0 +
  • +
  • + 120 + 1 +
  • +
  • + 125 + 2 +
  • +
  • + 130 + 0 +
  • +
  • + 165 + 1 +
  • +
    +
    + Interact_BladelinkZeusHammer + MeleeHit_BladelinkZeusHammer + +
  • Melee
  • +
  • MeleeBlunt
  • +
    + +
  • + + +
  • Poke
  • + + 15 + 1.6 + +
  • + + false + +
  • PN_ElectricalBluntTool
  • + + 31 + 2.2 + +
  • + EMP + 10 +
  • +
    + +
    +
    + + + + + PN_StormLance_Bladelink + + [caution] : Automaton exclusive weapon.\n\nlance used by the Automaton RoyalGuards. It has a built-in overcharge core that electrocutes when attacking an enemy, causing electrical burns. + + 3000 + 4 + + 45 + + Things/Weapons/PNStormLance + AutomataRace.Graphic_Sprite + (255,255,255) + 170 + +
  • + 0 + 0 +
  • +
  • + 120 + 1 +
  • +
  • + 125 + 2 +
  • +
  • + 130 + 0 +
  • +
  • + 165 + 1 +
  • +
    +
    + Interact_BladelinkZeusHammer + MeleeHit_BladelinkZeusHammer + +
  • Melee
  • +
  • MeleeBlunt
  • +
  • MeleePiercer
  • +
    + +
  • + + +
  • Poke
  • + + 15 + 1.6 + +
  • + + false + +
  • PN_ElectricalBluntTool
  • + + 31 + 2.2 + 0.9 + +
  • + EMP + 10 +
  • +
    + +
  • + + +
  • PN_ElectricalStabTool
  • + + 31 + 2.2 + 0.9 + +
  • + EMP + 10 +
  • +
    + +
    + +
  • + True + + (0.2,0,0.25) + -45 + + + (-0.25,0.3,0.2) + 45 + + + (0.15,0.3,0.2) + -45 + + + (-0.15,-0.3,0.2) + 45 + +
  • +
    +
    +
    \ No newline at end of file diff --git a/LoadFolders.xml b/LoadFolders.xml index 85f8b29..86e7f08 100644 --- a/LoadFolders.xml +++ b/LoadFolders.xml @@ -11,4 +11,15 @@
  • 1.5/Mods/Paniel_Experimental
  • + +
  • 1.6/Core
  • +
  • Content
  • +
  • 1.6/Royalty
  • +
  • 1.6/Ideology
  • +
  • 1.6/Biotech
  • +
  • 1.6/Anomaly
  • + + +
  • 1.6/Mods/Paniel_Experimental
  • +
    \ No newline at end of file