diff --git a/game.conf b/game.conf index 56af760..cde3f44 100644 --- a/game.conf +++ b/game.conf @@ -1,2 +1,2 @@ -name = Solar Fields -disallowed_mapgens = v5,v6,flat,carpathian,v7,fractal,singlenode \ No newline at end of file +name = Solar Plains +disallowed_mapgens = v5,v6,carpathian,v7,fractal,singlenode \ No newline at end of file diff --git a/mods/core/player.lua b/mods/core/player.lua index 17d6c01..edbeaf1 100644 --- a/mods/core/player.lua +++ b/mods/core/player.lua @@ -81,6 +81,27 @@ default.player_register_model("character.x", { stepheight = 0.6, }) +default.player_register_model("character.b3d", { + animation_speed = 60, + textures = { + "(wardrobe_skin.png^[multiply:#ffffff)" + }, + animations = { + -- Standard animations. + stand = { x= 0, y= 239, }, + lay = { x=162, y=166, }, + walk = { x=168, y=187, }, + mine = { x=189, y=198, }, + walk_mine = { x=200, y=219, }, + dead = { x= 221, y=225, }, + -- Utility animations (not currently used by the game; but still usable by mods). + sit = { x= 81, y=160, }, + lay_bed = { x= 226, y=228, }, + }, + collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.77, 0.3}, + stepheight = 0.6, +}) + -- Player stats and animations local player_model = {} local player_textures = {} @@ -144,8 +165,8 @@ end -- Update appearance when the player joins minetest.register_on_joinplayer(function(player) default.player_attached[player:get_player_name()] = false - default.player_set_model(player, "character.x") - player:set_local_animation({x=0, y=79}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, 30) + default.player_set_model(player, "character.b3d") + player:set_local_animation({x=0, y=239}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, 30) -- anim: stand, sit, lay, walk, mine, walk and mine player:set_properties({ visual_size = {x=1, y=1}, diff --git a/mods/intro/init.lua b/mods/intro/init.lua index c2b8e93..7c0b19a 100644 --- a/mods/intro/init.lua +++ b/mods/intro/init.lua @@ -172,13 +172,13 @@ function intro.reset_hud(player) player:hud_set_hotbar_image("hud_hotbar.png") player:hud_set_hotbar_selected_image("hud_hotbar_selected.png") + waila.init_hud(player) hb.custom_hud(player) player:hud_set_flags({crosshair = true, hotbar = true, healthbar = false, wielditem = true, breathbar = false}) player:set_attribute("core_display_hud", "true") hudclock.display_bg(player) hudinfo.display_hud_text(player) - waila.init_hud(player) end minetest.register_on_newplayer(function(player) diff --git a/mods/waila/init.lua b/mods/waila/init.lua index b2e2e6a..1fa7eee 100644 --- a/mods/waila/init.lua +++ b/mods/waila/init.lua @@ -269,12 +269,12 @@ local function core_loop() minetest.after(0.25, core_loop) end -core_loop() +--core_loop() function waila.init_hud(player) player_huds[player:get_player_name()] = {} - local bg = player:hud_add({ + player_huds[player:get_player_name()].bg = player:hud_add({ hud_elem_type = "image", position = {x=0.5, y=0}, offset = {x=0, y=-8}, @@ -282,7 +282,7 @@ function waila.init_hud(player) text = "ptextures_transparent.png", }) - local itemimage = player:hud_add({ + player_huds[player:get_player_name()].itemimg = player:hud_add({ hud_elem_type = "image", position = {x=0.5, y=0}, scale = {x=1, y=1}, @@ -291,7 +291,7 @@ function waila.init_hud(player) alignment = {x=1, y=0}, }) - local desc = player:hud_add({ + player_huds[player:get_player_name()].desc = player:hud_add({ hud_elem_type = "text", position = {x=0.5, y=0}, text = "", @@ -299,7 +299,8 @@ function waila.init_hud(player) alignment = {x=1, y=0}, offset = {x=-74, y=10}, }) - local harvestimg = player:hud_add({ + + player_huds[player:get_player_name()].harvestimg = player:hud_add({ hud_elem_type = "image", position = {x=0.5, y=0}, text = "ptextures_transparent.png", @@ -308,7 +309,7 @@ function waila.init_hud(player) scale = {x=1, y=1}, }) - local harvestable = player:hud_add({ + player_huds[player:get_player_name()].harvestable = player:hud_add({ hud_elem_type = "text", position = {x=0.5, y=0}, text = "", @@ -317,7 +318,7 @@ function waila.init_hud(player) offset = {x=-74, y=30}, }) - local modname = player:hud_add({ + player_huds[player:get_player_name()].modname = player:hud_add({ hud_elem_type = "text", position = {x=0.5, y=0}, text = "", @@ -326,7 +327,7 @@ function waila.init_hud(player) offset = {x=-74, y=70} }) - local facing = player:hud_add({ + player_huds[player:get_player_name()].facedir = player:hud_add({ hud_elem_type = "text", offset = {x=-74, y=50}, position = {x=0.5, y=0}, diff --git a/mods/wardrobe/init.lua b/mods/wardrobe/init.lua index ad7d627..174afd0 100644 --- a/mods/wardrobe/init.lua +++ b/mods/wardrobe/init.lua @@ -949,12 +949,6 @@ function wardrobe.apply_to_player(player, fields) textures = { "wardrobe_player_" .. pname .. ".png", - "ptextures_transparent.png", - "ptextures_transparent.png", - "ptextures_transparent.png", - "ptextures_transparent.png", - "ptextures_transparent.png", - "ptextures_transparent.png", }, }) @@ -963,13 +957,7 @@ function wardrobe.apply_to_player(player, fields) player:set_properties({ textures = { - "ptextures_transparent.png", "wardrobe_player_" .. pname .. ".png", - "ptextures_transparent.png", - "ptextures_transparent.png", - "ptextures_transparent.png", - "ptextures_transparent.png", - "ptextures_transparent.png", }, }) @@ -985,7 +973,6 @@ function wardrobe.apply_to_player(player, fields) player:set_properties({ textures = { - "ptextures_transparent.png", "(wardrobe_skin".. ".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][1].. ")^".. "(wardrobe_eyes_white_".. wardrobe.formspec_selections[pname][1] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][2].. ")^".. "(wardrobe_eyes_pupil_".. wardrobe.formspec_selections[pname][2] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][3].. ")^".. @@ -1008,12 +995,7 @@ function wardrobe.apply_to_player(player, fields) "(wardrobe_acc_".. wardrobe.formspec_selections[pname][19] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][19].. ")^".. "(wardrobe_acc_".. wardrobe.formspec_selections[pname][20] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][20].. ")^".. "(wardrobe_acc_".. wardrobe.formspec_selections[pname][21] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][21].. ")^".. - "(wardrobe_acc_".. wardrobe.formspec_selections[pname][22] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][22].. ")", - "ptextures_transparent.png", - "ptextures_transparent.png", - "ptextures_transparent.png", - "ptextures_transparent.png", - "ptextures_transparent.png", + "(wardrobe_acc_".. wardrobe.formspec_selections[pname][22] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][22].. ")" } }) diff --git a/mods/wardrobe/textures/wardrobe_player_test.png b/mods/wardrobe/textures/wardrobe_player_test.png new file mode 100644 index 0000000..e06ec91 Binary files /dev/null and b/mods/wardrobe/textures/wardrobe_player_test.png differ