Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them has been replaced with a symlink. Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still be present.
24 lines
732 B
JavaScript
24 lines
732 B
JavaScript
(function() {
|
|
var self = this;
|
|
var on = false;
|
|
var heldAt = 0;
|
|
self.startEquip = function(entityID, args) {
|
|
heldAt = Date.now();
|
|
};
|
|
self.continueEquip = function(entityID, args) {
|
|
if ((Date.now() - heldAt) < 1000) {
|
|
return;
|
|
}
|
|
var triggerValue = Controller.getValue(args[0] === 'left' ? Controller.Standard.LT : Controller.Standard.RT);
|
|
if (triggerValue > 0.2 && !on) {
|
|
print("Start launch");
|
|
on = true;
|
|
Messages.sendMessage("RocketChair", "launch");
|
|
} else if (triggerValue <= 0.2 && on) {
|
|
on = false;
|
|
}
|
|
};
|
|
self.releaseEquip = function(entityID, args) {
|
|
on = false;
|
|
};
|
|
})
|