Add updater tool to Godot 4 (#12)

This commit is contained in:
Rafał Mikrut 2020-12-25 22:27:21 +01:00 committed by GitHub
parent 4323d6ea47
commit 06aff2eae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 60 deletions

View File

@ -79,8 +79,6 @@ func _process(delta: float) -> void:
var _r2 = qq()
var _rr = qqr("WRT")
call("qqr","QWT")
var func_ref = funcref(self,"qqr")
func_ref.call_func("QWQW")
if 45:
pass
@ -141,7 +139,7 @@ func _process(delta: float) -> void:
enum {TILE, MILE}
enum State {STATE_IDLE, STATE_JUMP = 5, STATE_SHOOT}
const Roman = {IDLE = 0, JUMP = 5, SHOOT = 6}
#const Roman = {IDLE = 0, JUMP = 5, SHOOT = 6} # TODO Not working in Godot 4
const TITLE = 0
const TITLE2 : int = 0
var describtion
@ -156,25 +154,25 @@ func qqr(_stat : String = "TQW") -> String:
static func ff(_rr : String = "FA") -> String:
return "qtqwtwey"
class ram:
var sa : int = 0
var qq
static func rr() -> ram:
return ram.new()
static func Wr() -> Node:
return Node.new()
static func rqq() -> String:
return "as"
func roman() -> String:
return "wqr"
func wykop() -> String:
return "wqr"
func func_ready() -> void:
var rr : ram = ram.new()
rr.sa = 125
rr.qq = "qw"
var _s = rr.rr()
var _r = rr.rqq()
var _t = rr.roman()
var _y = rr.wykop()
#class ram: # TODO this version leaks in Godot 4
# var sa : int = 0
# var qq
# static func rr() -> ram:
# return ram.new()
# static func Wr() -> Node:
# return Node.new()
# static func rqq() -> String:
# return "as"
# func roman() -> String:
# return "wqr"
# func wykop() -> String:
# return "wqr"
#
#func func_ready() -> void:
# var rr : ram = ram.new()
# rr.sa = 125
# rr.qq = "qw"
# var _s = rr.rr()
# var _r = rr.rqq()
# var _t = rr.roman()
# var _y = rr.wykop()

View File

@ -8,13 +8,6 @@ extends Node2D
# Dictionary(),
# NodePath(),
# Plane(),
# PoolByteArray(),
# PoolColorArray(),
# PoolIntArray(),
# PoolRealArray(),
# PoolStringArray(),
# PoolVector2Array(),
# PoolVector3Array(),
# Quat(),
# Rect2(),
# String(),
@ -49,13 +42,6 @@ func _process(delta: float) -> void:
Dictionary(),
NodePath(),
Plane(),
PoolByteArray(),
PoolColorArray(),
PoolIntArray(),
PoolRealArray(),
PoolStringArray(),
PoolVector2Array(),
PoolVector3Array(),
Quat(),
Rect2(),
String(),
@ -108,13 +94,6 @@ func _process(delta: float) -> void:
Dictionary(),
NodePath(),
Plane(),
PoolByteArray(),
PoolColorArray(),
PoolIntArray(),
PoolRealArray(),
PoolStringArray(),
PoolVector2Array(),
PoolVector3Array(),
Quat(),
Rect2(),
String(),
@ -157,13 +136,6 @@ func _process(delta: float) -> void:
Dictionary(),
NodePath(),
Plane(),
PoolByteArray(),
PoolColorArray(),
PoolIntArray(),
PoolRealArray(),
PoolStringArray(),
PoolVector2Array(),
PoolVector3Array(),
Quat(),
Rect2(),
String(),
@ -205,13 +177,6 @@ func _process(delta: float) -> void:
Dictionary(),
NodePath(),
Plane(),
PoolByteArray(),
PoolColorArray(),
PoolIntArray(),
PoolRealArray(),
PoolStringArray(),
PoolVector2Array(),
PoolVector3Array(),
Quat(),
Rect2(),
String(),

34
Godot4Update.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
grep -rl "onready" . --exclude-dir=.git,Godot4Update.sh | xargs sed -i 's/@onready /@onready /'
grep -rl "extends RigidBody3D" . --exclude-dir=.git | xargs sed -i 's/extends RigidBody/extends RigidBody3D/'
grep -rl "extends RigidBody3D3D2D" . --exclude-dir=.git | xargs sed -i 's/extends RigidBody2D/extends RigidBody2D/'
grep -rl "PointLight2D" . --exclude-dir=.git | xargs sed -i 's/Light2D/PointLight2D/'
grep -rl "Camera3D" . --exclude-dir=.git | xargs sed -i 's/Camera/Camera3D/'
grep -rl "Camera3D3D2D" . --exclude-dir=.git | xargs sed -i 's/Camera2D/Camera2D/'
grep -rl "if i.get_name() != \"Camera3D3D\":" . --exclude-dir=.git | xargs sed -i 's/if i.get_name() != "Camera":/if i.get_name() != "Camera":/'
grep -rl "DirectionalLight3D" . --exclude-dir=.git | xargs sed -i 's/DirectionalLight/DirectionalLight3D/'
grep -rl "DirectionalLight3D3D2D" . --exclude-dir=.git | xargs sed -i 's/DirectionalLight2D/DirectionalPointLight2D/'
grep -rl "SpotLight3D" . --exclude-dir=.git | xargs sed -i 's/SpotLight/SpotLight3D/'
grep -rl "SpotLight3D3D2D" . --exclude-dir=.git | xargs sed -i 's/SpotLight2D/SpotPointLight2D/'
grep -rl "OmniLight3D" . --exclude-dir=.git | xargs sed -i 's/OmniLight/OmniLight3D/'
grep -rl "OmniLight3D3D2D" . --exclude-dir=.git | xargs sed -i 's/OmniLight2D/OmniPointLight2D/'
grep -rl "Node3D" . --exclude-dir=.git | xargs sed -i 's/Spatial/Node3D/'