Permalink
Browse files

mnx_temp: tweak for more consistent & harsher seasons

  • Loading branch information...
1 parent b948371 commit 45b7535f622c35317056fdf4b03f9866f241a9f9 @niv niv committed Dec 21, 2012
Showing with 47 additions and 43 deletions.
  1. +33 −33 rmnx/libmnx_weather.rb
  2. +14 −10 rmnx/mnx_temp.rb
View
@@ -61,11 +61,11 @@ module Tables
WEATHER_TABLES = {
S_WINTER => [
[T_X, W_FAIR, P_CLEAR],
- [T_M, W_VARIES, P_CLEAR],
- [T_MODERATE, W_FAIR, P_FOG],
- [T_MODERATE, W_FAIR, P_RAIN],
- [T_MODERATE, W_FAIR, P_DOWNPOUR],
- [T_MODERATE, W_FAIR, P_HAIL],
+ [T_C, W_VARIES, P_CLEAR],
+ [T_X, W_FAIR, P_FOG],
+ [T_C, W_FAIR, P_RAIN],
+ [T_M, W_FAIR, P_DOWNPOUR],
+ [T_X, W_FAIR, P_HAIL],
[T_COLD, W_FAIR, P_CLEAR],
[T_COLD, W_FAIR, P_FOG],
[T_COLD, W_FAIR, P_SNOW],
@@ -93,14 +93,14 @@ module Tables
[T_M, W_S, P_C],
[T_M, W_S, P_D],
[T_M, W_S, P_H],
- [T_C, W_V, P_C],
- [T_C, W_F, P_F],
- [T_C, W_V, P_S],
- [T_C, W_V, P_N],
- [T_C, W_V, P_L],
- [T_C, W_S, P_C],
- [T_C, W_S, P_N],
- [T_C, W_S, P_L]
+ [T_C, W_V, P_C],
+ [T_C, W_F, P_F],
+ [T_C, W_V, P_S],
+ [T_C, W_V, P_N],
+ [T_C, W_V, P_L],
+ [T_C, W_S, P_C],
+ [T_C, W_S, P_N],
+ [T_C, W_S, P_L]
],
S_SUMMER => [
[T_H, W_F, P_C],
@@ -109,16 +109,16 @@ module Tables
[T_W, W_F, P_R],
[T_W, W_F, P_D],
[T_W, W_S, P_T],
- [T_M, W_V, P_C],
- [T_M, W_F, P_F],
- [T_M, W_V, P_R],
- [T_M, W_V, P_D],
- [T_M, W_V, P_H],
- [T_C, W_V, P_C],
- [T_C, W_F, P_F],
- [T_C, W_V, P_S],
- [T_C, W_V, P_N],
- [T_C, W_V, P_L]
+ [T_H, W_V, P_C],
+ [T_M, W_F, P_F],
+ [T_H, W_V, P_R],
+ [T_H, W_V, P_D],
+ [T_H, W_V, P_H],
+ [T_H, W_V, P_C],
+ [T_C, W_F, P_F],
+ [T_H, W_V, P_C],
+ [T_H, W_F, P_R],
+ [T_H, W_F, P_R]
],
S_FALL => [
[T_H, W_F, P_C],
@@ -136,16 +136,16 @@ module Tables
[T_M, W_S, P_C],
[T_M, W_S, P_D],
[T_M, W_S, P_H],
- [T_C, W_V, P_C],
- [T_C, W_F, P_F],
- [T_C, W_V, P_S],
- [T_C, W_V, P_N],
- [T_C, W_V, P_L],
- [T_C, W_S, P_C],
- [T_C, W_S, P_N],
- [T_C, W_S, P_L],
- [T_X, W_V, P_C],
- [T_X, W_V, P_S]
+ [T_C, W_V, P_C],
+ [T_C, W_F, P_F],
+ [T_C, W_V, P_S],
+ [T_C, W_V, P_N],
+ [T_C, W_V, P_L],
+ [T_C, W_S, P_C],
+ [T_C, W_S, P_N],
+ [T_C, W_S, P_L],
+ [T_X, W_V, P_C],
+ [T_X, W_V, P_S]
]
}
View
@@ -128,9 +128,9 @@ def get_area_type resref, tileset, mask
def get_temp_range t
x = case t
when T_X
- [-20,0]
+ [-25,-15]
when T_C
- [0,5]
+ [-15,5]
when T_M
[5,15]
when T_W
@@ -385,14 +385,18 @@ def mnx_getweather resref, tileset, mask, year, month, day, hour, minute
def get_season(year, month, day)
return case month
- when 1..2
- S_WINTER
- when 3..4
- S_SPRING
- when 5..9
- S_SUMMER
- when 10..12
- S_FALL
+ when 10; S_FALL
+ when 11, 12, 1; S_WINTER
+ when 2; S_SPRING
+ when 3, 4, 5, 6, 7, 8, 9; S_SUMMER
+ #when 1..2
+ # S_WINTER
+ #when 3..4
+ # S_SPRING
+ #when 5..9
+ # S_SUMMER
+ #when 10..12
+ # S_FALL
end
end

0 comments on commit 45b7535

Please sign in to comment.