Skip to content

Commit

Permalink
Add back generic precipitation texts
Browse files Browse the repository at this point in the history
  • Loading branch information
cloneofghosts authored Dec 22, 2024
1 parent c694221 commit 5d5398d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion API/PirateText.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,22 @@ def calculate_text(
else:
cText = [mode, "heavy-sleet"]
cCond = "heavy-sleet"
elif rainPrep > 0 and precipType == "none":
if rainPrep < lightRainThresh:
cText = [mode, possiblePrecip + "very-light-precipitation"]
cCond = possiblePrecip + "very-light-precipitation"
elif rainPrep >= lightRainThresh and rainPrep < midRainThresh:
cText = [mode, possiblePrecip + "light-precipitation"]
cCond = possiblePrecip + "light-precipitation"
elif rainPrep >= midRainThresh and rainPrep < heavyRainThresh:
cText = [mode, "medium-precipitation"]
cCond = "medium-precipitation"
else:
cText = [mode, "heavy-precipitation"]
cCond = "heavy-precipitation"

# If visibility < 1000m, show fog
elif vis < visThresh:
elif vis < visThresh and wind < lightWindThresh:
return [mode, "fog"], "fog"
elif cloudCover > cloudThreshold:
cText = [mode, "heavy-clouds"]
Expand Down

0 comments on commit 5d5398d

Please sign in to comment.