Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
fixes for rpg addon
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremi360 committed Jul 20, 2020
1 parent 4199187 commit 342f208
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion addons/Rakugo/tools/scene_links/SceneLinkEdit.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extends HBoxContainer

export var menu_rect:Rect2

var editor : EditorInterface
onready var editor := EditorPlugin.new().get_editor_interface()
onready var tscn_dialog = $FreePos/TscnDialog

var scene : String setget _set_scene, _get_scene
Expand Down
2 changes: 1 addition & 1 deletion addons/Rakugo/types/node_link.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func _set_node(n:Node):


func _get_node()->Node:
return _node.get_node(value)
return _node.get_node(_value["node_path"])


func _set_value(dict: Dictionary) -> void:
Expand Down
14 changes: 5 additions & 9 deletions addons/Rakugo/types/rakugo_ranged.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,16 @@ var _max_value := 100.0
signal min_value_changed(var_id, new_min_value)
signal max_value_changed(var_id, new_max_value)

func _init(var_id:String, var_value:float, min_value:float, max_value:float
).(var_id, var_value, Rakugo.Type.RANGED) -> void:

func _init(var_id: String, var_value: float, min_value: float, max_value: float).(
var_id, var_value, Rakugo.Type.RANGED
) -> void:
_max_value = max_value
_min_value = min_value


func _set_value(var_value: float) -> void:
if var_value > max_value:
var_value = max_value

elif var_value < min_value:
var_value = min_value

._set_value(var_value)
._set_value(clamp(var_value, _min_value, _max_value))


func _set_min_value(new_min_value: float) -> void:
Expand Down
9 changes: 8 additions & 1 deletion addons/Rakugo/types/subquest.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ var description: String = "Overall description of quest." setget _set_title, _ge
# is this subquest needed for finish whole quest
var optional: bool = false setget _set_optional, _get_optional

enum {STATE_NOT_AVAILABLE, STATE_AVAILABLE, STATE_IN_PROGRESS, STATE_DONE, STATE_FAIL}
enum {
STATE_NOT_AVAILABLE,
STATE_AVAILABLE,
STATE_IN_PROGRESS,
STATE_DONE,
STATE_FAIL,
STATE_DELIVERED
}
var state: int = STATE_AVAILABLE setget _set_state, _get_state

signal done_subquest
Expand Down

0 comments on commit 342f208

Please sign in to comment.