diff options
Diffstat (limited to 'gamemode/hud')
| -rw-r--r-- | gamemode/hud/draw_spell.lua | 9 | ||||
| -rw-r--r-- | gamemode/hud/games/base.lua | 2 | ||||
| -rw-r--r-- | gamemode/hud/games/connectthedots.lua (renamed from gamemode/hud/spellminigames/connectthedots.lua) | 0 | ||||
| -rw-r--r-- | gamemode/hud/games/rubickscircle.lua | 1 | ||||
| -rw-r--r-- | gamemode/hud/spellminigames/base.lua | 18 |
5 files changed, 27 insertions, 3 deletions
diff --git a/gamemode/hud/draw_spell.lua b/gamemode/hud/draw_spell.lua index c1879ef..032c25f 100644 --- a/gamemode/hud/draw_spell.lua +++ b/gamemode/hud/draw_spell.lua @@ -2,6 +2,8 @@ CASTING_SPELL = nil --AddLUACSFolder("spellminigames") +local Folder = GM.Folder:gsub("gamemodes/","").."/gamemode/hud/" + --A table of spells to functions? Spells = {} --[[ @@ -14,13 +16,14 @@ Spells = {} function loadgames() GAMEMODE.minigames = {} - local Folder = GAMEMODE.Folder:gsub("gamemodes/","").."/gamemode/hud/" print("WS2A:Looking for minigames in:" .. Folder) - local games = file.Find(Folder.."*","LUA") + AddCSLuaFile(Folder .. "/games/base.lua") + include(Folder .. "/games/base.lua") + local games, fold = file.Find(Folder.."*","LUA") local game = {} print("WS2A:Loading " .. #(games) .. " minigames") + print("WS2A:Found " .. #(fold) .. " folders") for k,v in pairs(games) do - print(k) print(v) --[[ if (v != "base.lua") then diff --git a/gamemode/hud/games/base.lua b/gamemode/hud/games/base.lua new file mode 100644 index 0000000..a6c68c1 --- /dev/null +++ b/gamemode/hud/games/base.lua @@ -0,0 +1,2 @@ +--A file to show what functions are used for minigames +print("Base included!") diff --git a/gamemode/hud/spellminigames/connectthedots.lua b/gamemode/hud/games/connectthedots.lua index c24ff14..c24ff14 100644 --- a/gamemode/hud/spellminigames/connectthedots.lua +++ b/gamemode/hud/games/connectthedots.lua diff --git a/gamemode/hud/games/rubickscircle.lua b/gamemode/hud/games/rubickscircle.lua new file mode 100644 index 0000000..528f62b --- /dev/null +++ b/gamemode/hud/games/rubickscircle.lua @@ -0,0 +1 @@ +print(" second file to see if something's wrong with file function") diff --git a/gamemode/hud/spellminigames/base.lua b/gamemode/hud/spellminigames/base.lua new file mode 100644 index 0000000..65127e7 --- /dev/null +++ b/gamemode/hud/spellminigames/base.lua @@ -0,0 +1,18 @@ +--A file to show what functions are used for minigames + +Game.Name="Base" +Game.Tip="Why did I even write this? No one will look at it anyway!" + +--Set this to non-nil to end the game, and give the player a score. +Game.Score=nil + +--[[ +Game.OnStartCasting = function(ply,spell) + +Game.Minigame = function() +end + +Game.Interupt = function() +end + +--]] |
