diff --git a/game/player/DisplayPlayer.tscn b/game/player/DisplayPlayer.tscn index 64b0a775..dea41d61 100644 --- a/game/player/DisplayPlayer.tscn +++ b/game/player/DisplayPlayer.tscn @@ -10,7 +10,6 @@ body_path = NodePath("DisplayPlayer") character_skeleton_path = NodePath("DisplayPlayer/Rotation_Helper/Model/character") sseed = 9240987 -cseed = 9240987 script = ExtResource( 1 ) [node name="DisplayPlayer" type="KinematicBody" parent="."] diff --git a/game/player/Mob.gd b/game/player/Mob.gd index a6cff4b3..2d4c4e6f 100644 --- a/game/player/Mob.gd +++ b/game/player/Mob.gd @@ -1,4 +1,5 @@ extends Entity +class_name MobGD # Copyright Péter Magyar relintai@gmail.com # MIT License, functionality from this class needs to be protable to the entity spell system diff --git a/game/player/Mob.tscn b/game/player/Mob.tscn deleted file mode 100644 index 33f8ba94..00000000 --- a/game/player/Mob.tscn +++ /dev/null @@ -1,8 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://player/Mob.gd" type="Script" id=2] - -[node name="Mob" type="Entity" groups=[ -"mobs", -]] -script = ExtResource( 2 ) diff --git a/game/player/NetworkedPlayer.tscn b/game/player/NetworkedPlayer.tscn deleted file mode 100644 index 136861ab..00000000 --- a/game/player/NetworkedPlayer.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://player/NetworkedPlayer.gd" type="Script" id=1] - -[node name="NetworkedPlayer" type="Entity"] -script = ExtResource( 1 ) diff --git a/game/player/Player.tscn b/game/player/Player.tscn deleted file mode 100644 index 2c988017..00000000 --- a/game/player/Player.tscn +++ /dev/null @@ -1,8 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://player/Player.gd" type="Script" id=2] - -[node name="Player" type="Entity" groups=[ -"players", -]] -script = ExtResource( 2 ) diff --git a/game/player/bs_entity_spawner.gd b/game/player/bs_entity_spawner.gd index 70c22ad1..fcd13edc 100644 --- a/game/player/bs_entity_spawner.gd +++ b/game/player/bs_entity_spawner.gd @@ -23,9 +23,6 @@ extends ESSEntitySpawner # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -export(PackedScene) var player_scene : PackedScene -export(PackedScene) var networked_player_scene : PackedScene -export(PackedScene) var mob_scene : PackedScene export(PackedScene) var player_display_scene : PackedScene export(String) var spawn_parent_path : String = "/root/Main" export(int) var default_level_override : int = 0 @@ -249,11 +246,11 @@ func _request_entity_spawn(createinfo : EntityCreateInfo): else: if not createinfo.networked: if createinfo.entity_controller == EntityEnums.ENITIY_CONTROLLER_PLAYER: - entity_node = player_scene.instance() + entity_node = PlayerGD.new() else: - entity_node = mob_scene.instance() + entity_node = MobGD.new() else: - entity_node = networked_player_scene.instance() + entity_node = NetworkedPlayerGD.new() if entity_node == null: print("EntityManager: entity node is null") diff --git a/game/player/bs_entity_spawner.tres b/game/player/bs_entity_spawner.tres index aa372b93..cfcc11c5 100644 --- a/game/player/bs_entity_spawner.tres +++ b/game/player/bs_entity_spawner.tres @@ -1,16 +1,10 @@ -[gd_resource type="ESSEntitySpawner" load_steps=6 format=2] +[gd_resource type="ESSEntitySpawner" load_steps=3 format=2] [ext_resource path="res://player/bs_entity_spawner.gd" type="Script" id=1] -[ext_resource path="res://player/NetworkedPlayer.tscn" type="PackedScene" id=2] -[ext_resource path="res://player/Mob.tscn" type="PackedScene" id=3] [ext_resource path="res://player/DisplayPlayer.tscn" type="PackedScene" id=4] -[ext_resource path="res://player/Player.tscn" type="PackedScene" id=5] [resource] script = ExtResource( 1 ) -player_scene = ExtResource( 5 ) -networked_player_scene = ExtResource( 2 ) -mob_scene = ExtResource( 3 ) player_display_scene = ExtResource( 4 ) spawn_parent_path = "/root/Main" default_level_override = 0 diff --git a/game/project.godot b/game/project.godot index 9b427863..d508d5fa 100644 --- a/game/project.godot +++ b/game/project.godot @@ -224,6 +224,11 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://scenes/Menu.gd" }, { +"base": "Entity", +"class": "MobGD", +"language": "GDScript", +"path": "res://player/Mob.gd" +}, { "base": "", "class": "NetworkedPlayerGD", "language": "GDScript", @@ -308,6 +313,7 @@ _global_script_class_icons={ "MainPlanetGenerator": "", "ManaResource": "", "Menu": "", +"MobGD": "", "NetworkedPlayerGD": "", "PlayerGD": "", "PlayerMaster": "",