Jump to content

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...

Edited by myxal

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~

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 ;) 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...