mirror of
https://github.com/minetest-mods/technic.git
synced 2025-03-20 11:20:31 +01:00
make shape msg better
This commit is contained in:
parent
bc5fb6ba1c
commit
ea2b23a5b1
@ -194,8 +194,18 @@ local digiline_def = {
|
|||||||
update_forcefield(pos, meta, false)
|
update_forcefield(pos, meta, false)
|
||||||
meta:set_int("range", range)
|
meta:set_int("range", range)
|
||||||
elseif msg:sub(1, 5) == "shape" then
|
elseif msg:sub(1, 5) == "shape" then
|
||||||
|
local shape = msg:sub(7):lower()
|
||||||
|
if shape == "sphere" then
|
||||||
|
shape = 0
|
||||||
|
elseif shape == "cube" then
|
||||||
|
shape = 1
|
||||||
|
end
|
||||||
|
shape = tonumber(shape)
|
||||||
|
if not shape then
|
||||||
|
return
|
||||||
|
end
|
||||||
update_forcefield(pos, meta, false)
|
update_forcefield(pos, meta, false)
|
||||||
meta:set_int("shape", tonumber(msg:sub(7)))
|
meta:set_int("shape", shape)
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user