Bed: Difference between revisions
(Version bump, rm stub, Minor changes) |
m (Automated Formatting) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
{{Page version|41.78.16}} | {{Page version|41.78.16}} | ||
{{Infobox tile | {{Infobox tile | ||
|name = Crafted Bed | |name=Crafted Bed | ||
|model = CraftedBed.png | |model=CraftedBed.png | ||
|icon = CraftedBed.png | |icon=CraftedBed.png | ||
|category = Movable | |category=Movable | ||
|Weight = 7.5 | |Weight=7.5 | ||
|size = 2 | |size=2 | ||
<!--Properties--> | <!--Properties--> | ||
|type = Bed | |type=Bed | ||
|function = [[Sleep]]<br>Rest | |function=[[Sleep]]<br>Rest | ||
<!--Build--> | <!--Build--> | ||
|build_skill = [[Carpentry]] | |build_skill=[[Carpentry]] | ||
|build_level = 4 | |build_level=4 | ||
|build_tool_tag = Hammer | |build_tool_tag=Hammer | ||
|ingredients = <small>6 × [[File:Plank.png|20px|link=Plank]] [[Plank]]<br>4 × [[File:Nails.png|20px|link=Nails]] [[Nails]]<br>1 × [[File:Mattress.png|20px|link=Mattress]] [[Mattress]]</small> | |ingredients=<small>6 × [[File:Plank.png|20px|link=Plank]] [[Plank]]<br>4 × [[File:Nails.png|20px|link=Nails]] [[Nails]]<br>1 × [[File:Mattress.png|20px|link=Mattress]] [[Mattress]]</small> | ||
<!--Move--> | <!--Move--> | ||
|move_skill = [[Carpentry]] | |move_skill=[[Carpentry]] | ||
|move_level = 0 | |move_level=0 | ||
|move_tool_tag = Hammer | |move_tool_tag=Hammer | ||
<!--Disassemble--> | <!--Disassemble--> | ||
|disassemble_skill = [[Carpentry]] | |disassemble_skill=[[Carpentry]] | ||
| | |disassemblelevel=0 | ||
| | |disassembletool_tag=Hammer | ||
<!--Technical details--> | <!--Technical details--> | ||
| | |item_id=Movables.Movable | ||
|tile_id=carpentry_02_73 | |||
|tile_id2=carpentry_02_72 | |||
}} | }} | ||
{{Quote|text=Night night, don't let the zombies bite.|author=In-game description}} | {{Quote|text=Night night, don't let the zombies bite.|author=In-game description}} | ||
A '''bed''' is a [[Crafting|craftable]] piece of [[furniture]]. | A '''bed''' is a [[Crafting|craftable]] piece of [[furniture]]. | ||
==Usage== | ==Usage== | ||
Beds can be [[Sleep|slept]] in when the [[player]] is [[ | Beds can be [[Sleep|slept]] in when the [[player]] is [[Tired|tired]]. This will fast-forward time until the player wakes up, or when a [[Metagame#Sleeping Event|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. | 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. | ||
Line 39: | Line 40: | ||
===Carpentry=== | ===Carpentry=== | ||
{{Main|Carpentry}} | {{Main|Carpentry}} | ||
{{Crafting | {{Crafting/sandbox2 | ||
|bed | |||
}} | |||
==Distribution== | ==Distribution== | ||
Beds can be found inside of houses, or can be crafted by the player. | Beds can be found inside of houses, or can be crafted by the player. | ||
==Code== | |||
{{CodeBox| | |||
{{CodeSnip | |||
| lang = java | |||
| line = true | |||
| start = 1356 | |||
| retrieved = true | |||
| version = 41.78.16 | |||
| 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) | |||
}} | |||
}} | |||
==See also== | ==See also== |
Revision as of 06:29, 14 April 2024
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)