Skip to content

Commit

Permalink
Spellings and fixes to heading links
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdburton committed Jul 8, 2014
1 parent 405bccc commit c3714ea
Show file tree
Hide file tree
Showing 21 changed files with 119 additions and 113 deletions.
6 changes: 6 additions & 0 deletions css/elements.css
Expand Up @@ -23,6 +23,12 @@ h1, h2, h3, h4, h5, h6 {
word-wrap: break-word;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {
text-decoration: none;
color: #5A5A5A;
}

h1 {
font-size: 46px;
line-height: 50px;
Expand Down
8 changes: 4 additions & 4 deletions docs/00_Getting_Started.md
@@ -1,18 +1,18 @@
###<a name="download"></a>Download
###<a href="#download" name="download">Download</a>

The recommend method of obtaining PointShop is by downloading the [archive](https://github.com/adamdburton/pointshop/archive/master.zip) from [GitHub](https://github.com/adamdburton/pointshop). You can also [clone the repository](https://github.com/adamdburton/pointshop) if you're used to using the command line.

PointShop is not currently available on the Steam Workshop because of the dynamic nature of items.

###<a name="installation"></a>Installation
###<a href="#installation" name="installation">Installation</a>

1. Download and unzip the [archive](https://github.com/adamdburton/pointshop/archive/master.zip) or [clone the repository](https://github.com/adamdburton/pointshop) into your addons folder.
2. Restart your server or change the map.

###<a name="configuration"></a>Configuration
###<a href="#configuration" name="configuration">Configuration</a>

See the [configuration](/configuration) page for more information on each configuration option.

###<a name="customization"></a>Customization
###<a href="#customization" name="customization">Customization</a>

To create new items and categories for PointShop, see the [items](/items) and [categories](/categories) pages.
38 changes: 19 additions & 19 deletions docs/01_Configuration.md
@@ -1,118 +1,118 @@
<p class="lead">There are lots of configuration options available in pointshop. The page below describes the options and what they're used for. All configuration options are required.</p>
<p class="lead">There are lots of configuration options available in PointShop. The page below describes the options and what they're used for. All configuration options are required.</p>

####<a name="data-provider"></a>PS.Config.DataProvider
####<a href="#data-provider" name="data-provider">PS.Config.DataProvider</a>

**Type:** <span class="type">String</span>
**Description:** Sets the [Data Provider](/configuration/data-providers) to use.

PS.Config.DataProvider = 'pdata'

####<a name="branch"></a>PS.Config.Branch
####<a href="#branch" name="branch">PS.Config.Branch</a>

**Type:** <span class="type">String</span>
**Description:** Sets the url to check for updates from.

PS.Config.Branch = 'https://raw.github.com/adamdburton/pointshop/master/'

####<a name="check-version"></a>PS.Config.CheckVersion
####<a href="#check-version" name="check-version">PS.Config.CheckVersion</a>

**Type:** <span class="type">Boolean</span>
**Description:** Sets whether to check for updates.

PS.Config.CheckVersion = true

####<a name="shop-key"></a>PS.Config.ShopKey
####<a href="#shop-key" name="shop-key">PS.Config.ShopKey</a>

**Type:** <span class="type">String</span>
**Description:** Sets the key to use for opening the PointShop menu.

PS.Config.ShopKey = 'F3'

####<a name="shop-command"></a>PS.Config.ShopCommand
####<a href="#shop-command" name="shop-command">PS.Config.ShopCommand</a>

**Type:** <span class="type">String</span>
**Description:** Sets the console to opening the PointShop menu.

PS.Config.ShopCommand = 'ps_shop'

####<a name="shop-chat-command"></a>PS.Config.ShopChatCommand
####<a href="#shop-chat-command" name="shop-chat-command">PS.Config.ShopChatCommand</a>

**Type:** <span class="type">String</span>
**Description:** Sets the chat command to open the PointShop menu.

PS.Config.ShopChatCommand = '!shop'

####<a name="notify-on-join"></a>PS.Config.NotifyOnJoin
####<a href="#notify-on-join" name="notify-on-join">PS.Config.NotifyOnJoin</a>

**Type:** <span class="type">Boolean</span>
**Description:** Sets whether to nofify players how to open the PointShop menu when the join.

PS.Config.NotifyOnJoin = true

####<a name="points-over-time"></a>PS.Config.PointsOverTime
####<a href="#points-over-time" name="points-over-time">PS.Config.PointsOverTime</a>

**Type:** <span class="type">Boolean</span>
**Description:** Sets whether to give points to player whilst they are in the server, on a timer.

PS.Config.PointsOverTime = true

####<a name="points-over-time-delay"></a>PS.Config.PointsOverTimeDelay
####<a href="#points-over-time-delay" name="points-over-time-delay">PS.Config.PointsOverTimeDelay</a>

**Type:** <span class="type">Number</span>
**Description:** Sets the delay between giving points to connected players, in minutes.

PS.Config.PointsOverTimeDelay = 1

####<a name="points-over-time-amount"></a>PS.Config.PointsOverTimeAmount
####<a href="#points-over-time-amount" name="points-over-time-amount">PS.Config.PointsOverTimeAmount</a>

**Type:** <span class="type">Number</span>
**Description:** Sets the number of points to give after the PS.Config.PointsOverTimeDelay.

PS.Config.PointsOverTimeAmount = 1

####<a name="admin-can-access-admin-tab"></a>PS.Config.AdminCanAccessAdminTab
####<a href="#admin-can-access-admin-tab" name="admin-can-access-admin-tab">PS.Config.AdminCanAccessAdminTab</a>

**Type:** <span class="type">Boolean</span>
**Description:** Sets whether Admins can access the administration tab in the PointShop menu.

PS.Config.AdminCanAccessAdminTab = true

####<a name="super-admin-can-access-admin-tab"></a>PS.Config.SuperAdminCanAccessAdminTab
####<a href="#super-admin-can-access-admin-tab" name="super-admin-can-access-admin-tab">PS.Config.SuperAdminCanAccessAdminTab</a>

**Type:** <span class="type">Boolean</span>
**Description:** Sets whether Super Admins can access the administration tab in the PointShop menu.

PS.Config.SuperAdminCanAccessAdminTab = true

####<a name="can-players-give-points"></a>PS.Config.CanPlayersGivePoints
####<a href="#can-players-give-points" name="can-players-give-points">PS.Config.CanPlayersGivePoints</a>

**Type:** <span class="type">Boolean</span>
**Description:** Sets whether players can give their points to other players.

PS.Config.CanPlayersGivePoints = true

####<a name="display-preview-in-menu"></a>PS.Config.DisplayPreviewInMenu
####<a href="#display-preview-in-menu" name="display-preview-in-menu">PS.Config.DisplayPreviewInMenu</a>

**Type:** <span class="type">Boolean</span>
**Description:** Sets whether the hovering items in the PointShop menu shows a preview.

PS.Config.DisplayPreviewInMenu = true

####<a name="points-name"></a>PS.Config.PointsName
####<a href="#points-name" name="points-name">PS.Config.PointsName</a>

**Type:** <span class="type">String</span>
**Description:** Sets the name of points. Used in the PointShop menu and all notifications.

PS.Config.PointsName = 'Points'

####<a name="sort-items-by"></a>PS.Config.SortItemsBy
####<a href="#sort-items-by" name="sort-items-by">PS.Config.SortItemsBy</a>

**Type:** <span class="type">String</span>
**Description:** Sets the field to sort items by in the PointShop menu.

PS.Config.SortItemsBy = 'Name'

####<a name="calculate-buy-price"></a>PS.Config.CalculateBuyPrice
####<a href="#calculate-buy-price" name="calculate-buy-price">PS.Config.CalculateBuyPrice</a>

**Arguments:** <span class="type">Player</span> ply, <span class="type">ITEM</span> item
**Realm:** <span class="server">Server</span>
Expand All @@ -123,7 +123,7 @@
return item.Price
end

####<a name="calculate-sell-price"></a>PS.Config.CalculateSellPrice
####<a href="#calculate-sell-price" name="calculate-sell-price">PS.Config.CalculateSellPrice</a>

**Arguments:** <span class="type">Player</span> ply, <span class="type">ITEM</span> item
**Realm:** <span class="server">Server</span>
Expand Down
12 changes: 6 additions & 6 deletions docs/01_Configuration/00_Data_Providers.md
@@ -1,23 +1,23 @@
<p class="lead">Data providers give PointShop flexibilty on where data for each players Points and Items are stored. By Default, PointShop uses the PData provider by default.</p>
<p class="lead">Data providers give PointShop flexibility on where data for each players Points and Items are stored. By Default, PointShop uses the PData provider.</p>

####<a name="pdata"></a>PData
####<a href="#pdata" name="pdata">PData</a>

This provider uses the built in [Player.GetPData](http://wiki.garrysmod.com/page/Player/GetPData) and [Player.SetPData](http://wiki.garrysmod.com/page/Player/SetPData) functions. Data from these functions is stored in the sv.db file on the server.

<p class="info"><i class="fa fa-info-circle"></i> The sv.db file can be transferred between servers. This will keep all Point and Item data for players.</p>

PS.Config.DataProvider = 'pdata'

####<a name="data"></a>Data
####<a href="#data" name="data">Data</a>

This provider uses text files in the `garrysmod/data/pointshop` folder. Each player is given their own file in this folder and their data is stored in [JSON](http://en.wikipedia.org/wiki/JSON) format.

<p class="info"><i class="fa fa-info-circle"></i> The PointShop folder can be transferred between servers. This will keep all Point and Item data for players.</p>
<p class="info"><i class="fa fa-info-circle"></i> The garrysmod/data/pointshop folder can be transferred between servers. This will keep all Point and Item data for players.</p>

PS.Config.DataProvider = 'data'

####<a name="mysql"></a>MySQL
####<a href="#mysql" name="mysql">MySQL</a>

The MySQL provider is available as a separate download from the [pointshop-mysql](https://github.com/adamdburton/pointshop-mysql) github repository. This provider connects to a MySQL server and supports synchronizing Points and Items between servers.
The MySQL provider is available as a separate download from the [pointshop-mysql](https://github.com/adamdburton/pointshop-mysql) GitHub repository. This provider connects to a MySQL server and supports synchronizing Points and Items between servers.

PS.Config.DataProvider = 'mysql'
6 changes: 3 additions & 3 deletions docs/01_Configuration/00_Data_Providers/Development.md
@@ -1,14 +1,14 @@
<p class="lead">You can develop your own Data Provider if the default ones do not match your requirements. You could create a provider that interacts with a web service, for example.</p>

####<a name="fallback"></a>PROVIDER.Fallback
####<a href="#fallback" name="fallback">PROVIDER.Fallback</a>

**Required:** Yes
**Type:** <span class="type">String</span>
**Description:** Sets the Data Provider to fall back to should this provider fail.

PROVIDER.Fallback = 'pdata'

####<a name="get-data"></a>PROVIDER:GetData(ply, callback)
####<a href="#get-data" name="get-data">PROVIDER:GetData(ply, callback)</a>

**Required:** Yes
**Arguments:** <span class="type">Player</span> ply, <span class="type">Function</span> callback
Expand All @@ -19,7 +19,7 @@
callback(10, {}) -- returns 10 points and no items
end

####<a name="set-data"></a>PROVIDER:SetData(ply, points, items)
####<a href="#set-data" name="set-data">PROVIDER:SetData(ply, points, items)</a>

**Required:** Yes
**Arguments:** <span class="type">Player</span> ply, <span class="type">Number</span> points, <span class="type">Table</span> items
Expand Down
4 changes: 2 additions & 2 deletions docs/02_Items.md
Expand Up @@ -6,12 +6,12 @@

<a href="/items/hooks" class="button">Hooks <i class="fa fa-chevron-right"></i></a>

###<a name="creating-new-items"></a>Creating New Items
###<a href="#creating-new-items" name="creating-new-items">Creating New Items</a>

Creating new items is as simple as making a new lua file inside one of the category folders inside the `pointshop/items` folder. The new file should then be populated with Item [Properties](/items/properties) and [Functions](/items/functions).

<p class="warning"><i class="fa fa-warning"></i> Filenames for items must be <strong>lowercase</strong> and <strong>contain no spaces or non-alphanumeric characters</strong>. Items with filenames containing uppercase characters or spaces will not work properly.</p>

###<a name="clientside-models"></a>Clientside Models
###<a href="#clientside-models" name="clientside-models">Clientside Models</a>

PointShop has a built in system for showing models attached to players and does this by default if both an `ITEM.Model` and an `ITEM.Attachment` or `ITEM.Bone` are specified.
24 changes: 12 additions & 12 deletions docs/02_Items/01_Properties.md
@@ -1,94 +1,94 @@
<p class="lead">Properties define how an item works and who it should be available to. Some are used to show the item in the menu, whilst others are used to restrict items to specific groups.</p>

####<a name="name"></a>ITEM.Name
####<a href="#name" name="name">ITEM.Name</a>

**Required:** Yes
**Type:** <span class="type">String</span>
**Description:** The items name in the shop.

ITEM.Name = 'Test Item'

####<a name="price"></a>ITEM.Price
####<a href="#price" name="price">ITEM.Price</a>

**Required:** Yes
**Type:** <span class="type">Number</span>
**Description:** How much should the item cost to buy?

ITEM.Price = 200

####<a name="model"></a>ITEM.Model
####<a href="#model" name="model">ITEM.Model</a>

**Required:** No, unless ITEM.Material is not defined
**Type:** <span class="type">String</span>
**Description:** The model shown in the PointShop menu. Either `ITEM.Model` or `ITEM.Material` is required.

ITEM.Model = 'models/player/kleiner.mdl'

####<a name="material"></a>ITEM.Material
####<a href="#material" name="material">ITEM.Material</a>

**Required:** No, unless ITEM.Model is not defined
**Type:** <span class="type">String</span>
**Description:** The material shown in the PointShop menu. Either `ITEM.Model` or `ITEM.Material` is required.

ITEM.Material = 'trails/electric.vmt'

####<a name="skin"></a>ITEM.Skin
####<a href="#skin" name="skin">ITEM.Skin</a>

**Required:** No
**Type:** <span class="type">Number</span>
**Description:** Sets the skin of the model shown in the PointShop menu.

ITEM.Skin = 1

####<a name="allowed-user-groups"></a>ITEM.AllowedUserGroups
####<a href="#allowed-user-groups" name="allowed-user-groups">ITEM.AllowedUserGroups</a>

**Required:** No
**Type:** <span class="type">Table</span>
**Description:** Defines the groups who's members can buy the item.

ITEM.AllowedUserGroups = { "admin", "vip" }

####<a name="single-use"></a>ITEM.SingleUse
####<a href="#single-use" name="single-use">ITEM.SingleUse</a>

**Required:** No
**Type:** <span class="type">Boolean</span>
**Description:** Defines if the item should be given to the player only once and not kept. Useful for purchasing weapons weapons. This will call `ITEM:OnBuy()` but not `ITEM:OnEquip()`.

ITEM.SingleUse = true

####<a name="attachment"></a>ITEM.Attachment
####<a href="#attachment" name="attachment">ITEM.Attachment</a>

**Required:** No
**Type:** <span class="type">String</span>
**Description:** Defines which model attachment to use for clientside model positioning.

ITEM.Attachment = 'eyes'

####<a name="bone"></a>ITEM.Bone
####<a href="#bone" name="bone">ITEM.Bone</a>

**Required:** No
**Type:** <span class="type">String</span>
**Description:** Defines which model bone to use for clientside model positioning.

ITEM.Bone = 'ValveBiped.Bip01_Head1'

####<a name="no-preview"></a>ITEM.NoPreview
####<a href="#no-preview" name="no-preview">ITEM.NoPreview</a>

**Required:** No
**Type:** <span class="type">Boolean</span>
**Description:** Enables or disables previews for the item.

ITEM.NoPreview = true

####<a name="admin-only"></a>ITEM.AdminOnly
####<a href="#admin-only" name="admin-only">ITEM.AdminOnly</a>

**Required:** No
**Type:** <span class="type">Boolean</span>
**Description:** Sets whether the item should only be purchasable by admins.

ITEM.AdminOnly = true

####<a name="except"></a>ITEM.Except
####<a href="#except" name="except">ITEM.Except</a>

**Required:** No
**Type:** <span class="type">Boolean</span>
Expand Down
4 changes: 2 additions & 2 deletions docs/02_Items/01_Properties/Automatic_Properties.md
@@ -1,11 +1,11 @@
<p class="lead">The following properties are set automatically by PointShop when items are loaded.</p>

####<a name="name"></a>ITEM.ID
####<a href="#name" name="name">ITEM.ID</a>

**Type:** <span class="type">String</span>
**Description:** The same as the filename for the item.

####<a name="name"></a>ITEM.Category
####<a href="#name" name="name">ITEM.Category</a>

**Type:** <span class="type">String</span>
**Description:** The name of the category the item belongs to.

0 comments on commit c3714ea

Please sign in to comment.