Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenya <zhenya8915@gmail.com>2024-10-02 22:35:54 +0300
committerJenya <zhenya8915@gmail.com>2024-10-02 22:35:54 +0300
commit932ec4019a592ab0f87cf2c7790bfe66828dfccb (patch)
tree36aa0537b4ec03f1470dc08160551d9e68dd8700
parent3e8f914154b06af319ea7fffa633e0501f0e1f62 (diff)
Actual code
-rw-r--r--assets/opensb/binds/opensb.binds8
-rw-r--r--source/frontend/StarContainerInterface.cpp6
2 files changed, 13 insertions, 1 deletions
diff --git a/assets/opensb/binds/opensb.binds b/assets/opensb/binds/opensb.binds
index c52385a..8a4fdc8 100644
--- a/assets/opensb/binds/opensb.binds
+++ b/assets/opensb/binds/opensb.binds
@@ -3,7 +3,8 @@
"groups": {
"camera": { "name": "Camera" },
"voice": { "name": "Voice" },
- "building": { "name": "Building" }
+ "building": { "name": "Building" },
+ "inventory": { "name": "Inventory" }
},
"name": "Open^#ebd74a;Starbound",
"binds": {
@@ -15,6 +16,11 @@
"group": "camera",
"name": "Zoom In"
},
+ "takeAll": {
+ "default": [],
+ "group": "inventory",
+ "name": "Take All From Container"
+ },
"zoomOut": {
"default": [{
"type": "key",
diff --git a/source/frontend/StarContainerInterface.cpp b/source/frontend/StarContainerInterface.cpp
index 5a06d04..5d7ae89 100644
--- a/source/frontend/StarContainerInterface.cpp
+++ b/source/frontend/StarContainerInterface.cpp
@@ -18,6 +18,7 @@
#include "StarStatusControllerLuaBindings.hpp"
#include "StarWidgetLuaBindings.hpp"
#include "StarAugmentItem.hpp"
+#include <StarInput.hpp>
namespace Star {
@@ -265,6 +266,7 @@ void ContainerPane::update(float dt) {
m_script->update(m_script->updateDt(dt));
m_itemBag->clearItems();
+ Input& input = Input::singleton();
if (!m_containerInteractor->containerOpen()) {
dismiss();
@@ -296,6 +298,10 @@ void ContainerPane::update(float dt) {
fuelGauge->setPotentialFuelAmount(totalFuelAmount);
fuelGauge->setRequestedFuelAmount(0);
}
+
+ if (input.bindDown("opensb", "takeAll")) {
+ m_containerInteractor->clearContainer();
+ }
}
}
}