Update Gui.cpp

develop
Ryan Williams 2022-06-04 15:36:50 -07:00 committed by GitHub
parent 16b5cade00
commit ae4446610b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

@ -1472,6 +1472,9 @@ static bool add_proper_report(df::unit *unit, bool is_sparring, int report_index
DFHACK_EXPORT int Gui::makeAnnouncement(df::announcement_type type, df::announcement_flags flags, df::coord pos, std::string message, int color, bool bright) DFHACK_EXPORT int Gui::makeAnnouncement(df::announcement_type type, df::announcement_flags flags, df::coord pos, std::string message, int color, bool bright)
{ {
using df::global::cur_year;
using df::global::cur_year_tick;
if (gamemode == NULL || cur_year == NULL || cur_year_tick == NULL) if (gamemode == NULL || cur_year == NULL || cur_year_tick == NULL)
{ {
return -1; return -1;
@ -1523,8 +1526,8 @@ DFHACK_EXPORT int Gui::makeAnnouncement(df::announcement_type type, df::announce
new_rep->color = color; new_rep->color = color;
new_rep->bright = bright; new_rep->bright = bright;
new_rep->year = *df::global::cur_year; new_rep->year = *cur_year;
new_rep->time = *df::global::cur_year_tick; new_rep->time = *cur_year_tick;
new_rep->flags.bits.continuation = continued; new_rep->flags.bits.continuation = continued;
continued = true; continued = true;