Skip to content

Commit

Permalink
Housekeeping (#184)
Browse files Browse the repository at this point in the history
* Add Parser/Config Line Types
    - combat_you_cannot_hit
    - combat_you_melee_riposte
    - combat_you_rune_damage
    - combat_your_rune_damage
    - spells_memorize_too_high
    - shout_unknown_tongue
    - petition_you
    - account_subscription
    - eat_you
    - eat_you_finish
    - eat_you_full
    - forage_attacking
    - hide_corpse_none
    - ignore_add
    - list_leaving_zone
    - skill_max
    - skill_max_tradeskill
    - anon_off
    - anon_on
    - autofollow_no_target
    - autofollow_off
    - autofollow_on
    - cast_animal_only
    - cast_night_only
    - concious_you
    - dead_other
    - dead_you
    - effect_removal_block
    - equip_block
    - feign_failure_other
    - hide_moving
    - item_too_big
    - roleplay_off
    - roleplay_on
    - target_attack_sitting
    - target_group_member
    - tell_queued_offline
    - yell_help_you
    - you_lowfoodlowdrink
    - group_invite_yourself
    - group_join_reject
    - guild_member_other
    - guild_member_other_invite
    - guild_member_you
    - guild_member_you_accept
    - guild_officer_other
    - guild_officer_you
    - guild_remove_fail
    - guild_remove_you
    - guild_remove_you_attempt
    - guild_status_officer
    - loot_lore
    - loot_too_far
    - looted_money_you_split
    - split_format
    - split_format_example
    - split_invalid
    - split_off
    - split_on
    - split_shared
    - trade_error
    - tradeskill_create_you
    - tradeskill_fail_you
    - tradeskill_hands_full
    - tradeskill_skill_cap
    - tradeskill_wrong_container
    - trade_too_far

* Misc Parser Tweaks

* Bug Fixes
    - Encounter Parse Zone
    - Config Reload Hang
    - New Character Creation
    - Un-mutable Sounds
    - Config Generation Exit Code

* Configurable Zone Pop Delay
  • Loading branch information
mgeitz authored Mar 26, 2023
1 parent b70d9c4 commit 4374936
Show file tree
Hide file tree
Showing 9 changed files with 977 additions and 118 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

33 changes: 22 additions & 11 deletions eqa/eqalert.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ def main():
## Consume timer_q
## Produce sound_q, display_q
process_timer = threading.Thread(
target=eqa_timer.process, args=(configs, timer_q, sound_q, display_q, exit_flag)
target=eqa_timer.process,
args=(configs, timer_q, sound_q, display_q, exit_flag, cfg_reload),
)
process_timer.daemon = True
process_timer.start()
Expand Down Expand Up @@ -493,6 +494,14 @@ def main():
system_mute(configs, state, display_q, sound_q, new_message)
### Update character
elif new_message.tx == "new_character":
#### Handle new character created since eqalert launch
if (
new_message.payload
not in configs.characters.config["char_logs"].keys()
):
new_char, new_server = new_message.payload.split("_")
eqa_config.add_char_log(new_char, new_server, configs)
#### Swap to character log
new_char_log = (
configs.settings.config["settings"]["paths"][
"everquest_logs"
Expand Down Expand Up @@ -533,6 +542,9 @@ def main():
state.set_encounter_parse_save(new_state.save_parse)
state.set_auto_raid(new_state.auto_raid)
state.set_auto_mob_timer(new_state.auto_mob_timer)
state.set_auto_mob_timer_delay(
new_state.auto_mob_timer_delay
)
state.set_consider_eval(new_state.consider_eval)
eqa_config.set_last_state(state, configs)
char_log = new_char_log
Expand All @@ -554,15 +566,6 @@ def main():
+ state.server,
)
)
# sound_q.put(
# eqa_struct.sound(
# "speak",
# "Character changed to "
# + state.char
# + " on "
# + state.server,
# )
# )
display_q.put(
eqa_struct.display(
eqa_settings.eqa_time(), "draw", "redraw", "null"
Expand Down Expand Up @@ -606,6 +609,7 @@ def main():
state.set_encounter_parse_save(new_state.save_parse)
state.set_auto_raid(new_state.auto_raid)
state.set_auto_mob_timer(new_state.auto_mob_timer)
state.set_auto_mob_timer_delay(new_state.auto_mob_timer_delay)
state.set_consider_eval(new_state.consider_eval)
#### Stop state dependent processes
cfg_reload.set()
Expand Down Expand Up @@ -719,7 +723,14 @@ def main():
#### Restart process_timer
process_timer = threading.Thread(
target=eqa_timer.process,
args=(configs, timer_q, sound_q, display_q, exit_flag),
args=(
configs,
timer_q,
sound_q,
display_q,
exit_flag,
cfg_reload,
),
)
process_timer.daemon = True
process_timer.start()
Expand Down
21 changes: 16 additions & 5 deletions eqa/lib/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,21 @@ def process(
timer_seconds = configs.zones.config["zones"][str(state.zone)][
"timer"
]
timer_seconds = str(int(timer_seconds)-10)
if (int(timer_seconds) < 0):
timer_seconds = str(
int(timer_seconds) - int(state.auto_mob_timer_delay)
)
if int(timer_seconds) < 0:
timer_seconds = "0"
if int(state.auto_mob_timer_delay) <= 0:
pop_message = "Pop " + str(state.zone)
else:
pop_message = (
"Pop "
+ str(state.zone)
+ " in "
+ str(state.auto_mob_timer_delay)
+ " seconds."
)
timer_q.put(
eqa_struct.timer(
(
Expand All @@ -194,8 +206,7 @@ def process(
),
"timer",
str(timer_seconds),
# "Pop " + str(state.zone),
"Repop in ten",
pop_message,
)
)
## Consider Evaluation
Expand Down Expand Up @@ -1802,7 +1813,7 @@ def action_matched(line_type, line, base_path):
matched_log = base_path + "log/debug/matched-lines.txt"
if os.path.exists(matched_log):
file_size = os.path.getsize(matched_log)
if file_size > 5000000:
if file_size >= 10000000:
version = str(
pkg_resources.get_distribution("eqalert").version
).replace(".", "-")
Expand Down
Loading

0 comments on commit 4374936

Please sign in to comment.