1
0

cumarrput 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # cumarrput
  2. argc = arrsize('ARGS')
  3. if argc < 5:
  4. 'ERROR: cumarrput called incorrectly. report this to the maintainers'
  5. end
  6. cacon = ARGS[1]
  7. i = arrsize('$cumarrnam')
  8. !{Check for existing non-protected deposit by same guy}
  9. i2 = 0
  10. :cumarrputloop
  11. if i2 < i:
  12. if $cumarrnam[i2] = $ARGS[0] and cumarrdel[i2] = 0:
  13. !{The following little horror lets us not override a "higher priority" contraceptive method with a lower-priority one. So if PC has unprotected sex with a guy once and then uses a condom next time and the condom breaks, the list will still show the cum deposit as being from unprotected sex.}
  14. !{In brief, we create an array of contraceptive methods in order of decreasting priority, and set effcontra to the first value matched by either sexcontra or the relevant cumarrcon entry.}
  15. cacon = func('sexcontraprio', ARGS[1], cumarrcon[i2])
  16. i = i2
  17. else
  18. i2 += 1
  19. jump 'cumarrputloop'
  20. end
  21. end
  22. $cumarrnam[i] = $ARGS[0]
  23. cumarrcon[i] = cacon
  24. if cumarrppt[i] < ARGS[2]:
  25. cumarrppt[i] = ARGS[2]
  26. end
  27. if ARGS[3] < cumarrppt[i] or cumarrcpt[i] = 0:
  28. cumarrcpt[i] += ARGS[3]
  29. end
  30. if AGRS[4]:
  31. cumarrkno[i] = ARGS[4]
  32. end
  33. if argc > 5:
  34. if cumarrage[i] < ARGS[5]: cumarrage[i] = ARGS[5]
  35. else
  36. cumarrage[i] = 0
  37. end
  38. RESULT = i
  39. --- cumarrput ---------------------------------