amir-arad / EmptyEpsilon

Open source bridge simulator. Build with the SeriousProton engine.
http://emptyepsilon.org/
GNU General Public License v2.0
2 stars 0 forks source link

Intern (engineering) log feature from tdelc #8

Closed amir-arad closed 6 years ago

amir-arad commented 6 years ago

I propose to add a intern log only seen by the engeneer, to display all intern modifications of the ship. I use it to inform the ship about a virus attack, or some ship failures.

  • I change the function addToShipLog to addToShipLog(string message, sf::Color color, string station). If the value of the station is "extern", the extern log (for the relay) is filled. If "intern", the intern log (for the engeneer) is filled.
  • By default, the value of the station is "extern". So this PR don't affect the current code

Some automatic informations fill the log with this color code :

Green : shields enabled or disabled Change of the shields frequency

Yellow : Missile fire Change of the beam system target Change of the beam frequence target activated

yellow alert

White : warp speed jump initialisation

Red : damage received red alert auto destruction situation

Cyan : docking situation

This PR don't use the new color system, because I don't understand it now :)

PS : I have this warning during compilation :

/home/thomas/EE/EmptyEpsilon/src/spaceObjects/playerSpaceship.cpp:` In member function ‘const std::vector<PlayerSpaceship::ShipLogEntry>& PlayerSpaceship::getShipsLog(string) const’:
/home/thomas/EE/EmptyEpsilon/src/spaceObjects/playerSpaceship.cpp:667:1: warning: control reaches end of non-void function [-Wreturn-type]
 }