1
0
forked from 0ad/0ad
Commit Graph

24142 Commits

Author SHA1 Message Date
e8908dfee8 Fix getArea
The code didn't call `this.isCircularMap` but checks if it's defined.
The function returned the wrong values for square maps.

Broken in 480228f964

Comments by: @Stan
Differential Revision: https://code.wildfiregames.com/D5288
This was SVN commit r28122.
2024-06-23 17:17:46 +00:00
9af1433995 Rename the "color" property of COlist columns to "textcolor"
Patch by: @Vantha
Differential Revision: https://code.wildfiregames.com/D5278
This was SVN commit r28120.
2024-06-22 20:18:09 +00:00
e01ea16ae5 Adopt the generator based interface by generated maps
- Adding the function signature
- Changing `g_Map.ExportMap()` to `return g_Map`
- Changing `Engine.SetProgress(NN)` to `yield NN`
- Changing `const g_Map = ...` to `globalThis.g_Map = ...`
- On some maps using the argument `mapSettings`

Comments By: @asterix, @sera, @Stan
Differential Revision: https://code.wildfiregames.com/D5258
This was SVN commit r28119.
2024-06-21 15:19:13 +00:00
a178b3fcb3 Add scope in map generation scripts
Summary:
Preparation to use the generator based interface.

Removes many globals. (but doesn't reduce their scope by much)
Refs: #4964

Comments By: @sera @elexis
Differential Revision: https://code.wildfiregames.com/D5285
This was SVN commit r28117.
2024-06-18 16:26:36 +00:00
722f10ca7c Fix some strings.
Reported on Transifex by @lecalam and @rodrigo.vegas.

This was SVN commit r28114.
2024-06-15 06:01:27 +00:00
1d114d513f [A27] [Skirmish Maps] Some minor improvements to some maps and "new" keyword added to a few
Arabian Oases: Added "new" keyword
Sporades Islands: Added "new" keyword, gave both players a free starting
Scout Ship. Added a capturable CC on the unoccupied north island. Added
2 Gaia Treasure Ships.
Syria: Added some Ruins and Shrines.
Watering Holes: Minor tweaks to grass placement.
Zagros Mountains: Added some Shrines and swapped out the Gaia fields and
farmsteads for capturable Mill_Fields and Mills.

This was SVN commit r28113.
2024-06-14 22:20:26 +00:00
3bd5cd9934 Templates | Skirmish Maps | Add a "Scout Ship" default template for skirmish maps.
This was SVN commit r28112.
2024-06-14 22:17:02 +00:00
9cec9613a1 [Fix] Replace the "Immortals" tech at the Tachara, as it had accidentally been taken out some time ago by the author.
This was SVN commit r28111.
2024-06-14 22:16:40 +00:00
6d5dc7f311 Fixes zero usage for Vulkan upload buffer after b9fd6f18f0.
This was SVN commit r28110.
2024-06-14 22:05:32 +00:00
95fcfeb496 Escape non-breaking space in tutorial
Patch by: materiagris via https://github.com/0ad/0ad/pull/44
This was SVN commit r28109.
2024-06-12 08:32:09 +00:00
b9fd6f18f0 Adds proper IBuffer usage instead of dynamic flag.
Comments By: phosit
Differential Revision: https://code.wildfiregames.com/D5281
This was SVN commit r28107.
2024-06-10 19:31:41 +00:00
06545f5de1 Clean code of Unknown
- Put the actual functions in `unknownMapFunctions` instead of just the
names
- Inline some functions

Comments by: elexis
Differential Revision: https://code.wildfiregames.com/D5280
This was SVN commit r28105.
2024-06-08 11:37:27 +00:00
22a8f367f8 Clean code of Caledonian Meadows
- whitespace changes
- functions were called in a way that they always used the default
arguments
- deduplicate code in initialization of `heighLimits`
- new structure in `myBiome`, so that the painting can be reduced much.
 - also initialization instead of push
- use algorithm to calculate the `areas` and the "midpoints" of the
slope.

Comments by: @elexis
Differential Revision: https://code.wildfiregames.com/D5279
This was SVN commit r28104.
2024-06-08 11:30:58 +00:00
28332b6fe6 Deprecates OpenGL ARB backend.
Differential Revision: https://code.wildfiregames.com/D5242
This was SVN commit r28103.
2024-06-07 18:47:18 +00:00
922ab00c06 Remove usage of var in map scripts
Comments by: @Stan, @sera @elexis
Differential Revision: https://code.wildfiregames.com/D5273
This was SVN commit r28101.
2024-06-04 19:39:19 +00:00
c6df8f9372 Biomes for alpine_lakes and alpine_valley
The "biomes" where duplicated between alpine_lakes and alpine_valley.
The biomes can now be selected by the game setup page.
This also remove many `var`'s.

Comments by: @Stan, @elexis
Differential Revision: https://code.wildfiregames.com/D5277
This was SVN commit r28099.
2024-06-02 17:08:28 +00:00
163063c2a4 Clean code of Belgian Uplands
- The heights are now a constant array. Instead of pushing the heights
to an array.
- The terrain are now always constructed in one expression. Instead of
calling `.concat` repeatedly.
- The actors and the probability thereof are now also part of the
object. Separation of data and code.
- Player placement is now a iife.

Comments by: @Stan, @sera
Accepted by: @elexis
Differential Revision: https://code.wildfiregames.com/D5272
This was SVN commit r28098.
2024-05-31 18:14:04 +00:00
000b1d8148 [Gameplay] Skirmish Maps | An updated Sporades Islands map more suitable for 1v1 play and includes some of the newer elements for this alpha.
Differential Revision: https://code.wildfiregames.com/D5229
This was SVN commit r28094.
2024-05-23 17:59:36 +00:00
6ce2fc53ea Allow to use a generator as MapGenerator
This way it's clear what's the input and what's the output of the
computation.
All map generation scripts should reman working. They are adopted in a
future commit.

`Engine.SetProgress` and `Engine.ExportMap` can be removed in a future
commit.

Comments by: @marder, @sera, @Stan
Differential Revision: https://code.wildfiregames.com/D5220
This was SVN commit r28093.
2024-05-22 15:52:12 +00:00
585e821274 [Fix] Cleanup onager template after removing soldier construction
Patch by: @real_tabasco_sauce
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D5245
This was SVN commit r28092.
2024-05-22 15:31:21 +00:00
a4610e4ca9 Turn the FLOODFILL macro in to a function
Also move the "origin-handling" in to the loop.

Comments by: @sera, @vladislavbelov, @Stan
Differential Revision: https://code.wildfiregames.com/D5189
This was SVN commit r28087.
2024-05-12 06:13:47 +00:00
ae639bb360 Fix lint on the CI.
- Add a new CI docker file
- Fix a typo for checkrefs (Refs https://code.wildfiregames.com/D5266)
- Switch to Clang8
- Unify pipeline reset in a function
- Update the image building pipeline

This was SVN commit r28086.
2024-05-11 11:01:34 +00:00
660fdfac44 Use pageLoop for structree and civinfo
Deduplicate code in four places.

Comments by: @elexis
Differential Revision: https://code.wildfiregames.com/D5261
This was SVN commit r28085.
2024-05-10 13:16:52 +00:00
f48e480f7f Update eslintrc.json to allow for class properties in JavaScript.
Refs: https://code.wildfiregames.com/D4770

This was SVN commit r28084.
2024-05-10 10:10:49 +00:00
7c8c9fd59b [GUI] Remove Roman numerals from bot names
To avoid the appearance of two Roman numerals at the end of bot names
(e.g. "Artaxshasha II II -> here "Artaxshasha II" was the name itself
and the second "II" was added when the name was chosen for the second
time), remove the addition of Roman numerals entirely.

Instead, if possible, a new name is chosen for each bot. If not, the
suffix "(n)" is added counting the duplicates and warning is displayed.
AINames are added to the Iberians, Gauls, and Mauryas bringing their
totel to at least 8 each in order avoid any duplicates in regular
8-player games.

Credit to Norse_Harold for changing the condition for reusing names to
not use a hardcoded assumption about the maximum number of player slots

Patch by @Vantha
Accepted by @phosit, @wowgetoffyourcellphone

Differential Revision: https://code.wildfiregames.com/D5256
This was SVN commit r28082.
2024-05-09 18:31:33 +00:00
99cb6b03c5 [Gameplay] Increase capture points for Temple of Amun
Patch by: @real_tabasco_sauce
Differential Revision: https://code.wildfiregames.com/D5264
This was SVN commit r28081.
2024-05-09 18:12:44 +00:00
36626ac623 [Art] Fix the shields on the Roman Siege Ship
Reported to me by @Stan'

This was SVN commit r28080.
2024-05-09 17:57:10 +00:00
14ac8fd6e7 [Art] Add a special rubble actor for the Rice Paddy
Reported by: @Gurken_Khan on the forum
This was SVN commit r28079.
2024-05-09 16:37:33 +00:00
086e95d39c Don't move elements in the bottom panel of the game setup
Also fix the tooltip overlaping with the warning.

Differential Revision: https://code.wildfiregames.com/D5260
This was SVN commit r28078.
2024-05-09 11:11:35 +00:00
a16a3f82a1 Delete FSM.cpp forgotten in 3a5ad160f7
This was SVN commit r28075.
2024-05-05 06:04:22 +00:00
3a5ad160f7 Make CFsm a template
The context doesn't have to be converted to `void*` and back.


Differential Revision: https://code.wildfiregames.com/D5253
This was SVN commit r28074.
2024-05-04 16:13:02 +00:00
53f9faa4e0 [Gameplay Ships] Update tooltip for fire ship, reduce ignition time
Patch by: @real_tabasco_sauce
Differential Revision: https://code.wildfiregames.com/D5251
This was SVN commit r28072.
2024-04-30 23:37:01 +00:00
ba04cf3bd1 Use templates instead of macros to restrict access to the VFS
Subscribers: @sera, @Stan, @wraitii, @vladislavbelov

Differential Revision: https://code.wildfiregames.com/D5195
This was SVN commit r28066.
2024-04-13 17:12:47 +00:00
dd54414fe5 Improve batch training time tech description
In the Han CC I changed `0.8 * 0.75` to `0.8 - 0.2` so it could also be
described the same way.

Accepted By: @Freagarach
Comments By: @sera, @Stan
Trac Tickets: #6755

Differential Revision: https://code.wildfiregames.com/D5031
This was SVN commit r28065.
2024-04-12 18:39:17 +00:00
74afb17aa4 Split the Shutdown function
Comments By: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5148
This was SVN commit r28056.
2024-03-24 12:45:27 +00:00
a4f91e43ae Default many of CFsm's special functions and remove virtual specifires
Differential Revision: https://code.wildfiregames.com/D5249
This was SVN commit r28053.
2024-03-21 17:43:34 +00:00
78652aa92c Use std::function instead of inhereting from CNetFileReceiveTask
The user doesn't have to fiddle with `std::shared_ptr`.
And two (more unrelated) things: use `std::unordered_map`, use a
`std::find_if` in the callback.

Comments By: @vladislavbelov, @Stan
Differential Revision: https://code.wildfiregames.com/D5239
This was SVN commit r28048.
2024-03-09 14:31:43 +00:00
6b31999b64 Don't use std::shared_ptr<ScriptContext> in the CSimulation2
Since 1bccfef6fb the `CSimulation2` uses the `std::shared_ptr` only in
the constructor and stores a `ScriptContext&` (inside it's members).
That's a bit dangerous: A caller might think `CSimulation2` takes
ownership of the `ScriptContext`.
With this commit the caller has to pass an `ScriptContext&` to the
constructor.

Comments By: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5223
This was SVN commit r28046.
2024-03-08 17:15:25 +00:00
1b3e8a0218 Fix wrong default in "scaleByMapArea"
Noticed and patch proposed by @Feldfeld in 480228f964
Doesn't have any consequences as the function is only called via
"scaleByMapAreaAbsolute" in the codebase.

accepted by @Feldfeld @marder

Differential revision: https://code.wildfiregames.com/D5248
This was SVN commit r28042.
2024-02-28 06:44:09 +00:00
1eb11b39bf Remove the StateSet from FSM
The `StateSet` is only used to check if a state is valid. That's useless
since it wouldn't be found in the `TransitionMap` - With the same
outcome.

Accepted By: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5236
This was SVN commit r28039.
2024-02-25 14:05:23 +00:00
04ce68f42e rmgen: var -> let -> const
One should always use the variable declaration with the least possible
scope.
This patch cleans up many (but not all) of the `var` in rmgen and
replaces them with `let` or `const`.
The same is done for `let` -> `const`.

comments by: @sera @Stan
Differential revision: https://code.wildfiregames.com/D5214
This was SVN commit r28036.
2024-02-17 11:13:52 +00:00
e9bc76040d Accounts maxAnisotropy for Vulkan samplers.
This was SVN commit r28034.
2024-02-16 18:46:44 +00:00
483da49759 More generic hash function for FSM
The hash function introduced in 6faf704731 doesn't work on 32 bit
systems. This one should.

Accepted By: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5237
This was SVN commit r28033.
2024-02-16 17:31:40 +00:00
c1d7ac6182 [Art] Materials | Adjust normal affect on a couple terrain materials. The previous numbers were way too extreme.
This was SVN commit r28030.
2024-02-12 07:11:44 +00:00
7e433b5053 [Art] [Fix] Add 'garrisoned' prop points to the 3 Carthaginian ethnic Embassy structures.
Reported by: @Gurken_Khan
Thread:
https://wildfiregames.com/forum/topic/107313-alpha-27-pre-releaserelease-candidate-build-testing/?do=findComment&comment=564191

This was SVN commit r28029.
2024-02-12 07:09:50 +00:00
789cfb8cf5 [Fix] Add "pair" property forgotten in some techs.
Without the "pair" attribute API3..GameState.prototype.canResearch
doesn't check if the other tech is already researched (or is being
researched).

Patch by: @phosit
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D5238
This was SVN commit r28026.
2024-02-05 06:14:29 +00:00
62db78beec [PetraAI] - Fix resources (dead animals) coming in the defense army.
When a wild animal was in a defenseArmy and it was killed, its resource
got into the army as well. This caused a call to GetUnitAIOrder data
which was undefined for the resource.
Fixed by checking for UnitAI-ness and also for attack-ability whilst at
it.

Reported by @seregadushka at the forums:
https://wildfiregames.com/forum/topic/110098-petra-error-winter-is-coming5/.

Investigated and MWE by @Norse_Harold.
Fixes #6899

This was SVN commit r28025.
2024-02-02 12:40:52 +00:00
ca0f8d9bce [Art] Improve the look of the new Roman Antesignanus unit, based on descriptions posted on the forum.
This was SVN commit r28023.
2024-02-02 05:32:27 +00:00
7fd0365f8e [Art] A bunch of minor actor and texture improvements that would too inconsequential to have their own commits.
This was SVN commit r28022.
2024-02-02 03:43:48 +00:00
aee9c54b04 [Gameplay][fix] Use a promotion approach for Roman reforms special tech
Patch by: @real_tabasco_sauce
Accepted by: @borg-, @Riesi, @wowgetoffyourcellphone
Comments by: @phosit, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5206
Fixes #6888

This was SVN commit r28021.
2024-02-02 02:44:30 +00:00