1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-03 13:12:11 +02:00

added missing arguments

This commit is contained in:
MewMew 2019-10-15 05:56:30 +02:00
parent 70738f31c0
commit 514d102c3e
7 changed files with 14 additions and 13 deletions

View File

@ -158,7 +158,7 @@ local function get_resource_market_sells()
{price = {{"coin", math.random(5,10)}}, offer = {type = 'give-item', item = 'stone', count = 50}},
{price = {{"coin", math.random(5,10)}}, offer = {type = 'give-item', item = 'coal', count = 50}},
{price = {{"coin", math.random(8,16)}}, offer = {type = 'give-item', item = 'uranium-ore', count = 50}},
{price = {{"coin", math.random(2,3)}}, offer = {type = 'give-item', item = 'crude-oil-barrel', count = 1}},
{price = {{"coin", math.random(2,4)}}, offer = {type = 'give-item', item = 'crude-oil-barrel', count = 1}},
}
table.shuffle_table(sells)
return sells

View File

@ -100,7 +100,7 @@ local function protect_train(event)
event.entity.health = event.entity.health + event.final_damage_amount
end
end
--[[
local function neutral_force_player_damage_resistance(event)
if event.entity.force.index ~= 3 then return end -- Neutral Force
if event.cause then
@ -116,7 +116,7 @@ local function neutral_force_player_damage_resistance(event)
end
event.entity.health = event.entity.health + (event.final_damage_amount * 0.5)
end
]]
local function biters_chew_rocks_faster(event)
if event.entity.force.index ~= 3 then return end --Neutral Force
if not event.cause then return end

View File

@ -16,7 +16,8 @@ local coin_yield = {
["biter-spawner"] = 32,
["small-worm-turret"] = 8,
["medium-worm-turret"] = 16,
["big-worm-turret"] = 24
["big-worm-turret"] = 24,
["behemoth-worm-turret"] = 32,
}
local entities_that_earn_coins = {

View File

@ -33,7 +33,7 @@ local function on_player_died(event)
if event.cause then
local cause = event.cause
if not cause.name then
game.print(player.name .. tag .. " was killed." .. str, message_color)
game.print(player.name .. tag .. " was killed.", message_color)
return
end
if messages[cause.name] then

View File

@ -134,7 +134,7 @@ local function on_entity_died(event)
local surface = entity.surface
local ore = ore_raffle[math_random(1, #ore_raffle)]
local pos = {entity.position.x, entity.position.y}
create_particles(surface, particles[ore], pos, 16)
create_particles(surface, particles[ore], pos, 16, false)
if event.cause then
if event.cause.valid then

View File

@ -54,7 +54,7 @@ local function on_player_mined_entity(event)
local ore_entities_placed = 0
local modifier_raffle = {{0,-1},{-1,0},{1,0},{0,1}}
while ore_entities_placed < math_random(size[2],size[3]) do
local a = math.ceil((math_random(tile_distance_to_center*4, tile_distance_to_center*5)) / 1 + ore_entities_placed * 0.5, 0)
local a = math.floor((math_random(tile_distance_to_center*4, tile_distance_to_center*5)) / 1 + ore_entities_placed * 0.5) + 1
for x = 1, 150, 1 do
local m = modifier_raffle[math_random(1,#modifier_raffle)]
local pos = {x = p.x + m[1], y = p.y + m[2]}

View File

@ -405,7 +405,7 @@ local function gain_xp(player, amount)
amount = math.round(amount, 2)
global.rpg[player.index].xp = global.rpg[player.index].xp + amount
global.rpg[player.index].xp_since_last_floaty_text = global.rpg[player.index].xp_since_last_floaty_text + amount
if player.gui.left.rpg then draw_gui(player) end
if player.gui.left.rpg then draw_gui(player, false) end
if not experience_levels[global.rpg[player.index].level + 1] then return end
if global.rpg[player.index].xp >= experience_levels[global.rpg[player.index].level + 1] then
level_up(player)
@ -457,7 +457,7 @@ local function on_gui_click(event)
player.gui.left.rpg.destroy()
return
end
draw_gui(player)
draw_gui(player, false)
end
end
@ -471,20 +471,20 @@ local function on_gui_click(event)
if event.button == defines.mouse_button_type.right then
for a = 1, 5, 1 do
if global.rpg[player.index].points_to_distribute <= 0 then draw_gui(player) return end
if global.rpg[player.index].points_to_distribute <= 0 then draw_gui(player, false) return end
global.rpg[player.index].points_to_distribute = global.rpg[player.index].points_to_distribute - 1
global.rpg[player.index][index] = global.rpg[player.index][index] + 1
update_player_stats(player)
end
draw_gui(player)
draw_gui(player, false)
return
end
if global.rpg[player.index].points_to_distribute <= 0 then draw_gui(player) return end
if global.rpg[player.index].points_to_distribute <= 0 then draw_gui(player, false) return end
global.rpg[player.index].points_to_distribute = global.rpg[player.index].points_to_distribute - 1
global.rpg[player.index][index] = global.rpg[player.index][index] + 1
update_player_stats(player)
draw_gui(player)
draw_gui(player, false)
end
local xp_yield = {