Peter Nelson
a46a3a97f3
Change: New company face definition system and UI. ( #14319 )
...
Bits used by company faces are now defined by a variable system instead of being hardcoded, allowing future expansion.
The four face types covering gender and skin colour are now separate face styles with their own definitions.
2025-06-24 07:59:49 +01:00
Peter Nelson
5766ba51d7
Codefix: Clean up incorrect indentation for multi-line comments. ( #14383 )
2025-06-20 19:01:44 +01:00
Jonathan G Rennison
63f1c2aa3a
Codechange: Use TypedIndexContainer for typed index containers
...
Instead of ReferenceThroughBaseContainer
2025-06-12 18:50:49 +01:00
SamuXarick
ac8b236885
Fix: [Script] Make ScriptOrder functions aware of road waypoints ( #13419 )
2025-06-08 16:49:36 -04:00
Peter Nelson
ecafbf884e
Add: Allow separate expansion of town buildings and roads in scenario editor. ( #14341 )
2025-06-07 13:56:43 +00:00
glx22
938acbe6ef
Add: [Script] Cloning ScriptList
2025-06-05 22:37:33 +02:00
glx22
7200e7f509
Add: [Script] Framework for cloning selected ScriptObject
2025-06-05 22:37:33 +02:00
glx22
31fbb17c5b
Codechange: Replace ScriptObject::[SG]etAllowDoCommand with ScriptObject::DisableDoCommandScope
2025-06-05 01:39:40 +02:00
Loïc Guilloux
2cd3c8db86
Codechange: [Script] Don't report multiple errors on valuator/filter failure ( #14303 )
2025-05-30 14:38:41 +02:00
Peter Nelson
7c9393e822
Codechange: Remove terminator from airport tile lists. ( #14306 )
2025-05-27 20:23:59 +01:00
Loïc Guilloux
5e765a2787
Codechange: [CMake] Use ".sq.hpp" instead of ".hpp.sq" for API exports ( #14297 )
2025-05-24 22:38:37 +02:00
Peter Nelson
b42abfbefc
Fix 0455627d16: Incorrect script order position mapping. ( #14294 )
2025-05-23 19:55:22 +01:00
Peter Nelson
0455627d16
Codechange: Move ownership of Orders to OrderList. ( #13948 )
...
Removes the orders pool, and orders are now stored directly in each OrderList.
Iterating orders now no longer needs to traverse a linked-list, all orders in an OrderList are sequential.
2025-05-23 10:36:28 +01:00
SamuXarick
5fef32bde7
Change: [Script] Move GSStation::GetOwner to GSBaseStation::GetOwner ( #13406 )
...
* Add: [Script] GSBaseStation::GetOwner
Added method for Game Scripts to retrieve the owner of a basestation.
* Cleanup: [Script] Remove ScriptStation::GetOwner
Due to class inheritance, GSStation::GetOwner and GSWaypoint::GetOwner can both reach GetOwner defined at GSBaseStation.
2025-05-22 13:47:04 +02:00
Loïc Guilloux
4b1b2a4310
Change: [Script] Don't allow scripts to instantiate ScriptEvent ( #14276 )
2025-05-20 15:37:05 +02:00
SamuXarick
ad3a34e9ef
Add: [Script] ScriptVehicleList_Waypoint ( #13456 )
...
Creates a list of vehicles that have orders to a given waypoint.
2025-05-19 14:48:17 +02:00
Loïc Guilloux
1b0fd0e6fd
Fix b2c57123: [Script] Conversion from ScriptEvent to ScriptEventCompanyTown subclasses ( #14274 )
2025-05-18 15:40:47 +02:00
Loïc Guilloux
c16d5f3a8d
Change: [Script] ScriptVehicleList_Station accepts an optional VehicleType parameter ( #14260 )
2025-05-13 16:41:23 +02:00
Rubidium
ec79ceb2be
Codechange: use std::string_view for sq_pushstring
2025-05-03 23:02:09 +02:00
Peter Nelson
bd1a3fe0b7
Change: Remove the limit of 20 parameters to a Script Text string. ( #14193 )
2025-05-03 18:33:29 +01:00
frosch
9ac9798d7f
Codechange: Remove usages of stoi and stol. ( #14196 )
2025-05-03 17:46:30 +02:00
Rubidium
278aee2c19
Codechange: use std::string_view for sq_getstring
2025-05-03 14:24:28 +02:00
Peter Nelson
341cdbc16b
Codechange: Pass Script engine by reference.
2025-04-28 23:08:20 +01:00
Peter Nelson
72ca962b84
Codechange: Pass ScriptInstance by reference.
2025-04-28 23:08:20 +01:00
Peter Nelson
2c4897c2cd
Codechange: Use EnumBitSet for HouseZones. ( #14137 )
2025-04-28 20:27:43 +01:00
frosch
e2084bbdcd
Codechange: Replace out parameters with result tuples.
2025-04-28 20:50:13 +02:00
Rubidium
c7056866a3
Codechange: remove manual param count; in all cases strlen(params) == nparams
2025-04-27 17:57:53 +02:00
Rubidium
b9667ec3d1
Codechange: use std::string_view for scripts
2025-04-27 17:00:25 +02:00
frosch
689f55a0ea
Fix #14044 : Negative string parameters from GS were rendered as zero. ( #14049 )
...
String parameters are always stored as uint64_t. Negative values are sign-extended to int64_t and then casted to uint64_t.
The same applies to encoded strings. But ScriptText encoded them as int64_t.
Co-authored-by: rubidium42 <rubidium42@users.noreply.github.com >
2025-04-20 23:01:49 +02:00
frosch
cb113cfed0
Codefix: Add missing header includes.
2025-04-20 22:06:18 +02:00
frosch
0d4588688f
Codechange: Manage script event queue using smart pointers.
2025-04-18 19:47:28 +02:00
frosch
af14809697
Codechange: Add filename and line number to errors/warnings of the squirrel-exporters. ( #14031 )
2025-04-18 19:43:32 +02:00
Peter Nelson
67d6089f39
Change: Don't replace stripped control codes with '?' for scripts. ( #14028 )
2025-04-18 17:20:08 +01:00
Peter Nelson
2c59838acb
Codechange: (re)set multiple bitset flags in one call. ( #14017 )
2025-04-18 14:07:57 +01:00
Richard Wheeler
a93087ec5c
Fix #13980 : Allow diagonal selection for road convert ( #13983 )
...
Fixes #13980
2025-04-12 18:50:11 +01:00
frosch
dd073eb38d
Codechange: Use StringBuilder to create encoded strings.
2025-04-08 23:10:58 +02:00
Peter Nelson
5b9d171e63
Codechange: Use EnumBitSet for StringValidationSettings. ( #13974 )
2025-04-08 21:19:17 +01:00
frosch
3f2b58d6e1
Fix: Validate raw strings from game-scripts, and strip invalid and control characters. ( #13976 )
2025-04-07 19:30:36 +02:00
frosch
2cdf2bedfa
Codechange: Add a std::string overload for StrMakeValidInPlace() and a moving std::string&& overload for StrMakeValid(). ( #13962 )
2025-04-07 18:22:47 +02:00
frosch
86bb30acbe
Codefix dccc6185: Incorrect encoding of empty parameters in ScriptText. ( #13951 )
2025-04-03 13:57:30 +02:00
Loïc Guilloux
827b03a32c
Fix: [Script] Prevent cloning of API instances ( #13947 )
2025-04-02 12:30:57 +02:00
Peter Nelson
325f7f9767
Codechange: Use EnumBitSet for GoodsEntry status. ( #13899 )
2025-03-26 21:22:33 +00:00
Björn Wärmedal
d009bfc47b
Codechange: Add vehicle owner to crash event ( #13878 )
...
Co-authored-by: Björn Wärmedal <bjorn.warmedal@lumera.com >
2025-03-25 22:53:44 +01:00
Peter Nelson
732109e444
Codechange: Use EnumBitSet for RoadTypes.
2025-03-25 20:15:48 +00:00
Peter Nelson
79ef4e98fe
Codechange: Use std::swap() instead of Swap() ( #13883 )
2025-03-24 23:47:34 +00:00
frosch
488cda728d
Codechange: Use std::string and std::string_view instead of C strings.
2025-03-24 23:10:13 +01:00
Peter Nelson
b96b26ef15
Codechange: Rename short CargoType parameters cargo. ( #13848 )
...
Rename CargoType variables and parameters using short or meaningless names.
2025-03-24 18:18:21 +00:00
Loïc Guilloux
bdea29c414
Fix #13875 : [Script] be less strict about empty constructor format for doxygen ( #13882 )
2025-03-24 13:38:10 +01:00
Peter Nelson
a4f9977d18
Codechange: Don't reimplement DistanceManhattan. ( #13850 )
2025-03-21 17:06:39 +00:00
Peter Nelson
2909a14374
Codechange: Include table/strings.h in files that use StringIDs.
...
Be consistent with how and where the file is incldued.
2025-03-21 12:53:40 +00:00