This class defines a single server report. It holds information such as the report ID, who the report is about, who should see the report, and some formatting information.
Typically, the report will be created by the relevant section in the Server
, and added to the phase report vector. The actual text of the report must also be added to the report-messages.properties file.
Example:
Report r = new Report(3455);
r.subject = entity.getId();
r.indent();
r.addDesc(entity);
r.add(6);
r.choose(true);
vPhaseReport.addElement(r);
Then the following line would be added to report-messages.properties:
3455::<data> (<data>) does <data> damage to the <msg:3456,3457>.
3456::tank
3457::building
When the client parses the report, it will fill in the <data> tags with the values that were given to the add
methods called on the report object.
The example above might produce a report such as this when the getText
method was called:
" Crusader (Bob) does 6 damage to the tank."
@author Ryan McConnell (oscarmm)
@version $Revision: 6320 $
@since 0.30