1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-10 00:43:27 +02:00

Merge pull request #251 from ComfyFactory/rpg

fix minor issue with rpg
This commit is contained in:
Gerkiz 2022-04-11 21:14:53 +02:00 committed by GitHub
commit 7021324f6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2173 additions and 2173 deletions

View File

@ -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)

View File

@ -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})