mirror of
https://github.com/minetest-mods/technic.git
synced 2025-12-26 17:05:23 +01:00
make shape msg better
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user