Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: A Thousand Ships <[email protected]>
  • Loading branch information
yahkr and AThousandShips authored Jul 26, 2024
1 parent c4ef36c commit 89ce7d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/classes/Node.xml
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@
An optional description to the node. It will be displayed as a tooltip when hovering over the node in the editor's Scene dock.
</member>
<member name="exposed_in_owner" type="bool" setter="set_exposed_in_owner" getter="is_exposed_in_owner" default="false">
Sets this node's state as an exposed node in its [member owner]. This allows the node to be accessed in the editor when the scene is instantiated in another. It also enforces the node to become unique, see [member unique_name_in_owner].
Sets this node's state as an exposed node in its [member owner]. This allows the node to be accessed in the editor when the scene is instantiated in another. It also enforces that the node is unique, see [member unique_name_in_owner].
</member>
<member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer">
The [MultiplayerAPI] instance associated with this node. See [method SceneTree.get_multiplayer].
Expand Down
4 changes: 3 additions & 1 deletion scene/resources/packed_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Has
// Parse all child nodes that belong to p_owner or are not exposed.
for (int i = 0; i < p_node->get_child_count(); i++) {
Node *c = p_node->get_child(i);
if ((!c->is_exposed_in_owner() || is_editable_instance) || c->get_owner() == p_owner) {
if (!c->is_exposed_in_owner() || is_editable_instance || c->get_owner() == p_owner) {
Error err = _parse_node(p_owner, c, parent_node, name_map, variant_map, node_map, nodepath_map);
if (err) {
return err;
Expand Down Expand Up @@ -2003,6 +2003,7 @@ Variant SceneState::get_override_property_value(int p_idx, int p_prop) const {

return variants[overrides[p_idx].properties[p_prop].value];
}

StringName SceneState::get_override_property_name(int p_idx, int p_prop) const {
ERR_FAIL_INDEX_V(p_idx, overrides.size(), StringName());
ERR_FAIL_INDEX_V(p_prop, overrides[p_idx].properties.size(), StringName());
Expand Down Expand Up @@ -2113,6 +2114,7 @@ int SceneState::add_override(const int &o_path) {
overrides.push_back(nd);
return overrides.size() - 1;
}

void SceneState::add_override_property(int p_node, int p_name, int p_value, bool p_deferred_node_path) {
ERR_FAIL_INDEX(p_node, overrides.size());
ERR_FAIL_INDEX(p_name, names.size());
Expand Down

0 comments on commit 89ce7d5

Please sign in to comment.