atl/sm/game
import "atl/sm/game"Game state and settings (sm.game).
Functions
Section titled "Functions"func ServerTick() intThe server's tick counter.
func CurrentTick() intThe current tick (40 per second).
func TimeOfDay() float64The time of day, 0..1, where 0.5 is noon.
func SetTimeOfDay(t float64)[client] Sets the time of day.
func Difficulty() intThe game difficulty.
func AggroEnabled() boolWhether creature aggression is enabled.
func SetAggroEnabled(on bool)[server] Enables or disables creature aggression.
func AmmoConsumptionEnabled() boolWhether ammo consumption is enabled.
func SetAmmoConsumptionEnabled(on bool)[server] Enables or disables ammo consumption.
func FuelConsumptionEnabled() boolWhether fuel consumption is enabled.
func SetFuelConsumptionEnabled(on bool)[server] Enables or disables fuel consumption.
func RestrictionsEnabled() boolWhether build restrictions are enabled.
func SetRestrictionsEnabled(on bool)[server] Enables or disables build restrictions.
func UpgradeEnabled() boolWhether upgrades are enabled.
func SetUpgradeEnabled(on bool)[server] Enables or disables upgrades.
func RecipesEnabled() boolWhether recipes are enabled.
func SetRecipesEnabled(on bool)[server] Enables or disables recipes.
func LimitedInventory() boolWhether the limited inventory is enabled.
func SetLimitedInventory(on bool)[server] Enables or disables the limited inventory.
func SettingBool(name string) boolfunc SettingNumber(name string) float64func SettingString(name string) stringA game setting by name, as a boolean / number / string.
func Kick(p sm.Player)[server] Kicks a player.
func Ban(p sm.Player)[server] Bans a player.
func PauseSaving(reason string, ticks int)[server] Holds off autosaving while something (named reason) is mid-change.
func ResumeSaving(reason string)[server] Allows autosaving again.
func ExitToMenu()Exits to the main menu.
func ExitToMenuWithEndCredits()Exits to the main menu and plays the end credits.
func LoadWatchedTutorials() atl.Value[client] The tutorials the user has seen (a table you define).
func SaveWatchedTutorials(watched atl.Value)[client] Saves the tutorials the user has seen.