gfgtdf
b8c6edc53c
Fix indices in widget.add_item_of_type()/add_item()/remove_items_at() ( #8516 )
...
- widget:add_item_of_type() now uses lua 1-based indicies and throws lua errors on wrong indicies. (previously used c++ 0-based indexing, and could lead to assertions when wrong indicies were used, )
- widget:add_item() now has a optional location pos parameter as claimed in the wiki
- the pos and count paraemters in widget:remove_items_at() are now optional and default to removing the last element
With this is matches the behavior of the standart lua functions table.insert and table.remove which is imo what lua writers expect.
2024-09-03 14:17:57 +02:00
Wedge009
0618eadf3e
Replace tab with spaces
2024-09-03 17:02:12 +10:00
Wedge009
9b51a62a2e
Remove contentious last sentence as per PR review.
2024-09-03 17:02:12 +10:00
palmenf
25e77a13e9
Added an explanation of vision to the in-game help
2024-09-03 17:02:12 +10:00
Charles Dang
651779007a
Surface: add area getter
2024-09-02 18:47:14 -04:00
Charles Dang
de776a4065
Rect: add center point getter
2024-09-02 18:46:16 -04:00
Gothyoba
3bcec77482
AToTB: Use month names intead of Roman Numerals
2024-09-03 07:09:11 +10:00
Charles Dang
cd21c4f26b
Unit/Frame: made submerge handling more readable
2024-09-02 15:05:18 -04:00
Charles Dang
cbd7f0d309
Unit/Frame: removed unused grayscale handling for grayscale in render_unit_image
...
We always passed false here. The param was pulled over when I moved the old display::render_image function here and made it render_unit_image.
2024-09-02 14:47:00 -04:00
Charles Dang
3de0a624f3
Unit/Frame: reduced indentation (no functional changes)
2024-09-02 14:43:11 -04:00
Charles Dang
647f7949cb
Prefer get_location over get_location_[x|y] when possible
2024-09-02 13:44:31 -04:00
Charles Dang
d37679a7c9
Fix early crash if no teams are defined
...
gui_->viewing_team() in refresh_objectives results in invalid index access if there are no teams here.
2024-09-02 12:37:41 -04:00
Charles Dang
93cfddaa27
Display: rename team index functions/members for clarity
2024-09-02 12:37:41 -04:00
Charles Dang
25de2962ae
Editor/Context Manager: take a team reference for edit_side_dialog
2024-09-02 12:37:41 -04:00
Charles Dang
fbc7a27cdd
Add display::viewing_team_is_playing
...
Common enough check that this is useful in pursuit of removing direct index usage.
2024-09-02 12:37:41 -04:00
Charles Dang
500e937ac9
Display: use new team getters internally
...
currentTeam_ is what viewing_team_index returns
2024-09-02 12:37:41 -04:00
Charles Dang
725f4b3db7
Unit/Drawer: don't keep team indices
2024-09-02 12:37:41 -04:00
Charles Dang
f1be5e4c83
Clean up scattered cases of viewing_team_index + 1
2024-09-02 12:37:41 -04:00
Charles Dang
ac9f0674d7
Display: refactor out [playing|viewing]_side
...
Now defined in terms of [playing|viewing]_team().side(). Much clearer. No more damn +1 math.
2024-09-02 12:37:41 -04:00
Charles Dang
4c6580250a
Clean up more unnecessary uses of display::viewing_side
2024-09-02 12:37:41 -04:00
Charles Dang
0940b7451b
Display: add back [viewing|playing]_team as actual team reference getters
...
Cleaned up redundant getters in other classes that served the same purpose.
2024-09-02 12:37:41 -04:00
Charles Dang
58472054fb
Display: rename [viewing|playing]_team to [viewing|playing]_index
2024-09-02 12:37:41 -04:00
Charles Dang
7fa4fe483c
Remove display::team_valid
...
It's already checked when it's set
2024-09-02 12:37:41 -04:00
Tahsin Jahin Khalid
1e1db849fd
names: remove inappropriate saurian name
2024-09-02 12:31:57 -04:00
Subhraman Sarkar
2985574c87
remove inproper and inconsistent names
...
1. remove obviously English and English sounding female names from Dunefolk female names list
2. remove 'bakri' from male name list (means 'goat', could be offensive)
3. remove one potentially offensive name from saurian name list
4. remove 'Dalal' from dunefolk female names (can be used as slang)
2024-09-02 21:12:58 +05:30
pentarctagon
96420da3d5
heal_on_hit tests - results are identical to drains aside from default value
2024-09-01 19:40:14 -05:00
Dalas121
dc6b802d74
Changelog: log corpse/soulless arcane resist change.
...
Changelog entry for #9224
2024-09-01 18:40:07 -05:00
Dalas121
8d90a2b6f5
Reduce Corpse/Soulless arcane vulnerablility from -40% to -20% ( #9282 )
...
Resolves #9224
2024-09-01 18:25:34 -05:00
Gunter Labes
655491c159
Keep CI noise down by ignoring insignificant failures
2024-09-01 20:49:56 +02:00
Elvish_Hunter
61379bb5bc
Fix wmlindent warnings
2024-09-01 01:14:40 +02:00
Charles Dang
03cf5e64ce
Revert "Game Display: don't use resources::tod_manager"
...
This reverts commit c21b049d52
.
2024-08-31 17:15:06 -04:00
Elvish_Hunter
742f400612
Silence several wmllint warnings
2024-08-31 23:07:09 +02:00
Charles Dang
98296875fd
WB/Arrow: nothing inherits from this class...
2024-08-31 15:33:38 -04:00
Charles Dang
e7b3f59731
Display: clean up whiteboard arrow rendering
...
The arrow class shouldn't be in charge of adding to the drawing buffer. Also it meant that in a case of multiple arrows padding through one hex, multiple buffer entries would be added. Now it will use one per hex.
2024-08-31 15:29:41 -04:00
Charles Dang
4884561db7
Display: don't TOD color fg debug aid
2024-08-31 15:26:48 -04:00
Charles Dang
ae119c1d8a
Display: make fog/shroud drawing buffer registration more readable
2024-08-31 15:26:20 -04:00
Charles Dang
c21b049d52
Game Display: don't use resources::tod_manager
2024-08-31 15:24:21 -04:00
Charles Dang
96489728ab
Play Controller: removed orphaned function declaration
2024-08-31 15:23:17 -04:00
Charles Dang
97abecb56c
CI: Remove macOS and Windows debug job, add dedicated C++20 job
...
Also makes the windows build run on windows-latest and VS 2022
2024-08-31 11:56:48 -04:00
pentarctagon
f22fb410a3
firststrike tests
2024-08-31 10:14:36 -05:00
Tahsin Jahin Khalid
41f87afaf7
SotBE S7: UX improvements ( #9279 )
...
- add auxiliary camp keep and camp
- make scorpions avoid villages
Co-authored-by: Tahsin Jahin Khalid <5283677+knyghtmare@users.noreply.github.com>
2024-08-31 15:23:55 +06:00
Charles Dang
65ef3123e6
Make frame_parsed_parameters::parameters return a non-const object
2024-08-31 05:08:18 -04:00
Charles Dang
91300d4d36
Use designated initialization for frame_parameters
2024-08-31 05:08:18 -04:00
Charles Dang
d71d046005
IFP/XBRZ: don't default to max scale for invalid input
...
This now just clamps the input to the valid range.
2024-08-31 05:08:18 -04:00
Charles Dang
b11627c340
Clean up more unnecessary default ctors
2024-08-31 05:08:18 -04:00
Charles Dang
5c84ffc7df
Display: leave get_time_of_day unimplemented in the base class
2024-08-31 05:08:18 -04:00
Charles Dang
434f5275ac
Image/Locator: empty strings should produce void locators
...
No reason to try and load files with empty names.
2024-08-31 05:08:18 -04:00
Charles Dang
38cdb2a00c
Game Config Manager: properly delete copy ctor and assignment operator
2024-08-31 05:08:18 -04:00
Charles Dang
2ca1307318
Game Display: properly delete copy ctor and assignment operator
2024-08-31 05:08:18 -04:00
Charles Dang
28555f362f
Game Display: avoid gameboard global ptr for get_visible_unit
...
This function is implemented identically, though const, in display_context (the base class of game_board). We don't need the non-const game_board function here.
2024-08-31 05:08:18 -04:00