valgrind.xml 29.1 KB
Newer Older
1 2 3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.001">
Maiyannah Bishop's avatar
Maiyannah Bishop committed
4 5 6 7 8 9 10 11 12
	<TriggerPackage />
	<TimerPackage />
	<AliasPackage />
	<ActionPackage />
	<ScriptPackage>
		<Script isActive="yes" isFolder="no">
			<name>Valgrind</name>
			<packageName></packageName>
			<script>-- =============================================================================
13 14 15 16 17 18
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
--
19
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
20 21 22 23 24 25 26
--
-- Valgrind
--    The auto-installer for Valkryka
--
-- @package     Installer
-- @category    Valkryja
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
27
-- @copyright   2006-2020 Maiyannah Bishop
28 29 30 31 32
-- @link        valkryja.com
-- =============================================================================

Config = Config or {}
Valkryja = Valkryja or {}
33
Valkryja.Valgrind = Valkryja.Valgrind or {}
34 35

-- The below gets the system path so you can use it below
36
local modulepath = getModulePath("valgrind")
37
if modulepath then
38
   modulepath = string.gsub(modulepath, "valgrind.xml", '')
39 40 41 42 43 44
   Valkryja.SystemPath = string.gsub(modulepath, [[\]], [[/]])
else
   Valkryja.SystemPath = getMudletHomeDir():gsub([[\]], [[/]]).."/Valkryja/"
end
modulepath = nil

45
function Valkryja.Valgrind.Message(message)
46
   if not tostring(message) then return false end
47 48
    cecho("&lt;BlueViolet&gt;(&lt;CornflowerBlue&gt;Valgrind&lt;BlueViolet&gt;):&lt;reset&gt; "..tostring(message).."&lt;reset&gt;\n")
    return true
49 50
end

51 52 53 54 55 56
-- -----------------------------------------------------------------------------
-- Function: Valkryja.CheckModule
-- Check a single module is available as part of IntegrityCheck or a standalone 
-- check
function Valkryja.CheckModule(alias, fullname, report)
   if (alias==nil) then return false end
57 58
    if (fullname==nil) then return false end
    report = report or false
59
   if not (getModulePath(alias)) then
60 61
       if (report==true) then cecho("&lt;BlueViolet&gt;(&lt;CornflowerBlue&gt;Valkryja&lt;BlueViolet&gt;):       &lt;red&gt;!!&lt;reset&gt; "..fullname.." - unable to find module.\n") end
         return false
62 63
   else
      if (report==true) then cecho("&lt;BlueViolet&gt;(&lt;CornflowerBlue&gt;Valkryja&lt;BlueViolet&gt;):       "..fullname.." found at "..tostring(getModulePath(alias)).."\n") end
64
         return true
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
   end
end

-- =============================================================================
-- VALGRIND - AUTO INSTALLATION COMPONENTS
-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallModule()
-- Installs a single designated module
Valkryja.Valgrind = Valkryja.Valgrind or {}
Valkryja.Valgrind.RetrievalBase = "http://git.postactiv.com/maiyannah/valkyrior/raw/master/"
function Valkryja.Valgrind.InstallModule(alias)
   desiredRemotePath = Valkryja.Valgrind.RetrievalBase..alias..".xml"
   desiredLocalPath  = Valkryja.SystemPath..alias..".xml"
   if (Valkryja.SystemPath==nil) then return false end

   -- retrieve remote file if we need to
   if not lfs.attributes(desiredLocalPath) then
82
      Valkryja.Valgrind.Message(desiredLocalPath.." doesn't exist ... attempting to download from "..desiredRemotePath)
83 84
      success = downloadFile(desiredLocalPath, desiredRemotePath)
   else
85
      ValgrindMessage(desiredLocalPath.." already exists.")
86
       success = true
87 88 89 90
   end

   -- install the module if we need to
   if (Valkryja.CheckModule(alias, "", false)==false) then
91
      tempTimer(0.50, [[ValgrindMessage('Module "]]..alias..[[" not installed, attempting to install.')]])
92 93
      tempTimer(0.50, [[success = installModule("]]..desiredLocalPath..[[")]])
   else
94
      Valkryja.Valgrind.Message("Module "..alias.." already installed.")
95 96 97 98 99 100 101 102 103 104 105
      success = true
   end

   return success
end

-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallCore
-- Installs the basic core modules of Valkryja
function Valkryja.Valgrind.InstallCoreModules()
   -- retrieve and install modules
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
    tempTimer(0.60, [[Valkryja.Valgrind.InstallModule("valkryja")]])
    tempTimer(0.30, [[Valkryja.Valgrind.InstallModule("valkryja_config")]])
    tempTimer(0.70, [[Valkryja.Valgrind.InstallModule("berkana")]])
    tempTimer(1.00, [[Valkryja.Valgrind.InstallModule("kauna")]])
    tempTimer(1.30, [[Valkryja.Valgrind.InstallModule("logsogumandr")]])

    -- Valkryja.Valgrind.InstallModule("laeknishendr") - future addition
    -- Valkryja.Valgrind.InstallModule("raido")        - future addition    
    
    -- set load order
    tempTimer(0.60, [[setModulePriority("valkryja_config", 0)]])
    tempTimer(0.90, [[setModulePriority("valkryja", 1)]])
    tempTimer(1.20, [[setModulePriority("berkana", 2)]])
    tempTimer(1.50, [[setModulePriority("kauna", 2)]])
    tempTimer(1.70, [[setModulePriority("logsogumandr", 2)]])
121 122 123 124 125 126 127 128
end

-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallAchaeaModules
-- Installs the MUD-specific modules for Achaea
function Valkryja.Valgrind.InstallAchaeaModules()
   -- retrieve and install modules
   -- Valkryja.Valgrind.InstallModule("valkryja_imperian")
129 130
    
    -- set load order
131 132 133 134 135 136 137 138 139
   -- setModulePriority("valkryja_imperian", 3)
end

-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallAetoliaModules
-- Installs the MUD-specific modules for Aetolia
function Valkryja.Valgrind.InstallAetoliaModules()
   -- retrieve and install modules
   tempTimer(0.10, [[Valkryja.Valgrind.InstallModule("valkryja_aetolia")]])
140 141 142 143 144 145 146 147 148
    tempTimer(0.40, [[Valkryja.Valgrind.InstallModule("valkryja_aetolia_triggers")]])
    tempTimer(0.70, [[Valkryja.Valgrind.InstallModule("kauna_aetolia")]])
    tempTimer(1.00, [[Valkryja.Valgrind.InstallModule("kauna_aetolia_keys")]])
    
    -- set load order
    tempTimer(0.60, [[setModulePriority("valkryja_aetolia", 3)]])
    tempTimer(0.90, [[setModulePriority("kauna_aetolia", 4)]])
    tempTimer(1.20, [[setModulePriority("valkryja_aetolia_triggers", 5)]])
    tempTimer(1.50, [[setModulePriority("kauna_aetolia_keys", 5)]])
149 150 151 152 153 154 155 156
end

-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallAsteriaModules
-- Installs the MUD-specific modules for Asteria
function Valkryja.Valgrind.InstallAsteriaModules()
   -- retrieve and install modules
   tempTimer(0.10, [[Valkryja.Valgrind.InstallModule("valkryja_asteria_triggers")]])
157 158 159 160
    tempTimer(0.40, [[Valkryja.Valgrind.InstallModule("kauna_asteria_triggers")]])
    
    -- set load order
    tempTimer(0.60, [[setModulePriority("valkryja_asteria_triggers", 5)]])
161 162 163 164 165 166 167 168 169
   tempTimer(0.90, [[setModulePriority("kauna_asteria_triggers", 5)]])
end

-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallImperianModules
-- Installs the MUD-specific modules for Imperian
function Valkryja.Valgrind.InstallImperianModules()
   -- retrieve and install modules
   tempTimer(0.10, [[Valkryja.Valgrind.InstallModule("valkryja_imperian")]])
170 171 172 173 174 175 176 177 178 179
    tempTimer(0.40, [[Valkryja.Valgrind.InstallModule("valkryja_imperian")]])
    tempTimer(0.70, [[Valkryja.Valgrind.InstallModule("berkana_imperian")]])
    tempTimer(1.00, [[Valkryja.Valgrind.InstallModule("berkana_imperian_alias")]])
    tempTimer(1.30, [[Valkryja.Valgrind.InstallModule("kauna_imperian")]])
    tempTimer(1.60, [[Valkryja.Valgrind.InstallModule("kauna_imperian_alias")]])
    tempTimer(1.90, [[Valkryja.Valgrind.InstallModule("kauna_imperian_triggers")]])
    tempTimer(2.20, [[Valkryja.Valgrind.InstallModule("kauna_imperian_keys")]])
    tempTimer(2.50, [[Valkryja.Valgrind.InstallModule("logsogumandr_imperian")]])
    
    -- set load order
180
   tempTimer(0.60, [[setModulePriority("valkryja_imperian", 3)]])
181 182 183 184 185 186 187 188
    tempTimer(0.90, [[setModulePriority("berkana_imperian", 4)]])
    tempTimer(1.20, [[setModulePriority("kauna_imperian", 4)]])
    tempTimer(1.50, [[setModulePriority("logsogumandr_imperian", 4)]])
    tempTimer(1.80, [[setModulePriority("valkryja_imperian_triggers", 5)]])
    tempTimer(2.10, [[setModulePriority("berkana_imperian_alias", 5)]])
    tempTimer(2.30, [[setModulePriority("kauna_imperian_alias", 5)]])
    tempTimer(2.60, [[setModulePriority("kauna_imperian_triggers", 5)]])
    tempTimer(2.90, [[setModulePriority("kauna_imperian_keys", 5)]])
189 190 191 192 193 194 195 196 197
end

-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallLuminariModules
-- Installs the MUD-specific modules for Luminari MUD
function Valkryja.Valgrind.InstallLuminariModules()
   -- retrieve and install modules
   tempTimer(0.10, [[Valkryja.Valgrind.InstallModule("valkryja_luminari")]])
   tempTimer(0.40, [[Valkryja.Valgrind.InstallModule("valkryja_luminari_triggers")]])
198 199 200 201
    
    -- set load order
    tempTimer(0.60, [[setModulePriority("valkryja_luminari", 3)]])
    tempTimer(0.90, [[setModulePriority("valkryja_luminari_triggers", 5)]])
202 203 204 205 206 207 208
end

-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallMateriaMagicaModules
-- Installs the MUD-specific modules for Materia Magica
function Valkryja.Valgrind.InstallMateriaMagicaModules()
   -- retrieve and install modules
209 210
    tempTimer(0.10, [[Valkryja.Valgrind.InstallModule("valkryja_materiamagica")]])
    tempTimer(0.40, [[Valkryja.Valgrind.InstallModule("valkryja_materiamagica_triggers")]])
211 212
   tempTimer(0.70, [[Valkryja.Valgrind.InstallModule("kauna_materiamagica")]])
   tempTimer(1.00, [[Valkryja.Valgrind.InstallModule("kauna_materiamagica_alias")]])
213 214 215 216 217 218 219 220
    tempTimer(1.30, [[Valkryja.Valgrind.InstallModule("kauna_materiamagica_triggers")]])
    
    -- set load order
    tempTimer(0.60, [[setModulePriority("valkryja_materiamagica", 3)]])
    tempTimer(0.90, [[setModulePriority("kauna_materiamagica", 4)]])
    tempTimer(1.20, [[setModulePriority("valkryja_materiamagica_triggers", 5)]])
    tempTimer(1.50, [[setModulePriority("kauna_materiamagica_alias", 5)]])
    tempTimer(1.80, [[setModulePriority("kauna_materiamagica_triggers", 5)]])
221 222 223 224 225 226 227 228 229 230 231
end

-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.SetupProfile()
-- Set up the profile for valkryja with icon and etc
function Valkryja.Valgrind.SetupProfile()
   if not Valkryja.SystemPath then return false end
   profile_icon_path = Valkryja.SystemPath.."/img/custom-profile-logo.png"
   if not (lfs.attributes(Valkryja.SystemPath.."/img/custom-profile-logo.png")) then
      success = downloadFile(profile_icon_path, Valkryja.Valgrind.RetrievalBase.."/img/custom-profile-logo.png")
   end
232
   tempTimer(0.50, [[setProfileIcon(]]..profile_icon_path..[[)]])
233 234 235 236
   profile_icon_path = nil
   return success
end

237 238 239 240 241 242 243

-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallSingleIncidental
-- Installs a single markdown file to the root dir
-- It will assume that directory exists
function Valkryja.Valgrind.InstallSingleIncidental(file_name)
   file_path = Valkryja.SystemPath..file_name..".md"
244
    if not (lfs.attributes(file_path)) then
245
       Valkryja.Valgrind.Message(file_path.." not found, attempting to retrieve from "..Valkryja.Valgrind.RetrievalBase..file_name..".md")
246
       success = downloadFile(file_path, Valkryja.Valgrind.RetrievalBase..file_name..".md")
247
   end
248 249
    file_path = nil
    return success
250 251 252 253 254 255 256 257 258
end


-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallIncidentals
-- Installs our readmes and such
function Valkryja.Valgrind.InstallIncidentals()
   pcall(Valkryja.Valgrind.InstallSingleIncidental, "credits")
   pcall(Valkryja.Valgrind.InstallSingleIncidental, "licensees")
259 260
   pcall(Valkryja.Valgrind.InstallSingleIncidental, "paid_license")
   pcall(Valkryja.Valgrind.InstallSingleIncidental, "readme")
261 262
end

263 264 265 266 267 268
-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallSingleImage
-- Installs a single image to the /img/ directory
-- It will assume that directory exists
function Valkryja.Valgrind.InstallSingleImage(image_name)
   image_path = Valkryja.SystemPath.."/img/"..image_name..".png"
269
    if not (lfs.attributes(image_path)) then
270
       Valkryja.Valgrind.Message(image_path.." not found, attempting to retrieve from "..Valkryja.Valgrind.RetrievalBase.."/img/"..image_name..".png")
271
       success = downloadFile(image_path, Valkryja.Valgrind.RetrievalBase.."/img/"..image_name..".png")
272
   end
273
    return success
274 275 276 277 278 279 280 281
end

-- -----------------------------------------------------------------------------
-- Function: Valkryja.Valgrind.InstallImages
-- Gets and downloads all the images we need
function Valkryja.Valgrind.InstallImages()
   success = lfs.mkdir(Valkryja.SystemPath.."/img")
   pcall(Valkryja.Valgrind.InstallSingleImage, "avatar_decoration")
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
   pcall(Valkryja.Valgrind.InstallSingleImage, "canvas_bottom")
   pcall(Valkryja.Valgrind.InstallSingleImage, "canvas_left")
   pcall(Valkryja.Valgrind.InstallSingleImage, "canvas_right")
   pcall(Valkryja.Valgrind.InstallSingleImage, "canvas_top")
   pcall(Valkryja.Valgrind.InstallSingleImage, "chat_bg")
   pcall(Valkryja.Valgrind.InstallSingleImage, "chat_tab1_active")
   pcall(Valkryja.Valgrind.InstallSingleImage, "chat_tab1_inactive")
   pcall(Valkryja.Valgrind.InstallSingleImage, "chat_tab2_active")
   pcall(Valkryja.Valgrind.InstallSingleImage, "chat_tab2_inactive")
   pcall(Valkryja.Valgrind.InstallSingleImage, "chat_tab3_active")
   pcall(Valkryja.Valgrind.InstallSingleImage, "chat_tab3_inactive")
   pcall(Valkryja.Valgrind.InstallSingleImage, "chat_tab4_active")
   pcall(Valkryja.Valgrind.InstallSingleImage, "chat_tab4_inactive")
   pcall(Valkryja.Valgrind.InstallSingleImage, "console_bottom")
   pcall(Valkryja.Valgrind.InstallSingleImage, "console_cap1")
   pcall(Valkryja.Valgrind.InstallSingleImage, "console_cap2")
   pcall(Valkryja.Valgrind.InstallSingleImage, "console_cap3")
   pcall(Valkryja.Valgrind.InstallSingleImage, "console_cap4")
   pcall(Valkryja.Valgrind.InstallSingleImage, "console_left")
   pcall(Valkryja.Valgrind.InstallSingleImage, "console_right")
   pcall(Valkryja.Valgrind.InstallSingleImage, "console_top")
   pcall(Valkryja.Valgrind.InstallSingleImage, "generic_background")
   pcall(Valkryja.Valgrind.InstallSingleImage, "prompt_bg")
   pcall(Valkryja.Valgrind.InstallSingleImage, "scrollbar")
   pcall(Valkryja.Valgrind.InstallSingleImage, "sea_bg")
   pcall(Valkryja.Valgrind.InstallSingleImage, "splash")
   pcall(Valkryja.Valgrind.InstallSingleImage, "title")
   pcall(Valkryja.Valgrind.InstallSingleImage, "valkryja-websplash")
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
    
    -- Afflictions
    success = lfs.mkdir(Valkryja.SystemPath.."/img/afflictions")
    pcall(Valkryja.Valgrind.InstallSingleImage, "afflictions/icon-ablaze")
    pcall(Valkryja.Valgrind.InstallSingleImage, "afflictions/icon-blank")
    pcall(Valkryja.Valgrind.InstallSingleImage, "afflictions/icon-blind")
    pcall(Valkryja.Valgrind.InstallSingleImage, "afflictions/icon-burning")
    pcall(Valkryja.Valgrind.InstallSingleImage, "afflictions/icon-deaf")
    pcall(Valkryja.Valgrind.InstallSingleImage, "afflictions/icon-freezing")
    pcall(Valkryja.Valgrind.InstallSingleImage, "afflictions/icon-frozen")
    pcall(Valkryja.Valgrind.InstallSingleImage, "afflictions/icon-ablaze")
    pcall(Valkryja.Valgrind.InstallSingleImage, "afflictions/icon-insomnia")
    pcall(Valkryja.Valgrind.InstallSingleImage, "afflictions/icon-placeholder")
    
    -- Avatar
    success = lfs.mkdir(Valkryja.SystemPath.."/img/avatar")
    
    -- Balances
    success = lfs.mkdir(Valkryja.SystemPath.."/img/balances")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-balance")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-elixir")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-equilibrium")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-herb")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-pipe")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-salve")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-toadstool")
336
   pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-balance-none")
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-elixir-none")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-equilibrium-none")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-herb-none")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-pipe-none")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-salve-none")
    pcall(Valkryja.Valgrind.InstallSingleImage, "balances/icon-toadstool-none")
    
    -- Boxes
    success = lfs.mkdir(Valkryja.SystemPath.."/img/boxes")
    pcall(Valkryja.Valgrind.InstallSingleImage, "boxes/box-chat")
    pcall(Valkryja.Valgrind.InstallSingleImage, "boxes/box-information")
    pcall(Valkryja.Valgrind.InstallSingleImage, "boxes/box-map")
    
    -- Defences
    success = lfs.mkdir(Valkryja.SystemPath.."/img/defences")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-airelemental")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-armour")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-bandages")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-blank")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-blind")
357 358 359
   pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-boneimageoak")
   pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-caloric")
   pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-camoflauge")
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-celerity")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-celerityblessing")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-clarity")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-cloak")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-constitution")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-deaf")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-deathsight")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-earthelemental")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-earthsense")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-earthshield")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-fenugreek")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-fireelemental")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-fitness")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-flying")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-frostelixir")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-frostshield")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-goldtonic")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-gripping")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-guildreserve")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-infravision")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-insomnia")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-inspiration")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-levitation")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-luckycrits")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-mindseye")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-mirrorimage")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-moon")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-moss")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-nightsight")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-parry")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-pear")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-placeholder")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-quince")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-rebounding")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-redemption")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-resistance")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-senselife")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-shield")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-shieldabsorb")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-shroud")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-speed")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-starburst")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-stonebonusdamage")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-tenemecy")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-thermalshield")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-thirdeye")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-toughenwarchant")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-venom")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-warchantempower")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-wardancebemuse")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-waterelemental")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-weaponsrebounding")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-weathering")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-windveil")
    pcall(Valkryja.Valgrind.InstallSingleImage, "defences/icon-xpbonus")
    
    -- Defences
    success = lfs.mkdir(Valkryja.SystemPath.."/img/gauges")
    pcall(Valkryja.Valgrind.InstallSingleImage, "gauges/endurance-empty")
    pcall(Valkryja.Valgrind.InstallSingleImage, "gauges/endurance-full")
    pcall(Valkryja.Valgrind.InstallSingleImage, "gauges/health-empty")
    pcall(Valkryja.Valgrind.InstallSingleImage, "gauges/health-full")
    pcall(Valkryja.Valgrind.InstallSingleImage, "gauges/mana_empty")
    pcall(Valkryja.Valgrind.InstallSingleImage, "gauges/mana_full")
    pcall(Valkryja.Valgrind.InstallSingleImage, "gauges/willpower_empty")
    pcall(Valkryja.Valgrind.InstallSingleImage, "gauges/willpower_full")
    
    -- Hotbar
    success = lfs.mkdir(Valkryja.SystemPath.."/img/hb")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/background")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-autobashing-off")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-autobashing-on")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-empty")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f4-aet-praenomen")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f4-aet-templar")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f4-berserker-rage")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f5-aet-praenomen")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f5-bashing")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f5-bashing-mage")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f5-bashing-priest")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f5-bashing-shaman")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f5-bashing-templar")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f5-bashing-wardancer")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f6-templar-sacrifice")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f6-converge")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f6-imp-impale")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f7-aet-templar-engage")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f7-imp-disembowel")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f8-aet-templar-auras")
    pcall(Valkryja.Valgrind.InstallSingleImage, "hb/btn-f8-imp-transfix")
    
    -- Splash
    success = lfs.mkdir(Valkryja.SystemPath.."/img/splash")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/bg")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/btn_config")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/btn_language")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/btn_updates")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/btn_mud_achaea")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/btn_mud_aetolia")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/btn_mud_asteria")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/btn_mud_imperian")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/btn_mud_luminari")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/btn_mud_lusternia")
    pcall(Valkryja.Valgrind.InstallSingleImage, "splash/btn_mud_mm")
464 465
end

466 467 468 469 470 471 472
-- =============================================================================
-- ACTUAL AUTO-INSTALLERS FOR VALGRIND FOLLOW
-- -----------------------------------------------------------------------------

-- Minimal install - core components only
function Valkryja.Valgrind.MinimalInstall()
   tempTimer(0.10, [[pcall(Valkryja.Valgrind.InstallCoreModules)]])
473 474 475
    tempTimer(0.20, [[pcall(Valkryja.Valgrind.InstallImages)]])
    tempTimer(0.30, [[pcall(Valkryja.Valgrind.InstallIncidentals)]])
    tempTimer(0.40, [[pcall(Valkryja.Valgrind.SetupProfile)]])
476 477 478 479 480
end

-- Full install - core components plus modules for all supported muds
function Valkryja.Valgrind.FullInstall()
   tempTimer(0.10, [[pcall(Valkryja.Valgrind.InstallCoreModules)]])
481 482 483 484 485 486 487
    tempTimer(0.20, [[pcall(Valkryja.Valgrind.InstallAchaeaModules)]])
    tempTimer(0.30, [[pcall(Valkryja.Valgrind.InstallAetoliaModules)]])
    tempTimer(0.40, [[pcall(Valkryja.Valgrind.InstallImperianModules)]])
    tempTimer(0.50, [[pcall(Valkryja.Valgrind.InstallLuminariModules)]])
    tempTimer(0.60, [[pcall(Valkryja.Valgrind.InstallMateriaMagicaModules)]])
    tempTimer(0.70, [[pcall(Valkryja.Valgrind.InstallImages)]])
    tempTimer(0.80, [[pcall(Valkryja.Valgrind.InstallIncidentals)]])
488
   tempTimer(0.90, [[pcall(Valkryja.Valgrind.SetupProfile)]])
489 490 491 492 493
end

-- Achaea install - core components plus modules for Achaea only
function Valkryja.Valgrind.InstallAchaea()
   tempTimer(0.10, [[pcall(Valkryja.Valgrind.InstallCoreModules)]])
494 495 496 497
    tempTimer(0.20, [[pcall(Valkryja.Valgrind.InstallAchaeaModules)]])
    tempTimer(0.30, [[pcall(Valkryja.Valgrind.InstallImages)]])
    tempTimer(0.40, [[pcall(Valkryja.Valgrind.InstallIncidentals)]])
    tempTimer(0.50, [[pcall(Valkryja.Valgrind.SetupProfile)]])
498 499 500 501 502
end

-- Achaea install - core components plus modules for Aetolia only
function Valkryja.Valgrind.InstallAetolia()
   tempTimer(0.10, [[pcall(Valkryja.Valgrind.InstallCoreModules)]])
503 504 505 506
    tempTimer(0.20, [[pcall(Valkryja.Valgrind.InstallAetoliaModules)]])
    tempTimer(0.30, [[pcall(Valkryja.Valgrind.InstallImages)]])
    tempTimer(0.40, [[pcall(Valkryja.Valgrind.InstallIncidentals)]])
    tempTimer(0.50, [[pcall(Valkryja.Valgrind.SetupProfile)]])
507 508 509 510 511
end

-- Asteria install - core components plus modules for Asteria only
function Valkryja.Valgrind.InstallAsteria()
   tempTimer(0.10, [[pcall(Valkryja.Valgrind.InstallCoreModules)]])
512 513 514 515
    tempTimer(0.20, [[pcall(Valkryja.Valgrind.InstallAsteriaModules)]])
    tempTimer(0.30, [[pcall(Valkryja.Valgrind.InstallImages)]])
    tempTimer(0.40, [[pcall(Valkryja.Valgrind.InstallIncidentals)]])
    tempTimer(0.50, [[pcall(Valkryja.Valgrind.SetupProfile)]])
516 517 518 519 520
end

-- Imperian install - core components plus modules for Imperian only
function Valkryja.Valgrind.InstallImperian()
   tempTimer(0.10, [[pcall(Valkryja.Valgrind.InstallCoreModules)]])
521 522 523 524
    tempTimer(0.20, [[pcall(Valkryja.Valgrind.InstallImperianModules)]])
    tempTimer(0.30, [[pcall(Valkryja.Valgrind.InstallImages)]])
    tempTimer(0.40, [[pcall(Valkryja.Valgrind.InstallIncidentals)]])
    tempTimer(0.50, [[pcall(Valkryja.Valgrind.SetupProfile)]])
525 526 527 528 529
end

-- Luminari install - core components plus modules for Luminari only
function Valkryja.Valgrind.InstallLuminari()
   tempTimer(0.10, [[pcall(Valkryja.Valgrind.InstallCoreModules)]])
530 531 532 533
    tempTimer(0.20, [[pcall(Valkryja.Valgrind.InstallLuminariModules)]])
    tempTimer(0.30, [[pcall(Valkryja.Valgrind.SetupProfile)]])
    tempTimer(0.40, [[pcall(Valkryja.Valgrind.InstallImages)]])
    tempTimer(0.50, [[pcall(Valkryja.Valgrind.InstallIncidentals)]])
534 535 536 537 538
end

-- Materia Magica install - core components plus modules for MM only
function Valkryja.Valgrind.InstallMateriaMagica()
   tempTimer(0.10, [[pcall(Valkryja.Valgrind.InstallCoreModules)]])
539 540 541 542
    tempTimer(0.20, [[pcall(Valkryja.Valgrind.InstallMateriaMagicaModules)]])
    tempTimer(0.30, [[pcall(Valkryja.Valgrind.InstallImages)]])
    tempTimer(0.40, [[pcall(Valkryja.Valgrind.InstallIncidentals)]])
    tempTimer(0.50, [[pcall(Valkryja.Valgrind.SetupProfile)]])
543 544 545 546 547 548 549 550 551
end


if (Valkryja.CheckModule("valkryja", "", false)==false) then
   Valkryja.Valgrind.FullInstall()
end

-- END OF SCRIPT
-- =============================================================================</script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
552 553 554 555 556 557 558
			<eventHandlerList />
		</Script>
	</ScriptPackage>
	<KeyPackage />
	<HelpPackage>
		<helpURL></helpURL>
	</HelpPackage>
559
</MudletPackage>