diff options
| author | Alexander Pickering <Alexander.Pickering@anondomain.site90.net> | 2016-01-22 19:55:23 -0500 |
|---|---|---|
| committer | Alexander Pickering <Alexander.Pickering@anondomain.site90.net> | 2016-01-22 19:55:23 -0500 |
| commit | e8439ad503f530724f1eae2de1a8ac2c19df52c0 (patch) | |
| tree | c02e2ecf065ece9b41b2234ef41cb914e9b6b3d0 /gamemode | |
| parent | 85b92e122cdcf6879e1c7950c8015ecb2a0675e4 (diff) | |
| download | wintersurvival2-e8439ad503f530724f1eae2de1a8ac2c19df52c0.tar.gz wintersurvival2-e8439ad503f530724f1eae2de1a8ac2c19df52c0.tar.bz2 wintersurvival2-e8439ad503f530724f1eae2de1a8ac2c19df52c0.zip | |
More debugging around file.Find not finding games folder
Diffstat (limited to 'gamemode')
| -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 + +--]] |
