Skip to content

Commit

Permalink
made toggling Find Traps into yet another component #35
Browse files Browse the repository at this point in the history
  • Loading branch information
burner1024 committed Jun 25, 2020
1 parent 278fbc2 commit 3bef5db
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions tnt/components/easy_traps/baf/intuition.baf
Expand Up @@ -55,6 +55,7 @@ END

// intuition: start searching for traps
IF
%traps_baf_force_find_traps_toggle%
Global("%trap_var_base%_intuition", "MYAREA", 1)
Global("%trap_var_base%_detected", "MYAREA", 0)
%traps_baf_class%
Expand Down
5 changes: 5 additions & 0 deletions tnt/components/easy_traps/subcomponents.tpa
Expand Up @@ -61,3 +61,8 @@ END
ACTION_IF MOD_IS_INSTALLED ~%tp2_name%~ (ID_OF_LABEL ~%tp2_name%~ ~g_tnt_traps_reminders_specific~) BEGIN
OUTER_SET reminders = 2 // advanced
END

OUTER_SPRINT traps_baf_force_find_traps_toggle ~False()~
ACTION_IF MOD_IS_INSTALLED ~%tp2_name%~ (ID_OF_LABEL ~%tp2_name%~ ~g_tnt_traps_intuition_toggle_find_traps~) BEGIN
OUTER_SPRINT traps_baf_force_find_traps_toggle ~~
END
10 changes: 10 additions & 0 deletions tnt/tnt.tp2
Expand Up @@ -103,6 +103,16 @@ REQUIRE_PREDICATE (
) @304
SUBCOMPONENT @305

BEGIN @314
GROUP @226
LABEL ~g_tnt_traps_intuition_toggle_find_traps~
REQUIRE_PREDICATE ENGINE_IS ~tob bgee bg2ee iwdee pstee~ @124
REQUIRE_PREDICATE NOT MOD_IS_INSTALLED ~tnt.tp2~ (ID_OF_LABEL ~tnt.tp2~ ~g_tnt_traps_core~) @129
REQUIRE_PREDICATE (
MOD_IS_INSTALLED ~tnt.tp2~ (ID_OF_LABEL ~tnt.tp2~ ~g_tnt_traps_intuition_no_combat~)
OR MOD_IS_INSTALLED ~tnt.tp2~ (ID_OF_LABEL ~tnt.tp2~ ~g_tnt_traps_intuition_combat~)
) @304

BEGIN @309
GROUP @226
LABEL ~g_tnt_traps_intuition_center_on_character~
Expand Down
1 change: 1 addition & 0 deletions tnt/tra/english/setup.tra
Expand Up @@ -126,3 +126,4 @@
@311 = ~Trap reminders~
@312 = ~generic~
@313 = ~disclose trap type~
@314 = ~Trap intuition: toggle Find Traps automatically on a hunch (will interrupt whatever the thief is doing)~

0 comments on commit 3bef5db

Please sign in to comment.