From 83ecdc1173811c7d61f0e14508c959a3e9df806a Mon Sep 17 00:00:00 2001 From: Fesiug Date: Sun, 3 Sep 2023 09:31:16 -0400 Subject: [PATCH] Initial commit --- .gitattributes | 2 ++ README.md | 2 ++ gamemodes/benny/benny.txt | 11 +++++++++ gamemodes/benny/gamemode/cl_init.lua | 4 +++ gamemodes/benny/gamemode/init.lua | 7 ++++++ gamemodes/benny/gamemode/shared.lua | 37 ++++++++++++++++++++++++++++ 6 files changed, 63 insertions(+) create mode 100644 .gitattributes create mode 100644 README.md create mode 100644 gamemodes/benny/benny.txt create mode 100644 gamemodes/benny/gamemode/cl_init.lua create mode 100644 gamemodes/benny/gamemode/init.lua create mode 100644 gamemodes/benny/gamemode/shared.lua diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/README.md b/README.md new file mode 100644 index 0000000..baae44e --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# benny + Your Name Is Benny diff --git a/gamemodes/benny/benny.txt b/gamemodes/benny/benny.txt new file mode 100644 index 0000000..f68805d --- /dev/null +++ b/gamemodes/benny/benny.txt @@ -0,0 +1,11 @@ +"benny" +{ + "base" "base" + "title" "Your Name Is Benny" + "maps" "^benny_" + "category" "other" + "menusystem" "1" + "settings" + { + } +} \ No newline at end of file diff --git a/gamemodes/benny/gamemode/cl_init.lua b/gamemodes/benny/gamemode/cl_init.lua new file mode 100644 index 0000000..e9b3797 --- /dev/null +++ b/gamemodes/benny/gamemode/cl_init.lua @@ -0,0 +1,4 @@ + +-- Thing + +include( "shared.lua" ) \ No newline at end of file diff --git a/gamemodes/benny/gamemode/init.lua b/gamemodes/benny/gamemode/init.lua new file mode 100644 index 0000000..c3a2ec9 --- /dev/null +++ b/gamemodes/benny/gamemode/init.lua @@ -0,0 +1,7 @@ + +-- Thing + +AddCSLuaFile( "cl_init.lua" ) +AddCSLuaFile( "shared.lua" ) + +include( "shared.lua" ) \ No newline at end of file diff --git a/gamemodes/benny/gamemode/shared.lua b/gamemodes/benny/gamemode/shared.lua new file mode 100644 index 0000000..dc053a1 --- /dev/null +++ b/gamemodes/benny/gamemode/shared.lua @@ -0,0 +1,37 @@ + +-- Thing + +GM.Name = "Your Name Is Benny" +GM.Author = "Fesiug, Oranche" +GM.Email = "N/A" +GM.Website = "N/A" + +-- Load modules +local path = GM.FolderName .. "/gamemode/modules/" +local modules, folders = file.Find(path .. "*", "LUA") + +for _, folder in SortedPairs(folders, false) do + if folder == "." or folder == ".." then continue end + + -- Shared modules + for _, f in SortedPairs(file.Find(path .. folder .. "/sh_*.lua", "LUA"), false) do + AddCSLuaFile(path .. folder .. "/" .. f) + include(path .. folder .. "/" .. f) + end + + -- Server modules + if SERVER then + for _, f in SortedPairs(file.Find(path .. folder .. "/sv_*.lua", "LUA"), false) do + include(path .. folder .. "/" .. f) + end + end + + -- Client modules + for _, f in SortedPairs(file.Find(path .. folder .. "/cl_*.lua", "LUA"), false) do + AddCSLuaFile(path .. folder .. "/" .. f) + + if CLIENT then + include(path .. folder .. "/" .. f) + end + end +end \ No newline at end of file