Skip to content

Commit

Permalink
feat: added new to get version supported
Browse files Browse the repository at this point in the history
  • Loading branch information
gumaciel committed Aug 15, 2023
1 parent 5a58cc2 commit 150edfe
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions addons/admob/assets/android.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
1 change: 1 addition & 0 deletions addons/admob/assets/icon-1024.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
1 change: 1 addition & 0 deletions addons/admob/assets/icon-120.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
1 change: 1 addition & 0 deletions addons/admob/assets/icon-15.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
1 change: 1 addition & 0 deletions addons/admob/assets/icon-500.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
1 change: 1 addition & 0 deletions addons/admob/assets/icon-76.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
1 change: 1 addition & 0 deletions addons/admob/assets/ios.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
1 change: 1 addition & 0 deletions addons/admob/assets/poing.jpeg.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
2 changes: 1 addition & 1 deletion addons/admob/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="AdMob"
description="The AdMob of Plugin for Android and iOS."
author="Poing Studios"
version="godot3-v1.3.2"
version="v1.3.4"
script="src/core/AdMob.gd"
4 changes: 2 additions & 2 deletions addons/admob/src/core/VersionSupportedHTTPRequest.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ signal supported_version_changed(value_dictionary)
var AdMobGlobals = preload("res://addons/admob/src/utils/AdMobGlobals.gd")

func _ready():
request("https://gist.githubusercontent.com/gumaciel/ba15bd85ebcc87866c24a819de37cc9a/raw/admob_editor_versions_supported.json")
request("https://raw.githubusercontent.com/Poing-Studios/godot-admob-versions/" + AdMobGlobals.get_plugin_version() + "/versions.json")


func _on_VersionSupportedHTTPRequest_request_completed(result, response_code, headers, body):
var json = JSON.parse(body.get_string_from_utf8())

var version_support : Dictionary = json.result[AdMobGlobals.get_plugin_version()]
var version_support : Dictionary = json.result
emit_signal("supported_version_changed", version_support)
9 changes: 2 additions & 7 deletions addons/admob/src/utils/AdMobGlobals.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,5 @@ static func get_plugin_version() -> String:
var plugin_config_file := ConfigFile.new()
plugin_config_file.load("res://addons/admob/plugin.cfg")
var version : String = plugin_config_file.get_value("plugin", "version")

var regex = RegEx.new()
regex.compile("^.*?v\\d+\\.\\d+\\.\\d+")
var result = regex.search(version)
if result:
return result.get_string()
return ""

return version

0 comments on commit 150edfe

Please sign in to comment.