Bed: Difference between revisions

From PZwiki
mNo edit summary
m (Simplified redundant links)
 
(30 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Languages}}
{{Header|Project Zomboid|Tiles|Comfort tiles}}
{{Page version|41.78.16}}
{{Infobox tile
|name=Crafted Bed
|model=CraftedBed.png
|icon=CraftedBed.png
|category=Movable
|Weight=7.5
|size=2
<!--Properties-->
|type=Bed
|function=[[Sleep]]<br>Rest
<!--Build-->
|build_skill=[[Carpentry]]
|build_level=4
|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>
<!--Move-->
|move_skill=[[Carpentry]]
|move_level=0
|move_tool_tag=Hammer
<!--Disassemble-->
|disassemble_skill=[[Carpentry]]
|disassemblelevel=0
|disassembletool_tag=Hammer
<!--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}}
A '''bed''' is a [[Crafting|craftable]] piece of [[furniture]].
 
==Usage==
Beds can be [[Sleep|slept]] in when the [[player]] is [[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.
 
==Crafting==
===Carpentry===
{{Main|Carpentry}}
{{Crafting/sandbox2
|bed
}}
 
==Distribution==
Beds can be found inside of houses, or can be crafted by the player.


{{Containers
==Code==
|image = bed.png
{{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)
}}
}}
[[Bed]]s can be slept in when the player is [[moodles#Tired|tired]]. They can only be found in houses.
}}
 
 
==See also==
*[[Carpentry]]
*[[Furniture]]
*[[Moodles]]
 
{{Navbox construction|carpentry}}


[[Category:Furniture]]
[[Category:Carpentry]]
[[Category:Spiffo's Construction Crew (Project)]]
[[Category:Seat Yourself Furniture (Project)]]

Latest revision as of 11:12, 25 April 2024

UI Tick.png
This page has been revised for the current stable version (41.78.16).
Help by adding any missing content. [edit]
Crafted Bed
CraftedBed.png
[[File:{{{icon2}}}|Crafted Bed|]]
[[File:{{{icon3}}}|Crafted Bed|]]
[[File:{{{icon4}}}|Crafted Bed|]]
[[File:{{{icon5}}}|Crafted Bed|]]
General
Category
Movable
Size
2 tiles
Function
Sleep
Rest
Properties
Type
Bed
Build
Skill (level)
Tool(s)
Ingredients
6 × Plank.png Plank
4 × Nails.png Nails
1 × Mattress.png Mattress
Move
Skill (level)
Tool(s)
Disassemble
Skill (level)
Technical
Item ID(s)
Movables.Movable
Tile ID(s)
carpentry_02_73 carpentry_02_72
Night night, don't let the zombies bite.
— In-game description

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
CraftedBed.png
Bed
Plank.png Plank ×6
Nails.png Nails ×4
Mattress.png Mattress ×1

Hammer.png
Hammer (tag)
Carpentry 4 none 1.25 Carpentry

Distribution

Beds can be found inside of houses, or can be crafted by the player.

Code

Code icon.png Code snippet! This section contains source code from Project ZomboidShow / Hide
Retrieved: Build 41.78.16
-- 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