mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Fix all warnings, and an error.
This commit is contained in:
parent
611a12148f
commit
4d02ca12d1
@ -329,7 +329,7 @@ func _son_level_up(value: int) -> void:
|
|||||||
randomize()
|
randomize()
|
||||||
arr.shuffle()
|
arr.shuffle()
|
||||||
|
|
||||||
for v in range(value):
|
for _v in range(value):
|
||||||
for i in range(arr.size()):
|
for i in range(arr.size()):
|
||||||
var spell : Spell = arr[i]
|
var spell : Spell = arr[i]
|
||||||
|
|
||||||
|
@ -108,12 +108,13 @@ func box_blur(chunk : VoxelChunk):
|
|||||||
avg += chunk.get_voxel(x + 1, y + 1, z + 1, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
avg += chunk.get_voxel(x + 1, y + 1, z + 1, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
||||||
|
|
||||||
avg /= 8.0
|
avg /= 8.0
|
||||||
|
var aavg: int = int(avg)
|
||||||
|
|
||||||
chunk.set_voxel(avg, x, y, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
chunk.set_voxel(aavg, x, y, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
||||||
chunk.set_voxel(avg, x + 1, y, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
chunk.set_voxel(aavg, x + 1, y, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
||||||
chunk.set_voxel(avg, x, y, z + 1, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
chunk.set_voxel(aavg, x, y, z + 1, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
||||||
chunk.set_voxel(avg, x + 1, y, z + 1, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
chunk.set_voxel(aavg, x + 1, y, z + 1, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
||||||
chunk.set_voxel(avg, x, y + 1, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
chunk.set_voxel(aavg, x, y + 1, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
||||||
chunk.set_voxel(avg, x + 1, y + 1, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
chunk.set_voxel(aavg, x + 1, y + 1, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
||||||
chunk.set_voxel(avg, x, y + 1, z + 1, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
chunk.set_voxel(aavg, x, y + 1, z + 1, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
||||||
chunk.set_voxel(avg, x + 1, y + 1, z + 1, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
chunk.set_voxel(aavg, x + 1, y + 1, z + 1, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
|
||||||
|
@ -85,7 +85,7 @@ func handle_effect(info : SpellCastInfo) -> void:
|
|||||||
if info.target == null:
|
if info.target == null:
|
||||||
return
|
return
|
||||||
|
|
||||||
var ok : bool = false
|
# var ok : bool = false
|
||||||
|
|
||||||
# if (target_relation_type & TARGET_SELF):
|
# if (target_relation_type & TARGET_SELF):
|
||||||
# ok = true
|
# ok = true
|
||||||
|
@ -47,7 +47,7 @@ func _generate_chunk(chunk : VoxelChunk) -> void:
|
|||||||
_planet.generate_chunk(chunk, _spawn_mobs)
|
_planet.generate_chunk(chunk, _spawn_mobs)
|
||||||
|
|
||||||
func create_planet():
|
func create_planet():
|
||||||
var planet_files : Array
|
var planet_files : Array = Array()
|
||||||
|
|
||||||
var dir = Directory.new()
|
var dir = Directory.new()
|
||||||
if dir.open(planet_folder) == OK:
|
if dir.open(planet_folder) == OK:
|
||||||
|
@ -69,7 +69,7 @@ func set_player(p_player : Entity) -> void:
|
|||||||
|
|
||||||
_player.connect("caura_added", self, "on_caura_added")
|
_player.connect("caura_added", self, "on_caura_added")
|
||||||
_player.connect("caura_removed", self, "on_caura_removed")
|
_player.connect("caura_removed", self, "on_caura_removed")
|
||||||
_player.connect("cdied", self, "cdied")
|
_player.connect("cdied", self, "cdied", [], CONNECT_DEFERRED)
|
||||||
|
|
||||||
var health = _player.get_health()
|
var health = _player.get_health()
|
||||||
_on_player_health_changed(health)
|
_on_player_health_changed(health)
|
||||||
|
@ -90,7 +90,9 @@ func centity_data_changed(data: EntityData) -> void:
|
|||||||
var s : Node = spec_scene.instance()
|
var s : Node = spec_scene.instance()
|
||||||
_spec_container.add_child(s)
|
_spec_container.add_child(s)
|
||||||
s.owner = _spec_container
|
s.owner = _spec_container
|
||||||
s.name = spec.text_name
|
|
||||||
|
if spec.text_name != "":
|
||||||
|
s.name = spec.text_name
|
||||||
|
|
||||||
s.set_spec(_player, spec, i)
|
s.set_spec(_player, spec, i)
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ func _create_mesher():
|
|||||||
mesher = TVVoxelMesher.new()
|
mesher = TVVoxelMesher.new()
|
||||||
mesher.base_light_value = 0.45
|
mesher.base_light_value = 0.45
|
||||||
mesher.ao_strength = 0.2
|
mesher.ao_strength = 0.2
|
||||||
var m : float = 1.0 / 16.0
|
# var m : float = 1.0 / 16.0
|
||||||
|
|
||||||
mesher.uv_margin = Rect2(0.017, 0.017, 1 - 0.034, 1 - 0.034)
|
mesher.uv_margin = Rect2(0.017, 0.017, 1 - 0.034, 1 - 0.034)
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ func _build_phase(phase):
|
|||||||
clear_baked_lights()
|
clear_baked_lights()
|
||||||
generate_random_ao()
|
generate_random_ao()
|
||||||
|
|
||||||
var vl : VoxelLight = VoxelLight.new()
|
# var vl : VoxelLight = VoxelLight.new()
|
||||||
|
|
||||||
bake_lights()
|
bake_lights()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user