Actual code

This commit is contained in:
Jenya 2024-10-02 22:35:54 +03:00
parent 3e8f914154
commit 932ec4019a
2 changed files with 13 additions and 1 deletions

View File

@ -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",

View File

@ -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();
}
}
}
}