Vote for Our Mud on TMC!

help > w > weather
                - HELP DOC FOR WEATHER -

First of all, for weather to make any difference at all in your rooms,
you need to set_outdoors. So, you will need to put set_outdoors(x); in
the reset of your rooms.  If x is less than 2, weather will make no difference.
The numbers for x mean the following:
    1) Indoors, no windows, no contact with weather.
    2) Indoors, but have windows.
    3) Outdoors but under some cover.
    4) Outdoors, and in the open.

Furthermore, if you do not wish your climate to be temperate, you will need to
put set_climate(x) in the reset of your room as well.  The numbers for x
mean the following:

     0) Same as Temperate (Backwards Compatible)
     1) Subterranean
     2) Arctic
     3) Sub-arctic
     4) Temperate
     5) Tropical
     6) Arid

If you do not wish to memorize these numbers, than include
<weather.h> and you can do set_climate(ARID); instead of
set_climate(6); if you wish.  It will make it easier for
others to understand your code that way.  You should note
that climate DOES impact the temperatures and type of
weather in the area.  As does the season, time of day,
extent of cloud cover, and so on.

You can also use the weather daemon (/obj/daemons/weather_d.c)
to get weather information on a room a player is in.  Here is a list of
all the pertinent ones I can think of.  (Note from here on out,
"/obj/daemons/weather_d" will be referred to as weather_d.) :

   query_temperature():  Usage: weather_d->query_temperature()
This returns the temperature of the room this_player() is in.

   query_time_of_day():  Usage: weather_d->query_time_of_day();
This returns the time of day, either "night", "day", "morning" or "evening".

   query_cloud_string(x):  Usage: weather_d->query_cloud_string();
This returns a string that describes the current cloud cover in the
room of this_player();  If x is supplied, it will return a string that
describes cloud conditions if the cloud level were x. (x being an int from 
0 to 3).

   query_night():  Usage: weather_d->query_night();
This returns 1 if it's night, 0 if it isn't.  This is redundant with
query_time_of_day() but maybe helpful as it makes the check for you.

   get_precip_string():  Usage: weather_d->get_precip_string();
This returns a string describing current precipitation levels in the
room of this_player().

   get_temperature_string():  Usage: weather_d->get_temperature_string();
This returns a string that describes the current temperature in the
room of this_player().

   query_season():  Usage: weather_d->query_season();
This returns the season, either "autumn", "summer", "spring" or "winter".

   query_wind_speed():  Usage: weather_d->query_wind_speed();
This returns the speed of the wind in the room of this_player() in MPH.

   query_wind_dir():  Usage: weather_d->query_wind_dir();
This returns a string of the direction the wind is coming from in the
room of this_player().

Calls you can make to the room:

   query_climate():  Usage: room->query_climate();
This returns an integer that is the climate of the room, (See above.)