Skip to content

Commit

Permalink
Slight tweakes to termites,
Browse files Browse the repository at this point in the history
Refrencing #9
  • Loading branch information
Nexela committed Dec 14, 2016
1 parent 1131639 commit 48219f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ end
local function nano_trigger_cloud(event)
local area = Position.expand_to_area(event.entity.position, game.item_prototypes["gun-nano-emitter"].attack_parameters.range + 5)
for _, character in pairs(event.entity.surface.find_entities_filtered{area=area, type="player"}) do
local player = character.player and character.player.valid and character.player -- Make sure there is a player and it is valid
game.print("before")
local player = (character.player and character.player.valid) and character.player -- Make sure there is a player and it is valid
game.print("after")
if player and is_connected_player_ready(player) and not player.character.logistic_network then
local gun, nano_ammo, ammo_name = get_gun_ammo_name(player, "gun-nano-emitter")
if gun then
Expand Down
2 changes: 1 addition & 1 deletion prototypes/ammo/ammo-nano-termites.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ local cloud_small = {
action =
{
type = "area",
perimeter = 1,
perimeter = .5,
force="all",
entity_flags = {"placeable-neutral"},
action_delivery =
Expand Down

0 comments on commit 48219f8

Please sign in to comment.