adventuregamestudio / ags

AGS editor and engine source code
Other
701 stars 160 forks source link

AGS 4: cut deprecated commands from dialog script #2557

Closed ivan-mogilko closed 1 week ago

ivan-mogilko commented 1 week ago

Dialog script converter still has a support for a number of deprecated commands that should not be used anymore, because they have modern equivalents, and some are based on obsolete script API, such as SetGlobalInt, which has been removed from the engine, so using related commands in dialog will cause compilation errors anyway.

Handling of these commands starts here: https://github.com/adventuregamestudio/ags/blob/bf09c8220395b2b0ebce06e1270f364cfe69a8c5/Editor/AGS.Editor/Utils/DialogScriptConverter.cs#L188

Following commands must be removed, with any connected code:

There's also a piece of predefined script that has to be removed, related to the run-script command: https://github.com/adventuregamestudio/ags/blob/ags4/Editor/AGS.Editor/Resources/__DialogScripts.asc This is essentially a wrapper around a call to dialog_request, which duplicates a code in the engine which is run when text parser is used in dialog options.

EDIT: Similar changes should also be done to the dlgconv tool: https://github.com/adventuregamestudio/ags/blob/ags4/Tools/data/dialogscriptconv.cpp

ivan-mogilko commented 1 week ago

Done by commits ee226461e888388521ce44652b48782530f50f9b 83fdfc0d12c0a87606f9db3ead934c78a8d5746c 61dbdf864abe06ed483281420965aa659a1a3c2e 3af9ebfaa2f67b8c4be7b299098a840613fc3e08