commit 845c2754d4e897cdc58e4f3f2009648e57f90426
Author: Michal Schorm <mschorm(a)redhat.com>
Date: Sun Mar 28 13:42:39 2021 +0200
Add a bunch of custom patches
.gitignore | 2 +
EmptyEpsilon.spec | 14 ++-
WIP_relay_long_range_v1.patch | 86 +++++++++++++++
WIP_relay_long_range_v2.patch | 47 ++++++++
WIP_relay_visibility_range.patch | 11 ++
WIP_science_scanner_box.patch | 11 ++
WIP_science_scanner_box_alternative.patch | 33 ++++++
relay_add_info_selected_target.patch | 147 ++++++++++++++++++++++++++
relay_show_asteroids.patch | 10 ++
science_radar_setRangeIndicatorStepSize.patch | 11 ++
10 files changed, 371 insertions(+), 1 deletion(-)
---
diff --git a/.gitignore b/.gitignore
index ed9f085..5618356 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,5 @@
/SeriousProton-EE-2020.11.23.zip
/EmptyEpsilon-EE-2021.03.16.zip
/SeriousProton-EE-2021.03.16.zip
+/*src.rpm
+/*/
\ No newline at end of file
diff --git a/EmptyEpsilon.spec b/EmptyEpsilon.spec
index 92b2f6c..3dcb626 100644
--- a/EmptyEpsilon.spec
+++ b/EmptyEpsilon.spec
@@ -20,6 +20,18 @@ URL:
http://emptyepsilon.org/
Source0:
https://github.com/daid/EmptyEpsilon/archive/EE-%{version}.zip#/EmptyEpsi...
Source1:
https://github.com/daid/SeriousProton/archive/EE-%{version}.zip#/SeriousP...
+# Finished tested patched which should be a standard pack of enhacements
+Patch1: science_radar_setRangeIndicatorStepSize.patch
+Patch2: relay_show_asteroids.patch
+
+# WIP tested patches which are ready to use, but the feature is only half-complete
+Patch100: relay_add_info_selected_target.patch
+
+# Unstable patches
+#Patch101: relay_visibility_range.patch
+#Patch101: relay_add_info_shipType.patch
+#Patch102: fix.patch
+
%description
EmptyEpsilon places you in the roles of a spaceship's bridge officers, like
those seen in Star Trek. While you can play EmptyEpsilon alone or with friends,
@@ -33,7 +45,7 @@ information and follow orders.
Note: Network play require port 35666 UDP and TCP allowed in firewall.
%prep
-%autosetup -b 1 -n EmptyEpsilon-EE-%{version}
+%autosetup -b 1 -p1 -n EmptyEpsilon-EE-%{version}
%build
%cmake3 \
diff --git a/WIP_relay_long_range_v1.patch b/WIP_relay_long_range_v1.patch
new file mode 100644
index 0000000..c062fb6
--- /dev/null
+++ b/WIP_relay_long_range_v1.patch
@@ -0,0 +1,86 @@
+1/ On the "Relay" and "Strategic map" screens, reveal "Long
Range Sensors" range instead of just "Short Range Sensors" range
+
+--- EmptyEpsilon-EE-2021.03.16/src/screenComponents/radarView.cpp 2021-03-16
14:36:34.000000000 +0100
++++ EmptyEpsilon-EE-2021.03.16/src/screenComponents/radarView.cpp_patched 2021-03-28
08:21:39.901481817 +0200
+@@ -245,7 +245,8 @@ void GuiRadarView::drawNoneFriendlyBlock
+ if (stb_obj
+ && (obj->isFriendly(my_spaceship) || obj == my_spaceship))
+ {
+- r = stb_obj->getShortRangeRadarRange() * scale;
++ if (obj == my_spaceship) { r = stb_obj->getLongRangeRadarRange() *
scale; }
++ else { r = stb_obj->getShortRangeRadarRange() * scale; }
+ sf::CircleShape circle(r, 50);
+ circle.setOrigin(r, r);
+ circle.setFillColor(sf::Color(255, 255, 255, 255));
+
+
+
+
+2/ If the object is neither Friendly, nor Enemy, reveal area of 10 around them
+
+@@ -253,6 +254,18 @@ void GuiRadarView::drawNoneFriendlyBlock
+ window.draw(circle);
+ }
+
++ if (stb_obj
++ && ( ! obj->isFriendly(my_spaceship) && !
obj->isEnemy(my_spaceship) ))
++ {
++ r = 10;
++ sf::CircleShape circle(r, 50);
++ circle.setOrigin(r, r);
++ circle.setFillColor(sf::Color(255, 255, 255, 255));
++ circle.setPosition(worldToScreen(obj->getPosition()));
++ window.draw(circle);
++ }
++
++
+ P<ScanProbe> sp = obj;
+
+ if (sp && sp->owner_id == my_spaceship->getMultiplayerId())
+--- EmptyEpsilon-EE-2021.03.16/src/screenComponents/radarView.cpp 2021-03-16
14:36:34.000000000 +0100
++++ EmptyEpsilon-EE-2021.03.16/src/screenComponents/radarView.cpp_patched 2021-03-28
09:35:03.007650137 +0200
+@@ -243,6 +243,18 @@ void GuiRadarView::drawNoneFriendlyBlock
+ P<ShipTemplateBasedObject> stb_obj = obj;
+
+ if (stb_obj
++ && (obj == my_spaceship))
++ {
++ r = stb_obj->getLongRangeRadarRange() * scale;
++ sf::CircleShape circle(r, 50);
++ circle.setOrigin(r, r);
++ circle.setFillColor(sf::Color(255, 255, 255, 255));
++ circle.setPosition(worldToScreen(obj->getPosition()));
++ window.draw(circle);
++ drawNebulaBlockedAreas(mask_texture);
++ }
++
++ if (stb_obj
+ && (obj->isFriendly(my_spaceship) || obj == my_spaceship))
+ {
+ r = stb_obj->getShortRangeRadarRange() * scale;
+@@ -253,6 +265,17 @@ void GuiRadarView::drawNoneFriendlyBlock
+ window.draw(circle);
+ }
+
++ if (stb_obj
++ && ( ! obj->isFriendly(my_spaceship) && !
obj->isEnemy(my_spaceship) ))
++ {
++ r = 10;
++ sf::CircleShape circle(r, 50);
++ circle.setOrigin(r, r);
++ circle.setFillColor(sf::Color(255, 255, 255, 255));
++ circle.setPosition(worldToScreen(obj->getPosition()));
++ window.draw(circle);
++ }
++
+ P<ScanProbe> sp = obj;
+
+ if (sp && sp->owner_id == my_spaceship->getMultiplayerId())
+@@ -646,6 +669,7 @@ void GuiRadarView::drawObjects(sf::Rende
+ // Set the radius to reveal as getShortRangeRadarRange() if the
+ // object's a ShipTemplateBasedObject. Otherwise, default to 5U.
+ float r = stb_obj ? stb_obj->getShortRangeRadarRange() : 5000.0f;
++ if ( stb_obj == my_spaceship ) { r = stb_obj->getLongRangeRadarRange() }
+
+ // Query for objects within short-range radar/5U of this object.
+ sf::Vector2f position = obj->getPosition();
diff --git a/WIP_relay_long_range_v2.patch b/WIP_relay_long_range_v2.patch
new file mode 100644
index 0000000..0c74bf7
--- /dev/null
+++ b/WIP_relay_long_range_v2.patch
@@ -0,0 +1,47 @@
+--- EmptyEpsilon-EE-2021.03.16/src/screenComponents/radarView.cpp 2021-03-16
14:36:34.000000000 +0100
++++ EmptyEpsilon-EE-2021.03.16/src/screenComponents/radarView.cpp_patched 2021-03-28
09:35:03.007650137 +0200
+@@ -243,6 +243,18 @@ void GuiRadarView::drawNoneFriendlyBlock
+ P<ShipTemplateBasedObject> stb_obj = obj;
+
+ if (stb_obj
++ && (obj == my_spaceship))
++ {
++ r = stb_obj->getLongRangeRadarRange() * scale;
++ sf::CircleShape circle(r, 50);
++ circle.setOrigin(r, r);
++ circle.setFillColor(sf::Color(255, 255, 255, 255));
++ circle.setPosition(worldToScreen(obj->getPosition()));
++ window.draw(circle);
++ drawNebulaBlockedAreas(mask_texture);
++ }
++
++ if (stb_obj
+ && (obj->isFriendly(my_spaceship) || obj == my_spaceship))
+ {
+ r = stb_obj->getShortRangeRadarRange() * scale;
+@@ -253,6 +265,17 @@ void GuiRadarView::drawNoneFriendlyBlock
+ window.draw(circle);
+ }
+
++ if (stb_obj
++ && ( ! obj->isFriendly(my_spaceship) && !
obj->isEnemy(my_spaceship) ))
++ {
++ r = 10;
++ sf::CircleShape circle(r, 50);
++ circle.setOrigin(r, r);
++ circle.setFillColor(sf::Color(255, 255, 255, 255));
++ circle.setPosition(worldToScreen(obj->getPosition()));
++ window.draw(circle);
++ }
++
+ P<ScanProbe> sp = obj;
+
+ if (sp && sp->owner_id == my_spaceship->getMultiplayerId())
+@@ -646,6 +669,7 @@ void GuiRadarView::drawObjects(sf::Rende
+ // Set the radius to reveal as getShortRangeRadarRange() if the
+ // object's a ShipTemplateBasedObject. Otherwise, default to 5U.
+ float r = stb_obj ? stb_obj->getShortRangeRadarRange() : 5000.0f;
++ if ( stb_obj == my_spaceship ) { r = stb_obj->getLongRangeRadarRange();
}
+
+ // Query for objects within short-range radar/5U of this object.
+ sf::Vector2f position = obj->getPosition();
diff --git a/WIP_relay_visibility_range.patch b/WIP_relay_visibility_range.patch
new file mode 100644
index 0000000..d5501d6
--- /dev/null
+++ b/WIP_relay_visibility_range.patch
@@ -0,0 +1,11 @@
+--- EmptyEpsilon-EE-2021.03.16/src/screens/crew6/relayScreen.cpp 2021-03-16
14:36:34.000000000 +0100
++++ EmptyEpsilon-EE-2021.03.16/src/screens/crew6/relayScreen.cpp_patched 2021-03-28
07:34:04.797412212 +0200
+@@ -25,7 +25,7 @@ RelayScreen::RelayScreen(GuiContainer* o
+ {
+ targets.setAllowWaypointSelection();
+ radar = new GuiRadarView(this, "RELAY_RADAR", 50000.0f, &targets);
+-
radar->longRange()->enableWaypoints()->enableCallsigns()->setStyle(GuiRadarView::Rectangular)->setFogOfWarStyle(GuiRadarView::FriendlysShortRangeFogOfWar);
++
radar->longRange()->enableWaypoints()->enableCallsigns()->setStyle(GuiRadarView::Rectangular)->setFogOfWarStyle(GuiRadarView::NebulaFogOfWar);
+ radar->setAutoCentering(false);
+ radar->setPosition(0, 0, ATopLeft)->setSize(GuiElement::GuiSizeMax,
GuiElement::GuiSizeMax);
+ radar->setCallbacks(
diff --git a/WIP_science_scanner_box.patch b/WIP_science_scanner_box.patch
new file mode 100644
index 0000000..cba7712
--- /dev/null
+++ b/WIP_science_scanner_box.patch
@@ -0,0 +1,11 @@
+--- EmptyEpsilon-EE-2021.03.16/src/screenComponents/scanningDialog.cpp 2021-03-16
14:36:34.000000000 +0100
++++ EmptyEpsilon-EE-2021.03.16/src/screenComponents/scanningDialog.cpp_patched 2021-03-21
05:37:39.083814178 +0100
+@@ -51,7 +51,7 @@ void GuiScanningDialog::onDraw(sf::Rende
+ {
+ if (!box->isVisible())
+ {
+- box->show();
++// box->show();
+ scan_depth = 0;
+ setupParameters();
+ }
diff --git a/WIP_science_scanner_box_alternative.patch
b/WIP_science_scanner_box_alternative.patch
new file mode 100644
index 0000000..fa9804e
--- /dev/null
+++ b/WIP_science_scanner_box_alternative.patch
@@ -0,0 +1,33 @@
+--- EmptyEpsilon-EE-2021.03.16/src/screens/crew4/operationsScreen.cpp 2021-03-16
14:36:34.000000000 +0100
++++ EmptyEpsilon-EE-2021.03.16/src/screens/crew4/operationsScreen.cpp_patched 2021-03-21
17:40:31.898549798 +0100
+@@ -9,7 +9,7 @@
+
+ #include "screenComponents/radarView.h"
+ #include "screenComponents/openCommsButton.h"
+-#include "screenComponents/commsOverlay.h"
++//#include "screenComponents/commsOverlay.h"
+ #include "screenComponents/shipsLogControl.h"
+
+ #include "spaceObjects/playerSpaceship.h"
+@@ -22,8 +22,8 @@ OperationScreen::OperationScreen(GuiCont
+ science->science_radar->setCallbacks(
+ [this](sf::Vector2f position) { // Down
+ // If not our ship, or if we're scanning, ignore clicks.
+- if (!my_spaceship || my_spaceship->scanning_delay > 0.0)
+- return;
++// if (!my_spaceship || my_spaceship->scanning_delay > 0.0)
++// return;
+
+ // If we're in target selection mode, there's a waypoint, and this
+ // is our ship...
+@@ -90,8 +90,8 @@ OperationScreen::OperationScreen(GuiCont
+
+ mode = TargetSelection;
+
+- new ShipsLog(this);
+- (new GuiCommsOverlay(this))->setSize(GuiElement::GuiSizeMax,
GuiElement::GuiSizeMax);
++// new ShipsLog(this);
++// (new GuiCommsOverlay(this))->setSize(GuiElement::GuiSizeMax,
GuiElement::GuiSizeMax);
+ }
+
+ void OperationScreen::onDraw(sf::RenderTarget& window)
diff --git a/relay_add_info_selected_target.patch b/relay_add_info_selected_target.patch
new file mode 100644
index 0000000..23335e5
--- /dev/null
+++ b/relay_add_info_selected_target.patch
@@ -0,0 +1,147 @@
+--- EmptyEpsilon-EE-2021.03.16/src/screens/crew6/relayScreen.h 2021-03-16
14:36:34.000000000 +0100
++++ EmptyEpsilon-EE-2021.03.16/src/screens/crew6/relayScreen.h_patched 2021-03-28
11:28:54.559348446 +0200
+@@ -31,6 +31,15 @@ private:
+
+ GuiKeyValueDisplay* info_callsign;
+ GuiKeyValueDisplay* info_faction;
++ GuiKeyValueDisplay* info_type;
++
++ GuiKeyValueDisplay* info_empty1;
++ GuiKeyValueDisplay* info_empty2;
++
++ GuiKeyValueDisplay* info_distance;
++
++ GuiKeyValueDisplay* info_shields;
++ GuiKeyValueDisplay* info_hull;
+
+ GuiKeyValueDisplay* info_reputation;
+ GuiKeyValueDisplay* info_clock;
+
+
+
+
+
+
+
+
+
+--- EmptyEpsilon-EE-2021.03.16/src/screens/crew6/relayScreen.cpp 2021-03-28
12:42:44.135860437 +0200
++++ EmptyEpsilon-EE-2021.03.16/src/screens/crew6/relayScreen.cpp_patched 2021-03-28
12:43:57.739816082 +0200
+@@ -76,13 +76,38 @@ RelayScreen::RelayScreen(GuiContainer* o
+ radar->setViewPosition(my_spaceship->getPosition());
+
+ GuiAutoLayout* sidebar = new GuiAutoLayout(this, "SIDE_BAR",
GuiAutoLayout::LayoutVerticalTopToBottom);
+- sidebar->setPosition(-20, 150, ATopRight)->setSize(250,
GuiElement::GuiSizeMax);
++ sidebar->setPosition(-10, 10, ATopRight)->setSize(250,
GuiElement::GuiSizeMax);
+
++
++
++
++
++
++ // Simple scan data.
+ info_callsign = new GuiKeyValueDisplay(sidebar, "SCIENCE_CALLSIGN", 0.4,
tr("Callsign"), "");
+ info_callsign->setSize(GuiElement::GuiSizeMax, 30);
+-
+ info_faction = new GuiKeyValueDisplay(sidebar, "SCIENCE_FACTION", 0.4,
tr("Faction"), "");
+ info_faction->setSize(GuiElement::GuiSizeMax, 30);
++ info_type = new GuiKeyValueDisplay(sidebar, "SCIENCE_TYPE", 0.4,
tr("science","Type"), "");
++ info_type->setSize(GuiElement::GuiSizeMax, 30);
++
++ info_empty1 = new GuiKeyValueDisplay(sidebar, "SCIENCE_EMPTY1", 0.4,
"", "");
++ info_empty1->setSize(GuiElement::GuiSizeMax, 30);
++
++ info_distance = new GuiKeyValueDisplay(sidebar, "SCIENCE_DISTANCE", 0.4,
tr("science","Distance"), "");
++ info_distance->setSize(GuiElement::GuiSizeMax, 30);
++
++ info_empty2 = new GuiKeyValueDisplay(sidebar, "SCIENCE_EMPTY2", 0.4,
"", "");
++ info_empty2->setSize(GuiElement::GuiSizeMax, 30);
++
++ info_shields = new GuiKeyValueDisplay(sidebar, "SCIENCE_SHIELDS", 0.4,
tr("science", "Shields"), "");
++ info_shields->setSize(GuiElement::GuiSizeMax, 30);
++ info_hull = new GuiKeyValueDisplay(sidebar, "SCIENCE_HULL", 0.4,
tr("science", "Hull"), "");
++ info_hull->setSize(GuiElement::GuiSizeMax, 30);
++
++
++
++
+
+ zoom_slider = new GuiSlider(this, "ZOOM_SLIDER", 50000.0f, 6250.0f,
50000.0f, [this](float value) {
+ zoom_label->setText(tr("Zoom: {zoom}x").format({{"zoom",
string(50000.0f / value, 1.0f)}}));
+@@ -214,7 +239,7 @@ void RelayScreen::onDraw(sf::RenderTarge
+
+ GuiOverlay::onDraw(window);
+
+- info_faction->setValue("-");
++ info_faction->setValue(" ");
+
+ // If the player has a target and the player isn't destroyed...
+ if (targets.get() && my_spaceship)
+@@ -275,16 +300,44 @@ void RelayScreen::onDraw(sf::RenderTarge
+ P<SpaceStation> station = obj;
+ P<ScanProbe> probe = obj;
+
++ info_callsign->setValue(" ");
++ info_faction->setValue(" ");
++ info_type->setValue(" ");
++ info_empty1->setValue(" ");
++ info_distance->setValue(" ");
++ info_empty2->setValue(" ");
++ info_shields->setValue(" ");
++ info_hull->setValue(" ");
++
+ info_callsign->setValue(obj->getCallSign());
+
++ sf::Vector2f position_diff = obj->getPosition() -
my_spaceship->getPosition();
++ float distance = sf::length(position_diff);
++ info_distance->setValue(string(distance / 1000.0f, 1) + DISTANCE_UNIT_1K);
++
++
+ if (ship)
+ {
+ if (ship->getScannedStateFor(my_spaceship) >= SS_SimpleScan)
+ {
+
info_faction->setValue(factionInfo[obj->getFactionId()]->getLocaleName());
++
++ info_type->setValue(ship->getTypeName());
++ info_shields->setValue(ship->getShieldDataString());
++ info_hull->setValue(int(ceil(ship->getHull())));
++
+ }
+ }else{
+
info_faction->setValue(factionInfo[obj->getFactionId()]->getLocaleName());
++
++ // If the target is a station, show basic tactical info.
++ if (station)
++ {
++ info_type->setValue(station->template_name);
++ info_shields->setValue(station->getShieldDataString());
++ info_hull->setValue(int(ceil(station->getHull())));
++ }
++
+ }
+
+ if (probe && my_spaceship && probe->owner_id ==
my_spaceship->getMultiplayerId() && probe->canBeTargetedBy(my_spaceship))
+@@ -307,7 +360,7 @@ void RelayScreen::onDraw(sf::RenderTarge
+ hack_target_button->disable();
+ link_to_science_button->disable();
+ link_to_science_button->setValue(false);
+- info_callsign->setValue("-");
++ info_callsign->setValue(" ");
+ }
+ if (my_spaceship)
+ {
+@@ -322,7 +375,12 @@ void RelayScreen::onDraw(sf::RenderTarge
+ }
+
+ if (targets.getWaypointIndex() >= 0)
+- delete_waypoint_button->enable();
++ {
++ sf::Vector2f position_diff =
my_spaceship->waypoints[targets.getWaypointIndex()] - my_spaceship->getPosition();
++ float distance = sf::length(position_diff);
++ info_distance->setValue(string(distance / 1000.0f, 1) + DISTANCE_UNIT_1K);
++ delete_waypoint_button->enable();
++ }
+ else
+ delete_waypoint_button->disable();
+ }
diff --git a/relay_show_asteroids.patch b/relay_show_asteroids.patch
new file mode 100644
index 0000000..9609afc
--- /dev/null
+++ b/relay_show_asteroids.patch
@@ -0,0 +1,10 @@
+--- EmptyEpsilon-EE-2021.03.16/src/spaceObjects/asteroid.h 2021-03-16 14:36:34.000000000
+0100
++++ EmptyEpsilon-EE-2021.03.16/src/spaceObjects/asteroid.h_pacthed 2021-03-28
08:38:40.332730717 +0200
+@@ -16,6 +16,7 @@ public:
+ virtual void draw3D() override;
+
+ virtual void drawOnRadar(sf::RenderTarget& window, sf::Vector2f position, float
scale, float rotation, bool long_range) override;
++ virtual bool canHideInNebula() override { return false; }
+
+ virtual void collide(Collisionable* target, float force) override;
+
diff --git a/science_radar_setRangeIndicatorStepSize.patch
b/science_radar_setRangeIndicatorStepSize.patch
new file mode 100644
index 0000000..44653ce
--- /dev/null
+++ b/science_radar_setRangeIndicatorStepSize.patch
@@ -0,0 +1,11 @@
+--- EmptyEpsilon-EE-2021.03.16/src/screens/crew6/scienceScreen.cpp 2021-03-16
14:36:34.000000000 +0100
++++ EmptyEpsilon-EE-2021.03.16/src/screens/crew6/scienceScreen.cpp_patched 2021-03-27
23:33:41.278919582 +0100
+@@ -44,7 +44,7 @@ ScienceScreen::ScienceScreen(GuiContaine
+ // Draw the science radar.
+ science_radar = new GuiRadarView(radar_view, "SCIENCE_RADAR", my_spaceship
? my_spaceship->getLongRangeRadarRange() : 30000.0, &targets);
+ science_radar->setPosition(-270, 0,
ACenterRight)->setSize(GuiElement::GuiSizeMax, GuiElement::GuiSizeMax);
+-
science_radar->setRangeIndicatorStepSize(5000.0)->longRange()->enableWaypoints()->enableCallsigns()->enableHeadingIndicators()->setStyle(GuiRadarView::Circular)->setFogOfWarStyle(GuiRadarView::NebulaFogOfWar);
++
science_radar->setRangeIndicatorStepSize(3000.0)->longRange()->enableWaypoints()->enableCallsigns()->enableHeadingIndicators()->setStyle(GuiRadarView::Circular)->setFogOfWarStyle(GuiRadarView::NebulaFogOfWar);
+ science_radar->setCallbacks(
+ [this](sf::Vector2f position) {
+ if (!my_spaceship || my_spaceship->scanning_delay > 0.0)