diff options
Diffstat (limited to 'gamemode/config')
| -rw-r--r-- | gamemode/config/colortheme.lua | 7 | ||||
| -rw-r--r-- | gamemode/config/sv_newplayer.lua | 31 | ||||
| -rw-r--r-- | gamemode/config/sv_sql.lua | 14 |
3 files changed, 47 insertions, 5 deletions
diff --git a/gamemode/config/colortheme.lua b/gamemode/config/colortheme.lua index 13c7a26..c6c2f97 100644 --- a/gamemode/config/colortheme.lua +++ b/gamemode/config/colortheme.lua @@ -36,4 +36,11 @@ theme.ui = { border = Color(113,113,113) } +theme.game = { + -- The text displayed when someone is dammaged + dammagetext = theme.console.foreground, + -- The text displayed next to an npc when editor mode is enabled + npcsettings = theme.console.foreground +} + return theme diff --git a/gamemode/config/sv_newplayer.lua b/gamemode/config/sv_newplayer.lua index 229c11e..403e933 100644 --- a/gamemode/config/sv_newplayer.lua +++ b/gamemode/config/sv_newplayer.lua @@ -1,29 +1,50 @@ +--- Holds the data new players should be spawned with. +-- If new inventories central to the gamemode are added, +-- players should probably spawn with them. Add the +-- inventory to np.data. +--@server sv_newplayer.lua +--@alias np + local np = {} local inv = nrequire("inventory/inventory.lua") nrequire("inventorysystem/equipment/sh_equipment.lua") nrequire("inventorysystem/shapedinventory/sh_shaped.lua") -nrequire("inventorysystem/prayers/sh_prayers.lua") +nrequire("inventorysystem/abilities/sh_abilities.lua") nrequire("inventorysystem/skills/sh_skills.lua") nrequire("inventorysystem/quests/sh_quests.lua") local log = nrequire("log.lua") --local itm = nrequire("inventory/item.lua") -local data = { +--- The data that players spawn with. +-- @table data +-- @field inventories +-- @usage +-- local np = nrequire("config/sv_newplayer.lua") +-- local inv = nrequire("inventory/inventory.lua") +-- local invtbl = np.data.inventories +-- invtbl[#invtbl + 1] = {"My New Inventory",inv.CreateInventory("MyInventory"):Serialize()} +np.data = { inventories = { {"Equipment", inv.CreateInventory("Equipment"):Serialize()}, {"Shaped Inventory",inv.CreateInventory("Shaped Inventory"):Serialize()}, - {"Prayers",inv.CreateInventory("Prayers"):Serialize()}, + {"Abilities",inv.CreateInventory("Abilities"):Serialize()}, {"Skills",inv.CreateInventory("Skills"):Serialize()}, {"Quests",inv.CreateInventory("Quests"):Serialize()}, }, } +--- Function called with a new player needs default data. +-- By default, this function just returns np.data +-- You can overwrite it to return any other table though. +-- @treturn table The new data to return np.newdata = function() log.debug("newdata asked for") - log.debug(table.ToString(data,"data",true)) - return data + log.debug(table.ToString(np.data,"data",true)) + return np.data end +--- Function to return metadata for a player. +-- This just returns a server and location for the player to spawn. np.newmeta = function() log.debug("newmeta asked for") return { diff --git a/gamemode/config/sv_sql.lua b/gamemode/config/sv_sql.lua index a4b5daa..501f8e1 100644 --- a/gamemode/config/sv_sql.lua +++ b/gamemode/config/sv_sql.lua @@ -1,7 +1,20 @@ +--- Defaults relating to the sql database. +-- If you need to change the defaults, nrequire() thi +-- module, then change any of the fields. +-- @server sv_sql.lua + local sql = {} --SQL stuff, be careful to keep this secret! +--- The values in the sql table +-- @table mysql_config +-- @field boolean EnableMySQL=true Should we use MySQLOO to store the data? +-- @field string Host=localhost The hostname that the mysql database lives on +-- @field string Username=root The username to log into the database +-- @field string Password=root The password to log into the database +-- @field number Database_port=3306 The port to connect to the database on +-- @field string Preferred_module=mysqloo The perfered module to use for sql, when multiple are avaliable. local parse = { ["EnableMySQL"] = tobool, ["Host"] = tostring, @@ -34,4 +47,5 @@ for _,line in pairs(string.Explode("\n",mysqlconfig,false)) do sql[key] = parse[key](value) end + return sql |
