From a9f3504e34f237ec12ba37f2e9aa1cbf6a074561 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 4 May 2024 11:43:04 +0000 Subject: [PATCH] Rename to vl_physics --- mods/ENTITIES/mcl_item_entity/init.lua | 2 +- mods/ENTITIES/mcl_item_entity/mod.conf | 2 +- mods/ENTITIES/mcl_mobs/api.lua | 2 +- mods/ENTITIES/mcl_mobs/mod.conf | 2 +- mods/ENVIRONMENT/{mcl_physics => vl_physics}/api.lua | 6 +++--- mods/ENVIRONMENT/{mcl_physics => vl_physics}/init.lua | 4 ++-- mods/ENVIRONMENT/{mcl_physics => vl_physics}/mod.conf | 2 +- mods/HUD/mcl_experience/orb.lua | 2 +- mods/ITEMS/mcl_core/nodes_base.lua | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) rename mods/ENVIRONMENT/{mcl_physics => vl_physics}/api.lua (88%) rename mods/ENVIRONMENT/{mcl_physics => vl_physics}/init.lua (97%) rename mods/ENVIRONMENT/{mcl_physics => vl_physics}/mod.conf (79%) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 6b7fc2cf2..75ea6d62c 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -995,7 +995,7 @@ minetest.register_entity(":__builtin:item", { if push_out_item_stuck_in_solid(self, dtime, p, def, is_in_water) then return end - mcl_physics.apply_entity_environmental_physics(self) + vl_physics.apply_entity_environmental_physics(self) -- If node is not registered or node is walkably solid and resting on nodebox local nn = minetest.get_node(vector.offset(p, 0, -0.5, 0)).name diff --git a/mods/ENTITIES/mcl_item_entity/mod.conf b/mods/ENTITIES/mcl_item_entity/mod.conf index 26c80d0ea..d95dc8c6c 100644 --- a/mods/ENTITIES/mcl_item_entity/mod.conf +++ b/mods/ENTITIES/mcl_item_entity/mod.conf @@ -1,4 +1,4 @@ name = mcl_item_entity author = PilzAdam description = Dropped items will be attracted to the player like a magnet. -depends = mcl_physics, mcl_enchanting +depends = vl_physics, mcl_enchanting diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index b98656adb..7b964d762 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -412,7 +412,7 @@ local function on_step_work (self, dtime) self:check_suspend(player_in_active_range) -- Handle environmental physics - mcl_physics.apply_entity_environmental_physics(self) + vl_physics.apply_entity_environmental_physics(self) if not self._jumping_cliff then self._can_jump_cliff = self:can_jump_cliff() diff --git a/mods/ENTITIES/mcl_mobs/mod.conf b/mods/ENTITIES/mcl_mobs/mod.conf index 3c331852b..4dd9bcb14 100644 --- a/mods/ENTITIES/mcl_mobs/mod.conf +++ b/mods/ENTITIES/mcl_mobs/mod.conf @@ -2,4 +2,4 @@ name = mcl_mobs author = PilzAdam description = Adds a mob API for mods to add animals or monsters, etc. depends = mcl_particles, mcl_luck -optional_depends = mcl_weather, mcl_explosions, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor, mcl_portals, mcl_experience, mcl_sculk, mcl_physics +optional_depends = mcl_weather, mcl_explosions, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor, mcl_portals, mcl_experience, mcl_sculk, vl_physics diff --git a/mods/ENVIRONMENT/mcl_physics/api.lua b/mods/ENVIRONMENT/vl_physics/api.lua similarity index 88% rename from mods/ENVIRONMENT/mcl_physics/api.lua rename to mods/ENVIRONMENT/vl_physics/api.lua index d749d137d..b48a6e8db 100644 --- a/mods/ENVIRONMENT/mcl_physics/api.lua +++ b/mods/ENVIRONMENT/vl_physics/api.lua @@ -1,4 +1,4 @@ -local mod = mcl_physics +local mod = vl_physics local registered_environment_effects = {} @@ -35,12 +35,12 @@ local DEFAULT_ENTITY_PHYSICS = { function mod.apply_entity_environmental_physics(self, data) data = data or {} - local physics = self._mcl_physics or DEFAULT_ENTITY_PHYSICS + local physics = self._vl_physics or DEFAULT_ENTITY_PHYSICS local mass = physics.mass or DEFAULT_ENTITY_PHYSICS.mass local pos = self.object:get_pos() local vel = self.object:get_velocity() - local new_velocity,new_acceleration = mcl_physics.get_environment_effect(pos, vel, data, mass, self) + local new_velocity,new_acceleration = vl_physics.get_environment_effect(pos, vel, data, mass, self) --if new_velocity then print("new_velocity="..tostring(new_velocity)) end --if new_acceleration then print("new_acceleration="..tostring(new_acceleration)) end diff --git a/mods/ENVIRONMENT/mcl_physics/init.lua b/mods/ENVIRONMENT/vl_physics/init.lua similarity index 97% rename from mods/ENVIRONMENT/mcl_physics/init.lua rename to mods/ENVIRONMENT/vl_physics/init.lua index 44efbdc56..b9b627a88 100644 --- a/mods/ENVIRONMENT/mcl_physics/init.lua +++ b/mods/ENVIRONMENT/vl_physics/init.lua @@ -1,7 +1,7 @@ local modname = minetest.get_current_modname() local modpath = minetest.get_modpath(modname) local mod = {} -mcl_physics = mod +vl_physics = mod dofile(modpath.."/api.lua") @@ -54,7 +54,7 @@ local DEFAULT_NODE_PHYSICS = { } local function apply_node_physics(node, vel, staticdata, entity) local node_def = minetest.registered_nodes[node.name] or {} - local node_physics = node_def._mcl_physics or DEFAULT_NODE_PHYSICS + local node_physics = node_def._vl_physics or DEFAULT_NODE_PHYSICS local node_physics_effect = node_physics.effect if node_physics_effect then diff --git a/mods/ENVIRONMENT/mcl_physics/mod.conf b/mods/ENVIRONMENT/vl_physics/mod.conf similarity index 79% rename from mods/ENVIRONMENT/mcl_physics/mod.conf rename to mods/ENVIRONMENT/vl_physics/mod.conf index 42ea23306..8239d186a 100644 --- a/mods/ENVIRONMENT/mcl_physics/mod.conf +++ b/mods/ENVIRONMENT/vl_physics/mod.conf @@ -1,4 +1,4 @@ -name = mcl_physics +name = vl_physics author = teknomunk description = Environmental physics depends = flowlib diff --git a/mods/HUD/mcl_experience/orb.lua b/mods/HUD/mcl_experience/orb.lua index 4cb28d4ca..b39473f0e 100644 --- a/mods/HUD/mcl_experience/orb.lua +++ b/mods/HUD/mcl_experience/orb.lua @@ -107,7 +107,7 @@ local function xp_step(self, dtime) end -- Slide on slippery nodes - mcl_physics.apply_entity_environmental_physics(self) + vl_physics.apply_entity_environmental_physics(self) end minetest.register_entity("mcl_experience:orb", { diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index f39d4d180..59c5a5bdd 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -919,7 +919,7 @@ minetest.register_node("mcl_core:ice", { _mcl_blast_resistance = 0.5, _mcl_hardness = 0.5, _mcl_silk_touch_drop = true, - _mcl_physics = { + _vl_physics = { friction = 0.4, }, }) @@ -936,7 +936,7 @@ minetest.register_node("mcl_core:packed_ice", { _mcl_blast_resistance = 0.5, _mcl_hardness = 0.5, _mcl_silk_touch_drop = true, - _mcl_physics = { + _vl_physics = { friction = 0.15, }, })