Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
builtin: Correctly indicate failure in /spawnentity
- Loading branch information
Showing
with
3 additions
and
2 deletions.
-
+3
−2
builtin/game/chat.lua
|
@@ -736,8 +736,9 @@ core.register_chatcommand("spawnentity", { |
|
|
end |
|
|
end |
|
|
p.y = p.y + 1 |
|
|
core.add_entity(p, entityname) |
|
|
return true, ("%q spawned."):format(entityname) |
|
|
local obj = core.add_entity(p, entityname) |
|
|
local msg = obj and "%q spawned." or "%q failed to spawn." |
|
|
return true, msg:format(entityname) |
|
|
end, |
|
|
}) |
|
|
|
|
|