weather
index
/home/thindil/Projekty/anaria/server/lib/pymodules/weather.py

weather.py
 
Provide data structure and functions for weather system.

 
Modules
       
auxiliary
char
hooks
mud
mudsock
mudsys
olc
os
random
storage
utils
zone

 
Classes
       
WeatherData

 
class WeatherData
    Data for weather.
 
  Methods defined here:
__init__(self, set=None)
Standard class constructor.
copy(self)
copyTo(self, to)
store(self)

 
Functions
       
__unload__()
removes the hooks for weather.
chk_can_weather(ch, cmd)
cmd_weather(ch, cmd, arg)
Show weather in current zone.
weather_hook(info)
Count weather for all zones and if changed, send information about it to
all players in this zone.
weatholc_choice_exec(sock, data)
Edit weather.
weatholc_chooser(sock, data, option)
figure out what field we want to edit, and display prompt.
weatholc_extend_menu(sock, data)
Display option in main menu.
weatholc_menu(sock, data)
Display weather settings.
weatholc_parser(sock, data, choice, arg)
parse out what we want to change a specified field to.

 
Data
        __WEATHOLC_CLIMATE__ = 1
__WEATHOLC_SHOVERS__ = 6
__WEATHOLC_SKY__ = 5
__WEATHOLC_TEMP__ = 4
__WEATHOLC_WINDDIR__ = 3
__WEATHOLC_WIND__ = 2
weather_climate = ['brak', 'umiarkowany', 'ch\xc5\x82odny', 'zimny', 'ciep\xc5\x82y', 'gor\xc4\x85cy']
weather_shovers = ['brak', 'lekki deszcz', 'deszcz', 'deszcz ze \xc5\x9bniegiem', '\xc5\x9bnieg']
weather_sky = ['bezchmurne', 'lekko zachmurzone', 'zachmurzone']
weather_temp = ['upalnie', 'gor\xc4\x85co', 'ciep\xc5\x82o', 'ch\xc5\x82odno', 'zimno', 'mro\xc5\xbanie']
weather_wind = ['brak', '\xc5\x82agodna bryza', 'lekki wiatr', 'wiatr', 'silny wiatr']
weather_winddir = ['p\xc3\xb3\xc5\x82nocy', 'wschodu', 'po\xc5\x82udnia', 'zachodu', 'p\xc3\xb3\xc5\x82nocnego-wschodu', 'p\xc3\xb3\xc5\x82nocnego-zachodu', 'po\xc5\x82udniowego-zachodu', 'po\xc5\x82udniowego-wschodu']
weatholc_opt_map = {'1': (1, 'Wybierz klimat: '), '2': (2, 'Wybierz si\xc5\x82\xc4\x99 wiatru: '), '3': (3, 'Wybierz kierunek wiatru: '), '4': (4, 'Wybierz temperatur\xc4\x99: '), '5': (5, 'Wybierz zachmurzenie: '), '6': (6, 'Wybierz opady: ')}