Skip to content

Commit

Permalink
0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
thx114 committed Jan 13, 2024
1 parent 9c9b65e commit 1f04991
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 26 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# 1.0
# 0.1.1
�޸��������Bug
�޸�˫��bug

# 0.1.0
��������������
�������ֿ�ݼ�: ��RICO MOD��
- �ʲ���ǩ�����ҷ�ҳ
Expand Down
4 changes: 2 additions & 2 deletions MioHotkeyMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<AssemblyName>MioHotkeyMod</AssemblyName>
<RootNamespace>MioHotkeyMod</RootNamespace>
<Description>more Hotkeys</Description>
<Version>0.1.0</Version>
<Version>0.1.1</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<RestoreAdditionalProjectSources>
Expand Down Expand Up @@ -35,7 +35,7 @@
<PackageReference Include="BepInEx.PluginInfoProps" Version="2.0.0" />
<PackageReference Include="HarmonyX" Version="2.10.2"></PackageReference>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.7" IncludeAssets="compile" />
<PackageReference Include="HookUILib" Version="0.1.0" />
<PackageReference Include="HookUILib" Version="0.1.1" />
</ItemGroup>
<PropertyGroup>
<BepInExVersion Condition="'$(BepInExVersion)' == ''">5</BepInExVersion>
Expand Down
2 changes: 1 addition & 1 deletion Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class mioPLUGIN
{
public const string PLUGIN_GUID = "mio-hotkey-mod";
public const string PLUGIN_NAME = "MioHotkeyMod";
public const string PLUGIN_VERSION = "0.1.0";
public const string PLUGIN_VERSION = "0.1.1";
}
namespace MioHotkeyMod
{
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
* `左键`: 如果打开公交交通视图,且选择了工具栏的交通资产,则只显示对应公交元素

## 更新日志
* **0.1.1**
修复公交面板Bug
修复双击bug

* **0.1.0**
新增鼠标悬浮检测
新增滚轮快捷键: (RICO MOD)
Expand Down Expand Up @@ -96,6 +100,11 @@
* `Left mouse button`: If the public transport view is open and a traffic asset is selected in the toolbar, only the corresponding public transport elements are displayed.

## Update Log

* **0.1.1**
Fixed a bug in the info panel.
Resolved an issue with double-clicking.

* **0.1.0**
Added mouse hover detection.
Added wheel shortcuts (RICO MOD):
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mio-hotley-mod",
"version": "0.1.0",
"version": "0.1.1",
"description": "more hotkeys",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion thunderstore.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schemaVersion = "0.0.1"
[package]
namespace = "MioMods"
name = "MioHotkeyMod"
versionNumber = "0.1.0"
versionNumber = "0.1.1"
description = "more hotkeys"
websiteUrl = "https://github.com/thx114/mio-hotkey-mod"
containsNsfwContent = false
Expand Down
34 changes: 17 additions & 17 deletions ui_src/counter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class InfomodesPanel {
}
static clickAllItems(...ButtonIndexList) {
for (item of [...ButtonIndexList]) {
InfomodesPanel.getPanelItems().index(index).click
InfomodesPanel.getPanelItems().index(item).click
}
}
static clear() {
Expand All @@ -386,44 +386,44 @@ class InfomodesPanel {
static ClickFuncs = RE(
[InfomodesPanel.toolAtv('Bus.svg')],
async () => {
if (InfomodesPanel.getActiveItemNum() === 3 && InfomodesPanel.getItemState(4)) return;
if (InfomodesPanel.getActiveItemNum() === 3 && InfomodesPanel.getItemState(5)) return;
InfomodesPanel.clear(); await delay(50);
InfomodesPanel.clickAllItems(4, 14, 13)
InfomodesPanel.clickAllItems(5, 15, 14)
},

[InfomodesPanel.toolAtv('Train.svg')],
async () => {
if (InfomodesPanel.getActiveItemNum() === 3 && InfomodesPanel.getItemState(5)) return;
if (InfomodesPanel.getActiveItemNum() === 3 && InfomodesPanel.getItemState(6)) return;
InfomodesPanel.clear(); await delay(50);
InfomodesPanel.clickAllItems(5, 15, 13)
InfomodesPanel.clickAllItems(6, 16, 14)
},

[InfomodesPanel.toolAtv('Tram.svg')],
async () => {
if (InfomodesPanel.getActiveItemNum() === 3 && InfomodesPanel.getItemState(6)) return;
if (InfomodesPanel.getActiveItemNum() === 3 && InfomodesPanel.getItemState(7)) return;
InfomodesPanel.clear(); await delay(50);
InfomodesPanel.clickAllItems(6, 16, 13)
InfomodesPanel.clickAllItems(7, 17, 14)
},

[InfomodesPanel.toolAtv('Subway.svg')],
async () => {
if (InfomodesPanel.getActiveItemNum() === 3 && InfomodesPanel.getItemState(7)) return;
if (InfomodesPanel.getActiveItemNum() === 3 && InfomodesPanel.getItemState(8)) return;
InfomodesPanel.clear(); await delay(50);
InfomodesPanel.clickAllItems(7, 17, 13)
InfomodesPanel.clickAllItems(8, 18, 14)
},

[InfomodesPanel.toolAtv('Ship.svg')],
async () => {
if (InfomodesPanel.getActiveItemNum() === 3 && InfomodesPanel.getItemState(8)) return;
if (InfomodesPanel.getActiveItemNum() === 3 && InfomodesPanel.getItemState(9)) return;
InfomodesPanel.clear(); await delay(50);
InfomodesPanel.clickAllItems(8, 18, 13)
InfomodesPanel.clickAllItems(9, 19, 14)
},

[InfomodesPanel.toolAtv('Airplane.svg')],
async () => {
if (InfomodesPanel.getActiveItemNum() === 2 && InfomodesPanel.getItemState(9)) return;
if (InfomodesPanel.getActiveItemNum() === 2 && InfomodesPanel.getItemState(10)) return;
InfomodesPanel.clear(); await delay(50);
InfomodesPanel.clickAllItems(9, 13)
InfomodesPanel.clickAllItems(10, 14)
},

)
Expand Down Expand Up @@ -486,7 +486,7 @@ try {
// Add All Hotekys and ClickEvent
let HOTKEYS_ITEMS = {}
let CLICK_ITEMS = {}
let CLICK2_ITEMS = []
let CLICK2_ITEMS = function () { }
let OVER_ITEMS = []
let WHEEL_ITEMS = []

Expand All @@ -499,11 +499,11 @@ try {
ClickFuncs.forEach((item, index) => { CLICK_ITEMS[index] = item.ClickFuncs })
OverFuncs.forEach(item => { OVER_ITEMS = [...OVER_ITEMS, ...item.OverFuncs] })
WheelFuncs.forEach(item => { WHEEL_ITEMS = [...WHEEL_ITEMS, ...item.WheelFuncs] })
CLICK2_ITEMS = SmartClosePanel.getpanelList()
CLICK2_ITEMS = SmartClosePanel.getpanelList

console.log('MioHotkeys - All hotkeys and event Loaded:', LE = [HOTKEYS_ITEMS, CLICK_ITEMS, CLICK2_ITEMS, OVER_ITEMS, WHEEL_ITEMS], (() => { if (LE[0] && LE[1] && LE[2])return 'Succ'})())

window.MIOMOD_SAVE.mio_hotkey_mod.Event = {
window.MIOMOD_SAVE.mio_hotkey_mod.Event = {
// KeyEvent
keydown: async (event) => {
for (const [ObjName, ObjReItems] of Object.entries(HOTKEYS_ITEMS)) {
Expand Down Expand Up @@ -570,7 +570,7 @@ try {
}
let currentTime = new Date().getTime();
if (currentTime - window.MIOMOD_SAVE.mio_hotkey_mod.lastClickTime < 400 && window.MIOMOD_SAVE.global.move === false) {
for (item of CLICK2_ITEMS) {
for (item of CLICK2_ITEMS()) {
if (item.items.length > 0) { try { item.click } catch { }; break }
}
}
Expand Down

0 comments on commit 1f04991

Please sign in to comment.