Improvements
@ -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
|
||||
|
@ -1,2 +1,2 @@
|
||||
name = ip_cops
|
||||
depends = mobs
|
||||
depends = mobs, ip_destruction_counter
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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",
|
||||
})
|
||||
|
||||
|
@ -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
|
||||
},
|
||||
})
|
||||
|
||||
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
|
||||
|
@ -1,2 +1,2 @@
|
||||
name = ip_people
|
||||
depends = mobs
|
||||
depends = mobs, ip_destruction_counter
|
@ -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)
|
||||
|
Before Width: | Height: | Size: 762 B After Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 550 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 527 B After Width: | Height: | Size: 376 B |
Before Width: | Height: | Size: 979 B After Width: | Height: | Size: 555 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 892 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 924 B |
Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 555 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 701 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 698 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 742 B |
Before Width: | Height: | Size: 817 B After Width: | Height: | Size: 577 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 649 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 638 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 719 B |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 697 B |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 4.3 KiB |
BIN
mods/ip_roads/streetsmod/textures/streets_sign_smoking.png
Normal file
After Width: | Height: | Size: 449 B |
BIN
mods/ip_roads/streetsmod/textures/streets_sign_soliciting.png
Normal file
After Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 800 B |
@ -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
|
||||
|
@ -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
|
||||
})
|
@ -92,3 +92,5 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 6.2 KiB |