rework hud items for 96 DPI instead of 72; see minetest/minetest issue #6735

This commit is contained in:
Jordach 2017-12-04 20:06:26 +00:00
parent d8f6ceb2a7
commit 40a7bf816d
15 changed files with 91 additions and 62 deletions

BIN
blends/atvomat_sorter.blend Normal file

Binary file not shown.

Binary file not shown.

View File

@ -21,14 +21,6 @@ atvomat.crusher_recipes = {}
atvomat.logger_control = {}
atvomat.ingot_sort = {}
atvomat.ingot_block_sort = {}
atvomat.ore_sort = {}
atvomat.dye_sort = {}
-- items that can be compressed, format is input, amount -> output, amount
atvomat.compressor_recipes["iron"] = {"core:iron_ingot", 9, "core:iron_block", 1}

Binary file not shown.

View File

@ -1,3 +1,76 @@
-- avtomat - (automatico, automation)
-- part of solar plains, by jordach
--like the mover, the format for adding items into the list of sorting cards is: atvomat.ingot_sort["item:name"] = ""
atvomat.ingot_sort = {}
atvomat.ingot_block_sort = {}
atvomat.ore_sort = {}
atvomat.dye_sort = {}
-- register ingots for sorting:
--[[
list of item inventories for the sorter
face outputs for sorting:
up
down
left
right
front
back
main -- single slot for storing items.
]]--
local atsorter =
"size[8,9]" ..
"list[current_name;main;3.5,3.25;1,1]" ..
"list[current_name;up;0,0;3,1]" ..
"list[current_name;down;5,0;3,1]" ..
"list[current_name;left;0,1;3,1]" ..
"list[current_name;right;5,1;3,1]" ..
"list[current_name;front;0,2;3,1]" ..
"list[current_name;back;5,2;3,1]" ..
"list[current_player;main;0,4.5;8,1;]" ..
"list[current_player;main;0,6;8,3;8]" ..
"listring[current_name;main]" ..
"listring[current_player;main]" ..
"background[-0.45,-0.5;8.9,10;atvomat_sorter_interface.png]"..
"listcolors[#3a4466;#8b9bb4;#ffffff;#4e5765;#ffffff]"
minetest.register_node("atvomat:sorter", {
description = "Sorter (Sorts things based on items inside of it.)",
paramtype = "light",
tiles = {"atvomat_sorter_mesh.png"},
drawtype = "mesh",
mesh = "atvomat_sorter.b3d",
groups = {oddly_breakable_by_hand=3},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", atsorter)
local inv = meta:get_inventory()
inv:set_size("main", 1)
inv:set_size("up", 3)
inv:set_size("down", 3)
inv:set_size("left", 3)
inv:set_size("right", 3)
inv:set_size("front", 3)
inv:set_size("back", 3)
minetest.get_node_timer(pos):start(1.0)
end,
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

View File

@ -22,13 +22,13 @@ HUD_SIZE = ""
-- statbar positions
HUD_HEALTH_POS = {x=0.5,y=0.9}
HUD_HEALTH_OFFSET = {x=-175, y=2}
HUD_HEALTH_OFFSET = {x=-134, y=2}
HUD_HUNGER_POS = {x=0.5,y=0.9}
HUD_HUNGER_OFFSET = {x=-175, y=-15}
HUD_HUNGER_OFFSET = {x=-134, y=-15}
HUD_AIR_POS = {x=0.5,y=0.9}
HUD_AIR_OFFSET = {x=-175,y=-24}
HUD_AIR_OFFSET = {x=-134,y=-24}
--HUD_ARMOR_POS = {x=0.5,y=0.9}
--HUD_ARMOR_OFFSET = {x=-175, y=-15}
@ -36,16 +36,16 @@ HUD_AIR_OFFSET = {x=-175,y=-24}
-- dirty way to check for new statbars
if dump(minetest.hud_replace_builtin) ~= "nil" then
HUD_SCALEABLE = false
HUD_SIZE = {x=46.5, y=46.5}
HUD_SIZE = {x=46.5*0.91, y=46.5*0.9}
HUD_HEALTH_POS = {x=0.5,y=1}
HUD_HEALTH_OFFSET = {x=-218, y=-96}
HUD_HEALTH_OFFSET = {x=-202, y=-90}
HUD_HUNGER_POS = {x=0.5,y=1}
HUD_HUNGER_OFFSET = {x=-218, y=-88-24}
HUD_HUNGER_OFFSET = {x=-202, y=-106}
HUD_AIR_POS = {x=0.5,y=1}
HUD_AIR_OFFSET = {x=-218, y=-88-40}
HUD_AIR_OFFSET = {x=-202, y=-121}
--HUD_ARMOR_POS = {x=0.5,y=1}
--HUD_ARMOR_OFFSET = {x=-262, y=-110}

View File

@ -37,7 +37,7 @@ function hudclock.update_time()
position = {x=positionx, y=positiony},
text = "Time: " .. get_time() .. "\n\n" .. "Day: " .. hudclock.day .. "\nMonth: " .. hudclock.month .. "\nYear: " .. hudclock.year,
number = 0xFFFFFF,
offset = {x=46, y=-46},
offset = {x=48, y=-48},
});
@ -140,8 +140,8 @@ function hudclock.display_bg(player)
player:hud_add({
hud_elem_type = "image",
position = {x=positionx, y=positiony},
offset = {x=64, y=-48},
scale = {x=1, y=1},
offset = {x=128-54, y=-48},
scale = {x=1.333, y=1.333},
text = "mthudclock.png",
})

View File

@ -1,36 +0,0 @@
-- hydrolics (water based power and mechanical power)
--[[
1 Water Bucket = 1m^3 = 1000L
10L = 1 WP
1 WP = 2 ME (Small Water Wheel)
? WP = 10 ME (Thrust Piston)
= 20 ME (Windmill)
Pipes should carry 10L per straight Pipe;
Small (1m^3 size) Water wheel produces 2 ME per 10L of water.
Non-ME machines require a standard pipe connected from the top. These have small water wheels inside them to produce ME.
ME machines require more torque (and pressure?) than what a water pipe can normally provide.
-- Machines:
Ore Grinder; Turns ores into powdery lumps, low tier uses Water Pressure (produces , high tier uses Mechanical Energy
* Consumes 1 WP, 20 ME
* Processing Time: WP = 10 seconds; ME = 3 seconds.
Grinder; Multipurpose grinder, uses Water Pressure and ME for the higher tier. On April fools both Ore Grinder and Grinder become Grindr.
* Comsumes 1 WP, 20 ME
* Processing Time: WP = 8 seconds; ME = 3 seconds.
Compacter: Wanna turn that excess biomatter into burnable briquettes? Uses ME.
Hydrualic Press: Uses ME only. Useful for both destroying unwanted items and making pressed metal.
Sprinkler Head: Uses WP only. Turns existing water supply into a source for farmland.
]]--

View File

@ -110,8 +110,8 @@ function intro.hud_bg(player)
player:hud_add({
hud_elem_type = "image",
position = {x=0.5, y=1},
offset = {x=0.5, y=-67},
scale = {x=1, y=1},
offset = {x=0.5, y=-87},
scale = {x=1.25, y=1.25},
text = "hud_stat_bg.png",
})
@ -119,24 +119,24 @@ function intro.hud_bg(player)
player:hud_add({
hud_elem_type = "image",
position = {x=0.5, y=1},
offset = {x=-171, y=-54},
scale = {x=1, y=1},
offset = {x=-214, y=-70},
scale = {x=1.17, y=1.17},
text = "intro_heart.png",
})
player:hud_add({
hud_elem_type = "image",
position = {x=0.5, y=1},
offset = {x=-171, y=-66},
scale = {x=1, y=1},
offset = {x=-214, y=-85},
scale = {x=1.25, y=1.25},
text = "intro_hunger.png",
})
player:hud_add({
hud_elem_type = "image",
position = {x=0.5, y=1},
offset = {x=-171, y=-79}, -- note; these offsets are in pixels.
scale = {x=1, y=1},
offset = {x=-214, y=-100}, -- note; these offsets are in pixels.
scale = {x=1.25, y=1.25},
text = "intro_bubble.png",
})
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

After

Width:  |  Height:  |  Size: 323 B