Myk Taylor
5d04b9c4cb
add Textures module and load DFHack logo
...
undocumented for now since it's internal. in the future, perhaps this
could morph into a dynamic texture loading facility for tools
2023-01-04 13:30:18 -08:00
Myk
6361b0a3a4
Merge pull request #2543 from myk002/myk_prep_for_quietust
...
prep for Quietust's structure updates
2023-01-02 20:42:48 -08:00
Myk
35ce361b09
Merge pull request #2542 from myk002/myk_dwarfmode_dims
...
clear out obsolete area map and menu logic from the Gui module
2023-01-02 20:42:30 -08:00
Myk Taylor
218fbdbd45
prep for Quietust's structure updates
2023-01-01 01:03:42 -08:00
Myk Taylor
aa091ed37e
overwrite anchored textures where we actually touch their anchor
2023-01-01 00:45:14 -08:00
Myk Taylor
7d5d2d0a9b
clear out obsolete area map and menu logic
...
in particular, return the correct map dimensions in getDwarfmodeDims()
2022-12-31 22:49:30 -08:00
Myk Taylor
a6294c24fb
implement Screen::paintTile and readTile
2022-12-31 21:16:42 -08:00
Myk Taylor
7d91f9262d
respect tile colors in pens
2022-12-30 05:36:41 -08:00
Myk Taylor
83a8e9a45a
render bright colors correctly
2022-12-30 03:30:01 -08:00
Myk Taylor
1265d531d5
only keep the anchor flag if it's already there
2022-12-30 00:53:44 -08:00
Myk Taylor
f45eac993a
use semantically clearer div rather than bit shift
2022-12-29 22:18:35 -08:00
Myk Taylor
a4c11de4fb
returns correct mouse pos when in ascii
2022-12-29 00:01:40 -08:00
Myk Taylor
371f5be050
fix signedness of comparison var
2022-12-28 23:31:06 -08:00
Myk Taylor
07f8fad787
implement Gui::getMousePos and Gui::getDepthAt
2022-12-28 16:00:10 -08:00
Myk Taylor
e2a4eeb422
write textures and chars to the map
2022-12-27 17:00:50 -08:00
Myk Taylor
033eb2aefd
use default background colors
...
and ensure texpos_lower doesn't peek through
2022-12-27 15:05:13 -08:00
Myk Taylor
69c9e3ffb7
render tiles if given in the pen; otherwise text
...
this commit also smooths out many conflicts with other layers, but the
anchor layer still gives us trouble. it will overwrite us unless we
cover the upper left tile of the anchor graphic, and then the entire
anchor graphic will disappear. not ideal, but it's a start
2022-12-27 14:39:03 -08:00
lethosor
12804a10a6
Fix Gui/Screen to work with g_src changes ( dfhack/df-structures#487 )
2022-12-23 00:36:09 -05:00
Myk Taylor
52c1e49197
get the text rendering back
2022-12-21 22:13:05 -08:00
Myk Taylor
48a9e1c518
more new var names
2022-12-22 05:16:40 +00:00
Myk Taylor
93c875fb56
adjust to new variable names
2022-12-21 14:07:36 -08:00
Myk Taylor
839e927f9b
comment out problematic code from Renderer
2022-12-21 14:06:58 -08:00
Myk Taylor
010b18c0e4
hide "offset" tiles that we occlude
2022-12-20 20:10:14 -08:00
Myk Taylor
663e1dd541
ascii is now in color
2022-12-20 16:33:11 -08:00
Myk Taylor
d7f51e5ed8
basic text drawing
2022-12-20 11:00:49 -08:00
Myk Taylor
7f91cf6e2a
more instrumentation for eventmanager
2022-12-20 09:49:35 -08:00
Myk Taylor
999d602e79
instrument eventmanager a bit
2022-12-19 13:43:57 -08:00
Kelly Kinkade
57e599a4d9
comment out barracks reference
...
barracks appears to have gone away in 50.03
2022-12-17 13:07:37 -06:00
Myk Taylor
5cd60e10f0
comment out problematic code in Gui.cpp
2022-12-16 14:47:43 -06:00
Myk Taylor
768c95ecb6
absorb Putnam's work on Screen
2022-12-16 14:47:43 -06:00
Myk Taylor
ccc9e976e2
comment out problematic code in Screen.cpp
2022-12-16 14:47:43 -06:00
Myk Taylor
55351951f0
comment out problematic code in Items.cpp
2022-12-16 14:47:43 -06:00
Myk Taylor
93b8479e94
comment out problematic code in Buildings.cpp
2022-12-16 14:47:43 -06:00
Myk Taylor
6c562a3fed
fix apparent typo in Materials scanning
2022-12-09 09:21:50 -08:00
Tachytaenius
0836962007
Rename [xyz]CategoryActionTimers to [xyz]GroupActionTimers in action timer API
2022-12-01 23:24:04 +00:00
Tachytaenius
ae532e1452
Rename affectedActionTypeCategory to affectedActionTypeGroup in action timer API
2022-12-01 23:22:02 +00:00
Tachytaenius
76cdbfbc5c
Rename affectedActionCategory to affectedActionTypeCategory in action timer API
2022-12-01 23:19:10 +00:00
Tachytaenius
f06f17b59c
Rename affectedActionTypes to affectedActionCategory in action timer API
2022-12-01 23:17:57 +00:00
Tachytaenius
aa2cf44c4b
Use lambdas to violate DRY less in action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
a925c34413
Rename [xyz]ActionTimer functions to [xyz]ActionTimers
2022-12-01 13:34:54 +00:00
Tachytaenius
f863b9807a
Add action timer API input validation
2022-12-01 13:34:54 +00:00
Tachytaenius
cc40b80456
Protect against integer overflow when subtracting with action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
6148307e9b
Change != 0 to > 0 in action timer API core functions
2022-12-01 13:34:54 +00:00
Tachytaenius
5e0c0d22cb
Group action timer API internal functions together
2022-12-01 13:34:54 +00:00
Tachytaenius
e93d7eefb3
Factor out set and add shared action timer code into own functions
2022-12-01 13:34:54 +00:00
Tachytaenius
357b871b4f
Factor out shared unit action timer multiplication code into its own function
2022-12-01 13:34:54 +00:00
Tachytaenius
8f0b7663d9
Change ints in action timer API function signatures to int32_ts
2022-12-01 13:34:54 +00:00
Tachytaenius
4b33097e57
Remove default in action timer API switch case
2022-12-01 13:34:54 +00:00
Tachytaenius
a3b1125c28
Progress on action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
7f54a77ed9
Continue work on unit action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
16ef4f8313
Rename action_type_group to unit_timer_action_type_group
2022-12-01 13:34:54 +00:00
Tachytaenius
2cbbed6750
Use df-structures XML enums for action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
fa589b5764
Make progress with action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
0f8ce360ac
Make first pass of action timer API
2022-12-01 13:34:54 +00:00
Josh Cooper
807894ac6c
Updates Units::isAnimal
...
Now checks that the unit cannot learn or speak, and has either a wilderness population source, a pet/pet_exotic token, or is trainable for war/hunting
2022-11-29 13:19:19 -08:00
Myk
11c27d40dd
Merge branch 'develop' into Bumber64-patch-2
2022-11-18 17:34:00 -08:00
Myk
966623a919
Merge pull request #2387 from cppcooper/units-checking
...
Extends Units module
2022-11-14 16:55:42 -08:00
Josh Cooper
d112649886
Organizes and documents Units::is*(unit) functions
2022-11-12 16:40:20 -08:00
Josh Cooper
ebd450af0e
Adds isUnitInBox to Units module
2022-11-12 14:42:41 -08:00
Myk
5136bbbc03
Merge pull request #2383 from cppcooper/em-fixes
...
Fixes JOB_STARTED event
2022-11-11 19:58:46 -08:00
Josh Cooper
34de030ba9
Units module
...
- Updates `Lua API.rst`
- Only adds the most important additions (complicated enough to need explaining)
- Adds new functions to LuaApi.cpp
- Revises isUndead to accommodate `dfhack.units.isUndead(u)` => `Units::isUndead(u, false)` instead of taking the default value
2022-11-09 22:03:39 -08:00
Josh Cooper
f3ae193914
Update EventManager.cpp
2022-11-09 16:49:35 -08:00
Josh Cooper
80824f5b75
Extends Units module
2022-11-09 14:41:45 -08:00
myk002
0344595e4e
add "anywhere" keybinding guard
2022-11-09 14:32:51 -08:00
Josh Cooper
c0ffcc2f79
Updates Units::isDemon()
2022-11-09 12:37:41 -08:00
Josh Cooper
beee445f6f
Extends Units module
...
Adds unit check functions for
- animals
- demons
- titans
- megabeasts
- semimegabeasts
- night creatures
2022-11-09 11:44:28 -08:00
Josh Cooper
92645ccb5b
Fixes JOB_STARTED event
2022-11-08 12:43:23 -08:00
myk002
b82a604c8d
factor out keys -> lua onInput code to LuaTools
2022-11-08 10:15:28 -08:00
Josh Cooper
2197aded30
Fixes segfault
2022-11-06 17:30:28 -08:00
myk002
666edd6d60
don't overwrite dig priority by accident
...
many callers of setDesignationAt simply didn't bother with the priority
parameter. change the default value of the priority param so that by
default we will keep the previous value instead of overwriting it
2022-10-19 16:47:54 -07:00
Tachytaenius
1cf9688349
Implement/change/expose constructions findAtTile & insert (not building)
2022-10-12 21:10:22 +01:00
myk002
cb80f7dd75
don't cache dup civzones when scanning buildings
2022-09-25 16:04:36 -07:00
lethosor
e6336e769a
Units::teleport(): set idle_area
2022-09-24 13:30:24 -04:00
Myk Taylor
dbc5001bd8
fail if mouse cursor isn't over the map area
2022-09-18 13:27:13 -07:00
Myk Taylor
215a5b0a24
add Gui::getMousePos() that always gets map coords
2022-09-18 08:19:02 -07:00
Myk Taylor
448eced17c
make Screen::getMousePos always return scr coords
2022-09-18 08:07:08 -07:00
myk002
d0a5db2a0d
set sentinel value used by TWBT
2022-09-16 21:56:05 -07:00
lethosor
f021dd0e0a
Gui::getAnyItem(): add support for viewscreen_treasurelistst
2022-07-12 11:25:16 -04:00
lethosor
4cdb0ff138
Merge branch 'rm-old-modules' into develop
2022-07-12 11:23:10 -04:00
Myk
e0d37a31ae
Make the manager orders library available by default ( #2233 )
...
* move orders out of examples directory
* install orders into library dir
* read orders from new library dir
* update documentation
* update dreamfort references to orders import
* update changelog
* ignore json files in pre-commit
2022-07-06 07:03:29 -07:00
lethosor
1147add520
Constructions module: remove some old/unused functions/types
2022-06-29 23:35:14 -04:00
lethosor
4c7caa2658
Remove unneeded dependencies on modules/Graphic.h
2022-06-29 23:35:13 -04:00
lethosor
8bb047fcc6
Remove Notes module
...
Only used in a devel plugin that prints notes, and can be easily replaced
with `ui.waypoints.points`
2022-06-29 23:35:13 -04:00
Myk
ba629b8e0a
manually handle DestroyBuilding jobs ( #2209 )
...
* don't delete general refs from jobs that we cancel
though we still disconnect the refs if we can
* get job remove working in all cases
we apparently need to manually handle DestroyBuilding jobs
everything else we should let cancel_job handle
* update changelog
2022-06-21 16:38:04 -07:00
Josh Cooper
d38ab1d152
Fix UNIT_NEW_ACTIVE events ( #2197 )
...
* Updates eventful.lua to use UNIT_NEW_ACTIVE
* Fixes bug #2189
* Revises activeUnits declaration/initialization
* Fixes build error
* Update changelog.txt
* reword changelog entry
* add changelog entry for event name change
Co-authored-by: Myk <myk002@yahoo.com>
2022-06-17 09:34:41 -07:00
Myk
85d7489b3c
ensure refs are cleaned up when we remove a job ( #2184 )
...
* ensure job items are disassociated from the job
when the job is removed. the new df-provided ``cancel_job()`` doesn't do
this for us whereas the old custom implementation did.
ref: #2028
* remove trailing whitespace
* Clean up general refs before removing job
Because the game method doesn't do it itself
* Fix typo in var name
* clean up code
* update changelog
2022-06-11 07:38:22 -07: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
23e85a0d24
Fetch and merge
2022-06-04 12:17:28 -07:00
Ryan Williams
b0b601cf0f
Remove recenterViewscreen, update revealInDwarfmodeMap
2022-06-04 11:59:04 -07:00
Ryan Williams
b1e118384e
Update Maps.cpp
2022-05-30 16:26:30 -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