Barbed Fence: Difference between revisions

From PZwiki
m (Removed unnecessary reference to LUA (it's in the items description))
(Rewrite barbed wire)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{languages|:Barbed Fence}}
{{languages|:Barbed Fence}}
{{header|The Game World|Items|Construction|Carpentry|version=Version 37|incver=13}}<!--Comment: This section is for the infobox which will be positioned on the right of the page. Image.png is the default question mark image-->{{Items
{{header|The Game World|Items|Construction|Carpentry|Small Fence|version=Version 41|incver=60}}
|image = Barbed fence.png
{{Items
|weight = ?
  |image = Barbed fence.png
}}
}}
<!--Comment: Description of Item and General Information-->Barbed wire fences can help wall off and defend an area, while still allowing you to see through them.


'''Barbed fences''' are a type of small fence that can help wall off and defend an area, while still allowing you to see through them.


According to the description, Barbed Fence is supposed to have a chance to scratch, however, this is not implemented as of yet.  
Like all other small fences, a [[sheet rope]] can be attached to barbed fences.


In addition to the [[Barbed Wire|barbed wire]], you also will need a [[Wooden Stake|wooden stake]] to be placed in order to make the barbed fence.
Unlike other small fences, barbed fences have a 25% chance of scratching players when hopped over. Barbed fences do not injure zombies.
Currently, each barbed wire will provide one tile of fencing, with or without the wooden stake.
 
In order to place a barbed fence you will first need a [[Wooden Stake|wooden stake]] to be placed on the tile that you want to build a barbed fence on.
 
Currently, each barbed wire provides one tile of fencing.


== Crafting ==
== Crafting ==
Line 22: Line 25:
{{RecipeLookup|1028}}
{{RecipeLookup|1028}}
|}
|}
==Code==
'''''From ISBuildMenu.lua (media/lua/client/BuildingObjects/ISUI)'''''
<nowiki>
local barbedOption = subMenu:addOption(getText("ContextMenu_Barbed_Fence"), worldobjects, ISBuildMenu.onBarbedFence, square, player);
local tooltip2 = ISBuildMenu.canBuild(0,0,0,0,1,5,barbedOption, player);
-- we add that we need a Barbed wire too
if not getSpecificPlayer(player):getInventory():contains("BarbedWire") and not ISBuildMenu.cheat then
tooltip2.description = tooltip2.description .. " <RGB:1,0,0>" .. getItemText("Barbed wire") .. " 0/1 ";
barbedOption.onSelect = nil;
barbedOption.notAvailable = true;
else
tooltip2.description = tooltip2.description .. " <RGB:1,1,1>" .. getItemText("Barbed wire") .. " 1 ";
end
tooltip2:setName(getText("ContextMenu_Barbed_Fence"));
tooltip2.description = getText("Tooltip_craft_barbedFenceDesc") .. tooltip2.description;
tooltip2:setTexture("fencing_01_20");
ISBuildMenu.requireHammer(barbedOption)
ISBuildMenu.onBarbedFence = function(worldobjects, square, player)
-- sprite, northSprite, corner
local fence = ISWoodenWall:new("fencing_01_20", "fencing_01_21", nil);
-- we can place our fence every where
-- fence.canBeAlwaysPlaced = true;
fence.hoppable = true;
    fence.canBarricade = false
    fence.modData["xp:Woodwork"] = 5;
fence.modData["need:Base.BarbedWire"] = "1";
fence.player = player
fence.name = "Barbed Fence"
    getCell():setDrag(fence, player);
end
</nowiki>


== History ==
== History ==
Line 70: Line 40:


==See also==
==See also==
*[[Wooden stake]]
*[[Wooden fence]]
*[[Sandbag Wall]]
*[[Gravel Bag Wall]]
*[[Carpentry Guide]]
*[[Carpentry Guide]]
{{Navbox/Construction}}
{{Navbox/Construction}}
[[Category:Spiffo's Construction Crew (Project)]]
[[Category:Spiffo's Construction Crew (Project)]]

Revision as of 07:02, 10 December 2021


Template:Items

Barbed fences are a type of small fence that can help wall off and defend an area, while still allowing you to see through them.

Like all other small fences, a sheet rope can be attached to barbed fences.

Unlike other small fences, barbed fences have a 25% chance of scratching players when hopped over. Barbed fences do not injure zombies.

In order to place a barbed fence you will first need a wooden stake to be placed on the tile that you want to build a barbed fence on.

Currently, each barbed wire provides one tile of fencing.

Crafting

Output Ingredients Description Skill Level












History

Alpha
IWBUMS Build 35.7 Fixed wired fence wire check before building
2.9.9.17 Increased the spawn rate


See also

Template:Navbox/Construction