Skip to content

Commit 893e5be

Browse files
committed
add some override
1 parent 158da94 commit 893e5be

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

crates/luals/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ tokio.workspace = true
1616
luals-basic = { path = "../basic" , optional = true }
1717

1818
[features]
19-
default = ["luals-basic"]
19+
default = ["luals-basic", "no_format"]
2020
no_format = ["luals-basic/no_format"]

publish/UnixPublish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
cargo build --release -p luals
3+
cargo build --release -p luals --features "no_format"
44

55
if [ -d "dist" ]; then
66
rm -rf dist

publish/WinPublish.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cargo build --release -p luals
1+
cargo build --release -p luals --features "no_format"
22

33
$distPath = "dist"
44

resources/override_script/pub/pub.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ DEVELOP = %s
1818
DBGPORT = %d
1919
DBGWAIT = %s
2020
21+
require "luajitCompact"
2122
log = require 'brave.log'
2223
2324
xpcall(dofile, log.error, %q)
2425
local brave = require 'brave'
25-
brave.register(%d, %q)
26+
brave.register(%d, %s)
2627
]]
2728

2829
---@class pub
@@ -43,6 +44,12 @@ end
4344
---@param num integer
4445
---@param privatePad string?
4546
function m.recruitBraves(num, privatePad)
47+
if type(privatePad) == "string" then
48+
privatePad = string.format("[[%s]]", privatePad)
49+
else
50+
privatePad = "nil"
51+
end
52+
4653
for _ = 1, num do
4754
local id = #m.braves + 1
4855
log.debug('Create brave:', id)
@@ -63,6 +70,7 @@ function m.recruitBraves(num, privatePad)
6370
memory = 0,
6471
}
6572
end
73+
6674
if privatePad and not m.prvtPad[privatePad] then
6775
thread.newchannel('req:' .. privatePad)
6876
thread.newchannel('res:' .. privatePad)

resources/script/brave/work.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
local brave = require 'brave.brave'
2+
local inspect = require("inspect")
23

34
brave.on('loadProtoByStdio', function ()
45
local jsonrpc = require 'jsonrpc'

0 commit comments

Comments
 (0)