summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/MultiplayerPeerExtension.xml18
-rw-r--r--editor/editor_settings.cpp10
-rw-r--r--editor/export_template_manager.cpp4
3 files changed, 27 insertions, 5 deletions
diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml
index c5fe04cb32..bd11c76039 100644
--- a/doc/classes/MultiplayerPeerExtension.xml
+++ b/doc/classes/MultiplayerPeerExtension.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MultiplayerPeerExtension" inherits="MultiplayerPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Class that can be inherited to implement custom multiplayer API networking layers via GDExtension.
</brief_description>
<description>
+ This class is designed to be inherited from a GDExtension plugin to implement custom networking layers for the multiplayer API (such as WebRTC). All the methods below [b]must[/b] be implemented to have a working custom multiplayer implementation. See also [MultiplayerAPI].
</description>
<tutorials>
</tutorials>
@@ -10,16 +12,19 @@
<method name="_get_available_packet_count" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the available packet count is internally requested by the [MultiplayerAPI].
</description>
</method>
<method name="_get_connection_status" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the connection status is requested on the [MultiplayerPeer] (see [method MultiplayerPeer.get_connection_status]).
</description>
</method>
<method name="_get_max_packet_size" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the maximum allowed packet size (in bytes) is requested by the [MultiplayerAPI].
</description>
</method>
<method name="_get_packet" qualifiers="virtual">
@@ -27,41 +32,49 @@
<argument index="0" name="r_buffer" type="const uint8_t **" />
<argument index="1" name="r_buffer_size" type="int32_t*" />
<description>
+ Called when a packet needs to be received by the [MultiplayerAPI], with [code]p_buffer_size[/code] being the size of the binary [code]p_buffer[/code] in bytes.
</description>
</method>
<method name="_get_packet_peer" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the ID of the [MultiplayerPeer] who sent the most recent packet is requested (see [method MultiplayerPeer.get_packet_peer]).
</description>
</method>
<method name="_get_transfer_channel" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the transfer channel to use is read on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_channel]).
</description>
</method>
<method name="_get_transfer_mode" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the transfer mode to use is read on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]).
</description>
</method>
<method name="_get_unique_id" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the unique ID of this [MultiplayerPeer] is requested (see [method MultiplayerPeer.get_unique_id]).
</description>
</method>
<method name="_is_refusing_new_connections" qualifiers="virtual const">
<return type="bool" />
<description>
+ Called when the "refuse new connections" status is requested on this [MultiplayerPeer] (see [member MultiplayerPeer.refuse_new_connections]).
</description>
</method>
<method name="_is_server" qualifiers="virtual const">
<return type="bool" />
<description>
+ Called when the "is server" status is requested on the [MultiplayerAPI]. See [method MultiplayerAPI.is_server].
</description>
</method>
<method name="_poll" qualifiers="virtual">
<return type="int" />
<description>
+ Called when the [MultiplayerAPI] is polled. See [method MultiplayerAPI.poll].
</description>
</method>
<method name="_put_packet" qualifiers="virtual">
@@ -69,30 +82,35 @@
<argument index="0" name="p_buffer" type="const uint8_t*" />
<argument index="1" name="p_buffer_size" type="int" />
<description>
+ Called when a packet needs to be sent by the [MultiplayerAPI], with [code]p_buffer_size[/code] being the size of the binary [code]p_buffer[/code] in bytes.
</description>
</method>
<method name="_set_refuse_new_connections" qualifiers="virtual">
<return type="void" />
<argument index="0" name="p_enable" type="bool" />
<description>
+ Called when the "refuse new connections" status is set on this [MultiplayerPeer] (see [member MultiplayerPeer.refuse_new_connections]).
</description>
</method>
<method name="_set_target_peer" qualifiers="virtual">
<return type="void" />
<argument index="0" name="p_peer" type="int" />
<description>
+ Called when the target peer to use is set for this [MultiplayerPeer] (see [method MultiplayerPeer.set_target_peer]).
</description>
</method>
<method name="_set_transfer_channel" qualifiers="virtual">
<return type="void" />
<argument index="0" name="p_channel" type="int" />
<description>
+ Called when the channel to use is set for this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_channel]).
</description>
</method>
<method name="_set_transfer_mode" qualifiers="virtual">
<return type="void" />
<argument index="0" name="p_mode" type="int" />
<description>
+ Called when the transfer mode is set on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]).
</description>
</method>
</methods>
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index bd6cfde931..d4581ffb09 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -404,8 +404,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
const String display_scale_hint_string = vformat("Auto (%d%%),75%%,100%%,125%%,150%%,175%%,200%%,Custom", Math::round(get_auto_display_scale() * 100));
EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/display_scale", 0, display_scale_hint_string, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
- _initial_set("interface/editor/enable_debugging_pseudolocalization", false);
- set_restart_if_changed("interface/editor/enable_debugging_pseudolocalization", true);
+ _initial_set("interface/editor/debug/enable_pseudolocalization", false);
+ set_restart_if_changed("interface/editor/debug/enable_pseudolocalization", true);
// Use pseudolocalization in editor.
EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/editor/custom_display_scale", 1.0, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
@@ -716,6 +716,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Profiler
_initial_set("debugger/profiler_frame_history_size", 600);
+ // HTTP Proxy
+ _initial_set("network/http_proxy/host", "");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "network/http_proxy/port", 8080, "1,65535,1")
+
/* Extra config */
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Name,Path,Last Edited")
@@ -887,7 +891,7 @@ fail:
}
void EditorSettings::setup_language() {
- TranslationServer::get_singleton()->set_editor_pseudolocalization(get("interface/editor/enable_debugging_pseudolocalization"));
+ TranslationServer::get_singleton()->set_editor_pseudolocalization(get("interface/editor/debug/enable_pseudolocalization"));
String lang = get("interface/editor/editor_language");
if (lang == "en") {
return; // Default, nothing to do.
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index df3e73267e..7320f957c9 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -147,8 +147,8 @@ void ExportTemplateManager::_download_template(const String &p_url, bool p_skip_
download_templates->set_download_file(EditorPaths::get_singleton()->get_cache_dir().plus_file("tmp_templates.tpz"));
download_templates->set_use_threads(true);
- const String proxy_host = EDITOR_DEF("network/http_proxy/host", "");
- const int proxy_port = EDITOR_DEF("network/http_proxy/port", -1);
+ const String proxy_host = EDITOR_GET("network/http_proxy/host");
+ const int proxy_port = EDITOR_GET("network/http_proxy/port");
download_templates->set_http_proxy(proxy_host, proxy_port);
download_templates->set_https_proxy(proxy_host, proxy_port);