Skip to content

Commit

Permalink
faster loading: fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
burner1024 committed Feb 13, 2020
1 parent 9f79c6d commit 1d100d6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tnt/components/faster_loading_times/main.tpa
@@ -0,0 +1,22 @@
// don't remember what's this for, but must've been a reason
ACTION_IF ~%WEIDU_OS%~ STR_EQ ~win32~ BEGIN
AT_NOW ~del /s /f /q cache\data~
END ELSE BEGIN
AT_NOW ~rm -rf cache/data~
END
MKDIR ~cache/data~

// actual decompression
ACTION_BASH_FOR ~data~ ~^.+\.bif$~ BEGIN
ACTION_IF NOT (~%BASH_FOR_FILE%~ STRING_MATCHES_REGEXP ~fl#biffbackup.*~ = 0) BEGIN
DECOMPRESS_BIFF ~%BASH_FOR_FILE%~
OUTER_TEXT_SPRINT $already_done(~%BASH_FOR_FILE%~) 1
END
END
ACTION_BASH_FOR ~data/data~ ~^.+\.bif$~ BEGIN
ACTION_IF NOT (~%BASH_FOR_FILE%~ STRING_MATCHES_REGEXP ~fl#biffbackup.*~ = 0) BEGIN
ACTION_IF NOT VARIABLE_IS_SET $already_done(~%BASH_FOR_FILE%~) BEGIN
DECOMPRESS_BIFF ~%BASH_FOR_FILE%~
END
END
END
3 changes: 3 additions & 0 deletions tnt/tnt.tp2
Expand Up @@ -373,3 +373,6 @@ INCLUDE ~%components%/true_true_grandmastery/main.tpa~
BEGIN @258 /* Sensible multiclass restrictions */
REQUIRE_PREDICATE (GAME_INCLUDES ~bg1~ OR GAME_INCLUDES ~bg2~) @122 /* BG saga only */
INCLUDE ~%components%/sensible_multiclass_restrictions/main.tpa~

BEGIN @259 /* Faster loading times */
INCLUDE ~%components%/faster_loading_times/main.tpa~
1 change: 1 addition & 0 deletions tnt/tra/english/setup.tra
Expand Up @@ -99,3 +99,4 @@
@256 = ~Sensible Blade spins~
@257 = ~True True Grandmastery~
@258 = ~Sensible multiclass restrictions~
@259 = ~Faster loading times~

0 comments on commit 1d100d6

Please sign in to comment.