lact_lib.qsrc 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115
  1. # lact_lib
  2. if $ARGS[0] = '$get_bfat_tissue':
  3. !! func('lact_lib', 'get_bfattissue', npc_nbsize, npc_lactatemm)
  4. !! function to get breast fat tissue amount. Can be used for NPC as well as PC.
  5. !! ARGS[1] = npc_nbsize - the natural bust size of the NPC/PC.
  6. !! ARGS[2] = npc_lactatemm - he lactatemm of the NPC/PC.
  7. !! RESULT = Fat amount in ccm * 10.
  8. !! function for cup size volume in ccm y = 0,0002023*x^3 + 0,029199*x^2 + 4,3791*x + 70
  9. !! x = ((ARGS[1]/5) + 1)*10
  10. !! this function is based on the x figures for pcs_bust size (moving in steps of 5) and the actual cup sizes from a wikipedia table, which can be found here: https://en.wikipedia.org/wiki/Bra_size
  11. !! The function was estimated with excel using a trend line estimation for polynoms of third grade and a y = 0 at 70ccm
  12. !! https://www.ncbi.nlm.nih.gov/pubmed/11936199
  13. !! The percentage of fat volume in the total breast volume varied from 7 to 56% and the percentage of fat weight in the total breast weight varied from 3.6 to 37.6%. This great variability in the respective proportions of fat and glands in the evaluated specimens was not significantly correlated to age and body mass index.
  14. if ARGS[1] > 0:
  15. temp_var = ((ARGS[1]/5) + 1)*10
  16. temp_var2 = (((2023*temp_var*temp_var*temp_var)/10000000)+((29199*temp_var*temp_var)/1000000)+((43791*temp_var)/10000)+70)*10
  17. if temp_var2 > ARGS[2]:
  18. RESULT = temp_var2 - (ARGS[2] + ARGS[2]/50)
  19. elseif temp_var2 = ARGS[2]:
  20. RESULT = 0
  21. else
  22. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$get_bfat_tissue</i>!</font> - Node ARGS[1] - more mammary gland tissue available then total breast tissue.</b>'
  23. end
  24. else
  25. if ARGS[2] > 700:
  26. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$get_bfat_tissue</i>!</font> - Node ARGS[2] - more mammary gland tissue available then total breast tissue.</b>'
  27. else
  28. RESULT = 700
  29. end
  30. end
  31. end
  32. if $ARGS[0] = '$calc_npc_lactatemm_0':
  33. !! func('lact_lib', 'calc_npc_lactatemm_0', npc_glandamount, npc_prodstate, npc_breastage, npc_breastcount)
  34. !! New calc lactatemm function usuable for NPCs. Test function number one.
  35. !! ARGS[1] = npc_glandamount - The glandamount of the npc per breast. Glandamount here is actually the alveoli amount per breast. The value is 4500 to 150000 per breast depending on the genetics or if the npc went through pregnancy already.
  36. !! ARGS[2] = npc_prodstate - The breast production state of the npc. State can be "none", "induced" or "natural".
  37. !! ARGS[3] = npc_breastage - State can be "virgin" or "mature". Virgin in this case means that the breasts did not go through pregnancy changes yet, while mature is a fully developed breast that had all the changes during pregnancy.
  38. !! To determine the breastage, just check if the NPC has gone through pregnancy or not.
  39. !! ARGS[4] = npc_breastcount - The breast count of the NPC. If 0 the result will always be 0. Could be used for amputation events or multiple breasts events.
  40. !! The function will return something even if there is no lactation currently happening. this could be used for special events where sudden lactation is induced with the help of drugs. For example a lactation pill that will cause the NPC to lactate immediately without classical induction or natural growth during pregnancy.
  41. !! RESULT = lactatemm in ml*10
  42. if ARGS[2] = 'none':
  43. if ARGS[3] = 'virgin':
  44. temp_var = 2
  45. elseif ARGS[3] = 'mature':
  46. temp_var = 2
  47. else
  48. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_npc_lactatemm_0</i>!</font> - Node ARGS[2] "none".</b>'
  49. end
  50. elseif ARGS[2] = 'induced':
  51. if ARGS[3] = 'virgin':
  52. temp_var = 20
  53. elseif ARGS[3] = 'mature':
  54. temp_var = 80
  55. else
  56. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_npc_lactatemm_0</i>!</font> - Node ARGS[2] "induced".</b>'
  57. end
  58. elseif ARGS[2] = 'natural':
  59. if ARGS[3] = 'virgin':
  60. temp_var = 20
  61. elseif ARGS[3] = 'mature':
  62. temp_var = 80
  63. else
  64. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_npc_lactatemm_0</i>!</font> - Node ARGS[2] "natural".</b>'
  65. end
  66. else
  67. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_npc_lactatemm_0</i>!</font> - Root Node ARGS[2].</b>'
  68. end
  69. if ARGS[1] <= 0:
  70. RESULT = 0
  71. else
  72. RESULT = (ARGS[1]*temp_var*ARGS[4])/1000
  73. end
  74. end
  75. if $ARGS[0] = '$calc_lactatemm':
  76. !! func('lact_lib', 'calc_lactatemm')
  77. !! No arguments at the moment. Information is taken from the global variables 'nbsize', 'lactate','lactateinduced','kid'.
  78. !! lactatemm should be calculated every day, so if the breasts size is changed naturally the lactatemm will get higher. No change when silicone tits happen. Only natural breast tissue should make milk.
  79. !! Usage: lactatemm = func('lact_lib','$calc_lactatemm')
  80. !! RESULT = lactatemm in ml*10
  81. if lactate = 0:
  82. RESULT = 0
  83. elseif lactate >0:
  84. temp_breastsize = 0
  85. temp_breastsize += nbsize
  86. temp_var = 0
  87. !! This if needs to be changed later. If the kid is lost during the pregnancy, Sveta may still went through full breast development. If changing something here, please contact milky_boobs in the forums.
  88. if kid <= 0:
  89. temp_var = ((8*temp_breastsize*temp_breastsize)+(37*temp_breastsize))/4
  90. RESULT = temp_var
  91. else
  92. RESULT = ((8*temp_breastsize*temp_breastsize)+(37*temp_breastsize))
  93. end
  94. else
  95. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_lactatemm</i>!</font></b>'
  96. end
  97. end
  98. if $ARGS[0] = '$get_breastmilk_time':
  99. !! func('lact_lib','$get_breastmilk_time', sucktion_type, milk_demand)
  100. !! ARGS[1] = sucktion_type: the type of sucktion. adult_mouth [0], child_mouth [1], baby_mouth [2], manual_breastpump [3] , electric_breastpump [4], hand_expressing [5], cow milker [6], weak baby_mouth [7]
  101. !! ARGS[2] = milk_demand: how much milk is demanded. Warning: Should be ml and not in ml*10 for ease of use. :D
  102. !! RESULT = Time in Minutes
  103. !! Usage: breastmilktimetoget = func('lact_lib','$get_breastmilk_time', 2, 150)
  104. !! This function is just calculating the amount of time needed to get a specific amount of milk from svetas breasts. It is not pumping milk from her or changes anything else.
  105. !! If you want to milk sveta, use get_breastmilk.
  106. if lactate > 0:
  107. !! 'suck_flow_rate initialized' Base Rate of sucking is 10ml/minute.
  108. if ARGS[1] = 0:
  109. !! 'adult sucking'
  110. suck_flow_rate = 120
  111. elseif ARGS[1] = 1:
  112. !! 'child sucking'
  113. suck_flow_rate = 110
  114. elseif ARGS[1] = 2:
  115. !! 'baby sucking'
  116. suck_flow_rate = 80
  117. elseif ARGS[1] = 3:
  118. !! 'manual_breastpump sucking'
  119. suck_flow_rate = 180
  120. elseif ARGS[1] = 4:
  121. !! 'electric_breastpump sucking'
  122. suck_flow_rate = 400
  123. elseif ARGS[1] = 5:
  124. !! 'hand expression'
  125. suck_flow_rate = 105
  126. elseif ARGS[1] = 6:
  127. !! 'cow milker sucking'
  128. suck_flow_rate = 1000
  129. elseif ARGS[1] = 7:
  130. !! 'weak baby sucking'
  131. suck_flow_rate = 50
  132. temp_var = pcs_mood + ARGS[2]
  133. if temp_var > 100:
  134. pcs_mood = 100
  135. else
  136. pcs_mood += ARGS[2]
  137. end
  138. else
  139. !! 'suck flow else branch'
  140. suck_flow_rate = 100
  141. end
  142. if pcs_nips > 0:
  143. max_nip_flow_rate = 60
  144. elseif pcs_nips > 20:
  145. max_nip_flow_rate = 80
  146. elseif pcs_nips > 40:
  147. max_nip_flow_rate = 100
  148. elseif pcs_nips > 60:
  149. max_nip_flow_rate = 120
  150. elseif pcs_nips > 80:
  151. max_nip_flow_rate = 140
  152. elseif pcs_nips > 100:
  153. max_nip_flow_rate = 160
  154. else
  155. max_nip_flow_rate = 100
  156. end
  157. if breastcounter > 0:
  158. temp_var = breastcounter/10
  159. soreness_mod += temp_var
  160. if soreness_mod > 20: soreness_mod = 20
  161. if nipple_cream = 1:
  162. soreness_mod += 20
  163. nipple_cream = 0
  164. end
  165. end
  166. nip_flow_mod = 1
  167. temp_var = breastcounter/10
  168. nip_flow_mod += temp_var
  169. if nip_flow > 30: nip_flow_mod = 30
  170. max_nip_flow_rate += nip_flow_mod
  171. if (lactaterate/60) < 1 and lactaterate > 0:
  172. temp_lactaterate = 1
  173. else
  174. temp_lactaterate = lactaterate/60
  175. end
  176. if lactatemv >= (ARGS[2]*10):
  177. if max_nip_flow_rate <= suck_flow_rate:
  178. temp_var = (ARGS[2]*10)/max_nip_flow_rate
  179. else
  180. temp_var = (ARGS[2]*10)/suck_flow_rate
  181. end
  182. RESULT = temp_var
  183. elseif lactatemv > 0 and lactatemv < (ARGS[2]*10):
  184. if max_nip_flow_rate <= suck_flow_rate:
  185. temp_var = lactatemv/max_nip_flow_rate
  186. temp_var2 = (ARGS[2]*10) - lactatemv
  187. if max_nip_flow_rate <= temp_lactaterate:
  188. temp_var += temp_var2/max_nip_flow_rate
  189. else
  190. temp_var += temp_var2/(temp_lactaterate*10)
  191. end
  192. else
  193. temp_var = lactatemv/suck_flow_rate
  194. temp_var2 = (ARGS[2]*10) - lactatemv
  195. if suck_flow_rate <= temp_lactaterate:
  196. temp_var += temp_var2/suck_flow_rate
  197. else
  198. temp_var += temp_var2/(temp_lactaterate*10)
  199. end
  200. end
  201. RESULT = temp_var
  202. elseif lactatemv <=0:
  203. if max_nip_flow_rate <= suck_flow_rate:
  204. if max_nip_flow_rate <= temp_lactaterate:
  205. temp_var = (ARGS[2]*10)/max_nip_flow_rate
  206. else
  207. temp_var = (ARGS[2]*10)/(temp_lactaterate*10)
  208. end
  209. else
  210. if suck_flow_rate <= temp_lactaterate:
  211. temp_var = (ARGS[2]*10)/suck_flow_rate
  212. else
  213. temp_var = (ARGS[2]*10)/(temp_lactaterate*10)
  214. end
  215. end
  216. RESULT = temp_var
  217. else
  218. RESULT = 0
  219. end
  220. else
  221. RESULT = 0
  222. end
  223. end
  224. if $ARGS[0] = '$get_breastmilk':
  225. !! func('lact_lib','$get_breastmilk', sucktion_type, sucktion_time)
  226. !! ARGS[1] = sucktion_type: the type of sucktion. adult_mouth [0], child_mouth [1], baby_mouth [2], manual_breastpump [3] , electric_breastpump [4], hand_expressing [5], cow milker [6], weak baby_mouth [7]
  227. !! ARGS[2] = sucktion_time: how many minutes the sucking/pumping takes place
  228. !! Usage: breastmilkvolume = func('lact_lib','$get_breastmilk', 4, 20)
  229. !! RESULT = Milk in ml*10
  230. !! Sveta, someone or something tries to milk Svetas breasts, so the daily variable breastpumped is switched on. This is used for the femcycle. If this is not switched on, possible changes like prolactinlvl etc go down.
  231. breastpumped = 1
  232. if soreness_mod <= 0: soreness_mod = 1
  233. !! what type of sucktion is happening? different sucktion can cause a different demand of breastmilk. Base rate of sucktion is 10ml/minute x 10. So if the sucktion rate is 10ml/min then suck_flow_rate = 100.
  234. if ARGS[1] = 0:
  235. !! 'adult sucking'
  236. suck_flow_rate = 120
  237. temp_var = pcs_mood +(ARGS[2]/8)
  238. if temp_var > 100:
  239. pcs_mood = 100
  240. else
  241. pcs_mood += ARGS[2]/8
  242. end
  243. elseif ARGS[1] = 1:
  244. !! 'child sucking'
  245. suck_flow_rate = 110
  246. temp_var = pcs_mood + (ARGS[2]/2)
  247. if temp_var > 100:
  248. pcs_mood = 100
  249. else
  250. pcs_mood += ARGS[2]/2
  251. end
  252. elseif ARGS[1] = 2:
  253. !! 'baby sucking'
  254. suck_flow_rate = 80
  255. temp_var = pcs_mood + ARGS[2]
  256. if temp_var > 100:
  257. pcs_mood = 100
  258. else
  259. pcs_mood += ARGS[2]
  260. end
  261. elseif ARGS[1] = 3:
  262. !! 'manual_breastpump sucking'
  263. suck_flow_rate = 180
  264. elseif ARGS[1] = 4:
  265. !! 'electric_breastpump sucking'
  266. suck_flow_rate = 400
  267. elseif ARGS[1] = 5:
  268. !! 'hand expression'
  269. suck_flow_rate = 105
  270. elseif ARGS[1] = 6:
  271. !! 'cow milker sucking'
  272. suck_flow_rate = 1000
  273. elseif ARGS[1] = 7:
  274. !! 'weak baby sucking'
  275. suck_flow_rate = 50
  276. temp_var = pcs_mood + ARGS[2]
  277. if temp_var > 100:
  278. pcs_mood = 100
  279. else
  280. pcs_mood += ARGS[2]
  281. end
  282. else
  283. !! 'suck flow else branch'
  284. suck_flow_rate = 100
  285. end
  286. !! If you pump and work your breast more, soreness will decrease after pumping. This can also decline if your breasts arent worked for a longer time.
  287. if breastcounter > 0:
  288. temp_var = breastcounter/10
  289. soreness_mod += temp_var
  290. if soreness_mod > 30: soreness_mod = 30
  291. if nipple_cream = 1:
  292. soreness_mod += 20
  293. nipple_cream = 0
  294. end
  295. end
  296. !! If Sveta is not lactating we still need to do some actions. This is handled in here. Nipple pain + breast pain are applied as well as stamina is used.
  297. if lactate <= 0:
  298. if milkoverdemand <= 0: milkoverdemand = 0
  299. pump_stop_brake = 0
  300. !! This is how much milk demand is applied to the breasts. In this function it is needed to calculate the nipple pain and breast pain.
  301. max_sucktion_demand = suck_flow_rate*ARGS[2]
  302. if pain['nipples'] <= 60:
  303. suck_until_pain = (((60 - pain['nipples'])*soreness_mod)*10)/(suck_flow_rate/18)
  304. end
  305. temp_var = pain['nipples'] + max_sucktion_demand/(soreness_mod*100)
  306. if temp_var > 60:
  307. pain['nipples'] = 65
  308. pump_stop_brake = 1
  309. pumptime = suck_until_pain
  310. max_sucktion_demand = suck_flow_rate*pumptime
  311. else
  312. pain['nipples'] += max_sucktion_demand/(soreness_mod*100)
  313. end
  314. temp_var = pain['breasts'] + max_sucktion_demand/10000
  315. if temp_var > 20:
  316. pain['breasts'] = 25
  317. else
  318. pain['breasts'] += max_sucktion_demand/10000
  319. end
  320. !! Pumping breasts is exhausting even if no milk comes. Pumping will impact the stamina of Sveta if she is not lactating.
  321. temp_var = pcs_stam - max_sucktion_demand/300
  322. if temp_var < 0:
  323. pcs_stam = 0
  324. !! energy usage flag on.
  325. energytomilkpump = 1
  326. pcs_sweat += max_sucktion_demand/1000
  327. else
  328. pcs_stam -= max_sucktion_demand/300
  329. pcs_sweat += max_sucktion_demand/1000
  330. !! energy usage flag on.
  331. energytomilkpump = 1
  332. end
  333. if pumptime < 10:
  334. breastcounter += 1
  335. else
  336. breastcounter += pumptime/10
  337. end
  338. milkoverdemand += max_sucktion_demand
  339. RESULT = 0
  340. elseif lactate > 0:
  341. !! How much milk can go through the nipple. Base rate is 10ml/minute (100) when sucktion is applied to the nipple. If the demand is higher than the nipple can push through, nipple soreness will happen more quickly.
  342. if pcs_nips > 0:
  343. max_nip_flow_rate = 60
  344. elseif pcs_nips > 20:
  345. max_nip_flow_rate = 80
  346. elseif pcs_nips > 40:
  347. max_nip_flow_rate = 100
  348. elseif pcs_nips > 60:
  349. max_nip_flow_rate = 120
  350. elseif pcs_nips > 80:
  351. max_nip_flow_rate = 140
  352. elseif pcs_nips > 100:
  353. max_nip_flow_rate = 160
  354. else
  355. max_nip_flow_rate = 100
  356. end
  357. !! If you pump more, more milk will be able to flow out, disregarding nipplesize. Svetas nipples will get used to have milk stream through them, grows and drops with the breastcounter.
  358. nip_flow_mod = 1
  359. nip_flow_mod += breastcounter
  360. if nip_flow > 400: nip_flow_mod = 400
  361. max_nip_flow_rate += nip_flow_mod
  362. !! How much milk demand is applied to the breasts.
  363. max_sucktion_demand = suck_flow_rate*ARGS[2]
  364. !! We want to know if we can just suck out what is already stored or if additional milk production is needed to go through the whole pumping/sucking.
  365. !! If we only need 20ml from a 100ml storage, we would only substract 20ml, leaving 80ml inside the breasts.
  366. !! Also lets make sure we start at zero from the stuff we get from Sveta.
  367. milkedvolume = 0
  368. !! Case: Enough milk in Svetas breasts, covering the demand
  369. if lactatemv >= max_sucktion_demand:
  370. !! Checking if svetas nipple flow is enough to serve the demand. If yes - get the demand; If no - get what she is able to give us.
  371. if max_nip_flow_rate >= suck_flow_rate:
  372. milkedvolume = max_sucktion_demand
  373. lactatemv -= max_sucktion_demand
  374. else:
  375. milkedvolume = max_nip_flow_rate*ARGS[2]
  376. lactatemv -= milkedvolume
  377. end
  378. !! Case: Not enough milk in Svetas breasts.
  379. elseif lactatemv < max_sucktion_demand:
  380. !! We have two sub cases in this one. Sveta has no lactatemv and Sveta has not enough lactatemv. This means she has to produce more milk, but first we need to know how much is needed.
  381. !! temp_var will be the amount of milk Sveta has to produce to serve the demand. pump time left is the time left after lactatemv is drained.
  382. if lactatemv <= 0:
  383. temp_var = max_sucktion_demand
  384. pumptime_left = ARGS[2]
  385. else
  386. temp_var = max_sucktion_demand - lactatemv
  387. if max_nip_flow_rate >= suck_flow_rate:
  388. pumptime_left = ARGS[2] - (lactatemv/suck_flow_rate)
  389. else
  390. pumptime_left = ARGS[2] - (lactatemv/max_nip_flow_rate)
  391. end
  392. if pumptime_left < 0: pumptime_left = 0
  393. end
  394. !! Now we know how much time we have and how much demand we have. Time to check if Sveta can do it.
  395. !! For the case, that svetas milk flow is not big enough pumptime left will be 0, therefore this is handled here.
  396. if pumptime_left >0:
  397. if max_nip_flow_rate >= suck_flow_rate:
  398. !! the lactaterate is per hour, so it is possible that lactaterate will end up being zero when devided by 60. therefore everything here is multiplied by 100.
  399. if (suck_flow_rate*100) <= ((lactaterate*100)/60):
  400. milkedvolume += suck_flow_rate*pumptime_left
  401. else
  402. milkedvolume += ((((lactaterate*100)/60)*pumptime_left)/100)
  403. breastcounter += 2
  404. end
  405. else
  406. !! Same here as above.
  407. if (max_nip_flow_rate*100) <= ((lactaterate*100)/60):
  408. milkedvolume += max_nip_flow_rate*pumptime_left
  409. breastcounter += 2
  410. else
  411. milkedvolume += ((((lactaterate*100)/60)*pumptime_left)/100)
  412. breastcounter += 2
  413. end
  414. end
  415. !! Produced milk needs to be subtracted from the hourly lactate rate, so femcycle is only adding the milk that was not produced yet in the next hour
  416. if pumptime_left > 60:
  417. if ((pumptime_left*100)/60) > 100:
  418. lactaterate_use -= ((((lactaterate*100)/60)*(pumptime_left mod 60))/100)
  419. else
  420. lactaterate_use = lactaterate
  421. end
  422. else
  423. if lactaterate >= lactaterate_use:
  424. lactaterate_use -= milkedvolume
  425. else
  426. lactaterate_use = lactaterate
  427. end
  428. end
  429. if lactaterate_use <= 0: lactaterate_use = 0
  430. !! Sveta had to make milk, so she needs to use some of her body resources to make the milk.
  431. if milkedvolume > 0:
  432. !! energy usage flag on. Can be used in events to show that sveta is getting hungry or thirsty
  433. energytomilkpump = 1
  434. pcs_stam -= max_sucktion_demand/300
  435. if pcs_stam <= 0: pcs_stam = 0
  436. pcs_sweat += max_sucktion_demand/1000
  437. pcs_hydra -= milkedvolume/120
  438. if pcs_hydra < 1: pcs_hydra = 1
  439. pcs_energy -= milkedvolume/1200
  440. end
  441. end
  442. !! Now we check if sveta was able to make it or not. If not we have milk overdemand which will be used in femcycle to make her produce more milk next day.
  443. if temp_var > milkedvolume:
  444. milkoverdemand += (temp_var - milkedvolume)
  445. end
  446. !! time to add the pumped lactatemv to the milkedvolume and empty lactatemv.
  447. milkedvolume += lactatemv
  448. lactatemv = 0
  449. !! Here we have nipple and breastpain. The idea is - if there is more sucktion than the nipples can take more pain is applied. If the breasts make less milk then demanded pain to the breasts is applied.
  450. !! Else - there will only be nipple pain.
  451. if max_nip_flow_rate < suck_flow_rate:
  452. temp_var = pain['nipples'] + ((suck_flow_rate - max_nip_flow_rate)*100*ARGS[2])/2000 - (soreness_mod*ARGS[2])*15
  453. if temp_var >= 60:
  454. pain['nipples'] = 65
  455. elseif temp_var <= 0:
  456. pain['nipples'] += 1
  457. else
  458. pain['nipples'] += (((suck_flow_rate - max_nip_flow_rate)*100*ARGS[2])/2000 - (soreness_mod*ARGS[2])*15)
  459. end
  460. else
  461. if ARGS[2] < 10:
  462. pain['nipples'] += 1
  463. elseif ARGS[2] >= 10 and soreness_mod > ARGS[2]:
  464. pain['nipples'] += 1
  465. else
  466. pain['nipples'] += (ARGS[2]/10 - soreness_mod/10)
  467. end
  468. end
  469. if max_nip_flow_rate >= suck_flow_rate:
  470. if (suck_flow_rate*100) > ((lactaterate*100)/60):
  471. temp_var = pain['breasts'] + (((suck_flow_rate*100)-((lactaterate*100)/60))*pumptime_left)/1000
  472. if temp_var > 20:
  473. pain['breasts'] = 20
  474. else
  475. pain['breasts'] += (((suck_flow_rate*100)-((lactaterate*100)/60))*pumptime_left)/1000
  476. end
  477. end
  478. else
  479. if (max_nip_flow_rate*100) > ((lactaterate*100)/60):
  480. temp_var = pain['breasts'] + (((max_nip_flow_rate*100)-((lactaterate*100)/60))*pumptime_left)/1000
  481. if temp_var > 20:
  482. pain['breasts'] = 20
  483. else
  484. pain['breasts'] += (((max_nip_flow_rate*100)-((lactaterate*100)/60))*pumptime_left)/1000
  485. end
  486. end
  487. end
  488. end
  489. if pumptime < 10:
  490. breastcounter += 1
  491. else
  492. breastcounter += pumptime/10
  493. end
  494. !! Done - Result is the milked volume.
  495. RESULT = milkedvolume
  496. end
  497. end
  498. !! bp_milking - breast pump milking
  499. !! use href="exec:gt ''lact_lib'',''bp_milking''"
  500. if $ARGS[0] = 'bp_milking':
  501. pumptime = 0
  502. pumptype = 0
  503. if pump_bottletype < 1500: pump_bottletype = 1500
  504. if bpbottles <= 0: bpbottles = 1
  505. if $location_type ! 'bathroom' and pcs_inhib < 30:
  506. 'You aren''t confident enough to do that here.'
  507. act 'Finish': menu_off = 0 & gt $loc, $metka
  508. elseif bp_unbox <= 0:
  509. 'You need to unbox your breast pump first.'
  510. act 'Finish': menu_off = 0 & gt $loc, $metka
  511. elseif bp_unbox = 1 and ($location_type = 'bathroom' or $location_type = 'private'):
  512. gt 'lact_lib', 'bp_unbox_event'
  513. else
  514. *clr
  515. cla
  516. '<center><img <<$set_imgh>> src="images/pc/body/tits/breast_pump.jpg"></center>'
  517. 'How long do you want to pump your breasts with the manual breast pump?'
  518. if bpbottlem > 0:
  519. if pump_bottletype = 1500:
  520. 'Current bottle size in use: &gt;150ml | <a href="exec:pump_bottletype = 2500 & gt ''lact_lib'', ''bp_milking''">250ml</a>'
  521. else
  522. 'Current bottle size in use <a href="exec:pump_bottletype = 1500 & gt ''lact_lib'', ''bp_milking''">150ml</a> | &gt;250ml'
  523. end
  524. end
  525. if lactatemv > 0:
  526. pumptime = (func('lact_lib','$get_breastmilk_time', 3, (lactatemv/10)))
  527. if pumptime > 5:
  528. pumptime -= 2
  529. end
  530. if pumptime > 60:
  531. act 'Pump until breasts are empty':
  532. *clr
  533. cla
  534. minut += 2
  535. 'As you prepare for pumping you weight your breasts in your hands. You feel that your breasts carry a large amount of milk and pumping will probably take a long time.'
  536. 'Getting relieve for your breasts with the manual breast pump will probably take at least <<pumptime>> minutes.'
  537. if pcs_know_mward <= 0:
  538. 'You concider visiting a hospital to get help or buying a better breastpump.'
  539. pcs_ask_mward_help = 1
  540. pcs_knows_electric_pump = 1
  541. end
  542. 'Do you want to continue?'
  543. act 'Don''t pump':gt $loc, $metka
  544. act 'Continue':
  545. gt 'lact_lib', 'milking'
  546. end
  547. end
  548. elseif pumptime <= 0:
  549. act 'Pump until breasts are empty':
  550. *clr
  551. cla
  552. minute += 2
  553. 'As you prepare for pumping you weight your breasts in your hands. Your breasts feel really empty. There is no need to pump now.'
  554. act 'Don''t pump':gt $loc, $metka
  555. act 'back':gt 'lact_lib', 'bp_milking'
  556. end
  557. else
  558. act 'Pump until breasts are empty':
  559. pumptime = func('lact_lib','$get_breastmilk_time', 3, (lactatemv/10))
  560. if pumptime > 5:
  561. pumptime -= 2
  562. end
  563. gt 'lact_lib', 'milking'
  564. end
  565. end
  566. end
  567. act '15 Minutes':
  568. pumptime = 15
  569. gt 'lact_lib', 'milking'
  570. end
  571. act '30 Minutes':
  572. pumptime = 30
  573. gt 'lact_lib', 'milking'
  574. end
  575. act 'Custom':
  576. pumptime = input ("How long do you plan to pump your breasts? (Not more than 60 minutes)")
  577. if pumptime <= 0 or pumptime > 60:
  578. minut += 2
  579. act 'Don''t pump':menu_off = 0 & gt $loc, $metka
  580. act 'back':gt 'lact_lib', 'bp_milking'
  581. elseif pumptime > 0 and pumptime <= 60:
  582. gt 'lact_lib', 'milking'
  583. end
  584. end
  585. act 'Massage your breasts': gt 'lact_lib','man_milking'
  586. act 'Don''t pump':menu_off = 0 & gt $loc, $metka
  587. end
  588. end
  589. !! man_milking - manual (with hands) milking
  590. !! use href="exec:gt ''lact_lib'',''man_milking''"
  591. !! for manual milk expression in bathrooms etc. please use this function.
  592. if $ARGS[0] = 'massage':
  593. if breastcounter <= 0:
  594. temp_var = 50
  595. else
  596. temp_var = (50/breastcounter)
  597. end
  598. if (($location_type ! 'bathroom' and pcs_inhib >= 30) or $location_type = 'bathroom' and breastpump = 0) and pcs_horny >= temp_var:
  599. act 'Massage your breasts': gt 'lact_lib','man_milking'
  600. end
  601. end
  602. if $ARGS[0] = 'man_milking':
  603. pumptime = 0
  604. *clr
  605. cla
  606. 'How long do you want to massage your breasts?'
  607. if lactatemv > 0:
  608. pumptime = (func('lact_lib','$get_breastmilk_time', 5, (lactatemv/10)))
  609. if pumptime > 60:
  610. act 'Express until breasts are empty':
  611. *clr
  612. cla
  613. minut += 2
  614. 'You prepare yourself and weight your breasts in your hands. You feel that your breasts carry a large amount of milk and manually expressing it will probably take a long time.'
  615. 'Getting relieve for your breasts with manual expression will probably take at least <<pumptime>> minutes.'
  616. if breastpump <= 0 and bp_unbox <= 1:
  617. 'You should concider buying a breastpump'
  618. elseif breastpump = 1 and bp_unbox <= 1 and pain['nipples'] <= 60:
  619. 'You should concider using your breastpump.'
  620. else
  621. 'You should concider the use of a breastpump.'
  622. end
  623. 'Do you want to continue?'
  624. act 'Don''t express':menu_off = 0 & gt $loc, $metka
  625. act 'Express your milk':
  626. gt 'lact_lib', 'hand_milking'
  627. end
  628. end
  629. elseif pumptime <= 0:
  630. act 'Express milk until breasts are empty':
  631. *clr
  632. cla
  633. minute += 2
  634. 'As you prepare yourself you feel your breasts in your hands. Your breasts feel really empty. There is no need to express now.'
  635. act 'Don''t express milk':menu_off = 0 & gt $loc, $metka
  636. act 'back':gt 'lact_lib', 'man_milking'
  637. end
  638. else
  639. act 'Express until breasts are empty':
  640. pumptime = func('lact_lib','$get_breastmilk_time', 5, (lactatemv/10))
  641. gt 'lact_lib', 'hand_milking'
  642. end
  643. end
  644. end
  645. act '5 Minutes':
  646. pumptime = 5
  647. gt 'lact_lib', 'hand_milking'
  648. end
  649. act '10 Minutes':
  650. pumptime = 10
  651. gt 'lact_lib', 'hand_milking'
  652. end
  653. act 'Custom':
  654. pumptime = input ("How long do you plan to massage your breasts? (Not more than 60 minutes)")
  655. if pumptime <= 0 or pumptime > 60:
  656. minut += 2
  657. act 'Don''t express':gt $loc, $metka
  658. act 'back':gt 'lact_lib', 'man_milking'
  659. elseif pumptime > 0 and pumptime <= 60:
  660. gt 'lact_lib', 'hand_milking'
  661. end
  662. end
  663. act 'Don''t express':menu_off = 0 & gt $loc, $metka
  664. end
  665. if $ARGS[0] = 'bp_unbox_event':
  666. if bp_unbox <= 0:
  667. *clr
  668. cla
  669. minut += 5
  670. if $location_type = 'bathroom':
  671. 'You push down the toilet seat to sit down and slowly start to unbox your newly aquirred breast pump.'
  672. elseif $location_type = 'private' and $locclass = 'bedr':
  673. 'You sit down on your bed and slowly start to unbox your newly aquirred breast pump.'
  674. elseif $location_type = 'private':
  675. 'You sit down and slowly start to unbox your newly aquirred breast pump.'
  676. end
  677. if kid <= 0 and preg <= 0 and pregtimes <= 0 and pregchem <= 0 and bp_unbox <= 0:
  678. 'While examining it, you think about why you bought it in the first place. You are not pregnant nor do you have a kid that needs breast milk.'
  679. if lactate <= 0:
  680. 'Your breasts haven''t got any milk in them too, so it seems this pump is a bit useless.'
  681. else
  682. 'At least it can help to get the milk out of your breasts.'
  683. end
  684. end
  685. if $location_type = 'private':
  686. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_unboxing.jpg"></center>'
  687. elseif $location_type = 'bathroom':
  688. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_unboxing_bath.jpg"></center>'
  689. else
  690. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_unboxing_bath.jpg"></center>'
  691. end
  692. if (pcs_inhib > 40 and $location_type = 'private') or $location_type = 'bathroom':
  693. act 'Try out how it works':
  694. *clr
  695. cla
  696. 'You pull up your top to release your breasts'
  697. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center><br>'
  698. 'Your fingers glide around the sucktion cup of the breast pump, while your other hand holds the pump.'
  699. 'Making sure that no one is around, you lift the breast pump to your left breast. The cold cone feels uncomfortable on your nipple.'
  700. milkedvolume = func('lact_lib','$get_breastmilk', 3, 1)
  701. minut += 1
  702. bp_unbox = 2
  703. if lactate > 0 and milkedvolume > 0:
  704. if milkedvolume <= 50:
  705. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  706. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  707. 'You go on for a minute and then detach the pump. You collected some milk, but it is just a small puddle in the bottle.'
  708. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  709. elseif milkedvolume > 50 and milkedvolume <= 1500:
  710. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  711. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  712. 'You go on for a minute and then detach the pump. You collected <<milkedvolume/10>>ml of your breastmilk.'
  713. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_half.jpg"></center>'
  714. else
  715. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  716. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  717. 'You go on for a minute and then detach the pump. You easily filed the breast pump bottle with your breast milk just with this little pumping.'
  718. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_full.jpg"></center>'
  719. end
  720. 'You nod at the breast pump, thinking it will come in handy.'
  721. elseif lactate > 0 and milkedvolume <= 0:
  722. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  723. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  724. 'You go on for a minute and then detach the pump. You collected some milk, but it is just a small puddle in the bottle.'
  725. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  726. else
  727. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  728. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  729. 'You go on for a minute and then detach the pump. As expected no milk was collected in the bottle.'
  730. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/breast_pump.jpg"></center>'
  731. end
  732. act 'continue':
  733. *clr
  734. cla
  735. if milkedvolume > 50 and $location_type = 'private':
  736. 'You look at the milk in the bottle and then around the room. Having no idea what to do with the excess milk, you look at it and suddenly sip it down.'
  737. 'It is your milk, so it should be okay to drink it.'
  738. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
  739. '<center>The milk is still warm from your breasts.</center>'
  740. pcs_health += milkedvolume/400
  741. pcs_energy += milkedvolume/500
  742. if pcs_hydra >= 100:
  743. pcs_hydra += milkedvolume/200
  744. else
  745. pcs_hydra += milkedvolume/100
  746. end
  747. minut += ((milkedvolume/1000) + 3)
  748. act 'Finish': menu_off = 0 & gt $loc, $metka
  749. else
  750. 'You clean up your pump and cover your breasts again.'
  751. act 'Finish': menu_off = 0 & gt $loc, $metka
  752. end
  753. end
  754. bp_unbox = 2
  755. end
  756. end
  757. act 'Don''t try it here':
  758. *clr
  759. cla
  760. 'You look around you, not feeling to comfortable to use the breast pump here.'
  761. bp_unbox = 1
  762. act 'Finish': menu_off = 0 & gt $loc, $metka
  763. end
  764. elseif bp_unbox = 1:
  765. if $location_type = 'private' and pcs_inhib < 40:
  766. 'You can''t do this here'
  767. act 'Finish': menu_off = 0 & gt $loc, $metka
  768. else
  769. 'You pull up your top to release your breasts'
  770. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center><br>'
  771. 'Your fingers glide around the sucktion cup of the breast pump, while your other hand holds the pump.'
  772. 'Making sure that no one is around, you lift the breast pump to your left breast. The cold cone feels uncomfortable on your nipple.'
  773. milkedvolume = func('lact_lib','$get_breastmilk', 3, 1)
  774. minut += 1
  775. bp_unbox = 2
  776. if lactate > 0 and milkedvolume > 0:
  777. if milkedvolume <= 50:
  778. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  779. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  780. 'You go on for a minute and then detach the pump. You collected some milk, but it is just a small puddle in the bottle.'
  781. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  782. elseif milkedvolume > 50 and milkedvolume <= 1500:
  783. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  784. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  785. 'You go on for a minute and then detach the pump. You collected <<milkedvolume/10>>ml of your breastmilk.'
  786. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_half.jpg"></center>'
  787. else
  788. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  789. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it. The pump starts to draw milk from your breast.'
  790. 'You go on for a minute and then detach the pump. You easily filed the breast pump bottle with your breast milk just with this little pumping.'
  791. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_full.jpg"></center>'
  792. end
  793. 'You nod at the breast pump, thinking it will come in handy.'
  794. elseif lactate > 0 and milkedvolume <= 0:
  795. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  796. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  797. 'You go on for a minute and then detach the pump. You collected some milk, but it is just a small puddle in the bottle.'
  798. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  799. else
  800. 'You start to squeeze the bulb. Your nipple is sucked into the cone, getting elongated a bit. It feels weird at first and you release the lever, the sucktion on your nipple goes away and the nipple retracts.'
  801. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  802. 'You go on for a minute and then detach the pump. As expected no milk was collected in the bottle.'
  803. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/breast_pump.jpg"></center>'
  804. end
  805. act 'continue':
  806. *clr
  807. cla
  808. if milkedvolume > 50 and $location_type = 'private':
  809. 'You look at the milk in the bottle and then around the room. Having no idea what to do with the excess milk, you look at it and suddenly sip it down.'
  810. 'It is your milk, so it should be okay to drink it.'
  811. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
  812. '<center>The milk is still warm from your breasts.</center>'
  813. pcs_health += milkedvolume/400
  814. pcs_energy += milkedvolume/500
  815. if pcs_hydra >= 100:
  816. pcs_hydra += milkedvolume/200
  817. else
  818. pcs_hydra += milkedvolume/100
  819. end
  820. minut += ((milkedvolume/1000) + 3)
  821. act 'Finish': menu_off = 0 & gt $loc, $metka
  822. else
  823. 'You clean up your pump and cover your breasts again.'
  824. act 'Finish': menu_off = 0 & gt $loc, $metka
  825. end
  826. end
  827. end
  828. elseif bp_unbox >= 2:
  829. *clr
  830. cla
  831. 'You unboxed your breast pump already.'
  832. act 'Finish': menu_off = 0 & gt $loc, $metka
  833. end
  834. end
  835. !! milking
  836. !! never use directly. Always use bp_milking, man_milking or sex_milking
  837. if $ARGS[0] = 'milking':
  838. !! if pumptime <= 0 or pumptime > 60:
  839. !! act 'Finish':gt $loc, $metka
  840. !! end
  841. if pumptype = 1:
  842. pumptime = (pumptime*6)/10
  843. end
  844. !! :loop
  845. !! if k < kid:
  846. !! gs 'kid','kidlist'
  847. !! k += 1
  848. !! jump 'loop'
  849. !! end
  850. if lactate > 0 and pain['nipples'] < 60:
  851. milkedvolume = func('lact_lib','$get_breastmilk', 3, pumptime)
  852. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_lactating.jpg"></center>'
  853. if pumptime > 1:
  854. 'You attach the pump to your breast and start rythmically squeezing the bulb for <<pumptime>> minutes.'
  855. else
  856. 'You attach the pump to your breast and start rythmically squeezing the bulb for one minute.'
  857. end
  858. !! Fill the bottles :D
  859. if milkedvolume > pump_bottletype and (bpbottles*1500 + bpbottlem*2500) = pump_bottletype:
  860. 'During pumping you have to empty the collecting bottle as it filled up with your milk.'
  861. 'You give it a few more pumps and detach the pump.<br>You filled the bottle with <<pump_bottletype/10>>ml of your milk.'
  862. 'To collect all your pumped milk you should probably check if the pharmacy has additional bottles for your breast pump.'
  863. pcs_knowsmilkbottles = 1
  864. elseif milkedvolume > pump_bottletype and (bpbottles*1500 + bpbottlem*2500) > pump_bottletype:
  865. !! Checking which bottletype is used and filling those bottles up before the other type is used.
  866. bp_used_mbottle = 0
  867. bp_used_sbottle = 0
  868. :sbottleloop
  869. if pump_bottletype < 2500 and milkedvolume >= 1500 and bp_used_sbottle < bpbottles:
  870. bp_used_sbottle += 1
  871. milkedvolume -= 1500
  872. jump 'sbottleloop'
  873. end
  874. :mbottleloop
  875. if pump_bottletype >= 2500 and milkedvolume >= 2500 and bp_used_mbottle < bpbottlem:
  876. bp_used_mbottle += 1
  877. milkedvolume -= 2500
  878. jump 'mbottleloop'
  879. end
  880. !! Checking for the milkedvolume and if there are bottles left. if yes - use these bottles
  881. if milkedvolume > 0 and (((bpbottlem - bp_used_mbottle) > 0) or ((bpbottles - bp_used_sbottle) > 0)):
  882. :altfill01
  883. if pump_bottletype < 2500 and milkedvolume >= 2500 and bp_used_mbottle < bpbottlem:
  884. bp_used_mbottle += 1
  885. milkedvolume -= 2500
  886. jump 'altfill01'
  887. end
  888. :altfill02
  889. if pump_bottletype >= 2500 and milkedvolume >= 1500 and bp_used_sbottle < bpbottles:
  890. bp_used_sbottle += 1
  891. milkedvolume -= 1500
  892. jump 'altfill02'
  893. end
  894. end
  895. !! by this point all bottles should have been used up. Everything else needs to end up in the drain.
  896. if milkedvolume > 0 and bpbottlem = bp_used_mbottle and bpbottles = bp_used_sbottle:
  897. 'During pumping you have to switch the collecting bottle as it filled up with your milk. Unfortunately you don''t have enough bottles to collect all your milk.'
  898. 'You had to pour <<milkedvolume/10>>ml of your breast milk into the sink.'
  899. milkedvolume = ((bp_used_mbottle*2500) + (bp_used_sbottle*1500))
  900. elseif milkedvolume > 0 and milkedvolume < 1500 and (bpbottles - bp_used_sbottle) > 0:
  901. 'During pumping you have to switch the collecting bottle as it filled up with your milk.'
  902. elseif milkedvolume > 0 and milkedvolume < 2500 and milkedvolume > 1500 and (bpbottlem - bp_used_mbottle) > 0:
  903. 'During pumping you have to switch the collecting bottle as it filled up with your milk.'
  904. else
  905. 'During pumping you have to switch the collecting bottle as it filled up with your milk.'
  906. end
  907. if bp_used_mbottle >= 1 or bp_used_sbottle >= 1:
  908. '<center><img <<$set_imgh>> src="images/pc/body/tits/bottles_full.jpg"></center>'
  909. if milkedvolume = ((bp_used_mbottle*2500) + (bp_used_sbottle*1500)):
  910. 'You pumped <<milkedvolume/10>>ml of milk from your breasts, collecting it in:'
  911. if bp_used_sbottle = 1:
  912. 'One 150ml bottle'
  913. elseif bp_used_sbottle > 1:
  914. '<<bp_used_sbottle>> x 150ml bottles'
  915. end
  916. if bp_used_mbottle = 1:
  917. 'One 250ml bottle'
  918. elseif bp_used_mbottle > 1:
  919. '<<bp_used_mbottle>> x 250ml bottles'
  920. end
  921. else
  922. 'You pumped <<((bp_used_mbottle*2500)+(bp_used_sbottle*1500)+milkedvolume)/10>>ml of milk from your breasts collecting it in:'
  923. if bp_used_sbottle = 1:
  924. 'One 150ml bottle'
  925. elseif bp_used_sbottle > 1:
  926. '<<bp_used_sbottle>> x 150ml bottles'
  927. end
  928. if bp_used_mbottle = 1:
  929. 'One 250ml bottle'
  930. elseif bp_used_mbottle > 1:
  931. '<<bp_used_mbottle>> x 250ml bottles'
  932. end
  933. if (bpbottles - bp_used_sbottle) > 0 and milkedvolume <= 1500:
  934. 'You also stored <<milkedvolume/10>>ml of breast milk in a 150ml bottle.'
  935. elseif (bpbottlem - bp_used_mbottle) > 0 and milkedvolume <= 2500:
  936. 'You also stored <<milkedvolume/10>>ml of breast milk in a 250ml bottle.'
  937. else
  938. 'unhandled case - you shouldn''t end up here. Please report this in the bug section of Girl Life in the tfg-forums.'
  939. 'bp_used_mbottle: <<bp_used_mbottle>>'
  940. 'bp_used_sbottle: <<bp_used_sbottle>>'
  941. 'milkedvolume: <<milkedvolume>>'
  942. 'pump_bottletype: <<pump_bottletype>>'
  943. 'bpbottles: <<bpbottles>>'
  944. 'bpbottlem: <<bpbottlem>>'
  945. end
  946. milkedvolume += bp_used_mbottle*2500 + bp_used_sbottle*1500
  947. end
  948. else
  949. 'unhandled case - you shouldn''t end up here. Please report this in the bug section of Girl Life in the tfg-forums.'
  950. 'bp_used_mbottle: <<bp_used_mbottle>>'
  951. 'bp_used_sbottle: <<bp_used_sbottle>>'
  952. 'milkedvolume: <<milkedvolume>>'
  953. 'pump_bottletype: <<pump_bottletype>>'
  954. 'bpbottles: <<bpbottles>>'
  955. 'bpbottlem: <<bpbottlem>>'
  956. end
  957. else
  958. 'You give it a few more pumps and detach the pump.<br>You filled the bottle with <<milkedvolume/10>>ml of your milk.'
  959. end
  960. breastcounter += 1
  961. if energytomilkpump > 0 and pcs_energy = 0:
  962. '<br>During pumping you feel really hungry, producing breast milk seems to be more exhausing then thought.'
  963. energytomilkpump = 0
  964. elseif energytomilkpump > 0:
  965. '<br>You feel a bit thirsty after pumping.'
  966. energytomilkpump = 0
  967. end
  968. if bcream_used = 1:
  969. pcs_nips += rand(0,2)
  970. bcream_used = 0
  971. end
  972. minut += pumptime
  973. elseif lactate = 0 and pain['nipples'] < 60:
  974. if rand(1,50) + prolactinlvl >= rand(200,250) and milkinduceday >= 5:
  975. '<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
  976. 'As usual, you attach the pump but after a few pumps white liquid suddenly starts flowing from your nipples.<br>You started lactating!'
  977. lactateinduced = 1
  978. lactate = 1
  979. if func('lact_lib','$calc_lactatemm') > 0: lactatemm = func('lact_lib','$calc_lactatemm')
  980. if prolactinlvl < 200: prolactinlvl = 200
  981. lactaterate = 10*(prolactinlvl/200)
  982. pcs_nips += 2
  983. pumpinggrowth = 0
  984. else
  985. milkedvolume = func('lact_lib','$get_breastmilk', 3, pumptime)
  986. '<center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center>'
  987. if breastcounter < 100:
  988. 'You attach the pump to your nipples and start squeezing the bulb. The vacuum feels uncomfortable on your nipples.'
  989. elseif breastcounter >= 100 and breastcounter < 200:
  990. 'You attach the pump to your nipples and start squeezing the bulb. You are used to the vacuum on your nipples.'
  991. else
  992. 'You attach the pump to your nipples and start squeezing the bulb. The vacuum feels good on your nipples.'
  993. end
  994. if prolactinlvl > 100: 'A few droplets of liquid come out of your nipples but it is not milk.'
  995. breastcounter += 1
  996. if pump_stop_brake = 1:
  997. 'During pumping your nipples start to hurt extremely. You have to stop after <<pumptime>> minutes, because you couldn''t go on.'
  998. end
  999. if prolactinlvl > 100:
  1000. if rand(0,10) > 9:
  1001. pumpinggrowth += 1
  1002. end
  1003. 'After finishing, your breasts feel weirdly engorged.'
  1004. end
  1005. if bcream_used = 1:
  1006. pcs_nips += rand(0,2)
  1007. bcream_used = 0
  1008. end
  1009. end
  1010. minut += pumptime
  1011. else
  1012. 'Your nipples feel too sore to use the pump right now.'
  1013. end
  1014. if milkedvolume > 0:
  1015. lact_engorgement = 0
  1016. lactatemess = 0
  1017. act 'Pour it into the sink':
  1018. *clr
  1019. cla
  1020. if milkedvolume > 1500 and bpbottles <= 1:
  1021. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_sink.jpg"></center>'
  1022. '<center>You pour 150ml of your breast milk into the sink and clean up your breastpump.</center>'
  1023. else
  1024. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_sink.jpg"></center>'
  1025. '<center>You pour <<milkedvolume/10>>ml of your breast milk into the sink and clean up your breastpump.</center>'
  1026. end
  1027. minute += ((milkedvolume/1500) + 3)
  1028. act 'Finish':
  1029. milkedvolume = 0
  1030. menu_off = 0 & gt $loc, $metka
  1031. end
  1032. end
  1033. if pcs_hydra < 100:
  1034. act 'Drink it':
  1035. *clr
  1036. cla
  1037. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
  1038. '<center>You drink your own breast milk and clean up your breastpump.</center>'
  1039. '<center>The milk is still warm from your breasts.</center>'
  1040. pcs_health += milkedvolume/400
  1041. pcs_energy += milkedvolume/500
  1042. if pcs_hydra >= 100:
  1043. pcs_hydra += milkedvolume/200
  1044. else
  1045. pcs_hydra += milkedvolume/100
  1046. end
  1047. minute += ((milkedvolume/1000) + 3)
  1048. act 'Finish':
  1049. milkedvolume = 0
  1050. menu_off = 0 & gt $loc, $metka
  1051. end
  1052. end
  1053. end
  1054. else
  1055. act 'Finish':menu_off = 0 & gt $loc, $metka
  1056. end
  1057. end
  1058. !! engorged_morning
  1059. !! use href="exec:gt ''lact_lib'',''engorged_morning''"
  1060. if $ARGS[0] = 'engorged_morning':
  1061. minut += 5
  1062. '<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
  1063. 'You wake up and your breasts hurt. As you look down, you can see that you have a heavy letdown. You should pump your breasts as soon as possible.'
  1064. act 'Finish':menu_off = 0 & gt $loc, $metka
  1065. end
  1066. if $ARGS[0] = 'hand_milking':
  1067. *clr
  1068. cla
  1069. if lactate > 0 and pain['nipples'] <= 60:
  1070. 'You start to massage your breasts, your fingers gliding down your breasts skin, over the areolas. Your fingers pressing down into the areola, stretching it forwards to your nipple.'
  1071. 'Several small streams of your milk start to jet out of your nipples.'
  1072. 'You go on for <<pumptime>> minutes until you stop. You clean yourself up and everything else that got wet from your milk.<br>'
  1073. '<center><video autoplay loop src="images/pc/body/tits/bathroom_milking.mp4"></video></center>'
  1074. milkedvolume = func('lact_lib','$get_breastmilk', 5, pumptime)
  1075. minut += pumptime
  1076. elseif lactate = 0 and pain['nipples'] <= 60:
  1077. 'You start to massage your breasts, your fingers gliding down your breasts skin, over the areolas. Your fingers pressing down into the areola, stretching it forwards to your nipple,'
  1078. 'kneading your breasts as well.'
  1079. '<center><video autoplay loop src="images/pc/body/tits/bathroom_massage.mp4"></video></center>'
  1080. milkedvolume = func('lact_lib','$get_breastmilk', 5, pumptime)
  1081. minut += pumptime
  1082. else
  1083. 'Your nipples are too sore to hand massage right now.'
  1084. end
  1085. act 'Finish':menu_off = 0 & gt $loc, $metka
  1086. end
  1087. --- lact_lib ---------------------------------