body_din.tw 1.8 KB

1234567891011121314151617181920212223242526272829303132333435
  1. :: body_din
  2. <<set $here = 'body_din'>>
  3. <<set $ARGS = $location_var[$here]>>
  4. <!-- !! Medical procedures, such as abortions, are located at medical_din-->
  5. <!-- !! Determines whether a NPC sees that another character is pregnant.-->
  6. <!-- !! If ARGS 1-3 are not set the observed character is the player character (Sveta)-->
  7. <!-- !! Usage: visible = FUNC('body_din','pregnancyVisibility')-->
  8. <!-- !! Return values:-->
  9. <!-- !! 0: Has no reason to believe Sveta is pregnant-->
  10. <!-- !! 1: Believes Sveta is pregnant-->
  11. <!-- !! Parameters:-->
  12. <!-- !! ARGS[1]; The current pregnancy state (default: pregchem)-->
  13. <!-- !! $ARGS[2]: The worn clothing type (default $wardrobe.clothingworntype)-->
  14. <!-- !! ARGS[3]: The worn clothing numer (default: clothingwornnumber)-->
  15. <<if $location_var[$here][0] == 'pregnancyVisibility'>>
  16. <<set $result = 0>>
  17. <<set $pc.pregchemTemp = iif(!$ARGS[1],$pc.pregchem,$ARGS[1])>>
  18. <<set $wardrobe.clothingworntypeTemp = iif(!$ARGS[2],$wardrobe.clothingworntype,$ARGS[2])>>
  19. <<set $wardrobe.clothingwornnumberTemp = iif(!$ARGS[3],$wardrobe.clothingwornnumber,$ARGS[3])>>
  20. <<gs 'clothing_attributes' $wardrobe.clothingworntypeTemp $wardrobe.clothingwornnumberTemp>>
  21. <<if (getvar("$CloThinness") >= 5 or $wardrobe.clothingworntypeTemp == 'nude') and getvar("$pc.pregchemTemp") > 2688>>
  22. <<set $result = 1>>
  23. <<elseif getvar("$CloThinness") == 4 and getvar("$pc.pregchemTemp") > 3460>>
  24. <<set $result = 1>>
  25. <<elseif getvar("$CloThinness") == 3 and getvar("$pc.pregchemTemp") > 3990>>
  26. <<set $result = 1>>
  27. <<elseif getvar("$CloThinness") == 2 and getvar("$pc.pregchemTemp") > 4200>>
  28. <<set $result = 1>>
  29. <<elseif getvar("$pc.pregchemTemp") > 5200>>
  30. <<set $result = 1>>
  31. <</if>>
  32. <<set $pc.pregchemTemp to null>>
  33. <<set $wardrobe.clothingworntypeTemp to null>>
  34. <<set $wardrobe.clothingwornnumberTemp to null>>
  35. <</if>>