diff --git a/HEADS b/HEADS index 7d0c748..7920087 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"3.2": "64a9e86c5c20bd4bd5833f0563457d0126617489", "3.x": "9b512dd510207d32911064a1bbe15b80c91b006b"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "props": {"master": "2afd6eff45f9a921bdf4090ff3029def86df5cb5"}, "terraman_2d": {"master": "60a7e84a5dc2fc252b0c582dd8f877685d28d74a"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "rtile_map": {"master": "389070cfef387b69902e23e6c4ac53997b69e42e"}, "props_2d": {"master": "a45822b63519d7f9fb391ab6b1dced468c6f399d"}, "pandemonium_engine": {"master": "cdbcabc96b7571e16c5c16bf2021474cda7af3f9"}} \ No newline at end of file +{"engine": {"3.2": "64a9e86c5c20bd4bd5833f0563457d0126617489", "3.x": "9b512dd510207d32911064a1bbe15b80c91b006b"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "props": {"master": "2afd6eff45f9a921bdf4090ff3029def86df5cb5"}, "terraman_2d": {"master": "60a7e84a5dc2fc252b0c582dd8f877685d28d74a"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "rtile_map": {"master": "389070cfef387b69902e23e6c4ac53997b69e42e"}, "props_2d": {"master": "a45822b63519d7f9fb391ab6b1dced468c6f399d"}, "pandemonium_engine": {"master": "f4b7a3b37820f8df9864ff92f258712a08bc59d1"}} \ No newline at end of file diff --git a/game/autoload/Server.gd b/game/autoload/Server.gd index 17c9e5a..cde36f5 100644 --- a/game/autoload/Server.gd +++ b/game/autoload/Server.gd @@ -49,6 +49,12 @@ func _ready() -> void: get_tree().connect("connection_failed", self, "_connection_failed") get_tree().connect("server_disconnected", self, "_server_disconnected") + rpc_config("cset_seed", MultiplayerAPI.RPC_MODE_REMOTE) + rpc_config("crequest_select_class", MultiplayerAPI.RPC_MODE_REMOTE) + rpc_config("cspawn_player", MultiplayerAPI.RPC_MODE_REMOTESYNC) + rpc_config("sreceive_upload_character", MultiplayerAPI.RPC_MODE_MASTER) + rpc_config("", MultiplayerAPI.RPC_MODE_REMOTE) + func start_hosting(p_port : int = 0) -> int: if p_port == 0: @@ -154,7 +160,7 @@ func sset_seed(pseed): if multiplayer.has_network_peer() and multiplayer.is_network_server(): rpc("cset_seed", _sseed) -remote func cset_seed(pseed): +func cset_seed(pseed): _cseed = pseed @@ -169,7 +175,7 @@ func set_class(): else: crequest_select_class(local_player_master.my_info) -remote func crequest_select_class(info : Dictionary) -> void: +func crequest_select_class(info : Dictionary) -> void: # PLogger.log_trace("NetworkManager crequest_select_class") if get_tree().is_network_server(): @@ -181,7 +187,7 @@ remote func crequest_select_class(info : Dictionary) -> void: rpc("cspawn_player", info, sid, Vector3(10, 10, 10)) -remotesync func cspawn_player(info : Dictionary, sid : int, pos : Vector3): +func cspawn_player(info : Dictionary, sid : int, pos : Vector3): # PLogger.log_trace("NetworkManager cspawn_player") if sid == get_tree().get_network_unique_id(): @@ -208,7 +214,7 @@ remotesync func cspawn_player(info : Dictionary, sid : int, pos : Vector3): func upload_character(data : String) -> void: rpc_id(1, "sreceive_upload_character", data) -master func sreceive_upload_character(data: String) -> void: +func sreceive_upload_character(data: String) -> void: ESS.get_ess_entity_spawner().spawn_networked_player_from_data(data, Vector3(0, 10, 0), multiplayer.get_rpc_sender_id()) func set_terrarin_player(): diff --git a/game/player/Body.gd b/game/player/Body.gd index 5a8c29b..a05870f 100644 --- a/game/player/Body.gd +++ b/game/player/Body.gd @@ -87,6 +87,10 @@ var visibility_update_timer : float = 0 var _nameplate : Node = null +func _ready(): + rpc_config("sset_position", MultiplayerAPI.RPC_MODE_REMOTE) + rpc_config("cset_position", MultiplayerAPI.RPC_MODE_REMOTE) + func _enter_tree() -> void: world = get_node(world_path) as Node2D camera = get_node_or_null("Camera") as Camera2D @@ -536,14 +540,14 @@ func on_diesd(entity): #set_physics_process(false) -remote func sset_position(pposition : Vector2) -> void: +func sset_position(pposition : Vector2) -> void: if multiplayer.network_peer and multiplayer.is_network_server(): entity.vrpc("cset_position", position) if _controlled: cset_position(position) -remote func cset_position(pposition : Vector2) -> void: +func cset_position(pposition : Vector2) -> void: pposition = pposition diff --git a/game/player/PlayerGDBase.gd b/game/player/PlayerGDBase.gd index b828206..1a4b3af 100644 --- a/game/player/PlayerGDBase.gd +++ b/game/player/PlayerGDBase.gd @@ -38,6 +38,8 @@ func _ready(): set_physics_process(true) + rpc_config("set_position_remote", MultiplayerAPI.RPC_MODE_REMOTE) + func _physics_process(delta): # if (multiplayer.has_network_peer() and multiplayer.is_network_server()) or not multiplayer.has_network_peer(): if multiplayer.has_network_peer() and multiplayer.is_network_server(): @@ -67,8 +69,8 @@ func update_visibility() -> void: #warning-ignore:unassigned_variable var used_to_see : Array = Array() - for i in range(sees_gets_count()): - var ent : Entity = sees_gets(i) + for i in range(sees_get_count()): + var ent : Entity = sees_get(i) used_to_see.append(ent) @@ -90,7 +92,7 @@ func update_visibility() -> void: if self.get_network_master() != 1: ESS.entity_spawner.despawn_for(self, ent) - sees_removes(ent) + sees_remove(ent) for e in currenty_sees_filtered: var ent : Entity = e as Entity @@ -98,10 +100,10 @@ func update_visibility() -> void: if self.get_network_master() != 1: ESS.entity_spawner.spawn_for(self, ent) - sees_adds(ent) + sees_add(ent) -remote func set_position_remote(pos : Vector2) -> void: +func set_position_remote(pos : Vector2) -> void: if get_tree().is_network_server(): rpc("set_position_remote", pos) #print(position) diff --git a/game/player/bs_entity_spawner.gd b/game/player/bs_entity_spawner.gd index 58c12f7..7dba0af 100644 --- a/game/player/bs_entity_spawner.gd +++ b/game/player/bs_entity_spawner.gd @@ -45,7 +45,10 @@ func _ready(): # get_tree().connect("connected_to_server", self, "_connected_ok") # get_tree().connect("connection_failed", self, "_connected_fail") # get_tree().connect("server_disconnected", self, "_server_disconnected") - pass + + rpc_config("creceive_spawn_for", MultiplayerAPI.RPC_MODE_REMOTE) + rpc_config("spawn_owned_player", MultiplayerAPI.RPC_MODE_PUPPET) + rpc_config("register_player", MultiplayerAPI.RPC_MODE_REMOTE) func on_network_peer_packet(id : int, packet : PoolByteArray) ->void: #todo @@ -59,7 +62,7 @@ func despawn_for(player : Entity, target: Entity) -> void: print("despawnfor " + target.name) # rpc_id(player.get_network_master(), "creceive_despawn_for", target.get_path()) -remote func creceive_spawn_for(data: String, global_name : String, position: Vector2) -> Entity: +func creceive_spawn_for(data: String, global_name : String, position: Vector2) -> Entity: var createinfo : EntityCreateInfo = EntityCreateInfo.new() createinfo.player_name = global_name @@ -74,14 +77,14 @@ remote func creceive_spawn_for(data: String, global_name : String, position: Vec return createinfo.created_entity -remote func creceive_despawn_for(path : NodePath) -> void: +func creceive_despawn_for(path : NodePath) -> void: # print("recdespawnfor " + path) var ent = get_tree().root.get_node_or_null(path) if ent: ent.queue_free() -puppet func spawn_owned_player(data : String, position : Vector2) -> Entity: +func spawn_owned_player(data : String, position : Vector2) -> Entity: var createinfo : EntityCreateInfo = EntityCreateInfo.new() createinfo.guid = get_tree().multiplayer.get_network_unique_id() @@ -309,7 +312,7 @@ func _server_disconnected(): func _connected_fail(): pass # Could not even connect to server; abort. -remote func register_player(id, info): +func register_player(id, info): # Store the info # player_info[id] = info # If I'm the server, let the new guy know about existing players. diff --git a/game/project.pandemonium b/game/project.pandemonium index d157157..4f9fecf 100644 --- a/game/project.pandemonium +++ b/game/project.pandemonium @@ -191,22 +191,22 @@ _global_script_class_icons={ @"PlayerGD": "", @"WorldGeneratorSettings": "", @"HumanoidCharacterBones2D": "", -@"SpellGD": "", -@"SpellEffectVisualBasic": "", -@"NetworkedPlayerGD": "", -@"ItemVisualEntry2D": "", @"CharacterSkeleton2DGD": "", -@"Zone": "", +@"ItemVisualEntry2D": "", +@"NetworkedPlayerGD": "", +@"SpellEffectVisualBasic": "", +@"SpellGD": "", @"UIWindowModule": "", -@"WorldGenBaseResource": "", -@"UIGuiChildModule": "", -@"Menu": "", -@"ManaResource": "", +@"Zone": "", @"Main": "", -@"SubZone": "", -@"ItemTemplateGD": "", -@"HealthResource": "", +@"ManaResource": "", +@"Menu": "", +@"UIGuiChildModule": "", +@"WorldGenBaseResource": "", @"DisplayPlayerGD": "", +@"HealthResource": "", +@"ItemTemplateGD": "", +@"SubZone": "", @"LayeredTextureMaker": "" } Node="input/actionbar_5_11" @@ -238,7 +238,6 @@ EntitySpawner="*res://player/bs_entity_spawner.tscn" gdscript/completion/autocomplete_setters_and_getters=true gdscript/warnings/unused_argument=false gdscript/warnings/unused_signal=false -gdscript/warnings/return_value_discarded=false gdscript/warnings/integer_division=false [display] diff --git a/game/scenes/GameScene.gd b/game/scenes/GameScene.gd index b580707..dd74cb9 100644 --- a/game/scenes/GameScene.gd +++ b/game/scenes/GameScene.gd @@ -21,5 +21,5 @@ extends Node # SOFTWARE. func _ready(): - VisualServer.set_default_clear_color(Color(0, 0, 0)) + RenderingServer.set_default_clear_color(Color(0, 0, 0)) diff --git a/game/scenes/terra_2d_world/Terrain2DWorldBlockyGD.gd b/game/scenes/terra_2d_world/Terrain2DWorldBlockyGD.gd index 2a7d483..b55346b 100644 --- a/game/scenes/terra_2d_world/Terrain2DWorldBlockyGD.gd +++ b/game/scenes/terra_2d_world/Terrain2DWorldBlockyGD.gd @@ -37,7 +37,7 @@ func _enter_tree(): if !Engine.editor_hint && generate_on_ready: spawn(0, 0) - VisualServer.canvas_item_set_sort_children_by_y(get_canvas_item(), true) + RenderingServer.canvas_item_set_sort_children_by_y(get_canvas_item(), true) func spawn(x : int, y : int): chunks_clear() diff --git a/game/ui/2d/world/world_numbers_2d/Number.gd b/game/ui/2d/world/world_numbers_2d/Number.gd index 4ce16a8..cfa0808 100644 --- a/game/ui/2d/world/world_numbers_2d/Number.gd +++ b/game/ui/2d/world/world_numbers_2d/Number.gd @@ -52,7 +52,7 @@ func setup(pos : Vector2, color : Color, value : int, crit : bool) -> void: world_position = pos text = str(value) - add_color_override("font_color", color) + add_theme_color_override("font_color", color) if crit: animation_player.play("crit") diff --git a/module_config.py b/module_config.py index 59c8bff..678f6ba 100644 --- a/module_config.py +++ b/module_config.py @@ -28,4 +28,6 @@ addon_repositories = [ third_party_addon_repositories = [ ] +custom_module_folders = '' + slim_args = 'module_webm_enabled=no module_arkit_enabled=no module_visual_script_enabled=no module_gdnative_enabled=no module_mobile_vr_enabled=no module_theora_enabled=no module_xatlas_unwrap_enabled=no no_editor_splash=yes module_bullet_enabled=no module_camera_enabled=no module_csg_enabled=no module_denoise_enabled=no module_fbx_enabled=no module_gridmap_enabled=no module_hdr_enabled=no module_lightmapper_cpu_enabled=no module_raycast_enabled=no module_recast_enabled=no module_vhacd_enabled=no module_webxr_enabled=no'