Open Vort opened 4 years ago
Hi Vort,
Thanks for looking into this. I am not sure if it is something I will be fixing soon but it is on my long list of things to do. At the moment I am working in a new branch making a lot of changes cleaning up and restructuring the code so that that I can get it into a better state to continue working on it.
My priority will be to get the server connection UI in place first so it's easier for people to connect without having to modify the code.
For the player owned colouring I have plans already on how to implement it cleanly. If you look at the RoomEntity.h/cpp in models/room you will see that, for some entities (Walls, Roads & Ramparts), when the entity is created or updated I add a new object called "$_meta_data" to the entity JSON to hold additional data specific to Screep Studio that I need the upper layers.
My plan is to add something like "is_player_owned" or "is_hero_owned" to the "$_meta_data" for all entities that will be set to TRUE if the entity belongs to the current player. This will then be exposed on the RoomEntity base class which I will use during rendering to decide on the colour scheme.
I'd like to avoid having to do a large merge when I pull the "connection-ui" branch to master so I want to get that done before making any more changes in master. so it might be a while before this gets fixed.
My priority will be to get the server connection UI in place first so it's easier for people to connect without having to modify the code.
Temporary solution may be to hold connection data inside configuration file.
Please also think about something like auto-login. So that user will not be forced to enter login & password every time he launches client.
As I can see, rendering code contains some styles for distinguishing between player and enemy structures. But nevertheless client shows all structures as owned by enemy (with red color). This should be fixed.
I don't know how to do this properly. But, anyway, here is my attempt to fix rendering for Extension, Controller, ConstructionSite and Rampart: