Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Latest commit

 

History

History
30 lines (19 loc) · 835 Bytes

File metadata and controls

30 lines (19 loc) · 835 Bytes

Deprecated

Use (Config-lib)[https://github.com/mc-cc-scripts/config-lib] instead!

settingsManager-prog

Manages ComputerCraft Settings

settingsService.getset(<settingsKey>: String, <content>: any, <defaultContent>: table|string) : any

Uses

getset

Is used to quickly write content into the specified Settings-Key, or get the current Content.

  • If content is provided, the current content is saved and returned
  • If no content is provided, the current Settings-Content is returned
    • if no current Settings-Content is set, the default-Content is saved and returned

Example

local settingsService = require('./libs/settingsService')
local user = 'mc-cc-scripts'
local greetingText = settingsService.getSet('greetingText', 'Hello '..user, 'Hello User')
-- greetingText => 'Hello mc-cc-scripts'