Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#2141 closed task (fixed)

[PATCH] Take a look at the uses of Engine.Console_Write

Reported by: Yves Owned by: leper
Priority: Should Have Milestone: Alpha 17
Component: UI & Simulation Keywords: simple, patch
Cc: Yves Patch:

Description

The ingame console (opened with F9 by default) was used much more in the earlier days when the GUI wasn't as functional as today and when the console had access to the whole simulation.

There are still some uses of console.write which I had to replace with the new syntax (Engine.Console_Write) in ticket #2140. Some or all of these should probably be replaced with other error reporting functions because the console isn't used that often anymore and the normal player or developer should be informed about the issues.

Check ReportingErrors for a guideline.

Attachments (2)

uses_of_Engine.Console_Write.patch (9.0 KB ) - added by Adi 10 years ago.
uses_of_Engine.Console_Write.2.patch (10.8 KB ) - added by Adi 10 years ago.

Download all attachments as: .zip

Change History (6)

comment:2 by Adi, 10 years ago

Keywords: review patch added
Milestone: BacklogAlpha 17
Summary: Take a look at the uses of Engine.Console_Write[PATCH] Take a look at the uses of Engine.Console_Write

Here are the places where I found Engine.Console_Write and the resolutions I took:

./binaries/data/mods/public/gui/session/session.js:

  • replaced Engine.Console_Write(...) with error(...)

./binaries/data/mods/public/gui/session/messages.js

  • Engine.Console_Write logs only received chat messages, no resolution...

./binaries/data/mods/public/gui/common/functions_utility_music.js

  • Engine.Console_Write used only in newRandomSound. newRandomSound not used anywhere else, I removed newRandomSound.

./binaries/data/mods/public/gui/common/functions_utility_list.js:

  • replaced Engine.Console_Write(...) with error(...)

comment:3 by Adi, 10 years ago

in the new patch I also removed the translate() for error() and I removed Engine.Console_Write from binaries/data/mods/public/gui/session/messages.js as it's not necessary to log the chat messages.

comment:4 by leper, 10 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 15556:

Replace or remove uses of Engine.Console_Write. Patch by Adrian Fatol. Fixes #2141.
Cleans up list utility functions a bit.
Removes Engine.Console_Write.

comment:5 by leper, 10 years ago

Keywords: review removed

Thanks for the patch.

Note: See TracTickets for help on using tickets.