#include <stdlib.h>
#include <SDL3/SDL.h>
#include "fcintl.h"
#include "log.h"
#include "game.h"
#include "movement.h"
#include "unit.h"
#include "client_main.h"
#include "climisc.h"
#include "global_worklist.h"
#include "citydlg.h"
#include "colors.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_tilespec.h"
#include "helpdlg.h"
#include "mapview.h"
#include "sprite.h"
#include "themespec.h"
#include "widget.h"
#include "wldlg.h"
Go to the source code of this file.
◆ TARGETS_COL
◆ TARGETS_ROW
◆ add_global_worklist()
Add global worklist to city worklist starting from last free entry. Add only avilable targets in current game state. If global worklist have more targets that city worklist have free entries then we adding only first part of global worklist.
Definition at line 666 of file wldlg.c.
◆ add_target_to_production()
Change production of city but only in Editor. You must commit this changes by exit editor via OK button (commit function).
This function don't remove double imprv./wonder target entry from worklist and allow more entry of such target (In Production and worklist - this is fixed by commit function).
Definition at line 346 of file wldlg.c.
◆ add_target_to_worklist()
Add target to worklist.
Definition at line 202 of file wldlg.c.
◆ are_prods_same_class()
Find if two targets are the same class (unit, imprv. , wonder). This is needed by calculation of change production shields penalty. [similar to are_universals_equal()]
Definition at line 299 of file wldlg.c.
◆ change_production()
Change production in editor shell, calculate production shields penalty and refresh production progress label
Definition at line 321 of file wldlg.c.
◆ get_production_name()
Return full unit/imprv. name and build cost in "cost" pointer.
Definition at line 876 of file wldlg.c.
◆ get_progress_icon()
Return progress icon (bar) of current production state stock - current shields stocks cost - unit/imprv. cost function return in "progress" pointer (0 - 100 %) progress in numbers
Definition at line 896 of file wldlg.c.
◆ get_target_help_data()
Get Help Info about target
Definition at line 384 of file wldlg.c.
◆ global_worklist_callback()
Global worklist callback left mouse button -> add global worklist to current city list right mouse button -> clear city worklist and copy here global worklist.
There are problems with imprv./wonder targets because those can't be doubled on worklist and adding/setting can give you situation that global worklist have imprv./wonder entry that exist on city worklist or in building state. I don't make such check here and allow this "functionality" because doubled imprv./wonder entry are removed from city worklist during "commit" phase.
Definition at line 847 of file wldlg.c.
◆ ok_worklist_editor_callback()
Commit changes to city/global worklist. In City Mode Remove Double entry of Imprv/Woder Targets from list.
Definition at line 120 of file wldlg.c.
◆ popdown_worklist_editor()
Close worklist from view.
Definition at line 1849 of file wldlg.c.
◆ popdown_worklist_editor_callback()
Popdwon Worklist Editor
Definition at line 107 of file wldlg.c.
◆ popup_worklist_editor()
Global/City worklist editor. if pcity == NULL then function takes worklist as global worklist. worklist must be not NULL.
Definition at line 1051 of file wldlg.c.
◆ refresh_production_label()
Update and redraw production name label in worklist editor. stock - pcity->shields_stock or current stock after change production lost.
Definition at line 933 of file wldlg.c.
◆ refresh_worklist_count_label()
Update and redraw worklist length counter in worklist editor
Definition at line 1008 of file wldlg.c.
◆ remove_item_from_worklist()
Remove element from worklist or remove currently building imprv/unit and change production to first worklist element (or Capitalizations if worklist is empty)
Definition at line 450 of file wldlg.c.
◆ rename_worklist_editor_callback()
Rename Global Worklist
Definition at line 179 of file wldlg.c.
◆ set_global_worklist()
Clear city worklist and copy here global worklist. Copy only available targets in current game state. If all targets are unavilable then leave city worklist untouched.
Definition at line 745 of file wldlg.c.
◆ swap_item_down_from_worklist()
Swap worklist entries DOWN. Fuction swap current element with next element of worklist.
If item is last widget or there is only one widget on widgets list fuction remove this widget from widget list and target from worklist
In City mode, when item is first worklist element, function make change production (currently building is moved to first element of worklist and first element of worklist is build).
Definition at line 526 of file wldlg.c.
◆ swap_item_up_from_worklist()
Swap worklist entries UP. Fuction swap current element with prev. element of worklist.
If item is first widget on widgets list fuction remove this widget from widget list and target from worklist (global mode) or from production (city mode)
In City mode, when item is first worklist element, function make change production (currently building is moved to first element of worklist and first element of worklist is build).
Definition at line 583 of file wldlg.c.
◆ window_worklist_editor_callback()
Worklist Editor Window Callback
Definition at line 99 of file wldlg.c.
◆ worklist_editor_item_callback()
worklist callback left mouse button -> swap entries up. middle mouse button -> remove element from list right mouse button -> swap entries down.
Definition at line 635 of file wldlg.c.
◆ worklist_editor_targets_callback()
Targets callback left mouse button -> In city mode change production to target. In global mode add target to worklist. middle mouse button -> get target "help" right mouse button -> add target to worklist.
Definition at line 411 of file wldlg.c.
◆ editor