mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-12 10:04:40 +02:00
more market command to fish_market.lua
This commit is contained in:
parent
2a845fee10
commit
a2bee6628f
@ -463,7 +463,6 @@ commands.add_command("tpplayer", "<player> - Teleports you to the player. (Admin
|
||||
commands.add_command("invoke", "<player> - Teleports the player to you. (Admins and moderators)", invoke)
|
||||
commands.add_command("tppos", "Teleports you to a selected entity. (Admins only)", teleport_location)
|
||||
commands.add_command("walkabout", '<player> <duration> - Send someone on a walk. (Admins and moderators)', walkabout)
|
||||
commands.add_command("market", 'Places a fish market near you. (Admins only)', spawn_market)
|
||||
commands.add_command("regulars", 'Prints a list of game regulars.', print_regulars)
|
||||
commands.add_command("regular", '<promote, demote>, <player> Change regular status of a player. (Admins and moderators)', regular)
|
||||
commands.add_command("mods", 'Prints a list of game mods.', print_mods)
|
||||
|
@ -19,7 +19,7 @@ make pet follow you moar
|
||||
|
||||
local Event = require "utils.event"
|
||||
|
||||
function spawn_market(cmd)
|
||||
local function spawn_market(cmd)
|
||||
if not game.player or not game.player.admin then
|
||||
cant_run(cmd.name)
|
||||
return
|
||||
@ -352,7 +352,7 @@ end
|
||||
|
||||
if not global.pet_command_rotation then global.pet_command_rotation = 1 end
|
||||
|
||||
function on_180_ticks()
|
||||
local function on_180_ticks()
|
||||
|
||||
if game.tick % 900 == 0 then
|
||||
if global.player_speed_boost_records then
|
||||
@ -399,13 +399,15 @@ function on_180_ticks()
|
||||
end
|
||||
end
|
||||
|
||||
function fish_player_crafted_item(event)
|
||||
local function fish_player_crafted_item(event)
|
||||
local x = math.random(1,50)
|
||||
if x == 1 then
|
||||
fish_earned(event, 1)
|
||||
end
|
||||
end
|
||||
|
||||
commands.add_command("market", 'Places a fish market near you. (Admins only)', spawn_market)
|
||||
|
||||
Event.on_nth_tick(180, on_180_ticks)
|
||||
Event.add(defines.events.on_pre_player_mined_item, pre_player_mined_item)
|
||||
Event.add(defines.events.on_entity_died, fish_drop_entity_died)
|
||||
|
Loading…
Reference in New Issue
Block a user