Skip to content

Commit

Permalink
Remove show lua, it broke text fields
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangmeyers committed Mar 13, 2022
1 parent d9cd3b6 commit 5239c67
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
18 changes: 0 additions & 18 deletions app/public/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1095,17 +1095,6 @@ Blockly.Blocks['datastorage_svc_get'] = {
}
};

// print((function()
// local success, result = pcall(function()
// return experienceStore:GetAsync("User_1234")
// end)
// if not success then
// print(result)
// return nil
// end
// return result
// end)())

// wrapper function for simpler usage
Blockly.Lua['datastorage_svc_get'] = function (block) {
var value_name = Blockly.Lua.valueToCode(block, 'NAME', Blockly.Lua.ORDER_ATOMIC);
Expand Down Expand Up @@ -1148,13 +1137,6 @@ Blockly.Blocks['datastorage_svc_set'] = {
}
};

// local success, errorMessage = pcall(function()
// experienceStore:SetAsync("User_1234", 50)
// end)
// if not success then
// print(errorMessage)
// end

Blockly.Lua['datastorage_svc_set'] = function (block) {
var value_name = Blockly.Lua.valueToCode(block, 'NAME', Blockly.Lua.ORDER_ATOMIC);
var variable_datastore = Blockly.Lua.nameDB_.getName(block.getFieldValue('DATASTORE'), Blockly.Variables.CATEGORY_NAME);
Expand Down
2 changes: 1 addition & 1 deletion app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<button id="new-script-button" onclick="newScript()" style="display: none">New Script</button>

<button onclick="refresh()">Refresh</button>
<button onclick="showCode()">Show Lua</button>
<button onclick="showCode()">Print Lua Code</button>
<a target="_blank" class="btn" href="https://github.com/wolfgangmeyers/roblox-blockly">
<button>Documentation</button>
</a>
Expand Down
2 changes: 1 addition & 1 deletion app/public/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function showCode() {
// Generate Lua code and display it.
Blockly.Lua.INFINITE_LOOP_TRAP = null;
var code = Blockly.Lua.workspaceToCode(demoWorkspace);
alert(code);
console.log(code);
}

async function sendMessage(message) {
Expand Down

0 comments on commit 5239c67

Please sign in to comment.