lact_lib.qsrc 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106
  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 < 40:
  506. 'You can''t use it here.'
  507. act 'Finish': gt $loc, $metka
  508. elseif bp_unbox <= 0:
  509. 'You need to unbox your breast pump first.'
  510. act 'Finish': 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':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':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] = 'man_milking':
  593. pumptime = 0
  594. if pcs_inhib < 40:
  595. *clr
  596. cla
  597. 'You can''t do this here.'
  598. act 'Finish': gt $loc, $metka
  599. else
  600. *clr
  601. cla
  602. 'How long do you want to massage your breasts?'
  603. if lactatemv > 0:
  604. pumptime = (func('lact_lib','$get_breastmilk_time', 5, (lactatemv/10)))
  605. if pumptime > 60:
  606. act 'Express until breasts are empty':
  607. *clr
  608. cla
  609. minut += 2
  610. '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.'
  611. 'Getting relieve for your breasts with manual expression will probably take at least <<pumptime>> minutes.'
  612. if breastpump <= 0 and bp_unbox <= 1:
  613. 'You should concider buying a breastpump'
  614. elseif breastpump = 1 and bp_unbox <= 1 and pain['nipples'] <= 60:
  615. 'You should concider using your breastpump.'
  616. else
  617. 'You should concider the use of a breastpump.'
  618. end
  619. 'Do you want to continue?'
  620. act 'Don''t express':gt $loc, $metka
  621. act 'Express your milk':
  622. gt 'lact_lib', 'hand_milking'
  623. end
  624. end
  625. elseif pumptime <= 0:
  626. act 'Express milk until breasts are empty':
  627. *clr
  628. cla
  629. minute += 2
  630. 'As you prepare yourself you feel your breasts in your hands. Your breasts feel really empty. There is no need to express now.'
  631. act 'Don''t express milk':gt $loc, $metka
  632. act 'back':gt 'lact_lib', 'man_milking'
  633. end
  634. else
  635. act 'Express until breasts are empty':
  636. pumptime = func('lact_lib','$get_breastmilk_time', 5, (lactatemv/10))
  637. gt 'lact_lib', 'hand_milking'
  638. end
  639. end
  640. end
  641. act '5 Minutes':
  642. pumptime = 5
  643. gt 'lact_lib', 'hand_milking'
  644. end
  645. act '10 Minutes':
  646. pumptime = 10
  647. gt 'lact_lib', 'hand_milking'
  648. end
  649. act 'Custom':
  650. pumptime = input ("How long do you plan to massage your breasts? (Not more than 60 minutes)")
  651. if pumptime <= 0 or pumptime > 60:
  652. minut += 2
  653. act 'Don''t express':gt $loc, $metka
  654. act 'back':gt 'lact_lib', 'man_milking'
  655. elseif pumptime > 0 and pumptime <= 60:
  656. gt 'lact_lib', 'hand_milking'
  657. end
  658. end
  659. act 'Don''t express':gt $loc, $metka
  660. end
  661. end
  662. if $ARGS[0] = 'bp_unbox_event':
  663. if bp_unbox <= 0:
  664. *clr
  665. cla
  666. minut += 5
  667. if $location_type = 'bathroom':
  668. 'You push down the toilet seat to sit down and slowly start to unbox your newly aquirred breast pump.'
  669. elseif $location_type = 'private' and $locclass = 'bedr':
  670. 'You sit down on your bed and slowly start to unbox your newly aquirred breast pump.'
  671. elseif $location_type = 'private':
  672. 'You sit down and slowly start to unbox your newly aquirred breast pump.'
  673. end
  674. if kid <= 0 and preg <= 0 and pregtimes <= 0 and pregchem <= 0 and bp_unbox <= 0:
  675. '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.'
  676. if lactate <= 0:
  677. 'Your breasts haven''t got any milk in them too, so it seems this pump is a bit useless.'
  678. else
  679. 'At least it can help to get the milk out of your breasts.'
  680. end
  681. end
  682. if $location_type = 'private':
  683. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_unboxing.jpg"></center>'
  684. elseif $location_type = 'bathroom':
  685. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_unboxing_bath.jpg"></center>'
  686. else
  687. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_unboxing_bath.jpg"></center>'
  688. end
  689. if (pcs_inhib > 40 and $location_type = 'private') or $location_type = 'bathroom':
  690. act 'Try out how it works':
  691. *clr
  692. cla
  693. 'You pull up your top to release your breasts'
  694. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center><br>'
  695. 'Your fingers glide around the sucktion cup of the breast pump, while your other hand holds the pump.'
  696. 'Making sure that no one is around, you lift the breast pump to your left breast. The cold cone feels uncomfortable on your nipple.'
  697. milkedvolume = func('lact_lib','$get_breastmilk', 3, 1)
  698. minut += 1
  699. bp_unbox = 2
  700. if lactate > 0 and milkedvolume > 0:
  701. if milkedvolume <= 50:
  702. '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.'
  703. '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.'
  704. '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.'
  705. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  706. elseif milkedvolume > 50 and milkedvolume <= 1500:
  707. '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.'
  708. '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.'
  709. 'You go on for a minute and then detach the pump. You collected <<milkedvolume/10>>ml of your breastmilk.'
  710. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_half.jpg"></center>'
  711. else
  712. '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.'
  713. '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.'
  714. '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.'
  715. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_full.jpg"></center>'
  716. end
  717. 'You nod at the breast pump, thinking it will come in handy.'
  718. elseif lactate > 0 and milkedvolume <= 0:
  719. '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.'
  720. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  721. '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.'
  722. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  723. else
  724. '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.'
  725. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  726. 'You go on for a minute and then detach the pump. As expected no milk was collected in the bottle.'
  727. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/breast_pump.jpg"></center>'
  728. end
  729. act 'continue':
  730. *clr
  731. cla
  732. if milkedvolume > 50 and $location_type = 'private':
  733. '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.'
  734. 'It is your milk, so it should be okay to drink it.'
  735. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
  736. '<center>The milk is still warm from your breasts.</center>'
  737. pcs_health += milkedvolume/400
  738. pcs_energy += milkedvolume/500
  739. if pcs_hydra >= 100:
  740. pcs_hydra += milkedvolume/200
  741. else
  742. pcs_hydra += milkedvolume/100
  743. end
  744. minut += ((milkedvolume/1000) + 3)
  745. act 'Finish': gt $loc, $metka
  746. else
  747. 'You clean up your pump and cover your breasts again.'
  748. act 'Finish': gt $loc, $metka
  749. end
  750. end
  751. bp_unbox = 2
  752. end
  753. end
  754. act 'Don''t try it here':
  755. *clr
  756. cla
  757. 'You look around you, not feeling to comfortable to use the breast pump here.'
  758. bp_unbox = 1
  759. act 'Finish': gt $loc, $metka
  760. end
  761. elseif bp_unbox = 1:
  762. if $location_type = 'private' and pcs_inhib < 40:
  763. 'You can''t do this here'
  764. act 'Finish': gt $loc, $metka
  765. else
  766. 'You pull up your top to release your breasts'
  767. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center><br>'
  768. 'Your fingers glide around the sucktion cup of the breast pump, while your other hand holds the pump.'
  769. 'Making sure that no one is around, you lift the breast pump to your left breast. The cold cone feels uncomfortable on your nipple.'
  770. milkedvolume = func('lact_lib','$get_breastmilk', 3, 1)
  771. minut += 1
  772. bp_unbox = 2
  773. if lactate > 0 and milkedvolume > 0:
  774. if milkedvolume <= 50:
  775. '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.'
  776. '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.'
  777. '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.'
  778. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  779. elseif milkedvolume > 50 and milkedvolume <= 1500:
  780. '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.'
  781. '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.'
  782. 'You go on for a minute and then detach the pump. You collected <<milkedvolume/10>>ml of your breastmilk.'
  783. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_half.jpg"></center>'
  784. else
  785. '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.'
  786. '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.'
  787. '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.'
  788. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_full.jpg"></center>'
  789. end
  790. 'You nod at the breast pump, thinking it will come in handy.'
  791. elseif lactate > 0 and milkedvolume <= 0:
  792. '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.'
  793. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  794. '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.'
  795. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/pump_milkdrops.jpg"></center>'
  796. else
  797. '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.'
  798. 'With your hand you squeeze down again, your nipple sucked in again. You go on, and start to rythmically squeeze it.'
  799. 'You go on for a minute and then detach the pump. As expected no milk was collected in the bottle.'
  800. '<br><center><img <<$set_imgh>> src="images/pc/body/tits/breast_pump.jpg"></center>'
  801. end
  802. act 'continue':
  803. *clr
  804. cla
  805. if milkedvolume > 50 and $location_type = 'private':
  806. '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.'
  807. 'It is your milk, so it should be okay to drink it.'
  808. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
  809. '<center>The milk is still warm from your breasts.</center>'
  810. pcs_health += milkedvolume/400
  811. pcs_energy += milkedvolume/500
  812. if pcs_hydra >= 100:
  813. pcs_hydra += milkedvolume/200
  814. else
  815. pcs_hydra += milkedvolume/100
  816. end
  817. minut += ((milkedvolume/1000) + 3)
  818. act 'Finish': gt $loc, $metka
  819. else
  820. 'You clean up your pump and cover your breasts again.'
  821. act 'Finish': gt $loc, $metka
  822. end
  823. end
  824. end
  825. elseif bp_unbox >= 2:
  826. *clr
  827. cla
  828. 'You unboxed your breast pump already.'
  829. act 'Finish': gt $loc, $metka
  830. end
  831. end
  832. !! milking
  833. !! never use directly. Always use bp_milking, man_milking or sex_milking
  834. if $ARGS[0] = 'milking':
  835. !! if pumptime <= 0 or pumptime > 60:
  836. !! act 'Finish':gt $loc, $metka
  837. !! end
  838. if pumptype = 1:
  839. pumptime = (pumptime*6)/10
  840. end
  841. !! :loop
  842. !! if k < kid:
  843. !! gs 'kid','kidlist'
  844. !! k += 1
  845. !! jump 'loop'
  846. !! end
  847. if lactate > 0 and pain['nipples'] < 60:
  848. milkedvolume = func('lact_lib','$get_breastmilk', 3, pumptime)
  849. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_lactating.jpg"></center>'
  850. if pumptime > 1:
  851. 'You attach the pump to your breast and start rythmically squeezing the bulb for <<pumptime>> minutes.'
  852. else
  853. 'You attach the pump to your breast and start rythmically squeezing the bulb for one minute.'
  854. end
  855. !! Fill the bottles :D
  856. if milkedvolume > pump_bottletype and (bpbottles*1500 + bpbottlem*2500) = pump_bottletype:
  857. 'During pumping you have to empty the collecting bottle as it filled up with your milk.'
  858. 'You give it a few more pumps and detach the pump.<br>You filled the bottle with <<pump_bottletype/10>>ml of your milk.'
  859. 'To collect all your pumped milk you should probably check if the pharmacy has additional bottles for your breast pump.'
  860. pcs_knowsmilkbottles = 1
  861. elseif milkedvolume > pump_bottletype and (bpbottles*1500 + bpbottlem*2500) > pump_bottletype:
  862. !! Checking which bottletype is used and filling those bottles up before the other type is used.
  863. bp_used_mbottle = 0
  864. bp_used_sbottle = 0
  865. :sbottleloop
  866. if pump_bottletype < 2500 and milkedvolume >= 1500 and bp_used_sbottle < bpbottles:
  867. bp_used_sbottle += 1
  868. milkedvolume -= 1500
  869. jump 'sbottleloop'
  870. end
  871. :mbottleloop
  872. if pump_bottletype >= 2500 and milkedvolume >= 2500 and bp_used_mbottle < bpbottlem:
  873. bp_used_mbottle += 1
  874. milkedvolume -= 2500
  875. jump 'mbottleloop'
  876. end
  877. !! Checking for the milkedvolume and if there are bottles left. if yes - use these bottles
  878. if milkedvolume > 0 and (((bpbottlem - bp_used_mbottle) > 0) or ((bpbottles - bp_used_sbottle) > 0)):
  879. :altfill01
  880. if pump_bottletype < 2500 and milkedvolume >= 2500 and bp_used_mbottle < bpbottlem:
  881. bp_used_mbottle += 1
  882. milkedvolume -= 2500
  883. jump 'altfill01'
  884. end
  885. :altfill02
  886. if pump_bottletype >= 2500 and milkedvolume >= 1500 and bp_used_sbottle < bpbottles:
  887. bp_used_sbottle += 1
  888. milkedvolume -= 1500
  889. jump 'altfill02'
  890. end
  891. end
  892. !! by this point all bottles should have been used up. Everything else needs to end up in the drain.
  893. if milkedvolume > 0 and bpbottlem = bp_used_mbottle and bpbottles = bp_used_sbottle:
  894. '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.'
  895. 'You had to pour <<milkedvolume/10>>ml of your breast milk into the sink.'
  896. milkedvolume = ((bp_used_mbottle*2500) + (bp_used_sbottle*1500))
  897. elseif milkedvolume > 0 and milkedvolume < 1500 and (bpbottles - bp_used_sbottle) > 0:
  898. 'During pumping you have to switch the collecting bottle as it filled up with your milk.'
  899. elseif milkedvolume > 0 and milkedvolume < 2500 and milkedvolume > 1500 and (bpbottlem - bp_used_mbottle) > 0:
  900. 'During pumping you have to switch the collecting bottle as it filled up with your milk.'
  901. else
  902. 'During pumping you have to switch the collecting bottle as it filled up with your milk.'
  903. end
  904. if bp_used_mbottle >= 1 or bp_used_sbottle >= 1:
  905. '<center><img <<$set_imgh>> src="images/pc/body/tits/bottles_full.jpg"></center>'
  906. if milkedvolume = ((bp_used_mbottle*2500) + (bp_used_sbottle*1500)):
  907. 'You pumped <<milkedvolume/10>>ml of milk from your breasts, collecting it in:'
  908. if bp_used_sbottle = 1:
  909. 'One 150ml bottle'
  910. elseif bp_used_sbottle > 1:
  911. '<<bp_used_sbottle>> x 150ml bottles'
  912. end
  913. if bp_used_mbottle = 1:
  914. 'One 250ml bottle'
  915. elseif bp_used_mbottle > 1:
  916. '<<bp_used_mbottle>> x 250ml bottles'
  917. end
  918. else
  919. 'You pumped <<((bp_used_mbottle*2500)+(bp_used_sbottle*1500)+milkedvolume)/10>>ml of milk from your breasts collecting it in:'
  920. if bp_used_sbottle = 1:
  921. 'One 150ml bottle'
  922. elseif bp_used_sbottle > 1:
  923. '<<bp_used_sbottle>> x 150ml bottles'
  924. end
  925. if bp_used_mbottle = 1:
  926. 'One 250ml bottle'
  927. elseif bp_used_mbottle > 1:
  928. '<<bp_used_mbottle>> x 250ml bottles'
  929. end
  930. if (bpbottles - bp_used_sbottle) > 0 and milkedvolume <= 1500:
  931. 'You also stored <<milkedvolume/10>>ml of breast milk in a 150ml bottle.'
  932. elseif (bpbottlem - bp_used_mbottle) > 0 and milkedvolume <= 2500:
  933. 'You also stored <<milkedvolume/10>>ml of breast milk in a 250ml bottle.'
  934. else
  935. 'unhandled case - you shouldn''t end up here. Please report this in the bug section of Girl Life in the tfg-forums.'
  936. 'bp_used_mbottle: <<bp_used_mbottle>>'
  937. 'bp_used_sbottle: <<bp_used_sbottle>>'
  938. 'milkedvolume: <<milkedvolume>>'
  939. 'pump_bottletype: <<pump_bottletype>>'
  940. 'bpbottles: <<bpbottles>>'
  941. 'bpbottlem: <<bpbottlem>>'
  942. end
  943. milkedvolume += bp_used_mbottle*2500 + bp_used_sbottle*1500
  944. end
  945. else
  946. 'unhandled case - you shouldn''t end up here. Please report this in the bug section of Girl Life in the tfg-forums.'
  947. 'bp_used_mbottle: <<bp_used_mbottle>>'
  948. 'bp_used_sbottle: <<bp_used_sbottle>>'
  949. 'milkedvolume: <<milkedvolume>>'
  950. 'pump_bottletype: <<pump_bottletype>>'
  951. 'bpbottles: <<bpbottles>>'
  952. 'bpbottlem: <<bpbottlem>>'
  953. end
  954. else
  955. 'You give it a few more pumps and detach the pump.<br>You filled the bottle with <<milkedvolume/10>>ml of your milk.'
  956. end
  957. breastcounter += 1
  958. if energytomilkpump > 0 and pcs_energy = 0:
  959. '<br>During pumping you feel really hungry, producing breast milk seems to be more exhausing then thought.'
  960. energytomilkpump = 0
  961. elseif energytomilkpump > 0:
  962. '<br>You feel a bit thirsty after pumping.'
  963. energytomilkpump = 0
  964. end
  965. if bcream_used = 1:
  966. pcs_nips += rand(0,2)
  967. bcream_used = 0
  968. end
  969. minut += pumptime
  970. elseif lactate = 0 and pain['nipples'] < 60:
  971. if rand(1,50) + prolactinlvl >= rand(200,250) and milkinduceday >= 5:
  972. '<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
  973. 'As usual, you attach the pump but after a few pumps white liquid suddenly starts flowing from your nipples.<br>You started lactating!'
  974. lactateinduced = 1
  975. lactate = 1
  976. if func('lact_lib','$calc_lactatemm') > 0: lactatemm = func('lact_lib','$calc_lactatemm')
  977. if prolactinlvl < 200: prolactinlvl = 200
  978. lactaterate = 10*(prolactinlvl/200)
  979. pcs_nips += 2
  980. pumpinggrowth = 0
  981. else
  982. milkedvolume = func('lact_lib','$get_breastmilk', 3, pumptime)
  983. '<center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center>'
  984. if breastcounter < 100:
  985. 'You attach the pump to your nipples and start squeezing the bulb. The vacuum feels uncomfortable on your nipples.'
  986. elseif breastcounter >= 100 and breastcounter < 200:
  987. 'You attach the pump to your nipples and start squeezing the bulb. You are used to the vacuum on your nipples.'
  988. else
  989. 'You attach the pump to your nipples and start squeezing the bulb. The vacuum feels good on your nipples.'
  990. end
  991. if prolactinlvl > 100: 'A few droplets of liquid come out of your nipples but it is not milk.'
  992. breastcounter += 1
  993. if pump_stop_brake = 1:
  994. 'During pumping your nipples start to hurt extremely. You have to stop after <<pumptime>> minutes, because you couldn''t go on.'
  995. end
  996. if prolactinlvl > 100:
  997. if rand(0,10) > 9:
  998. pumpinggrowth += 1
  999. end
  1000. 'After finishing, your breasts feel weirdly engorged.'
  1001. end
  1002. if bcream_used = 1:
  1003. pcs_nips += rand(0,2)
  1004. bcream_used = 0
  1005. end
  1006. end
  1007. minut += pumptime
  1008. else
  1009. 'Your nipples feel too sore to use the pump right now.'
  1010. end
  1011. if milkedvolume > 0:
  1012. lact_engorgement = 0
  1013. lactatemess = 0
  1014. act 'Pour it into the sink':
  1015. *clr
  1016. cla
  1017. if milkedvolume > 1500 and bpbottles <= 1:
  1018. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_sink.jpg"></center>'
  1019. '<center>You pour 150ml of your breast milk into the sink and clean up your breastpump.</center>'
  1020. else
  1021. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_sink.jpg"></center>'
  1022. '<center>You pour <<milkedvolume/10>>ml of your breast milk into the sink and clean up your breastpump.</center>'
  1023. end
  1024. minute += ((milkedvolume/1500) + 3)
  1025. act 'Finish':
  1026. milkedvolume = 0
  1027. gt $loc, $metka
  1028. end
  1029. end
  1030. if pcs_hydra < 100:
  1031. act 'Drink it':
  1032. *clr
  1033. cla
  1034. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
  1035. '<center>You drink your own breast milk and clean up your breastpump.</center>'
  1036. '<center>The milk is still warm from your breasts.</center>'
  1037. pcs_health += milkedvolume/400
  1038. pcs_energy += milkedvolume/500
  1039. if pcs_hydra >= 100:
  1040. pcs_hydra += milkedvolume/200
  1041. else
  1042. pcs_hydra += milkedvolume/100
  1043. end
  1044. minute += ((milkedvolume/1000) + 3)
  1045. act 'Finish':
  1046. milkedvolume = 0
  1047. gt $loc, $metka
  1048. end
  1049. end
  1050. end
  1051. else
  1052. act 'Finish':gt $loc, $metka
  1053. end
  1054. end
  1055. !! engorged_morning
  1056. !! use href="exec:gt ''lact_lib'',''engorged_morning''"
  1057. if $ARGS[0] = 'engorged_morning':
  1058. minut += 5
  1059. '<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
  1060. '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.'
  1061. act 'Finish':gt $loc, $metka
  1062. end
  1063. if $ARGS[0] = 'hand_milking':
  1064. *clr
  1065. cla
  1066. if lactate > 0:
  1067. '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.'
  1068. 'Several small streams of your milk start to jet out of your nipples.'
  1069. 'You go on for <<pumptime>> minutes until you stop. You clean yourself up and everything else that got wet from your milk.<br>'
  1070. '<center><video autoplay loop src="images/pc/body/tits/bathroom_milking.mp4"></video></center>'
  1071. milkedvolume = func('lact_lib','$get_breastmilk', 5, pumptime)
  1072. minut += pumptime
  1073. else
  1074. '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.'
  1075. milkedvolume = func('lact_lib','$get_breastmilk', 5, pumptime)
  1076. minut += pumptime
  1077. end
  1078. act 'Finish':gt $loc, $metka
  1079. end
  1080. --- lact_lib ---------------------------------