Myk Taylor
215a5b0a24
add Gui::getMousePos() that always gets map coords
2022-09-18 08:19:02 -07:00
lethosor
f021dd0e0a
Gui::getAnyItem(): add support for viewscreen_treasurelistst
2022-07-12 11:25:16 -04:00
Ryan Williams
a7267e3c4e
Optimize report deletion
2022-06-07 04:21:48 -07:00
Ryan Williams
5d08e5ae67
More constants; remove extra "using" statements
2022-06-06 01:56:11 -07:00
Ryan Williams
ce36abce47
Fixes
2022-06-04 15:46:02 -07:00
Ryan Williams
ae4446610b
Update Gui.cpp
2022-06-04 15:36:50 -07:00
Ryan Williams
16b5cade00
Add constants, update old fns
...
Add MAX_REPORTS_SIZE, RECENT_REPORT_TICKS
Remove redundant "using df::global::world" inside fns
Update `makeAnnouncement`:
Use `word_wrap`, `pauseRecenter`, and utility fn `delete_old_reports`
Handle repeat announcements
Insert sorted into ``world->status.announcements``
Update `addCombatReportAuto`: Use utility fn `recent_report`
Update `showPopupAnnouncement`: Delete old popups at end of fn
Update `getDwarfmodeViewDims_default`: Check for ui_sidebar_mode::Default and ArenaWeather
2022-06-04 15:23:57 -07:00
Ryan Williams
b0b601cf0f
Remove recenterViewscreen, update revealInDwarfmodeMap
2022-06-04 11:59:04 -07:00
Ryan Williams
574728ac5c
Move add_proper_report up with other utility fns
2022-05-30 15:04:43 -07:00
Ryan Williams
0ff0d272b5
use static instead of anon namespace; suggested changes
2022-05-30 13:51:24 -07:00
Ryan Williams
1c3ea000e1
Trim trailing whitespace
2022-05-28 15:56:49 -07:00
Ryan Williams
249ed2888f
Fix scope issue
2022-05-28 13:28:10 -07:00
Ryan Williams
e613085b0e
remove whitespace
2022-05-28 12:39:49 -07:00
Ryan Williams
2b29431806
More fixes
...
* Use word_wrap()
* add_proper_report utility fn; have addCombatReportAuto use this
* Update Lua API.rst
* Update Gui.cpp
2022-05-28 12:35:49 -07:00
Ryan Williams
4b21e7afb4
Remove parseReportString from API (now utility fn)
...
Implementations using `word_wrap()` are commented out pending changes to that function.
2022-05-24 03:52:33 -07:00
Ryan Williams
ce34ac8f33
Use debugfilter; remove redundant changelog entries
2022-05-16 18:41:47 -07:00
Ryan Williams
74499ad64a
Use to_string on integer
2022-05-03 00:09:34 -07:00
Ryan Williams
f565de88e8
Fix stuff ( #4 )
...
* Update Lua API.rst
* Update Gui.h
* Update Gui.cpp
* Update LuaApi.cpp
2022-05-01 22:53:53 -07:00
Ryan Williams
b56d9520e9
Fix trailing whitespace
2022-04-25 00:39:05 -07:00
Ryan Williams
c7be54dac0
Update Gui.cpp
...
Add reverse engineered functions: parseReportString, autoDFAnnouncement, recenterViewscreen, and pauseRecenter.
Add versions of autoDFAnnouncement that don't take a report_init struct and that log unprinted announcements.
Add utility functions: recent_report, recent_report_any, delete_old_reports, and check_repeat_report.
2022-04-24 22:45:26 -07:00
lethosor
e7754ea890
Enable -Wunused-variable and fix most errors
2021-09-07 01:16:21 -04:00
lethosor
96dd249be0
getAnyPlant: use Maps::getPlantAtTile
...
Followup to #1882
2021-06-25 01:08:58 -04:00
myk002
aff5c9bf35
add getCursorCoords overload for df::coord
...
and factor out active cursor detection
2021-05-15 12:05:00 -07:00
Ben Lubar
635e709d95
name ui_look_list union
...
update scripts and structures
2020-03-06 16:06:27 -06:00
Ben Lubar
0243e422e5
Allow plugins to define subclasses of dfhack_viewscreen that have their own virtual_identity.
2020-02-07 16:00:14 -06:00
Dan Amlund
759df34fce
fix potential segfault
2018-05-11 17:51:32 +02:00
lethosor
ceaa518be9
Fix a potential segfault in getAnyUnit
...
See #1218
2018-05-11 10:04:10 -04:00
lethosor
10abece564
Fix duplicate condition in Gui::getAnyUnit()
2018-05-11 09:58:40 -04:00
lethosor
2a52582c1f
Add Gui::inRenameBuilding
2018-05-09 10:23:05 -04:00
Ben Lubar
565c1e1260
Fix uninitialized pointer being returned from Gui::getAnyUnit when on the pet list with no selection.
2018-04-05 16:49:30 -05:00
Dan Amlund
38491b4be8
add checks to avoid potential segfaults. use more dfhack idiomatic code
2018-01-31 20:10:40 +01:00
Dan Amlund
537e94d75a
fix segfault when splatter did not have historical figure
2018-01-31 20:10:34 +01:00
Dan Amlund
2deeda11d2
add many new cases for Gui::getSelectedUnit: report list, combat log list, military screen, unit health, unit custumize, assigning to cage, viewing cage, pitting, penning, burrows, look at corpse, look at corpse piece, look at named spatter
2018-01-28 13:04:52 +01:00
lethosor
fde1e284f4
Gui::getAnyItem: support viewscreen_assign_display_itemst
2017-12-28 16:19:45 -05:00
Quietust
88c7e493b8
Merge ui_area_map_width into ui_menu_width, now a 2-byte array
2017-12-03 20:34:59 -06:00
Quietust
c72ae8d8a7
Merge "announcements" global into d_init where it belongs
2017-12-03 20:05:08 -06:00
lethosor
16fb230ef6
getAnyItem: support viewscreen_textviewerst
2017-08-05 21:38:18 -04:00
lethosor
cda5cedacf
Fix Gui::refreshSidebar() on topmost z-level
2017-06-23 10:30:16 -04:00
lethosor
ae809afde7
Add Gui::refreshSidebar()
...
This handles feeding CURSOR_DOWN_Z and CURSOR_UP_Z properly, avoiding issues
when on the lowest z-level.
2017-06-23 00:02:21 -04:00
lethosor
0ed7e60522
getAnyUnit: support viewscreen_layer_unit_relationshipst
2017-06-10 19:06:43 -04:00
lethosor
047a66030b
getAnyUnit: add support for viewscreen_unitst, viewscreen_textviewerst
2017-06-07 20:51:40 -04:00
lethosor
9df35dd844
revealInDwarfmodeMap: use map y dimensions
2017-06-02 00:40:59 -04:00
lethosor
05f322ca30
Merge remote-tracking branch 'lethosor/lua-dmdims' into develop
2017-06-01 23:34:35 -04:00
lethosor
f59be2a9a0
Expand focus strings for jobmanagement and workquota_condition viewscreens
2017-05-27 00:57:16 -04:00
lethosor
d3c496cc2b
Add getSelectedPlant() and related functions
...
Currently only works with the center tile of multi-tile trees
2017-05-05 14:45:46 -04:00
David Corbett
acdb369aa8
Avoid non-trivial bitfield constructors
2016-12-09 13:41:14 -05:00
lethosor
70d3c07cdb
Initial lua getDwarfmodeViewDims rewrite
2016-10-07 23:51:58 -04:00
lethosor
a89251cdf8
Find job in job screen
2016-05-14 16:07:27 -04:00
lethosor
55e58e5f06
Update handling of viewscreen_workshop_profilest in Gui module, search/sort plugins
2016-05-14 11:43:37 -04:00
lethosor
fee6e57b40
Disable viewscreen_layer_workshop_profilest focus handler for now
2016-05-11 17:52:56 -04:00
lethosor
fabff1ddfb
Fix df::occupation usage
2015-12-26 19:59:54 -05:00
lethosor
64d861bf6b
Add support for viewscreen_locationsst to various gui functions
2015-12-25 11:09:13 -05:00
lethosor
610170b0b0
Add hooks for getDwarfmodeViewDims and getDepthAt (new)
2015-11-15 11:54:34 -05:00
lethosor
3f5c002634
Pass virtual_identity by reference
2015-10-03 09:27:24 -04:00
lethosor
d343dfd8a0
Add a function to find viewscreens (or parents) of a given type
...
This makes it possible for some plugins to detect the game state more
reliably - for example, prospector would previously fail when
embarking if the viewscreen_choose_start_sitest instance had any
children.
2015-10-02 21:50:55 -04:00
lethosor
445640f80c
Allow commands invoked through command-prompt to access selected items/units/buildings
...
Fixes #273
2014-11-25 20:25:31 -05:00
Alexander Gavrilov
4902c577b3
Fix some crashes when running without globals and update structures.
2014-07-24 23:10:37 +04:00
Alexander Gavrilov
7844907204
Add new API functions for creating announcements and combat reports.
...
Allow specifying the announcement flags directly, and adding unit
combat reports. Also, make announcement functions write the message
to the game log.
2014-04-15 19:50:23 +04:00
Alexander Gavrilov
010417c812
Compute detailed focus string for the hauling menu.
2012-10-11 12:36:17 +04:00
Petr Mrázek
8812238bf6
Update license, add contributors file, bump release number
2012-09-30 04:03:37 +02:00
Alexander Gavrilov
62cde96724
Add a script to reclassify 'individual choice' weapons based on unit skill.
2012-09-29 17:21:49 +04:00
jj
7cc29250f8
fix for updated viewlist_petst
2012-09-26 18:22:07 +02:00
Alexander Gavrilov
82dc1445cf
Support the Room list in getSelectedBuilding.
2012-09-20 11:55:53 +04:00
Alexander Gavrilov
c39a337223
Add unit/item/job/building getter hook vmethods to dfhack_viewscreen.
2012-09-20 11:11:20 +04:00
Alexander Gavrilov
7ce772ae0e
Add an API function that returns the selected building.
2012-09-20 10:41:03 +04:00
Alexander Gavrilov
d70a79deb9
Follow changes in XML defs.
2012-09-18 13:11:11 +04:00
Alexander Gavrilov
c1e20c6f05
Follow changes to structures.
2012-09-17 12:47:18 +04:00
Alexander Gavrilov
bfa6ed3e08
Support setting the target area for the siege engine.
2012-09-08 13:46:02 +04:00
Alexander Gavrilov
d5ea05ebb8
Implement a pressure plate sensitive to machine power.
...
When built next to a gearbox, it will monitor its powered state.
2012-09-06 12:37:29 +04:00
Alexander Gavrilov
3713c5ea9e
Add some APIs required by steam engine to the core.
2012-09-02 14:10:58 +04:00
Alexander Gavrilov
41ad42d0fd
Expose the liquids plugin engine to lua, and make a wrapper gui script.
2012-08-25 10:37:03 +04:00
Alexander Gavrilov
e825dc5ddb
Tweak the API for current viewscreen, and dispatch show/dismiss from C++.
2012-08-24 13:20:08 +04:00
Alexander Gavrilov
b8ee52131b
Add a module for painting tiles into the gps global.
2012-08-19 09:31:09 +04:00
Petr Mrázek
52f9fe4a6a
Merge https://github.com/danaris/dfhack
...
Conflicts:
depends/clsocket
2012-06-14 00:00:36 +02:00
Alexander Gavrilov
9dbcaa2733
Support adventure mode and stockpile screens in focus strings.
2012-06-06 18:54:06 +04:00
Timothy Collett
44c3afc306
Merge git://github.com/quietust/dfhack
...
Gotta get the changes that prevent DFHack from crashing.
2012-05-24 15:39:11 -04:00
Timothy Collett
24d221052b
Initial changes to get dfhack building on the Mac
2012-05-24 11:31:20 -04:00
Quietust
64ea06bbfe
Don't crash if "gps" is null
2012-05-23 13:38:01 -05:00
Alexander Gavrilov
81022451c2
Support sorting items in stocks, and correct unit sorting in joblist.
2012-05-21 22:29:03 +04:00
Alexander Gavrilov
34f08c0223
Handle the stocks screen in the focus strings.
2012-05-21 21:30:53 +04:00
Alexander Gavrilov
1b4a24c827
Support using focus strings to limit keybinding scope.
2012-05-19 21:31:42 +04:00
Alexander Gavrilov
7774f5f2c1
Add a mechanism converting ui focus to a string representation.
...
The idea is to make ui handling more modular, dispensing with
huge functions that switch or if/else on lots of variables.
For now, used to split up functions in the sort plugin.
2012-05-19 19:50:36 +04:00
Alexander Gavrilov
3c44e22760
Support trade viewscreens in Items::getSelectedItem.
2012-05-18 17:54:05 +04:00
Alexander Gavrilov
9489c6ed1a
Add support for a few more viewscreens to Units::getSelectedUnit.
2012-04-26 11:05:35 +04:00
Alexander Gavrilov
adbd351462
Rename units.other[0] to units.active.
2012-04-21 12:46:55 +04:00
Alexander Gavrilov
0a6982f404
Enable warnings correctly on linux and fix a lot of them.
2012-04-20 13:30:37 +04:00
Alexander Gavrilov
45ae2ed67f
Pull a few utility functions into the core and publish to lua.
2012-04-07 19:08:30 +04:00
Quietust
52aca6e05a
Rename "interface" to "interfacest" and just avoid all of these MSVC problems
2012-03-15 13:00:47 -05:00
Petr Mrázek
75113b715a
Misc fixes for warnings...
2012-03-10 16:03:11 +01:00
Alexander Gavrilov
8cc82d5876
Make plugins accept explicit output stream references.
...
This is an incompatible change to the plugin ABI.
The Console is not thread-safe unless used indirectly
via color_ostream_proxy, so everything should use their
per-thread stream.
2012-03-10 15:55:42 +04:00
Petr Mrázek
7fe8762852
Get rid of Simple namespace, Gui module is now a namespace.
2012-03-03 14:38:24 +01:00
Petr Mrázek
2682c54fce
Fix horrible errors and make MSVC shut upt about non-issues.
2012-03-01 01:29:55 +01:00
Mike Stewart
14b471a459
Add ability menu/area map width reading and writing to the Gui module, and use the new information in follow to properly center the screen regardless of menu configuration. Also general fixing and cleanup in follow.
2012-02-21 23:30:44 -08:00
Alexander Gavrilov
02e486be88
Support the new unitlist screen; it's same as joblist, but with pages.
2012-02-20 17:53:39 +04:00
Petr Mrázek
80cedd2ff8
Fix header includes, update structures.
2012-02-20 11:42:40 +01:00
Petr Mrázek
252895708f
Fixage.
2012-02-19 20:27:44 +01:00
Petr Mrázek
8f680dcf94
Make it build and run on linux (no stonesense, df2mc, dfusion)
2012-02-09 03:07:26 +01:00
Quietust
902e0c4d90
Strip out old offsets from Gui module and use df::global vars where available
2012-01-24 22:18:21 -06:00
Alexander Gavrilov
0f56611edc
Support showing announcements, as suggested by Q.
2012-01-15 15:19:20 +04:00
Alexander Gavrilov
a31542862a
Add utility functions to retrieve the selected job/unit/item.
...
Units can be selected via 'u', 'j', 'v' and 'k'; full-screen
unit details view not supported.
Items can be selected via 't', 'k', 'v'->inventory.
Also, when viewing a container item full-screen, the selected
contained item or unit is returned; never the container itself.
The api is used in rename to allow setting nicknames for
arbitrary units, including animals and enemies.
2012-01-14 19:31:43 +04:00