Jump to content

Excluding mod keybinds from working in map screen?


myxal

Recommended Posts

Is there a way to distinguish if the game is showing the map vs showing the world? One can apparently do this by searching for "HUD" in the screen name in DST, but map screen seems to also be marked as HUD in singleplayer...

Link to comment
Share on other sites

Well, from a quick dump of the table I'm seeing that the active screen with HUD has '.owner' set to the player, and the minimap while named HUD does not.

So perhaps:

local s = TheFrontEnd and TheFrontEnd:GetActiveScreen()
if s and s.name == "HUD" and s.owner ~= nil
then
  -- In game, not minimap
end

A more verbose version would check for the Player when seeing the owner, but I don't think that'd be necessary.  Though edge cases could exist~

Link to comment
Share on other sites

Thanks.

10 hours ago, CarlZalph said:

A more verbose version would check for the Player when seeing the owner, but I don't think that'd be necessary.

*Immediately thinks "shops and ruins in Hamlet"* ... Oh, it's actually set to the the player there as well. Gonna keep the extra check commented out just in case ;) 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...