aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md13
-rw-r--r--config.ld13
-rw-r--r--gamemode/client/cl_inventory.lua2
-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
-rw-r--r--gamemode/shared/concommands.lua2
-rw-r--r--gamemode/shared/log.lua2
21 files changed, 44 insertions, 33 deletions
diff --git a/README.md b/README.md
index a2c2656..a532f63 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
# Artery RPG base
-Artery is a gamemode base for Garrys Mod that aims to provide a lot of the fuctionality needed to build an RPG. Artery is organized as a set of modules that each provide one functionality, and an editor that provides an easy-to-use interface for setting up worlds.
+Artery is a gamemode base for Garrys Mod that aims to provide a lot of the functionality needed to build an RPG. Artery is organized as a set of modules that each provide one functionality, and an editor that provides an easy-to-use interface for setting up worlds.
Artery can:
-* Stich several servers togeather to create a single logical world
+* Stich several servers together to create a single logical world
* Save and load player data
* Spawn npcs that wander around, give quests, provides shops, and more!
* Easily work with external NPC addons so you don't have to make all the stuff to kill yourself
-* Allow for extensable addons to change basic parts of artery, or just add on to the base
+* Allow for extensible addons to change basic parts of artery, or just add on to the base
##Dependencies
@@ -18,16 +18,15 @@ As of now, artery depends on the following addons:
* CapsAdmin's PAC3 (+JetBoom's animbonelib which comes packaged with PAC3)
* artery_editor
-## Instalation
+## Installation
To install, simple clone this repository into the gamemodes/ folder of the server. Start the server with `+gamemode artery`
## Setup
-In order to build your world, you will probably need to write a lot of your own items, and a few npcs. This is much easier with the artery_editor addon, and GCompute. Just start the server with the sandbox gamemode.
+In order to build your world, you will probably need to write a lot of your own items, and a few npcs. This is much easier with the artery_editor addon, and GCompute. Just start the server with the sandbox gamemode.
* To add npcs, go under the entities tab, and go to the "artery" section.
* To add randomly spawning monsters, place art_huntablespawn points around the map, and then create zones with bobbleheadbob's Zones tool. Configure the zone with the monsters, and chance of spawning you want.
* To add new items, see the items tutorial on [the documentation](https://cogarr.net/artery/)
-* To stich servers togeather into a logical world, use the zones tool to place art_serverchagne volumes, configure the volume with the server to go to (ipaddress:port) and the location on the server to spawn the player.
-
+* To stich servers together into a logical world, use the zones tool to place art_serverchagne volumes, configure the volume with the server to go to (ipaddress:port) and the location on the server to spawn the player.
diff --git a/config.ld b/config.ld
index 8477cfa..3d69f61 100644
--- a/config.ld
+++ b/config.ld
@@ -12,12 +12,15 @@ file = {
}
format = 'markdown'
sort_modules = true
-new_type("domain","Domain")
-new_type("concommand","Console commands", false, ...)
+new_type("domain","Domain",false)
+new_type("concommand","Console commands", false)
new_type("metamethod","Meta Methods", false)
+new_type("server","Server Modules", true)
+new_type("client","Client Modules", true)
+new_type("shared","Shared Modules", true)
custom_tags = {
- {'reqadmin', hidden=false},
- {'domain', hidden=false}
+ {'reqadmin', hidden=true},
+ {'domain', hidden=true}
}
custom_display_name_handler = function(item,default_handeler)
@@ -30,3 +33,5 @@ custom_display_name_handler = function(item,default_handeler)
end
return default_handeler(item)
end
+
+readme = "README.md"
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua
index 91627d0..2c1e693 100644
--- a/gamemode/client/cl_inventory.lua
+++ b/gamemode/client/cl_inventory.lua
@@ -1,6 +1,6 @@
---Functions for hiding and showing inventory panels.
-- Deals with most the the things needed for inventory panels
---@module cl_inventory.lua
+--@client cl_inventory.lua
--[[
Reserved inventory id's
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:
diff --git a/gamemode/shared/concommands.lua b/gamemode/shared/concommands.lua
index 79ea0f3..ad91d53 100644
--- a/gamemode/shared/concommands.lua
+++ b/gamemode/shared/concommands.lua
@@ -1,6 +1,6 @@
--- Concommand autocomplete helper.
-- Helps you write console commands' autocomplete functions
---@module concommands.lua
+--@shared concommands.lua
local fuzzel = nrequire("fuzzel.lua")
diff --git a/gamemode/shared/log.lua b/gamemode/shared/log.lua
index 24fe58f..8005000 100644
--- a/gamemode/shared/log.lua
+++ b/gamemode/shared/log.lua
@@ -1,6 +1,6 @@
--- Logging utility.
-- This prints things to the console for now, maybe it can automatically file bugs and save bug reports in the future?
---@module log.lua
+--@shared log.lua
local log = {}