Permalink
Browse files

Auto close compact, We_AllInOne improvement

You now only need one tool to do everything!

- TODO: Still need to close the other interfaces when warping.
- WE_AllInOne is now also able to open the compact interface, removing the need for WE_CompactInterface.
- Recipe for WE_AllInOne added.
  • Loading branch information...
Silverfeelin committed Jan 20, 2018
1 parent 947a1f7 commit dab475e1e8c8638ff0b5271a75a56957e2822999
@@ -210,7 +210,7 @@
"scripts" : [
"/interface/wedit/compact/compact.lua"
],
"scriptDelta" : 1,
"scriptDelta" : 60,
"scriptWidgetCallbacks" : [
"actionSelected",
"toggleInfo"
@@ -16,6 +16,14 @@ function init()
status.setStatusProperty("wedit.compact.open", true)
end
function update(dt)
sb.logInfo("COMPACT UPDATE")
if status.statusProperty("wedit.compact.close", false) then
status.setStatusProperty("wedit.compact.close", nil)
pane.dismiss()
end
end
function uninit()
if not forceClosed then
status.setStatusProperty("wedit.compact.open", nil)

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,18 @@
{
"input" : [],
"output" : {
"item": "triangliumore",
"count": 1,
"parameters": {
"itemTags": [],
"radioMessagesOnPickup": [],
"learnBlueprintsOnPickup": [],
"twoHanded": true,
"shortdescription": "WE_AllInOne",
"category": "^orange;WEdit: All In One Tool",
"description": "^yellow;Active tool is determined by what you select in the compact WEdit interface.^reset;",
"inventoryIcon": "/assetMissing.png?replace;00000000=ffffff;ffffff00=ffffff?setcolor=ffffff?scalenearest=1?crop=0;0;16;16?blendmult=/objects/outpost/customsign/signplaceholder.png;0;0?replace;01000101=00000000;01000201=00000000;01000301=00000000;01000401=00000000;01000501=00000000;01000601=00000000;01000701=00000000;01000801=00000000;02000101=0a2a2a67;02000201=0e30307f;02000301=173a3a6e;02000401=22454559;02000501=28515139;02000601=2c595917;02000701=00000000;02000801=00000000;03000101=0627278a;03000201=d1e1e1f9;03000301=c6d8d8ec;03000401=b2c5c5d8;03000501=9fb1b1c0;03000601=5a77778b;03000701=355a5a5b;03000801=3c5e5e26;04000101=04242446;04000201=19373791;04000301=3752529e;04000401=607777b8;04000501=b0bbbbd5;04000601=dfeaeaff;04000701=c2d2d2d6;04000801=6f8d8d91;05000101=00000001;05000201=001c1c09;05000301=0027271a;05000401=05252537;05000501=0624247f;05000601=a7b6b6f4;05000701=c1cfcfff;05000801=e1ececfb;06000101=00000000;06000201=00000000;06000301=00000000;06000401=00000000;06000501=05262665;06000601=b2c1c1e2;06000701=b6c7c7ff;06000801=b3c3c3ff;07000101=00000000;07000201=00000000;07000301=00000000;07000401=00000000;07000501=08272741;07000601=7e9191c2;07000701=c7d7d7ff;07000801=c5d6d6ff;08000101=00000000;08000201=00000000;08000301=00000000;08000401=00000000;08000501=0c232316;08000601=3b575796;08000701=cfdcdcfb;08000801=e3ebebff;09000101=00000000;09000201=00000000;09000301=00000000;09000401=00000000;09000501=00000000;09000601=0b2b2b59;09000701=a2b3b3d0;09000801=e7eeeeff;10000101=00000000;10000201=00000000;10000301=00000000;10000401=00000000;10000501=00000000;10000601=0d333314;10000701=304e4e86;10000801=e1e8e8f2;11000101=00000000;11000201=00000000;11000301=00000000;11000401=00000000;11000501=00000000;11000601=00000000;11000701=14373733;11000801=657d7d9d;12000101=00000000;12000201=00000000;12000301=00000000;12000401=00000000;12000501=00000000;12000601=00000000;12000701=00000000;12000801=1d3f3f3d;13000101=00000000;13000201=00000000;13000301=00000000;13000401=00000000;13000501=00000000;13000601=00000000;13000701=00000000;13000801=00000000;14000101=00000000;14000201=00000000;14000301=00000000;14000401=00000000;14000501=00000000;14000601=00000000;14000701=00000000;14000801=00000000;15000101=00000000;15000201=00000000;15000301=00000000;15000401=00000000;15000501=00000000;15000601=00000000;15000701=00000000;15000801=00000000;16000101=00000000;16000201=00000000;16000301=00000000;16000401=00000000;16000501=00000000;16000601=00000000;16000701=00000000;16000801=00000000?blendmult=/objects/outpost/customsign/signplaceholder.png;0;-8?replace;01000101=00000000;01000201=00000000;01000301=00000000;01000401=00000000;01000501=00000000;01000601=00000000;01000701=00000000;01000801=00000000;02000101=00000000;02000201=00000000;02000301=00000000;02000401=00000000;02000501=00000000;02000601=00000000;02000701=00000000;02000801=00000000;03000101=55555503;03000201=00000000;03000301=00000000;03000401=00000000;03000501=00000000;03000601=00000000;03000701=00000000;03000801=00000000;04000101=3f666655;04000201=40666614;04000301=00000000;04000401=00000000;04000501=00000000;04000601=00000000;04000701=00000000;04000801=00000000;05000101=b7c8c8c3;05000201=577b7b72;05000301=466c6c28;05000401=00000000;05000501=00000000;05000601=00000000;05000701=00000000;05000801=00000000;06000101=d9e4e4ff;06000201=dce5e5e3;06000301=6588887c;06000401=4c72722f;06000501=00000000;06000601=00000000;06000701=00000000;06000801=00000000;07000101=bccdcdff;07000201=d7e3e3ff;07000301=e7efefed;07000401=688b8b7b;07000501=4d797928;07000601=00000000;07000701=00000000;07000801=00000000;08000101=cddedeff;08000201=c8d9d9ff;08000301=dfeaeaff;08000401=e3ebebe2;08000501=6288886d;08000601=55717112;08000701=00000000;08000801=00000000;09000101=becfcfff;09000201=d5e6e6ff;09000301=d1e2e2ff;09000401=ecf5f5ff;09000501=c6d5d5c0;09000601=5177774f;09000701=80808002;09000801=00000000;10000101=aebfbfff;10000201=e9f2f2ff;10000301=daececff;10000401=dbebebff;10000501=f6fafafb;10000601=84a2a289;10000701=53808022;10000801=00000000;11000101=a8babaf5;11000201=eaf3f3ff;11000301=ccddddff;11000401=deefefff;11000501=edf7f7ff;11000601=dce6e6d2;11000701=537c7c50;11000801=00000000;12000101=466161a1;12000201=e6ededf1;12000301=bdceceff;12000401=f0f8f8ff;12000501=d9e9e9ff;12000601=f9fcfcfb;12000701=7c9b9b7d;12000801=59808014;13000101=05222235;13000201=4e6d6d7c;13000301=99afafca;13000401=f2f8f8fa;13000501=cbdcdcff;13000601=f7fdfdff;13000701=acbfbfa8;13000801=55808030;14000101=00000000;14000201=2b474712;14000301=0322225b;14000401=728f8f82;14000501=93b0b0b4;14000601=e5f0f0e3;14000701=dde5e5d1;14000801=547e7e49;15000101=00000000;15000201=00000000;15000301=00000000;15000401=47717112;15000501=04232341;15000601=517c7c4c;15000701=547e7e5b;15000801=547e7e55;16000101=00000000;16000201=00000000;16000301=00000000;16000401=00000000;16000501=00000000;16000601=00000000;16000701=00000000;16000801=00000000?replace;ffffffff=00000000"
}
},
"groups" : [ "plain", "all", "tools" ]
}
@@ -13,21 +13,13 @@ local controller = wedit.controller
function wedit.actions.WE_AllInOne()
if not status.statusProperty("wedit.compact.open") then
controller.info("^shadow;^orange;WEdit: All in One")
controller.info("^shadow;^yellow;Please open the compact interface first!", {0,-1})
controller.info("^shadow;^yellow;Switch to ^red;WE_CompactInterface^yellow;.", {0,-2})
end
end
function wedit.actions.WE_CompactInterface()
controller.info("^shadow;^orange;WEdit: Compact Interface")
controller.info("^shadow;^yellow;Primary Fire: Open Interface.", {0,-1})
controller.info("^shadow;^yellow;Requires the ^red;Remote Interfaces^yellow; mod!", {0,-2})
controller.info("^shadow;^yellow;Hold the ^red;WE_AllInOne^yellow; tool with the interface open.", {0,-3})
controller.info("^shadow;^yellow;Primary Fire: Open Compact Interface.", {0,-1})
local c = controller
if not c.fireLocked and (c.primaryFire or c.altFire) then
world.sendEntityMessage(entity.id(), "interact", "ScriptPane", "/interface/wedit/compact/compact.config")
c.fireLock()
local c = controller
if not c.fireLocked and (c.primaryFire or c.altFire) then
c.fireLock()
world.sendEntityMessage(entity.id(), "interact", "ScriptPane", "/interface/wedit/compact/compact.config")
end
end
end
@@ -53,7 +45,7 @@ function wedit.actions.WE_Select()
-- Select stage 0: Not selecting.
controller.info("^shadow;^yellow;Primary Fire: Select area.", {0,-1})
if controller.primaryFire then
if controller.primaryFire and not controller.fireLocked then
-- Start selection; set first point.
controller.selectStage = 1
controller.rawSelection[1] = tech.aimPosition()
@@ -270,6 +270,11 @@ end
--- Uninit function, called in the main uninit callback.
function controller.uninit()
tech.setParentState()
-- Mark interfaces for closing.
if status.statusProperty("wedit.compact.open", false) then
status.setStatusProperty("wedit.compact.close", true)
end
end
-- Alter update callback.
Oops, something went wrong.

0 comments on commit dab475e

Please sign in to comment.