Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
fiendish committed Aug 20, 2017
2 parents daff023 + f1dbcae commit 11a1895
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 39 deletions.
6 changes: 6 additions & 0 deletions MUSHclient/AardwolfPackageChanges.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Aardwolf Client Package Major Changes List

r1935 snapshot
- bug fix: Some people had reported miniwindows not staying in the right place after r1927. It turns out that this was actually a bug in the official version of movewindow.lua. The fix for this has also been reported to Nick Gammon.
- bug fix: 'resetaard' should now correctly default miniwindow sizes again after being somewhat broken by changes made for the layout profile feature.
- new feature: The inventory serials plugin now has a mode toggle. Type 'inventory serials help' to see more.
- new feature: Thanks to Mendaloth, the channel capture plugin will now also capture remote socials. Adding a toggle for this is very low priority.

r1930 snapshot
- bug fix: Don't crash the GMCP mapper when clicking on a room's ghost after deleting it.
- bug fix: A poorly chosen variable name in aard_requirements.lua was very likely to conflict with anything else using a database. This caused transaction errors in the GMCP mapper and possibly other plugins.
Expand Down
3 changes: 1 addition & 2 deletions MUSHclient/lua/aardmapper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ default_y = 0
function reset_pos()
config.WINDOW.width = default_width
config.WINDOW.height = default_height
windowinfo.window_left = default_x
windowinfo.window_top = default_y
WindowPosition(win, default_x, default_y, 0, 18)
WindowResize(win, default_width, default_height, config.BACKGROUND_COLOUR.colour)
Repaint() -- hack because WindowPosition doesn't immediately update coordinates
end

Expand Down
21 changes: 10 additions & 11 deletions MUSHclient/lua/movewindow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ local function make_check_map_position_handler (mwi)
mwi.window_left > GetInfo (281) - mwi.margin or
mwi.window_top < 0 or -- don't drag title out of view
mwi.window_top > GetInfo (280) - mwi.margin then
mwi.window_left, mwi.window_top = 0, 0 -- reset to center right
mwi.window_mode = miniwin.pos_center_right
mwi.window_flags = 0
end -- if not visible
Expand Down Expand Up @@ -305,8 +304,8 @@ function movewindow.install (win, default_position, default_flags, nocheck, frie
-- save current position in table (obtained from state file)
window_left = tonumber (GetVariable ("mw_" .. win .. "_windowx")) or (start_position and start_position.x) or 0,
window_top = tonumber (GetVariable ("mw_" .. win .. "_windowy")) or (start_position and start_position.y) or 0,
window_mode = tonumber (GetVariable ("mw_" .. win .. "_windowmode")) or default_position,
window_flags = tonumber (GetVariable ("mw_" .. win .. "_windowflags")) or default_flags,
window_mode = default_position,
window_flags = default_flags,
window_friends = friends or {},
window_friend_deltas = {},
margin = 20, -- how close we can put to the edge of the window
Expand Down Expand Up @@ -394,17 +393,17 @@ function movewindow.save_state (win)

-- remember where the window was

-- use actual position, not where we happen to think it is, in case another plugin moves it
-- suggested by Fiendish, 27 August 2012. Updated by Fiendish, 13 July 2017.
if WindowInfo (win, 10) then
mwi.window_left = WindowInfo(win, 10)
-- use actual last specified position, not where we happen to think it is, in case another plugin moves it
-- suggested by Fiendish, 27 August 2012.
if WindowInfo (win, 1) then
mwi.window_left = WindowInfo(win, 1)
end
if WindowInfo (win, 11) then
mwi.window_top = WindowInfo(win, 11)
if WindowInfo (win, 2) then
mwi.window_top = WindowInfo(win, 2)
end

SetVariable ("mw_" .. win .. "_windowx", mwi.window_left)
SetVariable ("mw_" .. win .. "_windowy", mwi.window_top)
SetVariable ("mw_" .. win .. "_windowmode", mwi.window_mode)
SetVariable ("mw_" .. win .. "_windowflags", mwi.window_flags)

end -- movewindow.save_state

8 changes: 3 additions & 5 deletions MUSHclient/worlds/plugins/aard_ASCII_map.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ require "gmcphelper"
require "movewindow"
require "mw"
background_colour = GetNormalColour(1)
background_colour = GetNormalColour(1)
title_colour = 0x292929
border_color = 0xdddddd
title_gradient_col1 = GetNormalColour(1)
Expand Down Expand Up @@ -207,14 +207,12 @@ continents = { [0]="Mesolar", [1]="Southern Ocean", [2]="Gelidus", [3]="Abend",
-- pull in telnet option handling
dofile (GetPluginInfo (GetPluginID(), 20) .. "telnet_options.lua")
function reset_aard()
width = default_width
height = default_height
font_name = default_font_name
font_size = default_font_size
windowinfo.window_left = default_x
windowinfo.window_top = default_y
WindowPosition(win, default_x, default_y, 0, 18)
WindowResize(win, default_width, default_height, background_colour)
Repaint() -- hack because WindowPosition doesn't immediately update coordinates
OnPluginSaveState()
OnPluginInstall()
Expand Down
23 changes: 19 additions & 4 deletions MUSHclient/worlds/plugins/aard_channels_fiendish.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ USAGE:
sequence="100"
></trigger>

<trigger
enabled="y"
match="^\*.+$"
regexp="y"
omit_from_output="n"
script="rsocial"
sequence="100"
></trigger>

</triggers>

<aliases>
Expand Down Expand Up @@ -184,13 +193,10 @@ SetTriggerOption("global_quest", "enabled", global_quest_on)
SetTriggerOption("remort_auction", "enabled", remort_auction_on)
function reset_aard()
width = default_width
height = default_height
font_name = default_font_name
font_size = default_font_size
windowinfo.window_left = default_x
windowinfo.window_top = default_y
WindowPosition(win, default_x, default_y, 0, 18)
WindowResize(win, default_width, default_height, WINDOW_BACKGROUND_COLOUR)
Repaint() -- hack because WindowPosition doesn't immediately update coordinates
OnPluginSaveState()
OnPluginInstall()
Expand Down Expand Up @@ -804,6 +810,15 @@ function storeFromOutside(msg)
stampAndStore(ColoursToStyles(msg))
end
-- stolen from Mendaloth
function rsocial (name, line, wildcards, styles)
-- Remote socials will always start with a dark cyan or bright magenta *
-- Checking color cuts down on non-socials ending up in the chat log...
if (styles[1].textcolour == GetNormalColour(7) or styles[1].textcolour == GetBoldColour(6)) then
stampAndStore(filter_as_needed(styles))
end
end
function untagged_info (name, line, wildcards, styles)
local result = filter_as_needed(styles)
if result then
Expand Down
5 changes: 1 addition & 4 deletions MUSHclient/worlds/plugins/aard_group_monitor_gmcp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,10 @@ dofile (GetPluginInfo (GetPluginID(), 20) .. "telnet_options.lua")
dofile (GetPluginInfo (GetPluginID(), 20) .. "aardwolf_colors.lua")
function reset_aard()
width = default_width
height = default_height
font_name = default_font_name
font_size = default_font_size
windowinfo.window_left = default_x
windowinfo.window_top = default_y
WindowPosition(win, default_x, default_y, 0, 18)
WindowResize(win, default_width, default_height, background_colour)
Repaint() -- hack because WindowPosition doesn't immediately update coordinates
OnPluginSaveState()
OnPluginInstall()
Expand Down
4 changes: 1 addition & 3 deletions MUSHclient/worlds/plugins/aard_health_bars_gmcp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,10 @@ string.rpad = function(str, len, char)
end
function reset_aard()
width = default_width
font_name = default_font_name
font_size = default_font_size
windowinfo.window_left = default_x
windowinfo.window_top = default_y
WindowPosition(win, default_x, default_y, 0, 18)
WindowResize(win, default_width, WindowInfo(win, 4), background_colour)
Repaint() -- hack because WindowPosition doesn't immediately update coordinates
stacked = 0
OnPluginSaveState()
Expand Down
85 changes: 80 additions & 5 deletions MUSHclient/worlds/plugins/aard_inventory_serials.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
date_written="2011-12-30 22:45:00"
requires="4.70"
version="1.0"
save_state="y"
>
<description trim="y">
Makes inventory command slightly more useful by displaying UIDs
Makes inventory command slightly more useful by displaying item serial numbers
</description>
</plugin>

Expand Down Expand Up @@ -188,12 +189,13 @@ Makes inventory command slightly more useful by displaying UIDs
<aliases>

<alias
match="^ *(i|in|inv|inve|inven|invent|invento|inventor|inventory) *$"
match="^(i|in|inv|inve|inven|invent|invento|inventor|inventory) *$"
regexp="y"
enabled="y"
sequence="100"
ignore_case="y"
send_to="12"
group="commands"
>
<send>
inv_sent_count = inv_sent_count + 1
Expand All @@ -202,43 +204,66 @@ Makes inventory command slightly more useful by displaying UIDs
EnableTrigger("start_inv", true)
SendNoEcho("keyring data")
SendNoEcho("invdata")
if manually_requested then
EnableAliasGroup("commands", false)
end
</send>
</alias>

<alias
match="^ *keyr(i|in|ing)? l(i|is|ist)? *$"
match="^keyr(i|in|ing)? l(i|is|ist)? *$"
regexp="y"
enabled="y"
sequence="100"
ignore_case="y"
send_to="12"
group="commands"
>
<send>
key_sent_count = key_sent_count + 1
EnableTrigger("start_key", true)
SendNoEcho("keyring data")
if manually_requested then
EnableAliasGroup("commands", false)
end
</send>
</alias>

<alias
match="^ *vau(l|lt)? l(i|is|ist)? *$"
match="^vau(l|lt)? l(i|is|ist)? *$"
regexp="y"
enabled="y"
sequence="100"
ignore_case="y"
send_to="12"
group="commands"
>
<send>
vault_sent_count = vault_sent_count + 1
EnableTrigger("start_vault", true)
SendNoEcho("vault data")
if manually_requested then
EnableAliasGroup("commands", false)
end
</send>
</alias>
</aliases>

<alias
match="^((i|in|inv|inve|inven|invent|invento|inventor|inventory)|(keyr(i|in|ing)? l(i|is|ist)?)|(vau(l|lt)? l(i|is|ist)?)) serials( help| off| on)?$"
regexp="y"
enabled="y"
sequence="100"
ignore_case="y"
send_to="12"
script="serials_command"
></alias>
</aliases>
<script>
<![CDATA[
visible_always = tonumber(GetVariable("visible_always")) ~= 0 -- default true
manually_requested = false
function OnPluginListChanged()
dofile "lua/aard_requirements.lua"
end
Expand All @@ -247,6 +272,56 @@ function OnPluginInstall()
if IsConnected() then
OnPluginConnect()
end
EnableAliasGroup("commands", visible_always)
end
function show_help()
Note("--------------------------------------")
Note("Aardwolf Inventory Serials Plugin Help")
Note("--------------------------------------")
Note("")
Note("Command syntax:")
ColourNote("yellow", "", ">", "", ""," inventory serials <on/off>")
Note(" - Show or don't show item serial numbers by default when viewing inventory")
ColourNote("yellow", "", ">", "", ""," (inventory|keyring list|vault list) serials")
Note(" - Request the display of item serial numbers once")
Note("")
Note("Current status:")
Tell("Item serial numbers always shown by default? ")
ColourNote(visible_always and "lime" or "red", "", visible_always and "[YES]" or "[NO]")
Note("")
end
function serials_command(name, line, wildcards)
-- 1 is full command minus the serials bit
-- 2 is inv
-- 3 is keyring
-- 6 is vault
-- 9 is help/off/on
cmd = Trim(wildcards[9])
if cmd == "" then
if visible_always then
ColourNote("", "", "You already display item serial numbers by default. For help, type ","yellow", "", "'inventory serials help'","","",".")
else
manually_requested = true
end
EnableAliasGroup("commands", true)
Execute(wildcards[1])
manually_requested = false
elseif cmd == "off" and wildcards[2] ~= "" then
ColourNote("","","Inventory, vault list, and keyring list ","red","","[will not]","",""," display item serial numbers unless specifically requested (For help, type 'inventory serials help').")
visible_always = false
SetVariable("visible_always", 0)
EnableAliasGroup("commands", false)
elseif cmd == "on" and wildcards[2] ~= "" then
ColourNote("","","Inventory, vault list, and keyring list ","lime","","[will]","",""," always display item serial numbers.")
visible_always = true
SetVariable("visible_always", 1)
EnableAliasGroup("commands", true)
elseif cmd == "help" then
show_help()
end
end
function OnPluginEnable()
Expand Down
6 changes: 1 addition & 5 deletions MUSHclient/worlds/plugins/aard_statmon_gmcp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,12 @@ for k,v in pairs(data_color_defaults) do
data_colors[k] = data_colors[k] or v
end
function reset_aard()
stacked = 0
width = default_width
height = default_height
font_name = default_font_name
font_size = default_font_size
windowinfo.window_left = default_x
windowinfo.window_top = default_y
WindowPosition(win, default_x, default_y, 0, 18)
WindowResize(win, default_width, default_height, background_colour)
Repaint() -- hack because WindowPosition doesn't immediately update coordinates
OnPluginSaveState()
OnPluginInstall()
Expand Down

0 comments on commit 11a1895

Please sign in to comment.