Hiding specific Flags



  • I know we can use the checkbox in the interface to hide all flags. But what If I just want to hide some of the flags?

    It would be very useful to me if you were to add a boolean property 'hidden' to flags and an associated method to programatically hide/unhide flags. It's a cosmetic thing, but I really do find flags quite distracting, most of the time. 



  • I don't know how other people handle their code, but for me flags are useless and undesirable except for rallying soldier creeps.

    Anything else, ranging from claiming/reserving, to harvesting resources, can be easily accomplished with a

    let remoteLocation = new RoomPosition(25, 25, "TargetMapID");
    if (creep.room.name != remoteLocation.roomName)
    {
    creep.moveTo(remoteLocation);
    }
    else
    {
    // Do stuff like reserving, harvesting, etc.
    }

    And the desired map ID can be set in an array in the main loop which you then add as a parameter to your creep's role.run() function.

    This way, there's no ugly flags on sight and it's easier to clean if you respawn (rather than having to delete flags one by one or adding a for loop to remove them).



  • That's not a bad suggestion, but you could easily fake it you know with some code of your own.

    You could use a custom flag finder that EITHER returns a visible flag OR returns a position object tied to a deleted flag's memory. Flag.hide could delete the flag but not the memory, and store the position and color into that memory location. Flag.show would create a flag with the old name, pointing at the old memory.

    Some tedium to set up, but should be CPU efficient and emulate the exact result you want.



  • the point here for me is to be able to hide some of the flags in the UI. Being able to modify this trait in code is really just a bonus which I don't necessarily need. I do have a few flags I use as visual reference, but for the most part I would prefer to keep my flags hidden.


  • Dev Team

    We have a color-based flag filter feature in our TODO list, this should work I think.



  • A color based flag filter would make me happy. That works.