# HG changeset patch # User sheepluva # Date 1442468500 -7200 # Node ID 98d14636c3711e6eeb66c07a95dd9bcf6a228502 # Parent 7b2b181f84f82ae36bb27b388bb1a7570ef2e819 add TODO diff -r 7b2b181f84f8 -r 98d14636c371 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Wed Sep 16 08:58:51 2015 -0400 +++ b/hedgewars/uScript.pas Thu Sep 17 07:41:40 2015 +0200 @@ -2888,6 +2888,12 @@ procedure GetGlobals; begin +// TODO +// Use setters instead, because globals should be read-only! +// Otherwise globals might be changed by Lua, but then unexpectatly overwritten by engine when a ScriptCall is triggered by whatever Lua is doing! +// Sure, one could work around that in engine (e.g. by setting writable globals in SetGlobals only when their engine-side value has actually changed since SetGlobals was called the last time...), but things just get messier and messier then. +// It is inconsistent anyway to have some globals be read-only and others not with no indication whatsoever. +// -- sheepluva TurnTimeLeft:= ScriptGetInteger('TurnTimeLeft'); end;