prevent errors from appearing when steam client is not running
This commit is contained in:
parent
3ef3647f45
commit
c1a6cc81c2
|
|
@ -1,7 +1,10 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
var has_initialized
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
var initialize_response: Dictionary = Steam.steamInitEx()
|
var initialize_response: Dictionary = Steam.steamInitEx()
|
||||||
print("Did Steam initialize?: %s " % initialize_response)
|
|
||||||
if State.disconnect_steam:
|
if State.disconnect_steam:
|
||||||
Steam.steamShutdown()
|
Steam.steamShutdown()
|
||||||
|
else:
|
||||||
|
has_initialized = initialize_response["status"] == 0
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ func attach_sticky_note(sticky_note: StickyNote) -> bool:
|
||||||
current_sticky_note = sticky_note
|
current_sticky_note = sticky_note
|
||||||
sticky_note.attached_to = self
|
sticky_note.attached_to = self
|
||||||
|
|
||||||
if text == "hit" and sticky_note.text == "effort":
|
if name == "c_hit" and sticky_note.name == "c_effort" and Steamworks.has_initialized:
|
||||||
Steam.setAchievement("FIGHT_FOR_GOOD")
|
Steam.setAchievement("FIGHT_FOR_GOOD")
|
||||||
Steam.storeStats()
|
Steam.storeStats()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue