diff --git a/mods/ip_cops/init.lua b/mods/ip_cops/init.lua index 7dfa48a..e9287c9 100644 --- a/mods/ip_cops/init.lua +++ b/mods/ip_cops/init.lua @@ -125,7 +125,9 @@ mobs:register_mob(":cops:cop_regular_female", { { random = "female_noise", }, - on_die = onCopDie, + on_die = function(self, pos) + onCopDie(self, pos) + end, walk_velocity = 2, run_velocity = 8, jump_height = 1, @@ -183,7 +185,9 @@ mobs:register_mob(":cops:cop_regular_male", { { random = "male_noise", }, - on_die = onCopDie, + on_die = function(self, pos) + onCopDie(self, pos) + end, walk_velocity = 2, run_velocity = 8, jump_height = 1, @@ -241,7 +245,9 @@ mobs:register_mob(":cops:cop_armedthug", { { random = "male_noise", }, - on_die = onCopDie, + on_die = function(self, pos) + onCopDie(self, pos) + end, walk_velocity = 2, run_velocity = 8, jump_height = 1, @@ -270,6 +276,8 @@ mobs:register_mob(":cops:cop_armedthug", { }, }) -onCopDie = function() +onCopDie = function(self, pos) + minetest.set_node(pos, {name = "literal_trash:bloodstain", param2 = 1}) + destruction_counter.pigsKilled = destruction_counter.pigsKilled + 1 cops.copsSpawned = cops.copsSpawned - 1 end diff --git a/mods/ip_cops/mod.conf b/mods/ip_cops/mod.conf index 7449ec1..2794e90 100644 --- a/mods/ip_cops/mod.conf +++ b/mods/ip_cops/mod.conf @@ -1,2 +1,2 @@ name = ip_cops -depends = mobs \ No newline at end of file +depends = mobs, ip_destruction_counter \ No newline at end of file diff --git a/mods/ip_destruction_counter/init.lua b/mods/ip_destruction_counter/init.lua index 2781d26..9b3c24e 100644 --- a/mods/ip_destruction_counter/init.lua +++ b/mods/ip_destruction_counter/init.lua @@ -2,6 +2,8 @@ local modpath = minetest.get_modpath("ip_destruction_counter") destruction_counter = {} destruction_counter.nodesDestroyed = 0 +destruction_counter.pigsKilled = 0 +destruction_counter.peopleKilled = 0 local nodesDestroyedByHand = 0 local idText @@ -51,7 +53,7 @@ function destruction_counter.updateCounter(player) return end - local totalDestruction = destruction_counter.nodesDestroyed + math.floor(nodesDestroyedByHand / 10) + local totalDestruction = destruction_counter.nodesDestroyed + destruction_counter.pigsKilled * 20 + destruction_counter.peopleKilled * 10 + math.floor(nodesDestroyedByHand / 10) local percentage = (totalDestruction / 1000 * 4) if percentage > 100 then percentage = 100 diff --git a/mods/ip_explosives/init.lua b/mods/ip_explosives/init.lua index d3c495c..33807f0 100644 --- a/mods/ip_explosives/init.lua +++ b/mods/ip_explosives/init.lua @@ -153,7 +153,7 @@ local function entity_physics(pos, radius, drops) local obj_pos = obj:get_pos() local dist = math.max(1, vector.distance(pos, obj_pos)) - local damage = (4 / dist) * radius * 8 + local damage = (4 / dist) * radius if obj:is_player() then local dir = vector.normalize(vector.subtract(obj_pos, pos)) local moveoff = vector.multiply(dir, 2 / dist * radius) @@ -403,8 +403,7 @@ function explosives.boom(pos, def) local owner = def.owner local sound = def.sound or "tnt_explode" - minetest.sound_play(sound, {pos = pos, gain = 2.5, - max_hear_distance = math.min(def.radius * 30, 128)}, true) + minetest.sound_play(sound, {pos = pos, gain = 2.5, max_hear_distance = def.radius * 30}, true) local drops, radius = tnt_explode(pos, def.radius, true, def.ignore_on_blast, owner, true) -- append entity drops local damage_radius = (radius / math.max(1, def.radius)) * def.damage_radius diff --git a/mods/ip_more_fire/mod.conf b/mods/ip_more_fire/mod.conf index 841302a..2e9ada4 100644 --- a/mods/ip_more_fire/mod.conf +++ b/mods/ip_more_fire/mod.conf @@ -1,6 +1,6 @@ name = ip_more_fire title = More Fire -depends = ip_explosives, fire, ip_vessels +depends = ip_explosives, fire, ip_vessels, ip_destruction_counter description = Derivative of the More Fire mod by Nathan Salapat author = Nathan, Napiophelios, MCL optional_depends = ethereal diff --git a/mods/ip_more_fire/molotov.lua b/mods/ip_more_fire/molotov.lua index 0746c71..98cc038 100644 --- a/mods/ip_more_fire/molotov.lua +++ b/mods/ip_more_fire/molotov.lua @@ -147,7 +147,13 @@ MORE_FIRE_MOLOTOV_ENTITY.on_step = function(self, dtime) maxsize = 0.75, texture = 'more_fire_spark.png', }) - if self.timer>0.2 then + + if node == "main:glass" then + minetest.set_node(pos.z, {name = "air"}) + return + end + + if self.timer > 0.1 then local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1) for k, obj in pairs(objs) do if obj:get_luaentity() ~= nil then @@ -172,7 +178,9 @@ MORE_FIRE_MOLOTOV_ENTITY.on_step = function(self, dtime) self.object:remove() end else - if self.node ~= '' then + + + if self.node ~= '' and self.node ~= "main:glass" then minetest.sound_play('more_fire_shatter', {gain = 1.0}) for dx=-2,2 do for dy=-2,2 do @@ -190,6 +198,7 @@ MORE_FIRE_MOLOTOV_ENTITY.on_step = function(self, dtime) end end self.object:remove() + destruction_counter.nodesDestroyed = destruction_counter.nodesDestroyed + 20 end end end @@ -214,6 +223,7 @@ MORE_FIRE_MOLOTOV_ENTITY.on_step = function(self, dtime) end end self.object:remove() + destruction_counter.nodesDestroyed = destruction_counter.nodesDestroyed + 20 end end self.lastpos={x=pos.x, y=pos.y, z=pos.z} diff --git a/mods/ip_more_fire/pipebomb.lua b/mods/ip_more_fire/pipebomb.lua index 120622a..cf9b6f5 100644 --- a/mods/ip_more_fire/pipebomb.lua +++ b/mods/ip_more_fire/pipebomb.lua @@ -79,6 +79,7 @@ MORE_FIRE_PIPEBOMB_ENTITY.on_step = function(self, dtime) if obj:get_luaentity() ~= nil then if obj:get_luaentity().name ~= 'more_fire:pipebomb_entity' and obj:get_luaentity().name ~= '__builtin:item' then if self.node ~= '' then + minetest.sound_play('tnt_explode', {gain = 1.0}) explosives.boom(pos, {radius = 5}) local damage = 1 obj:punch(self.object, 1.0, { @@ -93,13 +94,13 @@ MORE_FIRE_PIPEBOMB_ENTITY.on_step = function(self, dtime) if node.name ~= 'air' then self.object:remove() - + minetest.sound_play('tnt_explode', {gain = 1.0}) explosives.boom(pos, { owner = playerWhoThrewObject }) minetest.add_particlespawner({ - amount = 64, + amount = 256, time = 0.5, minpos = {x = pos.x - 2, y = pos.y - 2, z = pos.z - 2}, maxpos = {x = pos.x + 2, y = pos.y + 2, z = pos.z + 2}, @@ -109,8 +110,8 @@ MORE_FIRE_PIPEBOMB_ENTITY.on_step = function(self, dtime) maxacc = vector.new(), minexptime = 1, maxexptime = 2.5, - minsize = 2, - maxsize = 5, + minsize = 4, + maxsize = 7, texture = "tnt_smoke.png", }) diff --git a/mods/ip_people/init.lua b/mods/ip_people/init.lua index cd2953c..f163b62 100644 --- a/mods/ip_people/init.lua +++ b/mods/ip_people/init.lua @@ -75,6 +75,9 @@ mobs:register_mob(":people:female", { punch_start = 200, punch_end = 219 }, + on_die = function(self, pos) + onPersonDie(self, pos) + end }) mobs:register_mob(":people:male", { @@ -128,4 +131,15 @@ mobs:register_mob(":people:male", { punch_start = 200, punch_end = 219 }, -}) \ No newline at end of file + + on_die = function(self, pos) + onPersonDie(self, pos) + end +}) + + + +onPersonDie = function(self, pos) + minetest.set_node(pos, {name = "literal_trash:bloodstain", param2 = 1}) + destruction_counter.peopleKilled = destruction_counter.peopleKilled + 1 +end diff --git a/mods/ip_people/mod.conf b/mods/ip_people/mod.conf index 750e341..0ab6dc4 100644 --- a/mods/ip_people/mod.conf +++ b/mods/ip_people/mod.conf @@ -1,2 +1,2 @@ name = ip_people -depends = mobs \ No newline at end of file +depends = mobs, ip_destruction_counter \ No newline at end of file diff --git a/mods/ip_roads/infrastructure/nodes.lua b/mods/ip_roads/infrastructure/nodes.lua index 1872779..8427553 100644 --- a/mods/ip_roads/infrastructure/nodes.lua +++ b/mods/ip_roads/infrastructure/nodes.lua @@ -1367,14 +1367,14 @@ } minetest.register_node("infrastructure:traffic_cone", { - description = "Traffic cone", + description = "Traffic Cone", tiles = { "infrastructure_traffic_cone.png" }, drawtype = "mesh", mesh = "infrastructure_traffic_cone.obj", paramtype = "light", groups = {cracky = 2}, walkable = false, - light_source = ENERGY_ABSORBING_TERMINAL_LIGHT_RANGE, + collision_box = cbox, selection_box = cbox, after_place_node = function(pos, placer) diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_anim_darkfirst.png b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_anim_darkfirst.png index 70b1cd3..0f0087d 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_anim_darkfirst.png and b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_anim_darkfirst.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_anim_lightfirst.png b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_anim_lightfirst.png index ea7368e..da411eb 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_anim_lightfirst.png and b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_anim_lightfirst.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_bottom_front_back.png b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_bottom_front_back.png index e283612..db5f939 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_bottom_front_back.png and b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_bottom_front_back.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_left_right_bright.png b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_left_right_bright.png index 0e6e50c..7cc9748 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_left_right_bright.png and b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_left_right_bright.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_top.png b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_top.png index 5f997a4..7b2a8fe 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_top.png and b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_h_top.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_v_left.png b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_v_left.png index 87b3bbb..1785788 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_v_left.png and b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_v_left.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_v_right.png b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_v_right.png index c777597..5d0a14f 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_v_right.png and b/mods/ip_roads/infrastructure/textures/infrastructure_boom_barrier_arm_v_right.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_fitch_barrel_side.png b/mods/ip_roads/infrastructure/textures/infrastructure_fitch_barrel_side.png index 7471830..a6d22d4 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_fitch_barrel_side.png and b/mods/ip_roads/infrastructure/textures/infrastructure_fitch_barrel_side.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_grid_paver_bottom.png b/mods/ip_roads/infrastructure/textures/infrastructure_grid_paver_bottom.png index de051cf..1964ad6 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_grid_paver_bottom.png and b/mods/ip_roads/infrastructure/textures/infrastructure_grid_paver_bottom.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_road_sign_crosswalk_front.png b/mods/ip_roads/infrastructure/textures/infrastructure_road_sign_crosswalk_front.png index 78b5dce..e513a7e 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_road_sign_crosswalk_front.png and b/mods/ip_roads/infrastructure/textures/infrastructure_road_sign_crosswalk_front.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_road_sign_right_of_way_front.png b/mods/ip_roads/infrastructure/textures/infrastructure_road_sign_right_of_way_front.png index 0f52f69..e106a30 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_road_sign_right_of_way_front.png and b/mods/ip_roads/infrastructure/textures/infrastructure_road_sign_right_of_way_front.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_pedestrians.png b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_pedestrians.png index 9cd1470..b72a2f8 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_pedestrians.png and b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_pedestrians.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles.png b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles.png index 393422a..30bde61 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles.png and b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_2.png b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_2.png index c81f500..e2b6429 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_2.png and b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_2.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_3.png b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_3.png index f55108c..34557d1 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_3.png and b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_3.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_4.png b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_4.png index c81f500..a28dd58 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_4.png and b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_bottom_4.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_1.png b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_1.png index 116ae46..d3279da 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_1.png and b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_1.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_2.png b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_2.png index 4a57e89..7c474ca 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_2.png and b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_2.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_3.png b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_3.png index 9dab2ea..beaee82 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_3.png and b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_3.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_4.png b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_4.png index ddc2364..f1da4ba 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_4.png and b/mods/ip_roads/infrastructure/textures/infrastructure_traffic_lights_vehicles_top_4.png differ diff --git a/mods/ip_roads/infrastructure/textures/infrastructure_truss.png b/mods/ip_roads/infrastructure/textures/infrastructure_truss.png index ba628f1..5c521cb 100644 Binary files a/mods/ip_roads/infrastructure/textures/infrastructure_truss.png and b/mods/ip_roads/infrastructure/textures/infrastructure_truss.png differ diff --git a/mods/ip_roads/streetsmod/textures/streets_lamps_basic_bottom.png b/mods/ip_roads/streetsmod/textures/streets_lamps_basic_bottom.png index 07d123f..d328f30 100644 Binary files a/mods/ip_roads/streetsmod/textures/streets_lamps_basic_bottom.png and b/mods/ip_roads/streetsmod/textures/streets_lamps_basic_bottom.png differ diff --git a/mods/ip_roads/streetsmod/textures/streets_lamps_basic_middle.png b/mods/ip_roads/streetsmod/textures/streets_lamps_basic_middle.png index 1370765..b3f6c89 100644 Binary files a/mods/ip_roads/streetsmod/textures/streets_lamps_basic_middle.png and b/mods/ip_roads/streetsmod/textures/streets_lamps_basic_middle.png differ diff --git a/mods/ip_roads/streetsmod/textures/streets_lamps_basic_top.png b/mods/ip_roads/streetsmod/textures/streets_lamps_basic_top.png index 355f50d..2d7a276 100644 Binary files a/mods/ip_roads/streetsmod/textures/streets_lamps_basic_top.png and b/mods/ip_roads/streetsmod/textures/streets_lamps_basic_top.png differ diff --git a/mods/ip_roads/streetsmod/textures/streets_lamps_basic_top_top.png b/mods/ip_roads/streetsmod/textures/streets_lamps_basic_top_top.png index 4d6bf22..3b80f41 100644 Binary files a/mods/ip_roads/streetsmod/textures/streets_lamps_basic_top_top.png and b/mods/ip_roads/streetsmod/textures/streets_lamps_basic_top_top.png differ diff --git a/mods/ip_roads/streetsmod/textures/streets_sign_grasswalk.png b/mods/ip_roads/streetsmod/textures/streets_sign_grasswalk.png deleted file mode 100644 index 1a72dff..0000000 Binary files a/mods/ip_roads/streetsmod/textures/streets_sign_grasswalk.png and /dev/null differ diff --git a/mods/ip_roads/streetsmod/textures/streets_sign_lava.png b/mods/ip_roads/streetsmod/textures/streets_sign_lava.png deleted file mode 100644 index e80f8e2..0000000 Binary files a/mods/ip_roads/streetsmod/textures/streets_sign_lava.png and /dev/null differ diff --git a/mods/ip_roads/streetsmod/textures/streets_sign_smoking.png b/mods/ip_roads/streetsmod/textures/streets_sign_smoking.png new file mode 100644 index 0000000..fd6a8ea Binary files /dev/null and b/mods/ip_roads/streetsmod/textures/streets_sign_smoking.png differ diff --git a/mods/ip_roads/streetsmod/textures/streets_sign_soliciting.png b/mods/ip_roads/streetsmod/textures/streets_sign_soliciting.png new file mode 100644 index 0000000..1428d89 Binary files /dev/null and b/mods/ip_roads/streetsmod/textures/streets_sign_soliciting.png differ diff --git a/mods/ip_roads/streetsmod/textures/streets_support.png b/mods/ip_roads/streetsmod/textures/streets_support.png index 610a38a..86a9459 100644 Binary files a/mods/ip_roads/streetsmod/textures/streets_support.png and b/mods/ip_roads/streetsmod/textures/streets_support.png differ diff --git a/mods/ip_roads/trafficlight/init.lua b/mods/ip_roads/trafficlight/init.lua index f099128..268cf1b 100644 --- a/mods/ip_roads/trafficlight/init.lua +++ b/mods/ip_roads/trafficlight/init.lua @@ -1,7 +1,6 @@ --[[ StreetsMod: inDev Trafficlights ]] -dofile(streets.modpath .. "/../trafficlight/old2new.lua") streets.tlBox = { {-0.1875,-0.5,0.5,0.1875,0.5,0.75}, --Box diff --git a/mods/ip_roads/trafficlight/old2new.lua b/mods/ip_roads/trafficlight/old2new.lua deleted file mode 100644 index 51ba9f3..0000000 --- a/mods/ip_roads/trafficlight/old2new.lua +++ /dev/null @@ -1,58 +0,0 @@ ---[[ - StreetsMod: Convert old trafficlights -]] -minetest.register_node(":streets:trafficlight_bottom", { - diggable = false, - pointable = false, - drawtype = "airlike", - description = "I'm an old node, please drop me", - groups = {not_in_creative_inventory = 1} -}) -minetest.register_abm({ - nodenames = {"streets:trafficlight_bottom"}, - interval = 1, - chance = 1, - action = function(pos, node) - minetest.log("action", "Converting trafficlight at position " .. minetest.pos_to_string(pos)) - -- Replace controller with distributor - pos.y = pos.y - 2 - minetest.set_node(pos, {name = "streets:digiline_distributor"}) - -- Change bottom pole - pos.y = pos.y + 2 - minetest.set_node(pos, {name = "streets:bigpole", param2 = 2}) - -- Change middle pole - pos.y = pos.y + 1 - minetest.set_node(pos, {name = "streets:bigpole", param2 = 2}) - -- Change the top - pos.y = pos.y + 1 - local fd = minetest.get_node(pos).param2 - local ch = minetest.get_meta(pos):get_string("channel") - minetest.set_node(pos, {name = "streets:bigpole", param2 = 2}) - -- Place new top - if fd == 1 then - minetest.set_node({x = pos.x - 1, y = pos.y, z = pos.z}, {name = "streets:trafficlight_top_warn", param2 = fd}) - local meta = minetest.get_meta({x = pos.x - 1, y = pos.y, z = pos.z}) - meta:set_string("channel", ch) - meta:set_string("state", "warn") - meta:set_string("formspec", "field[channel;Channel;${channel}]") - elseif fd == 2 then - minetest.set_node({x = pos.x, y = pos.y, z = pos.z + 1}, {name = "streets:trafficlight_top_warn", param2 = fd}) - local meta = minetest.get_meta({x = pos.x, y = pos.y, z = pos.z + 1}) - meta:set_string("channel", ch) - meta:set_string("state", "warn") - meta:set_string("formspec", "field[channel;Channel;${channel}]") - elseif fd == 3 then - minetest.set_node({x = pos.x + 1, y = pos.y, z = pos.z}, {name = "streets:trafficlight_top_warn", param2 = fd}) - local meta = minetest.get_meta({x = pos.x + 1, y = pos.y, z = pos.z}) - meta:set_string("channel", ch) - meta:set_string("state", "warn") - meta:set_string("formspec", "field[channel;Channel;${channel}]") - elseif fd == 0 then - minetest.set_node({x = pos.x, y = pos.y, z = pos.z - 1}, {name = "streets:trafficlight_top_warn", param2 = fd}) - local meta = minetest.get_meta({x = pos.x, y = pos.y, z = pos.z - 1}) - meta:set_string("channel", ch) - meta:set_string("state", "warn") - meta:set_string("formspec", "field[channel;Channel;${channel}]") - end - end -}) \ No newline at end of file diff --git a/mods/ip_story/init.lua b/mods/ip_story/init.lua index 575bdae..f0d11cd 100644 --- a/mods/ip_story/init.lua +++ b/mods/ip_story/init.lua @@ -92,3 +92,5 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end end end) + + diff --git a/mods/ip_story/textures/7.png b/mods/ip_story/textures/7.png index baec198..3fbb32c 100644 Binary files a/mods/ip_story/textures/7.png and b/mods/ip_story/textures/7.png differ diff --git a/mods/ip_story/textures/7.xcf b/mods/ip_story/textures/7.xcf index e4d6dc7..f612c52 100644 Binary files a/mods/ip_story/textures/7.xcf and b/mods/ip_story/textures/7.xcf differ diff --git a/mods/ip_story/textures/8.png b/mods/ip_story/textures/8.png index ea650fb..bef97fe 100644 Binary files a/mods/ip_story/textures/8.png and b/mods/ip_story/textures/8.png differ