aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-11-18 02:37:05 -0500
committerAlexander Pickering <alexandermpickering@gmail.com>2017-11-18 02:37:05 -0500
commit8ed7aec95941c0752a0ae21d10594579c39677fb (patch)
treed160fb6d89ec10f863b9d2773d3a14c09978b4ff /gamemode/core
parent0a490d7d811c682a8d0f5a74840583028f13822a (diff)
downloadartery-8ed7aec95941c0752a0ae21d10594579c39677fb.tar.gz
artery-8ed7aec95941c0752a0ae21d10594579c39677fb.tar.bz2
artery-8ed7aec95941c0752a0ae21d10594579c39677fb.zip
Updates to documentation
* Fixed typos in README * Added Server/Client/Shared kinds to documentation * Documentation now includes readme
Diffstat (limited to 'gamemode/core')
-rw-r--r--gamemode/core/clienteffects/cl_effects.lua2
-rw-r--r--gamemode/core/clienteffects/sv_effects.lua2
-rw-r--r--gamemode/core/combat/sv_weaponswing.lua4
-rw-r--r--gamemode/core/database/sv_queries.lua2
-rw-r--r--gamemode/core/database/sv_setup.lua2
-rw-r--r--gamemode/core/dataloader/sv_loadglobals.lua2
-rw-r--r--gamemode/core/inventory/common/items.lua2
-rw-r--r--gamemode/core/inventory/common/weapons.lua2
-rw-r--r--gamemode/core/inventory/inventory.lua2
-rw-r--r--gamemode/core/inventory/item.lua2
-rw-r--r--gamemode/core/inventory/sv_invtracker.lua13
-rw-r--r--gamemode/core/mapstich/sv_mapstich.lua2
-rw-r--r--gamemode/core/npc/sv_huntingspawner.lua2
-rw-r--r--gamemode/core/npc/sv_npcsystem.lua2
-rw-r--r--gamemode/core/npc/sv_shop.lua2
-rw-r--r--gamemode/core/pac/sv_pac.lua2
16 files changed, 26 insertions, 19 deletions
diff --git a/gamemode/core/clienteffects/cl_effects.lua b/gamemode/core/clienteffects/cl_effects.lua
index eff8dba..60b71c1 100644
--- a/gamemode/core/clienteffects/cl_effects.lua
+++ b/gamemode/core/clienteffects/cl_effects.lua
@@ -1,6 +1,6 @@
---A registry of client-side effects.
-- Use this to register effects to be called with sv_effects.lua
---@module cl_effects.lua
+--@client cl_effects.lua
local log = nrequire("log.lua")
local er = {} --master table of effects
diff --git a/gamemode/core/clienteffects/sv_effects.lua b/gamemode/core/clienteffects/sv_effects.lua
index d364068..9859b95 100644
--- a/gamemode/core/clienteffects/sv_effects.lua
+++ b/gamemode/core/clienteffects/sv_effects.lua
@@ -1,6 +1,6 @@
---A way to apply effects on players.
-- Also see cl_effects.lua
---@module sv_effects.lua
+--@server sv_effects.lua
local ed = {}
diff --git a/gamemode/core/combat/sv_weaponswing.lua b/gamemode/core/combat/sv_weaponswing.lua
index b02c8fc..1970007 100644
--- a/gamemode/core/combat/sv_weaponswing.lua
+++ b/gamemode/core/combat/sv_weaponswing.lua
@@ -1,9 +1,11 @@
---Automatically re-calculates swing arcs for weapons.
-- This files helps you create mele weapons that need to be swung
---@module sv_weaponswing.lua
+--@server sv_weaponswing.lua
+
--[[
This file tells you what weapons need their swings recalculated
]]
+
-- local itm = nrequire("core/inventory/item.lua")
-- local inv = nrequire("core/inventory/inventory.lua")
local wep = nrequire("core/inventory/common/weapons.lua")
diff --git a/gamemode/core/database/sv_queries.lua b/gamemode/core/database/sv_queries.lua
index 4d659b2..f6f8c9f 100644
--- a/gamemode/core/database/sv_queries.lua
+++ b/gamemode/core/database/sv_queries.lua
@@ -1,6 +1,6 @@
---Helper functions for saveing and loading players.
-- Defines functions for saveing/loading the player
---@module sv_queries.lua
+--@server sv_queries.lua
local fn = nrequire("utility/fn.lua")
local track = nrequire("core/inventory/sv_invtracker.lua")
diff --git a/gamemode/core/database/sv_setup.lua b/gamemode/core/database/sv_setup.lua
index c98a8e4..2fd0d42 100644
--- a/gamemode/core/database/sv_setup.lua
+++ b/gamemode/core/database/sv_setup.lua
@@ -1,6 +1,6 @@
---Functions for working the the mysqlite module.
-- Helps load players into their correct instance
---@module sv_setup.lua
+--@server sv_setup.lua
--Adds the MySQLite global
nrequire("sv_mysqlite.lua")
diff --git a/gamemode/core/dataloader/sv_loadglobals.lua b/gamemode/core/dataloader/sv_loadglobals.lua
index bb74572..5a24996 100644
--- a/gamemode/core/dataloader/sv_loadglobals.lua
+++ b/gamemode/core/dataloader/sv_loadglobals.lua
@@ -1,6 +1,6 @@
---Loads code from the data directory.
-- Simple data loader, loads code from the data directory, sv_* files only get loaded server side, cl_* files only get loaded client-side, other files are loaded shared
---@module sv_loadglobals.lua
+--@server sv_loadglobals.lua
print("Load globals called")
local log = nrequire("log.lua")
diff --git a/gamemode/core/inventory/common/items.lua b/gamemode/core/inventory/common/items.lua
index a7a1858..4b52a97 100644
--- a/gamemode/core/inventory/common/items.lua
+++ b/gamemode/core/inventory/common/items.lua
@@ -1,6 +1,6 @@
---Some common functions for working with items.
-- Just one function for now
---@module items.lua
+--@shared items.lua
local items = {}
diff --git a/gamemode/core/inventory/common/weapons.lua b/gamemode/core/inventory/common/weapons.lua
index 3ced3b1..065d1a6 100644
--- a/gamemode/core/inventory/common/weapons.lua
+++ b/gamemode/core/inventory/common/weapons.lua
@@ -1,6 +1,6 @@
---Common functionality used in a lot of weapons.
-- Bits an peices that most weapons need
---@module weapons.lua
+--@shared weapons.lua
local com = {}
diff --git a/gamemode/core/inventory/inventory.lua b/gamemode/core/inventory/inventory.lua
index 69e8181..1290519 100644
--- a/gamemode/core/inventory/inventory.lua
+++ b/gamemode/core/inventory/inventory.lua
@@ -1,6 +1,6 @@
---The main file needed to register create new inventory types.
-- Helps you register inventories that work with the rest of artery
---@module inventory.lua
+--@shared inventory.lua
--[[
Public functions:
diff --git a/gamemode/core/inventory/item.lua b/gamemode/core/inventory/item.lua
index 1e6a0cf..9a6a293 100644
--- a/gamemode/core/inventory/item.lua
+++ b/gamemode/core/inventory/item.lua
@@ -1,6 +1,6 @@
---The main module to use when createing new items.
-- Registers items that will work with the inventory system
---@module item.lua
+--@shared item.lua
--[[
An itemsystem
public functions:
diff --git a/gamemode/core/inventory/sv_invtracker.lua b/gamemode/core/inventory/sv_invtracker.lua
index 32388d7..e009828 100644
--- a/gamemode/core/inventory/sv_invtracker.lua
+++ b/gamemode/core/inventory/sv_invtracker.lua
@@ -1,6 +1,8 @@
---Utilities to help deal with inventories.
-- Helps you display, manage, and manipulate inventories
---@module sv_invtracker.lua
+--@server sv_invtracker.lua
+
+--@domain Server
--[[
some accessability functions
@@ -222,7 +224,7 @@ end
---A shortcut to remove an item from a player.
-- Removes an item from a player and returns the item
---@metamethod plymeta:RemoveItem(tbl)
+--@metamethod player:RemoveItem(tbl)
--@tparam table tbl The position the item is in (returned by plymeta:HasItem())
--@treturn itemtbl The item that was removed
function plymeta:RemoveItem(tbl)
@@ -234,7 +236,7 @@ end
---A shortcut for giving an item to a player.
-- Gives an item to a player
---@metamethod plymeta:GiveItem(tbl)
+--@metamethod player:GiveItem(tbl)
--@param itemtbl tbl The item to give the player
--@raises "Uanble to find place to put item" Raises an exception if we cannot find a location to put the item.
function plymeta:GiveItem(tbl)
@@ -285,7 +287,10 @@ end
---Prints a player's inventory to the console.
--@concommand artery_ShowMyInventories
-concommand.Add("artery_ShowMyInventories",function(ply,cmd,args)
+--@reqadmin
+concommand.Add("artery_ShowMyInventories",
+
+function(ply,cmd,args)
PrintTable(ply.data.inventories)
end)
diff --git a/gamemode/core/mapstich/sv_mapstich.lua b/gamemode/core/mapstich/sv_mapstich.lua
index f4208dd..f8e79cd 100644
--- a/gamemode/core/mapstich/sv_mapstich.lua
+++ b/gamemode/core/mapstich/sv_mapstich.lua
@@ -1,6 +1,6 @@
---Bits to help with transfering players.
-- Transfers players between areas when they hit a art_serverchange zone
---@module sv_mapstich.lua
+--@server sv_mapstich.lua
--Make sure zones are loaded already
nrequire("sv_mysqlite.lua")
diff --git a/gamemode/core/npc/sv_huntingspawner.lua b/gamemode/core/npc/sv_huntingspawner.lua
index f86fb59..99ed754 100644
--- a/gamemode/core/npc/sv_huntingspawner.lua
+++ b/gamemode/core/npc/sv_huntingspawner.lua
@@ -1,6 +1,6 @@
---Lets huntable monsters drop loot.
-- Register what monsters drop what loot
---@module sv_huntingspawner.lua
+--@server sv_huntingspawner.lua
--[[
This file spawns the huntable npc's in their zones.
diff --git a/gamemode/core/npc/sv_npcsystem.lua b/gamemode/core/npc/sv_npcsystem.lua
index ac8ddc0..0916d28 100644
--- a/gamemode/core/npc/sv_npcsystem.lua
+++ b/gamemode/core/npc/sv_npcsystem.lua
@@ -1,6 +1,6 @@
---Various functions for npcs.
-- Helps you spawn monsters, townies, and shopkeepers
---@module sv_npcsystem.lua
+--@server sv_npcsystem.lua
local f = nrequire("concommands.lua")
local n = {}
diff --git a/gamemode/core/npc/sv_shop.lua b/gamemode/core/npc/sv_shop.lua
index ffebce8..fd98eb8 100644
--- a/gamemode/core/npc/sv_shop.lua
+++ b/gamemode/core/npc/sv_shop.lua
@@ -1,5 +1,5 @@
---Some more logic related to shop npc's
---@module sv_shop.lua
+--@server sv_shop.lua
local itm = nrequire("core/inventory/item.lua")
diff --git a/gamemode/core/pac/sv_pac.lua b/gamemode/core/pac/sv_pac.lua
index d06ef35..a4d2c00 100644
--- a/gamemode/core/pac/sv_pac.lua
+++ b/gamemode/core/pac/sv_pac.lua
@@ -1,7 +1,7 @@
--- The server side lazy loader for pac3 costumes.
--PAC3 outfits are not downloaded until they are needed, we can keep the inital download to join the server pretty small this way.
-- The downside is that the game might lag a little when someone wears something that is rare/new and everyone has to download it.
---@module sv_pac.lua
+--@server sv_pac.lua
--[[
Console Commands: