mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-10 00:43:27 +02:00
fix minor issue with rpg
This commit is contained in:
parent
0f8ca8b84b
commit
9bf24f6659
@ -1197,9 +1197,9 @@ local function on_player_used_capsule(event)
|
||||
force = force,
|
||||
target_pos = target_pos,
|
||||
range = range,
|
||||
mana = rpg_t.mana,
|
||||
tame_unit_effects = tame_unit_effects,
|
||||
explosives = Explosives
|
||||
explosives = Explosives,
|
||||
rpg_t = rpg_t
|
||||
}
|
||||
|
||||
object.callback(data)
|
||||
|
@ -59,7 +59,7 @@ end
|
||||
local function create_entity(data)
|
||||
local self = data.self
|
||||
local player = data.player
|
||||
local mana = data.mana
|
||||
local rpg_t = data.rpg_t
|
||||
local position = data.position
|
||||
local surface = data.surface
|
||||
local force = data.force
|
||||
@ -77,7 +77,7 @@ local function create_entity(data)
|
||||
for y = 1, -1, -1 do
|
||||
local pos = {x = position.x + x, y = position.y + y}
|
||||
if surface.can_place_entity {name = self.entityName, position = pos} then
|
||||
if self.mana_cost > mana then
|
||||
if self.mana_cost > rpg_t.mana then
|
||||
break
|
||||
end
|
||||
local e = surface.create_entity({name = self.entityName, position = pos, force = force})
|
||||
|
Loading…
Reference in New Issue
Block a user