Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 1 file). Show all
Unified · Split
| @@ -589,6 +589,10 @@ void ScriptManager::scriptErrorMessage(const QString& message, const QString& fi · 588 unmodified lines | |||
| 589 | emit errorMessage(message, getFilename()); | 589 | emit errorMessage(message, getFilename()); |
| 590 | if (!currentEntityIdentifier.isInvalidID()) { | 590 | if (!currentEntityIdentifier.isInvalidID()) { |
| 591 | emit errorEntityMessage(message, fileName, lineNumber, currentEntityIdentifier, isEntityServerScript()); | 591 | emit errorEntityMessage(message, fileName, lineNumber, currentEntityIdentifier, isEntityServerScript()); |
| 592 | } else { | ||
| 593 | if (isEntityServerScript()) { | ||
| 594 | emit errorEntityMessage(message, fileName, lineNumber, EntityItemID(), isEntityServerScript()); | ||
| 595 | } | ||
| 592 | } | 596 | } |
| 593 | } | 597 | } |
| 594 | 598 | ||
| @@ -597,6 +601,10 @@ void ScriptManager::scriptWarningMessage(const QString& message, const QString& · 2 unmodified lines | |||
| 597 | emit warningMessage(message, getFilename()); | 601 | emit warningMessage(message, getFilename()); |
| 598 | if (!currentEntityIdentifier.isInvalidID()) { | 602 | if (!currentEntityIdentifier.isInvalidID()) { |
| 599 | emit warningEntityMessage(message, fileName, lineNumber, currentEntityIdentifier, isEntityServerScript()); | 603 | emit warningEntityMessage(message, fileName, lineNumber, currentEntityIdentifier, isEntityServerScript()); |
| 604 | } else { | ||
| 605 | if (isEntityServerScript()) { | ||
| 606 | emit warningEntityMessage(message, fileName, lineNumber, EntityItemID(), isEntityServerScript()); | ||
| 607 | } | ||
| 600 | } | 608 | } |
| 601 | } | 609 | } |
| 602 | 610 | ||
| @@ -605,6 +613,10 @@ void ScriptManager::scriptInfoMessage(const QString& message, const QString& fil · 2 unmodified lines | |||
| 605 | emit infoMessage(message, getFilename()); | 613 | emit infoMessage(message, getFilename()); |
| 606 | if (!currentEntityIdentifier.isInvalidID()) { | 614 | if (!currentEntityIdentifier.isInvalidID()) { |
| 607 | emit infoEntityMessage(message, fileName, lineNumber, currentEntityIdentifier, isEntityServerScript()); | 615 | emit infoEntityMessage(message, fileName, lineNumber, currentEntityIdentifier, isEntityServerScript()); |
| 616 | } else { | ||
| 617 | if (isEntityServerScript()) { | ||
| 618 | emit infoEntityMessage(message, fileName, lineNumber, EntityItemID(), isEntityServerScript()); | ||
| 619 | } | ||
| 608 | } | 620 | } |
| 609 | } | 621 | } |
| 610 | 622 | ||
| @@ -613,6 +625,12 @@ void ScriptManager::scriptPrintedMessage(const QString& message, const QString& · 2 unmodified lines | |||
| 613 | emit printedMessage(message, getFilename()); | 625 | emit printedMessage(message, getFilename()); |
| 614 | if (!currentEntityIdentifier.isInvalidID()) { | 626 | if (!currentEntityIdentifier.isInvalidID()) { |
| 615 | emit printedEntityMessage(message, fileName, lineNumber, currentEntityIdentifier, isEntityServerScript()); | 627 | emit printedEntityMessage(message, fileName, lineNumber, currentEntityIdentifier, isEntityServerScript()); |
| 628 | } else { | ||
| 629 | if (isEntityServerScript()) { | ||
| 630 | // TODO: Some callbacks like for example websockets one right now | ||
| 631 | // don't set currentEntityIdentifier and there doesn't seem to be easy way to add it currently | ||
| 632 | emit printedEntityMessage(message, fileName, lineNumber, EntityItemID(), isEntityServerScript()); | ||
| 633 | } | ||
| 616 | } | 634 | } |
| 617 | } | 635 | } |
| 618 | 636 | ||