From 7705374d1c2aca4d1b181bce155e3487b1ef7d9c Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sat, 4 May 2019 22:31:53 +0200 Subject: [PATCH] bugfixes --- basic_machines/electronic_fab.lua | 2 +- iron_age/coalburner.lua | 18 ++++++++++++- iron_age/hammer.lua | 31 ++++++++++++++++------ iron_age/lighter.lua | 2 +- textures/techage_appl_electronic_fab.png | Bin 252 -> 191 bytes textures/techage_appl_electronic_fab4.png | Bin 352 -> 220 bytes textures/techage_baborium.png | Bin 301 -> 251 bytes textures/techage_vacuum_tube.png | Bin 1029 -> 406 bytes 8 files changed, 42 insertions(+), 11 deletions(-) diff --git a/basic_machines/electronic_fab.lua b/basic_machines/electronic_fab.lua index 48e41a8..93f8579 100644 --- a/basic_machines/electronic_fab.lua +++ b/basic_machines/electronic_fab.lua @@ -264,7 +264,7 @@ minetest.register_craft({ recipe = { {"group:wood", "default:diamond", "group:wood"}, {"techage:tubeS", "basic_materials:gear_steel", "techage:tubeS"}, - {"group:wood", "techage:steel_ingot", "group:wood"}, + {"group:wood", "default:steel_ingot", "group:wood"}, }, }) diff --git a/iron_age/coalburner.lua b/iron_age/coalburner.lua index a6f4832..23a145e 100644 --- a/iron_age/coalburner.lua +++ b/iron_age/coalburner.lua @@ -50,6 +50,14 @@ local function start_burner(pos, height) end end +local function remove_coal(pos, height) + local pos1 = {x=pos.x-1, y=pos.y+1, z=pos.z-1} + local pos2 = {x=pos.x+1, y=pos.y+height, z=pos.z+1} + for _,p in ipairs(minetest.find_nodes_in_area(pos1, pos2, "techage:charcoal_burn")) do + minetest.remove_node(p) + end +end + local function remove_flame(pos, height) local idx pos = {x=pos.x, y=pos.y+height, z=pos.z} @@ -194,9 +202,15 @@ function techage.keep_running_burner(pos) if num_air(pos) == 0 then -- pause the burner meta:set_int("ignite", meta:get_int("ignite") + CYCLE_TIME) + meta:set_int("paused", 1) return true end - flame(pos, height, num, false) + if meta:get_int("paused") == 1 then + flame(pos, height, num, true) + meta:set_int("paused", 0) + else + flame(pos, height, num, false) + end handle = minetest.sound_play("techage_gasflare", { pos = {x=pos.x, y=pos.y+height, z=pos.z}, max_hear_distance = 32, @@ -205,6 +219,7 @@ function techage.keep_running_burner(pos) meta:set_int("handle", handle) else minetest.swap_node(pos, {name="techage:ash"}) + remove_coal(pos, height) return false end return true @@ -216,6 +231,7 @@ function techage.stop_burner(pos) local meta = minetest.get_meta(pos) local height = meta:get_int("height") remove_flame(pos, height) + remove_coal(pos, height) local handle = meta:get_int("handle") minetest.sound_stop(handle) end diff --git a/iron_age/hammer.lua b/iron_age/hammer.lua index 42ebcb8..594f8a6 100644 --- a/iron_age/hammer.lua +++ b/iron_age/hammer.lua @@ -26,8 +26,23 @@ local function handler(player_name, node, itemstack, digparams) end if minetest.get_item_group(node.name, "stone") > 0 then + -- Remove item from players inventory or from the world + local ndef = minetest.registered_nodes[node.name] + if ndef and ndef.drop then + local item = ItemStack(ndef.drop) + local inv = minetest.get_inventory({type="player", name=player_name}) + if inv:room_for_item("main", item) then + local taken = inv:remove_item("main", item) + else + for _,obj in ipairs(minetest.get_objects_inside_radius(pos, 1)) do + obj:remove() + break + end + end + end node.name = "default:gravel" minetest.swap_node(pos, node) + minetest.check_single_for_falling(pos) end end @@ -38,13 +53,13 @@ minetest.register_tool("techage:hammer_bronze", { full_punch_interval = 1.0, max_drop_level=1, groupcaps={ - cracky = {times={[1]=5.00, [2]=2.0, [3]=1.0}, uses=50, maxlevel=2}, + cracky = {times={[1]=5.00, [2]=2.0, [3]=1.0}, uses=40, maxlevel=2}, }, damage_groups = {fleshy=4}, }, sound = {breaks = "default_tool_breaks"}, after_use = function(itemstack, user, node, digparams) - minetest.after(0.05, handler, user:get_player_name(), node) + minetest.after(0.01, handler, user:get_player_name(), node) itemstack:add_wear(digparams.wear) return itemstack end, @@ -57,13 +72,13 @@ minetest.register_tool("techage:hammer_steel", { full_punch_interval = 1.0, max_drop_level=1, groupcaps={ - cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=60, maxlevel=2}, + cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=50, maxlevel=2}, }, damage_groups = {fleshy=4}, }, sound = {breaks = "default_tool_breaks"}, after_use = function(itemstack, user, node, digparams) - minetest.after(0.05, handler, user:get_player_name(), node) + minetest.after(0.01, handler, user:get_player_name(), node) itemstack:add_wear(digparams.wear) return itemstack end, @@ -76,13 +91,13 @@ minetest.register_tool("techage:hammer_mese", { full_punch_interval = 0.9, max_drop_level=3, groupcaps={ - cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=80, maxlevel=3}, + cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=60, maxlevel=3}, }, damage_groups = {fleshy=5}, }, sound = {breaks = "default_tool_breaks"}, after_use = function(itemstack, user, node, digparams) - minetest.after(0.05, handler, user:get_player_name(), node) + minetest.after(0.01, handler, user:get_player_name(), node) itemstack:add_wear(digparams.wear) return itemstack end, @@ -95,13 +110,13 @@ minetest.register_tool("techage:hammer_diamond", { full_punch_interval = 0.9, max_drop_level=3, groupcaps={ - cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=100, maxlevel=3}, + cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=70, maxlevel=3}, }, damage_groups = {fleshy=5}, }, sound = {breaks = "default_tool_breaks"}, after_use = function(itemstack, user, node, digparams) - minetest.after(0.05, handler, user:get_player_name(), node) + minetest.after(0.01, handler, user:get_player_name(), node) itemstack:add_wear(digparams.wear) return itemstack end, diff --git a/iron_age/lighter.lua b/iron_age/lighter.lua index e7a8758..01e1660 100644 --- a/iron_age/lighter.lua +++ b/iron_age/lighter.lua @@ -58,7 +58,7 @@ minetest.register_node("techage:coal_lighter_burn", { drop = "", light_source = 10, is_ground_content = false, - groups = {crumbly = 2, not_in_creative_inventory=1}, + groups = {not_in_creative_inventory=1}, sounds = default.node_sound_dirt_defaults(), }) diff --git a/textures/techage_appl_electronic_fab.png b/textures/techage_appl_electronic_fab.png index 4be44d65f10f8a96f8a1349bec9e00f3fdd64bd1..719b6fed511e30d5d96ea4974a90b6088339adc9 100644 GIT binary patch delta 175 zcmeyvxSw%?L_G^L0|P^2NcwRg#ggvm>&U>cv7h@-A}f&3SRCZ;#IWw1%u67Lv%n*= zn1O*?7=#%aX3dcR3i1c|gt+=-78Vp2^!D~x+gYcir$jVQY6fX83GxeOaCmkj4am{) zba4#PIG>y#VQ?Uahn3BM(NUv;n?tivqfsf3QBd5V;7IN<0W%TX1~#DT1)s$n4r^BE P1DOn-u6{1-oD!M@L_K?nr>`sfV^&5Xc23sx zq9;IAot`d^ArXg@ZK}WN9Clz*Yhz?v%qLNLpuxIVo diff --git a/textures/techage_appl_electronic_fab4.png b/textures/techage_appl_electronic_fab4.png index c7b9d28e2440c134a33836917903906c85df8cec..1069e6e1ca1a78a5c609bce84bec2701c22fda26 100644 GIT binary patch delta 204 zcmaFBbcb<*L_G^L0|Ubhk1|al#ggvm>&U>cv7h@-A}f&3SRCZ;#IWw1%u67Lv%n*= zn1O*?7=#%aX3dcR3JL}Igt+=-7WVdb6%-d(+gYcir>t07#F)O1GkIG`7 z?@>TiZ#`WcLn>~)owb+ikb#KX>N|$~3jb`}mNoI~mz-kOSao}8Z_l!v^qX;lgc=Jo0|Ud`yN`l^6id3JuOkD)#(wTUiL5|AV{wqX6T`Z5GA}1a>(p}= zctjR6FmMZlFeAgPITAo6`~f~8u0ENCN4U5;Sy&oPOio8B<^Rw53esH?|8-G$*l2rk&Wd@@jkv%n*=n1O*?7=#%aX3dcR z3bL1Y`ns||W@QpkQF*VRR4~y_r+%WRi(`nz>9s*8c^eFPxL4F%(oJafW4`>MW#=jG zG9E-Fi#Jf_XMaw>5qLqOLFpJWb|*HT&xUsPY2+-%dko%>O)_;QR*_Fh94pL34a zF4oS3dPFzrgOvDzTt-o|mrmpNaS_me#!exyapWpHR~in*WacyxzHVV}-x^ sD)tmR%kM9QLl>N=*}QSt`E=g0U$s9U1V0VA33M@or>mdKI;Vst08H~_SpWb4 diff --git a/textures/techage_vacuum_tube.png b/textures/techage_vacuum_tube.png index c5b76abd940bde9cd2f56c0aafea811bd9cefb29..8291585e7bfb2725a0fc3e224fde00568249c91d 100644 GIT binary patch delta 351 zcmV-l0igbc2$lno86^V%002a!ipBr{00d`2O+f$vv5yPwad7@w^59|NjE~{F#!JX;yEyth1_QcdY;b019+cPE!E? z|NjC1{{aF46zAbKk&E?DC;vD9i*i(h;H9FzUq`m759W&?<-{^!3PrmS? zhg`V$sS}P{f`dRW3;|I6{N4@}uxk9XuyqQVNkR~s#Sl^xk|neWrjYUt002ovPDHLkV1l?fm2v<8 delta 979 zcmV;^11$WO1BD2X8A1jC0047(dh`GQ00v@9M??Vs0RI60puMM)00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-;r0TL}0ehuP-kv=Pb18GS_K~z}7-IiTw6jv00zdO6L zlg)OUtWr%=6fD?kt6(J>G-A(6f$wri=;I7#*=Gjsc}JJVf_v!lCF@W5s6&$;(}_uO;O9f6As z_8+Hzsbv?#*RNrw5}1ZX%1pXV!HQ24C@p2p`uFi7irZjQ%Ps)^9v>r~jN8VgTTy}` z3@I2q)epeXm7iPzL_WeFPJhqhmlxWG0a*7=EtX|Ir2E^|pL5o(+OR3F2V4QhMn|~) z@3>=p$M&7*Q+nFf2qvc!C;~K9r94uOJ~cysxu$UD{29*>u19b?_LpP)gZizG@t&`G z2n2ixz%nf&kun;$G@xQIKB2SWZO5oACQe0s&1*nc|~= z<{iwJxB}o)!AP#v~FQO;TQeFKT|HP8Kx?)L=>Yu}7EUM5L8X6&7vW@AP`#`L) zJWyF#$$X2e2a<`IoG9)%-0o@7FAr}k4!~q4!2VzOhExCi&>K!WyIxce==c1TXyh2p zmh5(R{c&JiW57&>AL?t|*ovYCXx!L;N{OZtEJ@exvBwoxfJGJIc@IKYfEBAF&lW(4 zx!)?&GQ6hx0u#|A9|$D_sG*3b3~>JPv7GOt`icY~fnS_fbL|mKt}}SCkG;(u#A3Gq zsHk{_-hob-p=Tsz_zh#u(1XPP-B zdZ61eZtI>q;S>3DiU;XAG{AceFF9%N^mjvyUfY+Wv;3{2Z2zR%Y5)GKCH8z;!`EF$ z*&p5aWB^AxF7QR?=JfTtq;m6rPAzh2n`{2nhx^3ZB_}DX(SRvhKfKGaA0tohfv)HP z(XM7DFR4fr1eTmNgF^Mi<#Zw>{C*Y9e@`Zju+aRvw4`4s!l0~XmhO&z4tBN_egw7$ zveKi-`p(%`Rx|q?T|;~KnO%uFyyx_J-MKCQ0X-8p6qnR58~^|S07*p#PDHLkV1fvk B(F_0p