Skip to content

Commit

Permalink
add POVA support (#138)
Browse files Browse the repository at this point in the history
* add POVA support

Add support for POVA player overrides.

* add POVA support

Add support for POVA player overrides.
  • Loading branch information
tenplus1 authored and stujones11 committed May 7, 2018
1 parent 579d245 commit 4210caf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 3d_armor/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local S = armor_i18n.gettext
local skin_previews = {}
local use_player_monoids = minetest.global_exists("player_monoids")
local use_armor_monoid = minetest.global_exists("armor_monoid")
local use_pova_mod = minetest.get_modpath("pova")
local armor_def = setmetatable({}, {
__index = function()
return setmetatable({
Expand Down Expand Up @@ -286,6 +287,14 @@ armor.set_player_armor = function(self, player)
"3d_armor:physics")
player_monoids.gravity:add_change(player, physics.gravity,
"3d_armor:physics")
elseif use_pova_mod then
-- only add the changes, not the default 1.0 for each physics setting
pova.add_override(name, "3d_armor", {
speed = physics.speed - 1,
jump = physics.jump - 1,
gravity = physics.gravity - 1,
})
pova.do_override(player)
else
player:set_physics_override(physics)
end
Expand Down
1 change: 1 addition & 0 deletions 3d_armor/depends.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
default
player_monoids?
armor_monoid?
pova?
fire?
ethereal?
bakedclay?
Expand Down

0 comments on commit 4210caf

Please sign in to comment.