2021-01-18 9:00 JST 〜 メンテナンスによるサービス全停止予定
  • R/O
  • SSH

コミット

タグ

よく使われているワード(クリックで追加)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

A simple mod for the game "Factorio" that does what it's name implies.


コミットメタ情報

リビジョン1350876c2278245622f81c1433b7951fc58d655f (tree)
日時2018-08-06 15:07:13
作者Eric Hopper <hopper@omni...>
コミッターEric Hopper

ログメッセージ

A preliminary version of RunSpeedToggle.

変更サマリ

差分

diff -r 000000000000 -r 1350876c2278 control.lua
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/control.lua Sun Aug 05 23:07:13 2018 -0700
@@ -0,0 +1,23 @@
1+local function on_hotkey(event)
2+ local player = game.players[event.player_index]
3+ local speed = player.character_running_speed_modifier
4+ local msg = ""
5+
6+ if speed == 1 then
7+ speed = 1.5
8+ msg = ">"
9+ elseif (speed > 1.49999) and (speed < 1.50001) then
10+ speed = 15
11+ msg = ">>"
12+ else
13+ speed = 1
14+ msg = "1"
15+ end
16+ player.surface.create_entity(
17+ {name = "flying-text",
18+ position = pos_offset(player.position,{x=-0.5,y=0.2}),
19+ text = msg,
20+ color = {r=1, g=1, b=1}})
21+end
22+
23+script.on_event("runspeedtoggle_hotkey", on_hotkey)
diff -r 000000000000 -r 1350876c2278 data.lua
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data.lua Sun Aug 05 23:07:13 2018 -0700
@@ -0,0 +1,10 @@
1+data:extend(
2+ {
3+ {
4+ type = "custom-input",
5+ name = "runspeedtoggle_hotkey",
6+ key_sequence = "F1",
7+ consuming = "script-only"
8+ },
9+ }
10+)
diff -r 000000000000 -r 1350876c2278 info.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/info.json Sun Aug 05 23:07:13 2018 -0700
@@ -0,0 +1,11 @@
1+{
2+ "name": "RunSpeedToggle",
3+ "version": "0.0.1",
4+ "title": "Run Speed Toggle",
5+ "author": "Omnifarious",
6+ "contact": "eric-factorio@omnifarious.org"
7+ "homepage": "",
8+ "factorio_version": "0.16",
9+ "dependencies": ["base >= 0.16"],
10+ "description": "This mod will toggle the player's run speed multiplier (applied after all bonuses) to one of three configurable values with a keypress."
11+}