Bed
A bed is a craftable piece of furniture.
Usage
Beds can be slept in when the player is tired. This will fast-forward time until the player wakes up, or when a sleeping event occurs.
Sleeping on a bed of "average" or "poor" quality (or the floor) will reduce the rate at which tiredness disappears, and the player will wake up without being fully rested while also being potentially sore in the neck.
Crafting
Carpentry
- Main article: Carpentry
Product | Ingredients | Tools | Requirements | Workstation | XP |
---|---|---|---|---|---|
Bed |
Plank ×6 Nails ×4 Mattress ×1 |
Hammer (tag) |
Carpentry 4 | none | 1.25 Carpentry |
Distribution
Beds can be found inside of houses, or can be crafted by the player.
Code
-- bed
local bedSprite = ISBuildMenu.getBedSprite(player);
local bedOption = subMenu:addOption(getText("ContextMenu_Bed"), worldobjects, ISBuildMenu.onBed, square, bedSprite, player);
local tooltip9 = ISBuildMenu.canBuild(6,4,0,0,0,4,bedOption, player);
-- we add that we need a mattress too
local mattress = ISBuildMenu.countMaterial(player, "Base.Mattress");
if mattress < 1 then
tooltip9.description = tooltip9.description .. ISBuildMenu.bhs .. getItemNameFromFullType("Base.Mattress") .. " " .. mattress .. "/1 ";
if not ISBuildMenu.cheat then
bedOption.onSelect = nil;
bedOption.notAvailable = true;
end
else
tooltip9.description = tooltip9.description .. ISBuildMenu.ghs .. getItemNameFromFullType("Base.Mattress") .. " " .. mattress .. "/1 ";
end
tooltip9:setName(getText("ContextMenu_Bed"));
tooltip9.description = getText("Tooltip_craft_bedDesc") .. tooltip9.description;
tooltip9:setTexture(bedSprite.northSprite1);
ISBuildMenu.requireHammer(bedOption)