Forest Logo
search
package_2

bittersweet

By @kaatrasalo

Roblox

Mirrored

Bittersweet

  • A Sweet Bitfield library
local bittersweet = require("./bittersweet")

local bits = bittersweet.define({
    ["boss"] = false,
    ["cool"] = true,
    ["working hard"] = false,
    ["hardly working"] = true
})

bits.get("boss") --> false
bits.set("boss", true)

-- Write to a u32
local some_number_to_network = bits.export() --> number

-- Read from u32
bits.read_from(some_number_to_network).get("boss") --> true

-- You can also chain sets
bits.set("boss", false).set("working hard", true).get("boss") --> false

Package Details

Install command (Click to copy)


Version

0.1.2

License

SEE LICENSE IN LICENSE

warning

Usable with conditions

infoCustom license terms, automatically reviewed — read the packaged LICENSE file before shipping this in a game.

Automated license review — not legal advice.