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
|
||||
|
||||
var has_initialized
|
||||
|
||||
func _ready() -> void:
|
||||
var initialize_response: Dictionary = Steam.steamInitEx()
|
||||
print("Did Steam initialize?: %s " % initialize_response)
|
||||
if State.disconnect_steam:
|
||||
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
|
||||
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.storeStats()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue