Commit Graph

104 Commits (828d2146ebf81e54bdff53c5537d979ec18134c3)

Author SHA1 Message Date
Rubidium a4d4301a0c Codechange: We are heading to 15 3 months ago
SamuXarick 8584d1b5bb
Add: [Script] GetAirportNumHelipads (#12085)
Adds a function for Scripts to get the number of helipads of an airport type.
3 months ago
Loïc Guilloux b0f3417025
Add: [Script] ScriptTileList_StationCoverage (#12015) 4 months ago
Patric Stout 849fd5ae03
Change: [Script] replace easy/medium/hard values with default value (#11959) 4 months ago
Patric Stout e28edf6945
Remove: [Script] CONFIG_RANDOM from AddSetting flags (#11942)
It had a very weird interaction, and was only ever used by a single
AI.
4 months ago
dP 897b59c158
Add: [GS] Allow to set max loan for each company separately (#11224) 4 months ago
SamuXarick 0c4e509b60
Fix #10439: [GS] Validate story page button colour, flags, cursor and vehicle type (#11892)
Adds GSStoryPage::IsValidStoryPageButtonColour, GSStoryPage::IsValidStoryPageButtonFlags and GSStoryPage::IsValidStoryPageButtonCursor to the API.

Add missing enforced preconditions to validate parameters passed to MakePushButtonReference, MakeTileButtonReference and MakeVehicleButtonReference.
4 months ago
SamuXarick 76f0f9e386
Fix #10438: [GS] Validate story page element type for ScriptStoryPage::NewElement (#11888)
Fixes a crash that happens if an invalid StoryPageElementType is passed to ScriptStoryPage::NewElement.

Adds an enforced precondition that tests the validity of StoryPageElementType.

Adds GSStoryPage::IsValidStoryPageElementType to the API.
4 months ago
Tyler Trahan bbdbf9a589
Add: AI/GS Time Mode to choose between economy (default) and calendar time (#11603) 4 months ago
Loïc Guilloux c86d918921
Add: [Script] Optional filter parameter to more ScriptXXXList constructors (#11698) 5 months ago
Loïc Guilloux a672813bb0
Add: [Script] Optional filter parameter to ScriptVehicleList constructor (#11663) 5 months ago
Michael Lutz 1c56991213 Add: [Script] Game script control of industry production level. 9 months ago
Andy ce9305a5ee
Add: [Script] GSIndustry.GetConstructionDate() method (#11145) 10 months ago
mrmbernardi 35ef6c1723
Feature: [GS] Goal destination can be updated (#10817) 12 months ago
Patric Stout 6b1c38e303
Fix 3effb893: mention GSAsyncMode in changelog (#10924) 12 months ago
SamuXarick f8b5661d28 Change: Allow GS access to ScriptGroup functions 1 year ago
SamuXarick f225f36c3d Change: Allow GS access to ScriptGameSettings.IsDisabledVehicleType 1 year ago
SamuXarick fd26a44c9e Change: Allow GS access to more ScriptCompany functions 1 year ago
Andy 8b1960a41c Change: Allow GS access to more ScriptOrder functions 1 year ago
Rubidium cada2ca310 Add: GSCompanyMode::IsValid and IsDeity, and precondition enforcement helpers 1 year ago
SamuXarick 3df9321a65 Fix: Some Script::IsValidVehicle checks need to be complemented with IsPrimaryVehicle
Add: [Script] ScriptVehicle.IsPrimaryVehicle
1 year ago
glx22 e735370318 Change: [Script] A ScriptText with too many parameters is now a fatal error
It should never happen as adding/setting parameters already checks that anyway.
1 year ago
SamuXarick 4fc4874a30 Add: [Script] Let random road layout be a choice 1 year ago
Michael Lutz 150f05dc15
Change: Heading for 14 now. (#10302) 1 year ago
dP 5e14a20b3b
Feature: [GS] Scriptable league tables (#10001) 2 years ago
SamuXarick 8d0d45c431 Add: ScriptCargo::GetWeight to get cargo weights 2 years ago
SamuXarick 3dda8c9bad Fix: ScriptRoad::HasRoadType really check for RoadType
Script::HasRoadType was only checking if the tile had the same RoadTramType as that of the RoadType provided.
Now it really checks RoadType against RoadType.
2 years ago
Andy b8a8891a86 Add: [Script] IndustryType::ResolveNewGRFID to resolve industry id from grfid and grf_local_id 2 years ago
Andy 26ac0c48f0 Add: [Script] ObjectType::ResolveNewGRFID to resolve object id from grfid and grf_local_id 2 years ago
Patric Stout 394c749b6b
Change: Heading for 13 now (#9573) 3 years ago
dP 39662aabef
Add: allow gamescripts to build neutral objects (#9568) 3 years ago
SamuXarick 37de878129
Feature: [AI/GS] Missing water related functions and objects (#8390) 3 years ago
Patric Stout eca73a810c Change: rebrand 1.12.0 to 12.0
One question that keeps popping up: "when do we release 2.0?".
NewGRF will force that at least 1.16 will be 2.0, but to not wait
for this, let's drop the "1." and be for ever done with that
conversation.

We are following in the footstep of giants here.
3 years ago
Michael Lutz 8706dcd9c1
Add: [Script] Basic information about loaded NewGRFs for scripts. (#9464)
Currently, scripts use various heuristics to detect loaded NewGRFs that are inherently unreliable.
The list of loaded NewGRFs is easily accessible to a human player, and thus giving
scripts the same information is consistent with the current approach to not give scripts
more information than a human player.
3 years ago
Patric Stout 9bfa7198fd
Change: Heading for 1.12 now (#8862) 3 years ago
dP 91cc414588 Feature: [GS] Allow non-question type windows to have no buttons 3 years ago
dP bab7de6cf2 Feature: Allow GameScripts to add additional text to Industry view window 3 years ago
Pavel Stupnikov 4b42ecb0f6
Feature: Add tile parameter for GSCompany.ChangeBankBalance to show text effect if needed (#8573) 3 years ago
Patric Stout 218f40eea2
Add: [Script] ScriptCargo::GetName, to get the human readable name of a cargo (#8544)
Of course this translates into AICargo.GetName() for AIs and
GSCargo.GetName() for GameScripts.
3 years ago
Pavel Stupnikov 9a45a0f535
Feature: Set exclusive access to industry from GS (#8115) 3 years ago
Niels Martin Hansen b7751c483e
Feature: Influence industry production changes from GS (#7912) 3 years ago
Michael Lutz 1c0ba07c3c Add: [Script] Native priority queue; useful e.g. for pathfinders. 4 years ago
Niels Martin Hansen 800ade7702
Feature: Push-buttons on storybook pages (#7896)
Allow more direct player-initiated interaction for Game Scripts, by letting the GS put push-buttons on storybook pages. These buttons can either trigger an immediate event, or require the player to first select a tile on the map, or a vehicle.

Additionally this reworks how the storybook pages are layouted and rendered, to allow for slightly more complex layouts, and maybe speeding drawing up a bit.
4 years ago
glx 2f264f2c92 Change: Heading for 1.11 now 4 years ago
Pavel Stupnikov d7a928a08b Feature: GS method to control engine availability for a specific company (#7791)
* Feature: GS method to allow company to use an engine before its introduction date

* Feature: GS method to retire an engine early for a specific company
4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 5 years ago
glx d0e8060182 Fix 6fc60d8c4f: forgot to update API changelog 5 years ago
frosch a67ee02529
Change: Heading for 1.10 now (#7319) 5 years ago
SamuXarick 1e5a6765d9 Change: Give AI/GSBridge::GetName an extra parameter to refer the vehicle type (#6988) 5 years ago