Skip to content

Commit

Permalink
Merge branch 'development' into MUSHclient
Browse files Browse the repository at this point in the history
  • Loading branch information
fiendish committed Mar 30, 2018
2 parents 8818779 + c3e66e0 commit 8ac824b
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 53 deletions.
5 changes: 5 additions & 0 deletions MUSHclient/AardwolfPackageChanges.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Aardwolf Client Package Major Changes List

r1980 snapshot
- bug fix: Fix a couple plugin load order issues between the Bigmap plugin and the GMCP mapper plugin.
- bug fix: Fix a situation where the GMCP mapper wouldn't let you change the scan depth.
- bug fix: It looks like I broke nocase #subs at some point.

r1979 snapshot
- new feature: function setTabByName(name) added to the communication log plugin to switch to a named tab.

Expand Down
8 changes: 4 additions & 4 deletions MUSHclient/lua/aardmapper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ function draw (uid)
-- let them move it around
movewindow.add_drag_handler (win, 0, 0, 0, title_bottom)

BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end -- draw

local credits = {
Expand Down Expand Up @@ -1169,7 +1169,7 @@ function full_find (name, dests, show_uid, expected_count, walk, fcb, no_portals
local notfound = {}
for i,v in ipairs(dests) do
SetStatus (string.format ("Pathfinding: searching for route to %i/%i discovered destinations", i, #dests))
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
local foundpath = findpath(current_room, v.uid, no_portals, no_portals)
if not rooms [v.uid] then
rooms [v.uid] = get_room (v.uid)
Expand Down Expand Up @@ -1272,7 +1272,7 @@ function full_find (name, dests, show_uid, expected_count, walk, fcb, no_portals
end

function quick_find(name, dests, show_uid, expected_count, walk, fcb)
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
Note("+------------------------------ START OF SEARCH -------------------------------+")

for i,v in ipairs(dests) do
Expand Down Expand Up @@ -1311,7 +1311,7 @@ function quick_find(name, dests, show_uid, expected_count, walk, fcb)
fcb (uid)
end -- if callback

BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end -- for each room

Note("+-------------------------------- END OF SEARCH -------------------------------+")
Expand Down
2 changes: 1 addition & 1 deletion MUSHclient/lua/scrollbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function ScrollBar:draw(inside_callback)
WindowMoveHotspot(self.window, self:generateHotspotID("scroller"), self.left, position, self.right, position + self.size)
end
Draw3DRect(self.window, self.left, position, self.right, position + self.size, false)
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
self.has_hotspots = true

if not inside_callback then
Expand Down
4 changes: 2 additions & 2 deletions MUSHclient/lua/text_rect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ function TextRect:draw(cleanup_first, inside_callback)
self:doUpdateCallbacks()
end

BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end

function TextRect:addUpdateCallback(object, callback)
Expand Down Expand Up @@ -670,7 +670,7 @@ function TextRect.linkHover(flags, hotspot_id)
WindowLine(tr.window, left, bottom, right, bottom, 0xffffff, 256, 1);
end
end
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end

function TextRect.cancelLinkHover(flags, hotspot_id)
Expand Down
8 changes: 6 additions & 2 deletions MUSHclient/worlds/plugins/Aardwolf_Bigmap_Graphical.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,13 @@ function NoMap(messages)
if (mapwin ~= GetPluginID().."_mapper") or not use_exact_sizes then
AddResizeTag(mapwin, 1, nil, nil, "resize_mouse_down", "resize_move_callback", "resize_release_callback")
end
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end
function DrawMap(clearHotspotsFirst)
if TextHeight(mapwin, font_id) == nil then
OnPluginInstall()
end
if show_map ~= 1 then
return
end
Expand Down Expand Up @@ -477,7 +480,7 @@ function DrawMap(clearHotspotsFirst)
if (mapwin ~= GetPluginID().."_mapper") or not use_exact_sizes then
AddResizeTag(mapwin, 1, nil, nil, "resize_mouse_down", "resize_move_callback", "resize_release_callback")
end
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end -- DrawMap
function resize_mouse_down(flags, hotspot_id)
Expand Down Expand Up @@ -671,6 +674,7 @@ function OnPluginListChanged ()
dofile "lua/aard_requirements.lua"
if IsPluginInstalled("b6eae87ccedd84f510b74714") then
if not mapper_is_loaded then
WindowDelete(GetPluginID().."_mapper")
OnPluginInstall()
end
else
Expand Down
3 changes: 1 addition & 2 deletions MUSHclient/worlds/plugins/aard_ASCII_map.xml
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,7 @@ function DisplayMapPage()
-- show it now (or refresh)
WindowShow(win, true)
--Redraw()
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end -- Display_Map
Expand Down
45 changes: 23 additions & 22 deletions MUSHclient/worlds/plugins/aard_GMCP_mapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ function map_areas (name, line, wildcards)
end
Note (line)
count = count + 1
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end
Note (hl)
Expand Down Expand Up @@ -1190,7 +1190,7 @@ function custom_exit_list (name, line, wildcards)
Hyperlink(string.format("mapper goto %s",row.uid), line, string.format("%s",row.dir), "", "", false, NoUnderline_hyperlinks)
print("")
count = count + 1
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end -- custom exits query
world.Note (hl)
line = string.format ("Found %s custom exits.", count)
Expand Down Expand Up @@ -1569,7 +1569,7 @@ function ExecuteWithWaits(cexit_command)
SendNoEcho("echo {mapper_wait}wait("..wait_time..")")
line, wildcards = wait.regexp("^\\{mapper_wait\\}wait\\(([0-9]*\\.?[0-9]+)\\)",nil,trigger_flag.OmitFromOutput)
Note("CEXIT WAIT: waiting for "..wait_time.." seconds before continuing.")
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
wait.time(wait_time)
partial_cexit_command = string.sub(partial_cexit_command, strend+1)
end
Expand Down Expand Up @@ -1625,7 +1625,7 @@ function custom_exit (name, line, wildcards)
added_waits = added_waits + tonumber(wait_secs)
end
world.Note("CEXIT: WAIT FOR CONFIRMATION BEFORE MOVING.\nThis should take about "..cexit_delay+added_waits.." seconds"..(((added_waits ~= 0) and " (includes "..added_waits.." seconds in added waits)") or "")..".")
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
ExecuteWithWaits(cexit_command)
wait.time(cexit_delay+added_waits)
Expand Down Expand Up @@ -2859,22 +2859,22 @@ end
function remove_date_added_columns()
print("---------------------------------------------------------")
print("Removing date_added from exits table...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
drop_db_columns("exits", {"date_added"}, "PRIMARY KEY(fromuid, dir)")
print("Removing date_added from rooms table...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
drop_db_columns("rooms", {"date_added", "roomid"}, "PRIMARY KEY(uid)")
print("Removing date_added from areas table...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
drop_db_columns("areas", {"date_added", "areaid"}, "PRIMARY KEY(uid)")
print("Removing date_added from bookmarks table...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
drop_db_columns("bookmarks", {"date_added", "id"}, "PRIMARY KEY(uid)")
print("Removing date_added from environments table...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
drop_db_columns("environments", {"date_added", "environmentid"}, "PRIMARY KEY(uid)")
print("---------------------------------------------------------")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end
function drop_db_columns(db_table, drop_columns, extra_directives)
Expand Down Expand Up @@ -2982,7 +2982,7 @@ function update_db_schema(db_user_version)
-- to save time at startup.
if db_user_version < 2 then
print("Updating mapper database schema to v2...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
create_tables()
dbCheckExecute("PRAGMA user_version = 2;")
end
Expand All @@ -2993,7 +2993,7 @@ function update_db_schema(db_user_version)
if db_user_version < 4 then
print("Updating mapper database schema to v4 (v3 skipped)...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
-- add bookmarks and terrain tables to the main db since we're
-- ditching the second db file
dbCheckExecute([[
Expand All @@ -3017,14 +3017,14 @@ function update_db_schema(db_user_version)
if db_user_version < 5 then
print("Updating mapper database schema to v5...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
check_rooms_flags()
dbCheckExecute("PRAGMA user_version = 5;")
end
if db_user_version < 6 then
print("Updating mapper database schema to v6...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
-- original database name for wayhouse was missing the apostrophe
dbCheckExecute([[
update areas set name="The Adventurers' Wayhouse" where uid="wayhouse";
Expand All @@ -3034,7 +3034,7 @@ function update_db_schema(db_user_version)
if db_user_version < 7 then
print("Updating mapper database schema to v7...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
fix_exits_table_v7()
dbCheckExecute([[
CREATE TABLE IF NOT EXISTS storage (
Expand All @@ -3058,7 +3058,7 @@ function update_db_schema(db_user_version)
if db_user_version < 9 then
print("Updating mapper database schema to v9 (v8 skipped)...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
local flags_column_exists = false
for a in dbnrowsWRAPPER("PRAGMA table_info('areas')") do
if a["name"] == "flags" then
Expand All @@ -3073,7 +3073,7 @@ function update_db_schema(db_user_version)
if db_user_version < 10 then
print("Updating mapper database schema to v10...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
remove_date_added_columns()
local ignore_exits_mismatch_column_exists = false
for row in dbnrowsWRAPPER("PRAGMA table_info('rooms')") do
Expand All @@ -3089,20 +3089,20 @@ function update_db_schema(db_user_version)
if db_user_version < 11 then
print("Updating mapper database schema to v11...")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
dbCheckExecute("CREATE INDEX IF NOT EXISTS exits_touid_index ON exits (touid);")
dbCheckExecute("CREATE INDEX IF NOT EXISTS rooms_area_index ON rooms (area);")
end
print("")
print("Converted database to new format. Verifying integrity.")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
if not checkDatabaseIntegrity(true) then
return
end
dbCheckExecute("VACUUM;")
print("")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
dbCheckExecute("PRAGMA user_version = 11;")
utils.msgbox ("Your map database schema update has completed.", "", "ok", "i")
Expand Down Expand Up @@ -3327,6 +3327,7 @@ function activate_running(run)
mapper.config.SCAN.depth = 4 -- or whatever
else
mapper.config.SCAN.depth = temp_scan_depth
temp_scan_depth = 4 -- or whatever
end
mapper.draw(current_room)
end
Expand Down Expand Up @@ -4122,7 +4123,7 @@ function findpath(src, dst, noportals, norecalls)
local main_status = GetInfo(53)
while not found and depth < max_depth do
SetStatus(main_status.." (searching depth "..depth..")")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
depth = depth + 1
if depth > 1 then
ftd = room_sets[depth-1] or {}
Expand Down Expand Up @@ -4239,7 +4240,7 @@ function findNearestJumpRoom(src, dst, target_type)
local main_status = GetInfo(53)
while not found and depth < max_depth do
SetStatus(main_status.." (searching jump depth "..depth..")")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
depth = depth + 1
-- prune the search space
Expand Down
4 changes: 2 additions & 2 deletions MUSHclient/worlds/plugins/aard_channels_fiendish.xml
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ function drawTabs (mouseover)
end
tabs_rects[current_tab]:draw()
tabs_scrollbars[current_tab]:draw()
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end
function tabMouseOver (flags, hotspot_id)
Expand Down Expand Up @@ -1004,7 +1004,7 @@ end
function getmemoryusage()
collectgarbage('collect')
return collectgarbage('count')
end
end
]]>
</script>
Expand Down
2 changes: 1 addition & 1 deletion MUSHclient/worlds/plugins/aard_group_monitor_gmcp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ function DisplayGroupPage()
AddResizeTag(win, 1, nil, nil, "MouseDown", "ResizeMoveCallback", "ResizeReleaseCallback")
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end -- Display_Group_Page
function validate_percent(input)
Expand Down
2 changes: 1 addition & 1 deletion MUSHclient/worlds/plugins/aard_health_bars_gmcp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ function DisplayStatsPage()
DressWindow(win, nil, nil)
AddResizeTag(win, 1, nil, nil, "MouseDown", "ResizeMoveCallback", "ResizeReleaseCallback")
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end -- DisplayStatsPage
-- right click menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function arrangeZ()
WindowSetZOrder(v, k)
SetVariable("a"..v, k)
end
BroadcastPlugin (999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end
function OnPluginDisable()
Expand Down
20 changes: 10 additions & 10 deletions MUSHclient/worlds/plugins/aard_repaint_buffer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ function resume()
paused = false
end
function BufferedRepaint()
repaint_on_tick = true
if (paused == false) and (utils.timer() - last_repaint_time > .1) then
repaint_on_tick = false
Repaint()
last_repaint_time = utils.timer()
end
end
function OnPluginBroadcast (msg, id, name, text)
if ((msg == 999) and (text == "repaint")) then
repaint_on_tick = true
if (paused == false) and (utils.timer() - last_repaint_time > .1) then
repaint_on_tick = false
Repaint()
last_repaint_time = utils.timer()
end
elseif ((msg == 999) and (text == "pause_repaint")) then
paused = true
elseif ((msg == 999) and (text == "resume_repaint")) then
paused = false
BufferedRepaint()
end
end
Expand Down
2 changes: 1 addition & 1 deletion MUSHclient/worlds/plugins/aard_statmon_gmcp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ function Print()
AddResizeTag(win, 1, nil, nil, "MouseDown", "ResizeMoveCallback", "ResizeReleaseCallback")
BroadcastPlugin(999, "repaint")
CallPlugin("abc1a0944ae4af7586ce88dc", "BufferedRepaint")
end
function RefreshPage()
Expand Down
5 changes: 1 addition & 4 deletions MUSHclient/worlds/plugins/aard_text_substitution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,11 @@ dofile(GetInfo(60) .. "aardwolf_colors.lua")
require "addxml"
function apply_pattern_as_trigger(original_pattern, nocase, alone)
local flags = trigger_flag.Enabled + trigger_flag.OmitFromLog + trigger_flag.OmitFromOutput + trigger_flag.RegularExpression + trigger_flag.Temporary
if nocase then
flags = flags + trigger_flag.IgnoreCase
end
addxml.trigger(
{
match = original_pattern:gsub("([^%%]?)%%([^%%])", "%1\\%2"), -- replace % escapes with \ escapes
enabled = true,
ignore_case = nocase,
regexp = true,
sequence = 100,
omit_from_output = true,
Expand Down

0 comments on commit 8ac824b

Please sign in to comment.