Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add send_via_river special game #446

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

XVhc6A
Copy link
Collaborator

@XVhc6A XVhc6A commented Mar 8, 2024

Brief description of the changes:

Send your science via the inserters at the river!

inserters are spaced every ~400 units. More inserters you use, the faster you can send science.

Tested Changes:

  • I've tested the changes locally or with people.
  • I've not tested the changes.
image

comfy_panel/special_games/send_via_river.lua Show resolved Hide resolved
comfy_panel/special_games/send_via_river.lua Show resolved Hide resolved
comfy_panel/special_games/send_via_river.lua Show resolved Hide resolved
comfy_panel/special_games/send_via_river.lua Show resolved Hide resolved
" flasks of ",
formatted_food,
" to team ",
team_strings[enemy],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be more consistent to use the same messages, give or take, as feeding.lua does, i.e.

" to ", Functions.team_name_with_color(enemy), "'s biters!"

if inventory then
for item_name, item_count in pairs(inventory.get_contents()) do
if science_packs[item_name] ~= nil then
inventory.remove({ name = item_name, count = item_count })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you just directly use Feeding.lua:Public.feed_biters ? and delete a lot of this code?

end
end

local function drbuttons_temporary_tick_handler(event)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps rename to "send_via_river_" instead of "drbuttons_" ?

global.send_via_river_special_init = false
global.send_via_river_specialbox_check_interval = 60*60*5

local disabled_food = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, it would be great to use Tables for this if you can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants