mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-21 21:49:10 +00:00
Fix: [Script] "type" std function might be redefined by scripts (#13686)
This commit is contained in:
bin
@@ -12,7 +12,7 @@ AIBridge.GetBridgeID <- AIBridge.GetBridgeType;
|
||||
class AICompat14 {
|
||||
function Text(text)
|
||||
{
|
||||
if (type(text) == "string") return text;
|
||||
if (typeof text == "string") return text;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -12,8 +12,8 @@ GSBridge.GetBridgeID <- GSBridge.GetBridgeType;
|
||||
class GSCompat14 {
|
||||
function Text(text)
|
||||
{
|
||||
if (type(text) == "string") return text;
|
||||
if (type(text) == "instance" && text instanceof GSText) return text;
|
||||
if (typeof text == "string") return text;
|
||||
if (typeof text == "instance" && text instanceof GSText) return text;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user