GS: Charge 5000 opcodes to call ScriptTown::FoundTown

This call is very expensive and calling it in a loop when it fails
can consume all available CPU time

Add a further 50000 charge if a town name cannot be generated
This commit is contained in:
Jonathan G Rennison
2020-04-15 17:04:32 +01:00
parent ab99c16601
commit 3f68c73b09
3 changed files with 14 additions and 0 deletions

View File

@@ -126,6 +126,11 @@ public:
*/
static int GetOpsTillSuspend();
/**
* Decrease the number of operations the script can execute before being suspended.
*/
static void DecreaseOps(int amount);
/**
* Get the value of one of your settings you set via info.nut.
* @param name The name of the setting.