1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-14 10:13:13 +02:00

Merge pull request #147 from Valansch/reenable_on_tick

Reenable on tick
This commit is contained in:
Valansch 2018-01-09 20:49:14 +01:00 committed by GitHub
commit 8ce0010022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 23 deletions

View File

@ -291,21 +291,6 @@ local function market_item_purchased(event)
fish_cost = market_item.price[1].amount * event.count
global.fish_market_fish_spent[event.player_index] = global.fish_market_fish_spent[event.player_index] + fish_cost
--to reenable buffs and pets remove this block:
if event.offer_index < 4 then
local fish_amount = 10
if event.offer_index == 2 then fish_amount = 30 end
player.insert{name="raw-fish", count = fish_amount}
player.remove_item{name="small-plane", count = 100}
player.remove_item{name="discharge-defense-remote", count = 100}--nobody useds that anyways
player.remove_item{name="wood", count = event.count}
player.print("This item is currently disabled due to desync concerns. Please don't hurt us :(")
end
return
--upto here
if event.offer_index == 1 then -- discharge-defense-remote
player.remove_item({name="discharge-defense-remote", count=event.count})
boost_player_runningspeed(player) --disabled due to on_tick being disabled

View File

@ -1,18 +1,18 @@
local function on_tick()
walk_on_tick()
if game.tick % 60 == 0 then
walk_on_tick()
if game.tick % 60 == 0 then
poll_on_second()
walk_distance_on_second()
if game.tick % 1200 == 0 then
player_list_on_12_seconds()
end
walk_distance_on_second()
if game.tick % 1200 == 0 then
player_list_on_12_seconds()
end
if game.tick % 180 == 0 then
fish_market_on_180_ticks()
if game.tick % 900 == 0 then
refill_well()
end
end
end
end
end
--Event.register(defines.events.on_tick, on_tick)
Event.register(defines.events.on_tick, on_tick)