Skip to content

API Temperature

Nak edited this page Aug 18, 2021 · 2 revisions

If you want to display the current temperature on the client, you can make a function like so:

local function GetTemp()
	return StormFox2.Temperature.GetDisplay() .. StormFox2.Temperature.GetDisplaySymbol()
end

Note: Temperature is represented internally in C°.

Functions Returns Description
alt text StormFox2.Temperature.Set( Number Celsius, Number LerpTime = 0 ) Sets the temperature.
alt text StormFox2.Temperature.Get( String Type = "celsius" ) Number Returns the current temperature.
alt text StormFox2.Temperature.GetDisplay( Number Celcius = CurrentTemperature ) Number Converts the given or current temperature to the type the client use. Useful for displays.
alt text StormFox2.Temperature.GetDisplaySymbol() String Returns the temperature-type symbol the client use.
alt text StormFox2.Temperature.GetDisplayType() String Returns the temperature-type the client use.
alt text StormFox2.Temperature.GetTypes() Table Returns all temperature types.
alt text StormFox2.Temperature.Convert( String From = "celsius", String To = "celsius", Number Number ) Number Converts the given temperature.

Wiki

API

  • alt text CWI
  • alt text Time
  • alt text Temperature
  • alt text Weather (TBD)
  • alt text Sun (TBD)
  • alt text Moon (TBD)
  • alt text Downfall (TBD)
  • alt text Terrain (TBD)
  • alt text Map (TBD)
  • alt text Data (TBD)
  • alt text Network (TBD)
  • alt text Client (TBD)
  • alt text Environment (TBD)

Clone this wiki locally