Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Godot Engine 4.3 dev #24

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ Import("env")
Import("env_modules")

sources = [
"src/clippable_mesh.cpp",
"src/hydro_rigid_body.cpp",
"src/register_types.cpp",
"src/water_area.cpp",
"src/watercraft_ballast.cpp",
"src/watercraft_propulsion.cpp",
"src/watercraft_rudder.cpp",
"thirdparty/src/clippable_mesh.cpp",
"thirdparty/src/hydro_rigid_body.cpp",
"thirdparty/src/register_types.cpp",
"thirdparty/src/water_area.cpp",
"thirdparty/src/watercraft_ballast.cpp",
"thirdparty/src/watercraft_propulsion.cpp",
"thirdparty/src/watercraft_rudder.cpp",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What advantage does moving these files bring?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to disable the copyright header replacement.

Copy link
Collaborator Author

@fire fire Mar 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way is to add your copyright with SPDX short tag.

GODOT ENGINE license boiler plate

Copyright (c) 2019 Jon Ring
SPDX-License-Identifier: MIT

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And move it back.

]
env_hydro = env_modules.Clone()
env_hydro.add_source_files(env.modules_sources, sources)

if env.editor_build:
env_hydro.add_source_files(env.modules_sources, "editor/*.cpp")
env_hydro.add_source_files(env.modules_sources, "thirdparty/editor/*.cpp")
2 changes: 1 addition & 1 deletion doc_classes/HydroRigidBody.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="HydroRigidBody" inherits="RigidBody3D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="HydroRigidBody" inherits="RigidBody3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
A RigidBody3D with buoyancy and other related forces when it is inside a [WaterArea3D].
</brief_description>
Expand Down
2 changes: 1 addition & 1 deletion doc_classes/WaterArea3D.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="WaterArea3D" inherits="Area3D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="WaterArea3D" inherits="Area3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Defines an area in which a [HydroRigidBody] will be affected by buoyancy and related forces.
</brief_description>
Expand Down
2 changes: 1 addition & 1 deletion doc_classes/WatercraftBallast.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="WatercraftBallast" inherits="Node3D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="WatercraftBallast" inherits="Node3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Allows off-center weight to be added to a [HydroRigidBody]
</brief_description>
Expand Down
2 changes: 1 addition & 1 deletion doc_classes/WatercraftPropulsion.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="WatercraftPropulsion" inherits="Node3D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="WatercraftPropulsion" inherits="Node3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Adds a propulsion system to a [HydroRigidBody]
</brief_description>
Expand Down
2 changes: 1 addition & 1 deletion doc_classes/WatercraftRudder.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="WatercraftRudder" inherits="Node3D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<class name="WatercraftRudder" inherits="Node3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Adds a steerable rudder to a [HydroRigidBody].
</brief_description>
Expand Down
53 changes: 30 additions & 23 deletions register_types.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
/*************************************************************************/
/* Copyright (c) 2020 Jon Ring */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
/**************************************************************************/
/* register_types.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/

#include "src/register_types.h"
#include "modules/hydro/thirdparty/src/register_types.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be incompatible with building the module using custom_modules=... with a directory not named modules.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will investigate.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "../src/watercraft_rudder.h"
#include "hydro_gizmo_plugins.h"


WatercraftBallastNode3DGizmoPlugin::WatercraftBallastNode3DGizmoPlugin() {
Color gizmo_color =
EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion src/hydro_rigid_body.h → thirdparty/src/hydro_rigid_body.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#define WATERCRAFT_BODY_H

#include "clippable_mesh.h"
#include "scene/3d/physics_body_3d.h"
#include "scene/3d/physics/physics_body_3d.h"
#include "scene/3d/physics/rigid_body_3d.h"

class ImmediateMesh;
class MeshInstance;
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions src/register_types.h → thirdparty/src/register_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/

#ifndef HYDRO_REGISTER_TYPES_H
#define HYDRO_REGISTER_TYPES_H

#include "modules/register_module_types.h"

void initialize_hydro_module(ModuleInitializationLevel p_level);
void uninitialize_hydro_module(ModuleInitializationLevel p_level);

#endif
File renamed without changes.
3 changes: 2 additions & 1 deletion src/water_area.h → thirdparty/src/water_area.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/

#ifndef WATER_AREA_H
#define WATER_AREA_H

#include "scene/3d/area_3d.h"
#include "scene/3d/physics/area_3d.h"

class WaterArea3D : public Area3D {
GDCLASS(WaterArea3D, Area3D)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/


#include "watercraft_ballast.h"
#include "hydro_rigid_body.h"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/


#include "watercraft_rudder.h"
#include "hydro_rigid_body.h"

Expand Down
File renamed without changes.