Skip to content
Permalink
Tree: 0054fb69cf
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (36 sloc) 1.23 KB
#pragma once
#ifndef WEATHER_GEN_H
#define WEATHER_GEN_H
struct point;
struct tripoint;
class calendar;
class JsonObject;
enum weather_type : int;
struct w_point {
double temperature;
double humidity;
double pressure;
double windpower;
bool acidic;
};
class weather_generator
{
public:
double base_temperature = 6.5; // Average temperature of New England
double base_humidity = 66.0; // Average humidity
double base_pressure = 1015.0; // Average atmospheric pressure
double base_acid = 0.0;
weather_generator();
/**
* Input should be an absolute position in the map square system (the one used
* by the @ref map). You can use @ref map::getabs to get an absolute position from a
* relative position (relative to the map you called getabs on).
*/
w_point get_weather( const tripoint &, const calendar &, unsigned ) const;
weather_type get_weather_conditions( const tripoint &, const calendar &, unsigned seed ) const;
weather_type get_weather_conditions( const w_point & ) const;
int get_water_temperature() const;
void test_weather() const;
static weather_generator load( JsonObject &jo );
};
#endif
You can’t perform that action at this time.