1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-11-06 09:09:26 +02:00

Fixed floating text and CI pleasing

This commit is contained in:
SimonFlapse
2018-11-24 16:35:20 +01:00
parent 7febb1162e
commit 6ed752e73d

View File

@@ -228,8 +228,8 @@ local function on_entity_died (event)
return return
end end
elseif cause and (cause.name == 'artillery-turret' or cause.name == 'gun-turret' or cause.name == 'laser-turret' or cause.name == 'flamethrower-turret') then elseif cause and (cause.name == 'artillery-turret' or cause.name == 'gun-turret' or cause.name == 'laser-turret' or cause.name == 'flamethrower-turret') then
local exp = Config.XP['enemy_killed'] * alien_coin_modifiers[entity.name] exp = Config.XP['enemy_killed'] * alien_coin_modifiers[entity.name]
local text = string_format('Killed %s! + %d XP', entity.name, exp) local text = string_format('+ %d XP', exp)
Game.print_floating_text(cause.surface, cause.position, text, {r = 144, g = 202, b = 249}) Game.print_floating_text(cause.surface, cause.position, text, {r = 144, g = 202, b = 249})
ForceControl.add_experience(force, exp) ForceControl.add_experience(force, exp)
return return
@@ -247,7 +247,7 @@ local function on_entity_died (event)
end end
local exp = Config.XP['enemy_killed'] * alien_coin_modifiers[entity.name] local exp = Config.XP['enemy_killed'] * alien_coin_modifiers[entity.name]
local text = string_format('Killed %s! + %d XP', entity.name, exp) local text = string_format('+ %d XP', exp)
local player_index = cause.player.index local player_index = cause.player.index
Game.print_player_floating_text_position(player_index, text, {r = 144, g = 202, b = 249},-1, -0.5) Game.print_player_floating_text_position(player_index, text, {r = 144, g = 202, b = 249},-1, -0.5)
ForceControl.add_experience(force, exp) ForceControl.add_experience(force, exp)