mirror of
https://github.com/pandorabox-io/banners.git
synced 2025-01-08 00:50:32 +01:00
Banners increase maxpower instead of power
This commit is contained in:
parent
f17a739709
commit
7e74d0a3a0
@ -116,7 +116,7 @@ minetest.register_node("banners:power_banner", {
|
|||||||
if facname then
|
if facname then
|
||||||
local faction = factions.factions[facname]
|
local faction = factions.factions[facname]
|
||||||
if faction then
|
if faction then
|
||||||
faction:decrease_power(banners.power_per_banner)
|
faction:decrease_maxpower(banners.power_per_banner)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
banners.banner_on_dig(pos, n, p)
|
banners.banner_on_dig(pos, n, p)
|
||||||
@ -132,7 +132,7 @@ banners.after_powerbanner_placed = function(pos, player, itemstack, pointed_thin
|
|||||||
local banner_string = factions.factions[faction].banner
|
local banner_string = factions.factions[faction].banner
|
||||||
minetest.get_meta(pos):set_string("banner", banner_string)
|
minetest.get_meta(pos):set_string("banner", banner_string)
|
||||||
minetest.get_meta(pos):set_string("faction", faction)
|
minetest.get_meta(pos):set_string("faction", faction)
|
||||||
factions.factions[faction]:increase_power(banners.power_per_banner)
|
factions.factions[faction]:increase_maxpower(banners.power_per_banner)
|
||||||
end
|
end
|
||||||
minetest.add_entity(pos, "banners:banner_ent")
|
minetest.add_entity(pos, "banners:banner_ent")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user