GHI_GetCurrentZoneClimate

Pilus edited this page Aug 11, 2015 · 1 revision
Clone this wiki locally

Syntax:

GHI_GetCurrentZoneClimate()

Arguments:

GHI_GetCurrentZoneClimate has no arguments.

Returns:

zoneData.climate
''String''
The climate type of the zone. Can be one of the following:
  • mountain
  • forest
  • plain
  • jungle
  • highland
  • swamp
  • cold_forest
  • indoor_city
  • wasteland
  • desert
climate.dayTemp
''Number''
Temperature during the day in this climate. Ranges from -25 to 40.
climate.nightTemp
''Number''
Temperature at night in this climate. Ranges from -25 to 40.
climate.indoor
''Number''
Temperature indoors in this climate. Ranges from -25 to 40.
climate.humidity
''String''
The humidity level of the climate. It can be Low, Medium, or High.
climate.precipitation
''String''
The type of precipitation that commonly occurs in the climate. Can be from the following list.
  • nil
  • snow
  • rain
  • sandstorm

Example:

local zoneName = GetRealZoneText();

local zoneClimate, zoneDayTemp, zoneNightTemp, zoneIndoor, zoneHumid, zonePrecip = GHI_GetCurrentZoneClimate();

local culrPrecip, stayIndoors

if zonePrecip == "" then

currPrecip = "Not weather patterns are forecast for today."

stayIndoors = "Enjoy the weather outside."

else

currPrecip = "There is a chance of "..zonePrecip.." today."

stayIndoors = "We recommend staying indoors. Where you should remain at a comfortable temperature of "..zoneIndoor

end

print("Welcome to "..zoneName..".",

"The temperatures range from "..zoneDayTemp.." in the day to "..zoneNightTemp.." at night.",

"The current humidity level is "..zoneHumid..".",

currPrecip,

` stayIndoors)``

This script forecasts the weather for the zone you are currently in. This is similar to the one in GHI_GetZoneClimate, but calls the zone information with the GHI_GetCurrentZoneClimate() function instead.