1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-28 03:56:53 +02:00

added print to settime

implemented /clock
updated info.lua
removed rail_grid from generating
This commit is contained in:
Valansch 2017-07-09 02:28:01 +02:00
parent 26e4b599a2
commit 8946486e6a
4 changed files with 27 additions and 28 deletions

View File

@ -71,6 +71,7 @@ function set_time(d, month, h, m)
current_day = d current_day = d
current_h = h current_h = h
current_m = m current_m = m
game.print(game.player.name .. " set the clock to " .. format_time(game.tick) .. ". Type /clock to check the time.")
end end
Event.register(defines.events.on_console_command, player_send_command) Event.register(defines.events.on_console_command, player_send_command)

View File

@ -173,6 +173,10 @@ function on_set_time(cmd)
end end
set_time(params_numeric[1], params_numeric[2], params_numeric[3], params_numeric[4]) set_time(params_numeric[1], params_numeric[2], params_numeric[3], params_numeric[4])
end end
local function clock()
game.player.print(format_time(game.tick))
end
commands.add_command("kill", "Will kill you.", kill) commands.add_command("kill", "Will kill you.", kill)
commands.add_command("detrain", "<player> - Kicks the player off a train.", detrain) commands.add_command("detrain", "<player> - Kicks the player off a train.", detrain)
commands.add_command("tpplayer", "<player> - Teleports you to the player.", teleport_player) commands.add_command("tpplayer", "<player> - Teleports you to the player.", teleport_player)
@ -180,3 +184,4 @@ commands.add_command("invoke", "<player> - Teleports the player to you.", invoke
commands.add_command("tppos", "Teleports you to a selected entity.", teleport_location) commands.add_command("tppos", "Teleports you to a selected entity.", teleport_location)
commands.add_command("walkabout", '<player> <"close", "far", "very far", number> - Send someone on a walk.', walkabout) commands.add_command("walkabout", '<player> <"close", "far", "very far", number> - Send someone on a walk.', walkabout)
commands.add_command("settime", '<day> <month> <hour> <minute> - Sets the clock', on_set_time) commands.add_command("settime", '<day> <month> <hour> <minute> - Sets the clock', on_set_time)
commands.add_command("clock", 'Look at the clock', clock)

View File

@ -18,23 +18,16 @@ local function info_show(player)
local infotext = [===[ local infotext = [===[
Hi stranger, I'm a fish.. Hi stranger, I'm a fish..
And this is what you ought to know: And this is what you ought to know:
- Please be nice and don't grief. - Please be nice and don't grief. Or else.. ;)
- Don't fight with other players for silly things.
- Fix personal confrontations diplomatically.
- No political, racist, or misogynistic content. - No political, racist, or misogynistic content.
- If you suspect you desync, restart the game.
- If you suspect you desync while connecting, - You can join our community on discord.me/redmew
close and relaunch Factorio ASAP. Very bad for us. - View the chatlog on: log.mewmew.net
- Contribute to server costs and upgrades with
- Join our community on https://discord.gg/gKyDpQE bitcoin: 13qh5uJh3UDUiWKyQaybkpxC1gfLVDB1ww
for questions and feedback. Also on /r/redmew (reddit)
- You can contribute to server costs and upgrades
with bitcoin: 13qh5uJh3UDUiWKyQaybkpxC1gfLVDB1ww
]===] ]===]
player.gui.left.direction = "horizontal" player.gui.left.direction = "horizontal"

View File

@ -11,7 +11,7 @@ notes:
--]] --]]
require "perlin_noise" require "perlin_noise"
require "rail_grid" --require "rail_grid"
perlin:load( ) perlin:load( )