refonte du système de chunk et correction de bug/traduction
This commit is contained in:
@@ -59,6 +59,7 @@ shape = SubResource("CapsuleShape3D_mwti2")
|
||||
|
||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="." unique_id=73991663]
|
||||
stream = ExtResource("2_w00q2")
|
||||
bus = &"Sfx"
|
||||
|
||||
[node name="Model" parent="." unique_id=178278867 instance=ExtResource("3_lp5jo")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.000101934645, 0)
|
||||
|
||||
@@ -88,13 +88,8 @@ func can_use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
for area in zone.get_affected_areas():
|
||||
if area is Plant:
|
||||
is_there_a_plant_here = true
|
||||
|
||||
var is_there_contamination_in_zone = false
|
||||
for tile in zone.get_tiles():
|
||||
if not player.region.decontamination_layer.is_decontamined(tile):
|
||||
is_there_contamination_in_zone = true
|
||||
|
||||
return not is_there_a_plant_here and not is_there_contamination_in_zone
|
||||
return not is_there_a_plant_here and player.region.is_coords_decontaminated(zone.get_tiles())
|
||||
|
||||
func use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
if player.region == null:
|
||||
|
||||
@@ -41,12 +41,9 @@ func use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
await player.get_tree().create_timer(USE_INTERVAL).timeout
|
||||
|
||||
var bodies = zone.area.get_overlapping_bodies()
|
||||
var rock_layer_id = bodies.find_custom(func (b) : return b is RockLayer)
|
||||
if rock_layer_id != -1:
|
||||
var rock_layer : RockLayer = bodies[rock_layer_id]
|
||||
|
||||
rock_layer.dig_rocks(zone.get_tiles())
|
||||
|
||||
var rock_layers = bodies.filter(func (b) : return b is RockLayer)
|
||||
for rock_layer in rock_layers:
|
||||
player.region.dig_rocks(zone.get_tiles())
|
||||
|
||||
var particles := (DIG_PARTICLES.instantiate() as DigParticleEmmitter)
|
||||
player.region.add_child(particles)
|
||||
|
||||
Reference in New Issue
Block a user