-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFPE_Interface_Script.psc
52 lines (46 loc) · 1.44 KB
/
FPE_Interface_Script.psc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Scriptname FPE_Interface_Script extends Quest Conditional
Actor property PlayerRef Auto Const Mandatory
FormList FPFP_DataHoldersList
Quest FPE
Keyword FPFP_HasData
Bool Function LoadFPE()
If Game.IsPluginInstalled("FP_FamilyPlanningEnhanced.esp")
FPFP_DataHoldersList = Game.GetFormFromFile(0x0000D015 ,"FP_FamilyPlanningEnhanced.esp") as FormList
FPE = Game.GetFormFromFile(0x00000F99 ,"FP_FamilyPlanningEnhanced.esp") as Quest
FPFP_HasData = Game.GetFormFromFile(0x0000D010 ,"FP_FamilyPlanningEnhanced.esp") as Keyword
Return True
Else
Return false
EndIf
EndFunction
FPFP_BasePregData Function GetPregData(actor akActor)
If (akActor == PlayerRef)
Return (FPE as FPFP_Player_Script).GetPlayerPregnancyInfo()
ElseIf !akActor.HasKeyword(FPFP_HasData)
Return None
Else
FPFP_BasePregData tmpData
Int i = FPFP_DataHoldersList.GetSize()
While (i)
i -= 1
tmpData = FPFP_DataHoldersList.GetAt(i) as FPFP_BasePregData
If (tmpData.OurSelf == akActor)
Return tmpData
EndIf
EndWhile
EndIf
EndFunction
Function TryToMakePregnant(actor akFemale, actor akMale)
FPFP_BasePregData tmpData = GetPregData(akFemale)
If (tmpData)
If (tmpData.DeterminePotentialMan(akMale) != None)
tmpData.TrySpermFrom(akMale)
EndIf
EndIf
EndFunction
Function TryToAbort(actor akFemale)
FPFP_BasePregData tmpData = GetPregData(akFemale)
if (tmpData)
tmpData.GiveBirth(false)
EndIf
EndFunction