diff --git a/assets/props/parchment/gd_parchment.gd b/assets/props/parchment/gd_parchment.gd deleted file mode 100644 index 73433c5..0000000 --- a/assets/props/parchment/gd_parchment.gd +++ /dev/null @@ -1,20 +0,0 @@ -extends Spatial - - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" -export var paper = false - -func _init(): - $sm_paperparchment_lod0.set_visible(paper) - print("[Parchment] Set is visibility > " + paper) - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): -# pass diff --git a/assets/props/parchment/parchment.gd b/assets/props/parchment/parchment.gd new file mode 100644 index 0000000..2f015a0 --- /dev/null +++ b/assets/props/parchment/parchment.gd @@ -0,0 +1,15 @@ +tool +extends Spatial + +export(bool) var paper = false setget activatePaper + +func activatePaper(showPaper): + if Engine.editor_hint: + paper = showPaper + + print("[Parchment] Editor value " +String(showPaper)) + $sm_paperparchment_lod0.set_visible(paper) + +func _ready(): + print("[Parchment] Paper bool " +String(paper)) + $sm_paperparchment_lod0.set_visible(paper) diff --git a/assets/props/parchment/sm_parchment.tscn b/assets/props/parchment/sm_parchment.tscn index 50eb68e..4528a67 100644 --- a/assets/props/parchment/sm_parchment.tscn +++ b/assets/props/parchment/sm_parchment.tscn @@ -1,12 +1,11 @@ [gd_scene load_steps=4 format=2] [ext_resource path="res://assets/props/parchment/sm_wood_parchment_lod1.mesh" type="ArrayMesh" id=1] -[ext_resource path="res://assets/props/parchment/gd_parchment.gd" type="Script" id=2] +[ext_resource path="res://assets/props/parchment/parchment.gd" type="Script" id=2] [ext_resource path="res://assets/props/parchment/sm_paperparchment_lod0.mesh" type="ArrayMesh" id=3] [node name="sm_parchment" type="Spatial"] script = ExtResource( 2 ) -paper = true [node name="sm_wood_parchment_lod1" type="MeshInstance" parent="."] use_in_baked_light = true diff --git a/scenes/levels/warcraft/WarCraft.exr b/scenes/levels/warcraft/WarCraft.exr index 995d0f2..516efd0 100644 Binary files a/scenes/levels/warcraft/WarCraft.exr and b/scenes/levels/warcraft/WarCraft.exr differ diff --git a/scenes/levels/warcraft/WarCraft.lmbake b/scenes/levels/warcraft/WarCraft.lmbake index ab2a4d5..4b03ee4 100644 Binary files a/scenes/levels/warcraft/WarCraft.lmbake and b/scenes/levels/warcraft/WarCraft.lmbake differ diff --git a/scenes/levels/warcraft/WarCraft.tscn b/scenes/levels/warcraft/WarCraft.tscn index 23d32ee..4c0abe3 100644 --- a/scenes/levels/warcraft/WarCraft.tscn +++ b/scenes/levels/warcraft/WarCraft.tscn @@ -521,6 +521,7 @@ shape = SubResource( 7 ) [node name="dagger" type="MeshInstance" parent="Hidden Objects Items"] transform = Transform( -0.625025, -0.777847, 0.0655765, 0, 0.0840072, 0.996466, -0.780606, 0.622816, -0.0525065, 0.69073, -0.117415, 0.830941 ) use_in_baked_light = true +generate_lightmap = false mesh = ExtResource( 14 ) material/0 = ExtResource( 19 )