Change script directory tree

Userscripts have been moved from /scripts/userscripts to /userscripts.

Core scripts have been moved from /scripts/corescripts to /cores.
This commit is contained in:
Gnome Ann
2021-12-11 23:46:30 -05:00
parent 36209bfe69
commit 03453c4e27
2 changed files with 2 additions and 2 deletions

40
cores/default.lua Normal file
View File

@@ -0,0 +1,40 @@
-- Default core script
-- Runs all input modifiers and generation modifiers in forward order, and
-- runs all output modifiers in reverse order
kobold, koboldcore = require("bridge")() -- This line is optional and is only for EmmyLua type annotations
---@class KoboldCoreScript
local corescript = {}
-- Run all the input modifiers from bottom to top
function corescript.inmod()
for i = #koboldcore.userscripts, 1, -1 do
local userscript = koboldcore.userscripts[i]
if userscript.inmod ~= nil then
userscript.inmod()
end
end
end
-- Run all the generation modifiers from top to bottom
function corescript.genmod()
for i, userscript in ipairs(koboldcore.userscripts) do
if userscript.genmod ~= nil then
userscript.genmod()
end
end
end
-- Run all the generation modifiers from top to bottom
function corescript.outmod()
for i, userscript in ipairs(koboldcore.userscripts) do
if userscript.outmod ~= nil then
userscript.outmod()
end
end
end
return corescript