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 5731d59..21b94c0 100644 --- a/scenes/levels/warcraft/WarCraft.tscn +++ b/scenes/levels/warcraft/WarCraft.tscn @@ -447,10 +447,10 @@ transform = Transform( 0.0876426, 0, -0.996152, 0, 1, 0, 0.996152, 0, 0.0876426, [node name="sm_parchment" parent="Main Scene Props" instance=ExtResource( 15 )] transform = Transform( 0.796076, 0.00917861, -0.605127, 0, 0.999885, 0.0151663, 0.605197, -0.0120736, 0.795984, 0.543303, 0.962739, 0.755265 ) +paper = true [node name="sm_parchment2" parent="Main Scene Props" instance=ExtResource( 15 )] transform = Transform( -0.596381, 0.0184557, 0.802489, 0.0225364, 0.999726, -0.00624354, -0.802385, 0.0143617, -0.596634, 0.281044, 0.958449, -0.253034 ) -paper = false [node name="sm_candle_d2" type="MeshInstance" parent="Main Scene Props"] transform = Transform( -0.927966, 1.10978e-07, -0.372664, 6.91459e-08, 1, 1.25617e-07, 0.372664, 9.08001e-08, -0.927966, 0.457262, 1.00485, -0.058084 ) @@ -527,6 +527,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 )