Here we go:
https://pastebin.com/3cJpGc2r
This is my mapper plugin.
I was just thinking: I didn't make a way to only tag a room as one tile, and also if the room gets tagged more than once, it puts the same thing in (If I tag waypoint twice, it puts waypointwaypoint in my sql)
Might this cause problems? I can imagine it trying to draw a cleric and warrior tile over and over, but maybe it would just drop them on top of each other and I'd never know. I'd imagine that's how it would draw, so I doubt it.
For the WindowCircleOp thing, would it be something like special_room_border = {
["magetrainer"] = "MAGE_COLOUR_FILL",
["clerictrainer"] = "CLERIC_COLOUR_FILL",
["necromancertrainer"] = "NECRO_COLOUR_FILL",
-- et cetera
}
WindowCircleOp (win, special_room_border[room.bordercolour], left-2-room.borderpenwidth, top-2-room.borderpenwidth,
right+2+room.borderpenwidth, bottom+2+room.borderpenwidth,[room.bordercolour],
room.borderpen, room.borderpenwidth,-1,miniwin.brush_null)
or did I mess up the WindowCircleOp (second argument)? should I put it back to
(win, miniwin.circle_rectangle??
Also, I fixed the border stuff by putting
-- SPECIAL ROOM COLOUR FILLS
special_room = false
if room.info and room.info ~= "" then
if string.match (room.info, "waypoint") then
special_room = true
elseif string.match (room.info, "bank") then
special_room = true
ETC ETC ETC ETC
in my mapper plugin, and
elseif string.match (room.info, "magetrainer") then
special_room = true
WindowDrawImage (win, "magetrainer", left, top, right, bottom, miniwin.image_stretch) -- stretch to fill
WindowCircleOp (win, miniwin.circle_rectangle, left-2-room.borderpenwidth, top-2-room.borderpenwidth,
right+2+room.borderpenwidth, bottom+2+room.borderpenwidth,MAGE_TRAINER_FILL_COLOUR.colour,
room.borderpen, room.borderpenwidth,-1,miniwin.brush_null)
elseif string.match (room.info, "necromancertrainer") then
special_room = true
WindowDrawImage (win, "necromancertrainer", left, top, right, bottom, miniwin.image_stretch) -- stretch to fill
WindowCircleOp (win, miniwin.circle_rectangle, left-2-room.borderpenwidth, top-2-room.borderpenwidth,
right+2+room.borderpenwidth, bottom+2+room.borderpenwidth,NECRO_TRAINER_FILL_COLOUR.colour,
room.borderpen, room.borderpenwidth,-1,miniwin.brush_null)
elseif string.match (room.info, "rangertrainer") then
special_room = true
WindowDrawImage (win, "rangertrainer", left, top, right, bottom, miniwin.image_stretch) -- stretch to fill
WindowCircleOp (win, miniwin.circle_rectangle, left-2-room.borderpenwidth, top-2-room.borderpenwidth,
right+2+room.borderpenwidth, bottom+2+room.borderpenwidth,RANGER_TRAINER_FILL_COLOUR.colour,
room.borderpen, room.borderpenwidth,-1,miniwin.brush_null)
ETC ETC ETC
end
end -- if
if uid == current_room and not special_room then
WindowCircleOp (win, miniwin.circle_rectangle, left-2-room.borderpenwidth, top-2-room.borderpenwidth,
right+2+room.borderpenwidth, bottom+2+room.borderpenwidth,OUR_ROOM_COLOUR.colour,
room.borderpen, room.borderpenwidth,-2,miniwin.brush_null)
end
end
in my mapper.lua
I'll try to convert the system to the new way fiendish showed me today, if I can get the WindowCircleOp part right. Should be much more pretty looking.
The link for my mud is dentinmud.org, port 3000.
You won't be able to see my mapper in its full glory unless you have all of the files relevant to it. You might only need my images folder, or you can spoof one.
If you connect, type "set kxwt on", as you don't have my plugin that automatically does that: this will feed you room and walk info every time you look or walk. |