mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-25 23:49:09 +00:00
Revert d7bd67cda3
: [Scripts] "_typeof" metamethod negatively affects old scripts
This commit is contained in:
@@ -12,9 +12,9 @@ GSBridge.GetBridgeID <- GSBridge.GetBridgeType;
|
||||
class GSCompat14 {
|
||||
function Text(text)
|
||||
{
|
||||
type = typeof(text)
|
||||
if (type != "string" && type != "GSText") return null;
|
||||
return text;
|
||||
if (type(text) == "string") return text;
|
||||
if (type(text) == "instance" && text instanceof GSText) return text;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user