├── .gitignore ├── ChangeLog.md ├── FlxsnxMod.sln ├── FlxsnxMod ├── Flx.cs ├── FlxsnxMod.csproj ├── Properties │ ├── AssemblyInfo.cs │ ├── Res.Designer.cs │ └── Res.resx └── Resources │ └── mod └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .vs 2 | FlxsnxMod/bin 3 | FlxsnxMod/obj 4 | FlxsnxMod/FlxsnxMod.csproj.user -------------------------------------------------------------------------------- /ChangeLog.md: -------------------------------------------------------------------------------- 1 | ## 更新日志(UpdateLog) 2 | 3 | #### 2023-05-10 v1.4.3 - rc1 4 | 1. 增加会饿,以恢复饥饿消耗的默认布尔值 5 | 2. 修复了 ChangeLog 中的 Markdown 数字格式 6 | 3. 版本号以 rc 的形式发布小的修改,rc 修改可以是稳定的小修改、新的功能测试、对之前功能的简单bug进行修正等等。这样就不会出现过去的Changelog版本号中许多不必要的问题,例如:`1.0.21` 发布的比 `1.0.3` 更早, `1.0.5` 后又出现 `1.0.5.1` 而 `x.y.z.1` 的版本号又是随机出现的。 7 | 8 | #### 2023-02-09 v1.4.2 9 | 1. 修复游戏更新导致Mod失效 10 | 2. 此版本需要[MelonLoader 0.6.0](https://github.com/LavaGang/MelonLoader/releases/tag/v0.6.0)版本 11 | 12 | #### 2022-11-23 v1.4.1 13 | 1. 修复清空背包与背包物999功能导致闪退的问题 14 | 2. 因功能失效移除大范围虫炮功能 15 | 16 | #### 2022-11-12 v1.4.0 17 | 1. 适配游戏0.5.0版本 18 | 2. 增加物品ID导出功能(导出成功后文件在游戏目录里) 19 | 3. 增加BuffID导出功能(导出成功后文件在游戏目录里) 20 | 21 | #### 2022-06-16 v1.3.1 22 | 1. 修复一处判断错误的问题 23 | 2. 增加还原耐久(就是关闭不耗耐久) 24 | 3. 增加拾取范围功能 25 | 4. 增加行船速度功能 26 | 5. 增加远程龙卷风功能(远程武器100%生成龙卷风) 27 | 6. 增加召唤鬼魂功能(击杀敌人100%召唤穴居者鬼魂) 28 | 29 | #### 2022-06-15 v1.3.0 30 | 1. 修复雷霆光束 31 | 2. 物品ID表不再调用steam内置浏览器打开 改为默认浏览器打开 32 | 33 | #### 2022-04-29 v1.2.1 34 | 1. 适配0.3.10 修复部分功能无法使用 35 | 2. 之前仅限房主使用的功能现改为仅限AdminPlayer使用 36 | PS. 是否为AdminPlayer通过SteamId判断,所以盗版可能无法使用有限制的功能 37 | 38 | #### 2022-04-19 v1.2.0 39 | 1. 增加吸附掉落物(配合范围虫炮使用) (注意清空背包 背包满了 吸不了) 40 | 2. 增加不会饥饿 41 | 3. 增加不耗耐久 42 | 4. 增加范围拆墙+铲地 43 | 5. 功能进行分类 可折叠 44 | 6. 对仅房主可使用的功能进行了标注 45 | 7. 秒挖地皮不再需要重新进存档即可生效 46 | 8. 增加打开/关闭Mod菜单的快捷键 F11 或 波浪键(~)在ESC的下面 47 | 48 | #### 2022-04-13 v1.1.3 49 | 1. 修复鼠标闪烁问题 50 | 2. 增加游戏加速功能 51 | 52 | #### 2022-04-06 v1.1.2 53 | 1. 增加大范围虫炮(拆墙用) 54 | 55 | #### 2022-04-05 v1.1.1 56 | 1. 增加秒挖地皮 57 | 58 | #### 2022-03-25 v1.1.0 59 | 1. 美化UI 60 | 2. 解决光标在Mod菜单时不显示问题 61 | 3. 打开Mod菜单时 屏蔽游戏内左键(防止点按钮时点到攻击) 62 | 4. 增加地图传送功能 63 | 5. Mod菜单改为可拖动窗口 64 | 65 | #### 2022-03-23 v1.0.6 66 | (测试) 67 | 1. 超级光束改为V键 68 | 2. 增加添加物品指令 /item 可用于刷有属性的史诗食物 69 | PS. 食物变化值就是两个原料的物品ID 比如例示里的80039717 就是 心型莓果8003 与 魂灵面纱9717 70 | 3. 增加添加&删除Buff指令 /buff 可用于添加自己想要的buff和自定义buff数值 71 | 72 | #### 2022-03-21 v1.0.5.1 73 | 1. 增加超级光束 74 | 75 | #### 2022-03-21 v1.0.5 76 | 1. 雷霆光束改为F键(因为我之前老不小心按到) 77 | 2. 增加一键背包物品999 78 | 3. 增加一键清空背包 79 | 4. 增加一键千万挖掘伤害(挖黑曜石用) 80 | 5. 蓝色亮光改为橙色(以免被郁金香与食物buff覆盖) 81 | 82 | #### 2022-03-20 v1.0.4 83 | 1. 增加雷霆光束 84 | 85 | #### 2022-03-18 v1.0.3 86 | 1. 增加挖掘伤害buff 87 | 2. 增加金色植物概率buff 88 | 3. 增加稀有食物概率buff 89 | 4. 增加每3秒对附近敌人造成燃烧伤害buff 90 | 91 | #### 2022-03-18 v1.0.21 92 | 1. 现在可对单个技能增加等级 93 | 94 | #### 2022-03-17 v1.0.2 95 | 1. 再次修复粘贴ID bug 96 | 2. 等级修改增加30级选项 97 | 3. 增加多个buff效果修改 98 | 99 | #### 2022-03-16 v1.0.1 100 | 1. 修复粘贴ID时剪切板没复制文本,MOD会崩溃的问题 101 | 2. 修改等级增加多个选项 102 | 3. 窗口位置变动 103 | 4. 新增一个功能 无敌 104 | -------------------------------------------------------------------------------- /FlxsnxMod.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.1.32228.430 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlxsnxMod", "FlxsnxMod\FlxsnxMod.csproj", "{D956B604-96EC-4A2A-B232-178D5E719772}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D956B604-96EC-4A2A-B232-178D5E719772}.Debug|Any CPU.ActiveCfg = Release|Any CPU 15 | {D956B604-96EC-4A2A-B232-178D5E719772}.Debug|Any CPU.Build.0 = Release|Any CPU 16 | {D956B604-96EC-4A2A-B232-178D5E719772}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {D956B604-96EC-4A2A-B232-178D5E719772}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {D5DC1259-9580-4AAB-96FF-ED49F64BC25A} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /FlxsnxMod/Flx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using Il2CppSystem.Text.RegularExpressions; 4 | using MelonLoader; 5 | using UnityEngine; 6 | using HarmonyLib; 7 | using Il2Cpp; 8 | using Il2CppInterop.Runtime.InteropTypes.Arrays; 9 | 10 | namespace FlxsnxMod 11 | { 12 | [HarmonyPatch(typeof(MapUI), "Ping")] 13 | public class Flx : MelonMod 14 | { 15 | static bool showMenu = false; 16 | Manager m; 17 | ChatWindow chat; 18 | string itemID = "1"; 19 | float amount = 1; 20 | public const string version = "1.4.3"; 21 | // for any Release Candidate version 22 | public const string rc = "rc1"; 23 | Vector2 vSbarValue; 24 | bool ThunderBeam = false; 25 | AssetBundle Flxasset; 26 | GUIStyle buttonStyle; 27 | Color32 ModColor = new Color32(165, 151, 115, 255); 28 | Rect WindowRect = new Rect(0, (Screen.height - 420) / 2 + 30, 330, 420); 29 | // GUIStyle ModIcon; 30 | GUIStyle CloseButton; 31 | GUIStyle OpenButton; 32 | static bool MapPing = false; 33 | static bool rangeClear = false; 34 | static float clearRange = 5.0f; 35 | static bool oneTapClearTile = false; 36 | static bool pullLootToPlayer = false; 37 | 38 | bool showAddItem = false; 39 | bool showSkill = false; 40 | bool showOther = false; 41 | bool showOther2 = false; 42 | bool showNewRangeClear = false; 43 | 44 | [Obsolete] 45 | public override void OnApplicationStart() 46 | { 47 | Flxasset = AssetBundle.LoadFromMemory(FlxsnxMod.Properties.Res.mod); 48 | buttonStyle = new GUIStyle() 49 | { 50 | normal = new GUIStyleState 51 | { 52 | textColor = Color.white, 53 | background = Flxasset.LoadAsset("button") 54 | }, 55 | active = new GUIStyleState 56 | { 57 | textColor = Color.white, 58 | background = Flxasset.LoadAsset("button3") 59 | }, 60 | hover = new GUIStyleState 61 | { 62 | textColor = Color.white, 63 | background = Flxasset.LoadAsset("button2") 64 | }, 65 | alignment = TextAnchor.MiddleCenter, 66 | wordWrap = true, 67 | padding = new RectOffset(4, 4, 4, 4), 68 | margin = new RectOffset(5, 5, 0, 5) 69 | }; 70 | 71 | /*ModIcon = new GUIStyle() 72 | { 73 | normal = new GUIStyleState 74 | { 75 | textColor = Color.white, 76 | background = Flxasset.LoadAsset("avatar") 77 | }, 78 | fixedHeight = 28, 79 | fixedWidth = 28, 80 | margin = new RectOffset(0, 0, 10, 10) 81 | };*/ 82 | 83 | CloseButton = new GUIStyle() 84 | { 85 | normal = new GUIStyleState 86 | { 87 | textColor = Color.white, 88 | background = Flxasset.LoadAsset("button") 89 | }, 90 | active = new GUIStyleState 91 | { 92 | textColor = Color.white, 93 | background = Flxasset.LoadAsset("button3") 94 | }, 95 | hover = new GUIStyleState 96 | { 97 | textColor = Color.white, 98 | background = Flxasset.LoadAsset("button2") 99 | }, 100 | alignment = TextAnchor.MiddleCenter, 101 | wordWrap = true, 102 | margin = new RectOffset(0, 0, 10, 10), 103 | fontSize = 11 104 | }; 105 | 106 | OpenButton = new GUIStyle() 107 | { 108 | normal = new GUIStyleState 109 | { 110 | textColor = Color.white, 111 | background = Flxasset.LoadAsset("button") 112 | }, 113 | active = new GUIStyleState 114 | { 115 | textColor = Color.white, 116 | background = Flxasset.LoadAsset("button3") 117 | }, 118 | hover = new GUIStyleState 119 | { 120 | textColor = Color.white, 121 | background = Flxasset.LoadAsset("button2") 122 | }, 123 | alignment = TextAnchor.MiddleCenter, 124 | wordWrap = true, 125 | margin = new RectOffset(0, 6, 6, 0), 126 | fontSize = 11, 127 | }; 128 | } 129 | 130 | public override void OnUpdate() 131 | 132 | { 133 | if (m == null) 134 | { 135 | m = GameObject.FindObjectOfType(); 136 | } 137 | 138 | if (showMenu && Input.GetMouseButton(0)) 139 | { 140 | m._inputManager.DisableInput(0.1f); 141 | } 142 | 143 | if (Input.GetKeyDown(KeyCode.F)) 144 | { 145 | if (ThunderBeam) 146 | { 147 | 148 | if (isAdminPlayer()) 149 | { 150 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), m.player.aimDirection, m.player.entity,114514); 151 | } 152 | 153 | } 154 | } 155 | 156 | if (Input.GetKeyDown(KeyCode.V)) 157 | { 158 | if (ThunderBeam) 159 | { 160 | if (isAdminPlayer()) 161 | { 162 | superThunderBeam(); 163 | } 164 | 165 | } 166 | } 167 | 168 | if (Input.GetKeyDown(KeyCode.Return)) 169 | { 170 | 171 | if (!chat) 172 | { 173 | chat = GameObject.FindObjectOfType(); 174 | } 175 | var text = chat.GetInputText(); 176 | LoggerInstance.Msg(text); 177 | if (text != "") 178 | { 179 | var code = text.Split(' '); 180 | LoggerInstance.Msg(code[0]); 181 | 182 | if (code.Length >= 2 && code[1] != null && code[1] != "") 183 | { 184 | if (code[0] == "/item" && IsNumeric(code[2])) 185 | { 186 | if (isAdminPlayer()) 187 | { 188 | if ((code.Length == 4 && code[3] != null && code[3] != "" && IsNumeric(code[3]))) 189 | { 190 | m.player.playerCommandSystem.CreateAndDropEntity((ObjectID)Enum.Parse(typeof(ObjectID), code[1]), m.player.RenderPosition + new Vector3(0, 2f, 0), (int)Int32.Parse(code[2]), variation: (int)Int32.Parse(code[3])); 191 | } 192 | else 193 | { 194 | m.player.playerCommandSystem.CreateAndDropEntity((ObjectID)Enum.Parse(typeof(ObjectID), code[1]), m.player.RenderPosition + new Vector3(0, 2f, 0), (int)Int32.Parse(code[2])); 195 | } 196 | } 197 | } 198 | 199 | if (code[0] == "/buff" && code.Length >= 3 && code[2] != null && code[2] != "") 200 | { 201 | if (code[1] == "add" && code.Length == 4 && code[3] != null && code[3] != "" && IsNumeric(code[3])) 202 | { 203 | addBuff(code[2], (int)Int32.Parse(code[3])); 204 | } 205 | else if (code[1] == "del") 206 | { 207 | delBuff(code[2], 0); 208 | } 209 | } 210 | } 211 | } 212 | } 213 | 214 | if (Input.GetKeyDown(KeyCode.F11) || Input.GetKeyDown(KeyCode.BackQuote)) 215 | { 216 | showMenu = !showMenu; 217 | if (showMenu == true) 218 | { 219 | Cursor.lockState = CursorLockMode.None; 220 | Cursor.visible = true; 221 | } 222 | } 223 | } 224 | 225 | public override void OnGUI() 226 | { 227 | var oldbackground = GUI.backgroundColor; 228 | GUI.backgroundColor = new Color32(48, 48, 48, 255); 229 | GUI.skin.window = new GUIStyle() 230 | { 231 | normal = new GUIStyleState 232 | { 233 | textColor = Color.white, 234 | background = Flxasset.LoadAsset("window"), 235 | }, 236 | padding = new RectOffset(25, 25, 25, 25), 237 | wordWrap = true 238 | }; 239 | GUI.skin.verticalScrollbarThumb = new GUIStyle() 240 | { 241 | normal = new GUIStyleState 242 | { 243 | background = Flxasset.LoadAsset("button") 244 | }, 245 | fixedWidth = 6 246 | }; 247 | GUI.skin.horizontalSliderThumb = new GUIStyle() 248 | { 249 | normal = new GUIStyleState 250 | { 251 | background = Flxasset.LoadAsset("button") 252 | }, 253 | fixedWidth = 10, 254 | fixedHeight = 10 255 | }; 256 | GUI.skin.verticalScrollbar = new GUIStyle() 257 | { 258 | normal = new GUIStyleState 259 | { 260 | background = Flxasset.LoadAsset("windows") 261 | }, 262 | fixedWidth = 6 263 | }; 264 | 265 | GUILayout.BeginArea(new Rect(5, 5, 120, 30)); 266 | 267 | 268 | 269 | if (showMenu == false) 270 | { 271 | if (GUILayout.Button("FlxsnxMod", buttonStyle, new GUILayoutOption[] { GUILayout.Height(30) })) 272 | { 273 | showMenu = true; 274 | Cursor.lockState = CursorLockMode.None; 275 | Cursor.visible = true; 276 | } 277 | } 278 | 279 | GUILayout.EndArea(); 280 | if (showMenu) 281 | { 282 | GUI.backgroundColor = oldbackground; 283 | WindowRect = GUI.Window(20029933, WindowRect, (GUI.WindowFunction)menuWindow, ""); 284 | } 285 | } 286 | 287 | void menuWindow(int winId) 288 | { 289 | if (m == null) 290 | { 291 | m = GameObject.FindObjectOfType(); 292 | } 293 | 294 | GUILayout.BeginHorizontal(new GUIStyle() { margin = new RectOffset(0,0,0,6)},new GUILayoutOption[0]); 295 | 296 | // GUILayout.Button("", ModIcon, new GUILayoutOption[0]); 297 | GUILayout.Label("FlxsnxMod V" + inGameVersion(), new GUIStyle() 298 | { 299 | normal = new GUIStyleState 300 | { 301 | textColor = Color.white, 302 | 303 | }, 304 | margin = new RectOffset(6, 0, 6, 10), 305 | padding = new RectOffset(0, 0, 10, 0), 306 | fixedHeight = 28 307 | }, new GUILayoutOption[0]); ; 308 | GUI.backgroundColor = new Color32(245, 45, 45, 255); 309 | if (GUILayout.Button("X", CloseButton, new GUILayoutOption[] { GUILayout.Width(25), GUILayout.Height(25) })) 310 | { 311 | showMenu = false; 312 | } 313 | 314 | GUILayout.EndHorizontal(); 315 | 316 | GUI.backgroundColor = new Color32(58, 58, 58, 255); 317 | vSbarValue = GUILayout.BeginScrollView(vSbarValue, false, true, new GUILayoutOption[0]); 318 | GUI.backgroundColor = ModColor; 319 | 320 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 321 | bool link = GUILayout.Button("GitHub", buttonStyle, new GUILayoutOption[0]); 322 | if (link) 323 | { 324 | System.Diagnostics.Process.Start("https://github.com/FlxSNX/FlxSNXMod"); 325 | } 326 | bool dumpid = GUILayout.Button("导出物品ID", buttonStyle, new GUILayoutOption[0]); 327 | if (dumpid) 328 | { 329 | StreamWriter dumpItmeID = File.CreateText(Application.dataPath + "/../itemID.txt"); 330 | dumpItmeID.WriteLine("DumpObjectIDTool By FlxSNXMod"); 331 | foreach (ObjectID item in Enum.GetValues(typeof(ObjectID))) 332 | { 333 | dumpItmeID.WriteLine(PugText.ProcessText($"Items/{item}", new Il2CppStringArray(new string[] { }), true, false) + " " + item + " " + item.GetHashCode()); 334 | } 335 | dumpItmeID.Close(); 336 | dumpItmeID.Dispose(); 337 | LoggerInstance.Msg("itemID.txt导出完成,请在游戏目录下查看"); 338 | } 339 | bool dumpbuffid = GUILayout.Button("导出buffID", buttonStyle, new GUILayoutOption[0]); 340 | if (dumpbuffid) 341 | { 342 | StreamWriter dumpItmeID = File.CreateText(Application.dataPath + "/../buffID.txt.txt"); 343 | dumpItmeID.WriteLine("DumpConditionIDTool By FlxSNXMod"); 344 | foreach (ConditionID buff in Enum.GetValues(typeof(ConditionID))) 345 | { 346 | dumpItmeID.WriteLine(PugText.ProcessText($"Conditions/{buff}", new Il2CppStringArray(new string[] { }), true, false) + " " + buff + " " + buff.GetHashCode()); 347 | } 348 | dumpItmeID.Close(); 349 | dumpItmeID.Dispose(); 350 | LoggerInstance.Msg("buffID.txt导出完成,请在游戏目录下查看"); 351 | } 352 | GUILayout.EndHorizontal(); 353 | 354 | GUILayout.Label("游戏加速:" + (int)UnityEngine.Time.timeScale + "X", new GUILayoutOption[0]); 355 | UnityEngine.Time.timeScale = GUILayout.HorizontalSlider((int)UnityEngine.Time.timeScale, 1, 50, new GUILayoutOption[0]); 356 | 357 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 358 | if (GUILayout.Button("一键清空背包", buttonStyle, new GUILayoutOption[0])) 359 | { 360 | var ih = m.player.playerInventoryHandler; 361 | for (int i = 10; i < ih.size; i++) 362 | { 363 | var info = ih.GetObjectData(i); 364 | ih.DestroyObject(i, info.objectID); 365 | } 366 | } 367 | if (GUILayout.Button("背包物品999", buttonStyle, new GUILayoutOption[0])) 368 | { 369 | var ih = m.player.playerInventoryHandler; 370 | for (int i = 10; i < ih.size; i++) 371 | { 372 | var info = ih.GetObjectData(i); 373 | if (info.objectID != ObjectID.None) 374 | { 375 | ih.SetAmount(i, info.objectID, 999); 376 | } 377 | } 378 | } 379 | GUILayout.EndHorizontal(); 380 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 381 | if (GUILayout.Button("不会饥饿", buttonStyle, new GUILayoutOption[0])) 382 | { 383 | m.player.playerCommandSystem.ToggleCanConsumeHunger(m.player.entity, false); 384 | } 385 | if (GUILayout.Button("会饿", buttonStyle, new GUILayoutOption[0])) 386 | { 387 | m.player.playerCommandSystem.ToggleCanConsumeHunger(m.player.entity, true); 388 | } 389 | if (GUILayout.Button("不耗耐久", buttonStyle, new GUILayoutOption[0])) 390 | { 391 | addBuff("ToolDurabilityLastsLonger", 100); 392 | addBuff("EquipmentDurabilityLastsLonger", 100); 393 | } 394 | if (GUILayout.Button("还原耐久", buttonStyle, new GUILayoutOption[0])) 395 | { 396 | delBuff("ToolDurabilityLastsLonger", 0); 397 | delBuff("EquipmentDurabilityLastsLonger", 0); 398 | } 399 | GUILayout.EndHorizontal(); 400 | 401 | /* 添加物品功能区 */ 402 | GUILayout.BeginHorizontal(new GUIStyle() { margin = new RectOffset(0, 0, 0, 8) }, new GUILayoutOption[0]); 403 | GUILayout.Label("添加物品 [该功能仅限管理员玩家使用]", new GUILayoutOption[0]); 404 | if (GUILayout.Button(showAddItem ? "x" : "+", OpenButton, new GUILayoutOption[] { GUILayout.Width(20), GUILayout.Height(20) })) 405 | { 406 | showAddItem = !showAddItem; 407 | } 408 | GUILayout.EndHorizontal(); 409 | if (showAddItem) 410 | { 411 | addItem(); 412 | } 413 | 414 | /* 修改技能功能区 */ 415 | GUILayout.BeginHorizontal(new GUIStyle() { margin = new RectOffset(0, 0, 0, 8) }, new GUILayoutOption[0]); 416 | GUILayout.Label("修改技能", new GUILayoutOption[0]); 417 | if (GUILayout.Button(showSkill ? "x" : "+", OpenButton, new GUILayoutOption[] { GUILayout.Width(20), GUILayout.Height(20) })) 418 | { 419 | showSkill = !showSkill; 420 | } 421 | GUILayout.EndHorizontal(); 422 | if (showSkill) 423 | { 424 | skill(); 425 | } 426 | 427 | /* 新范围拆除功能区 */ 428 | GUILayout.BeginHorizontal(new GUIStyle() { margin = new RectOffset(0, 0, 0, 8) }, new GUILayoutOption[0]); 429 | GUILayout.Label("范围拆墙+铲地" + (rangeClear ? "[已开启]" : "[已关闭]"), new GUILayoutOption[0]); 430 | if (GUILayout.Button(showNewRangeClear ? "x" : "+", OpenButton, new GUILayoutOption[] { GUILayout.Width(20), GUILayout.Height(20) })) 431 | { 432 | showNewRangeClear = !showNewRangeClear; 433 | } 434 | GUILayout.EndHorizontal(); 435 | if (showNewRangeClear) 436 | { 437 | rangebox(); 438 | } 439 | 440 | /* 高级功能区 */ 441 | GUILayout.BeginHorizontal(new GUIStyle() { margin = new RectOffset(0, 0, 0, 8) }, new GUILayoutOption[0]); 442 | GUILayout.Label("高级功能", new GUILayoutOption[0]); 443 | if (GUILayout.Button(showOther2 ? "x" : "+", OpenButton, new GUILayoutOption[] { GUILayout.Width(20), GUILayout.Height(20) })) 444 | { 445 | showOther2 = !showOther2; 446 | } 447 | GUILayout.EndHorizontal(); 448 | if (showOther2) 449 | { 450 | other(); 451 | } 452 | 453 | /* Buff功能区 */ 454 | GUILayout.BeginHorizontal(new GUIStyle() { margin = new RectOffset(0, 0, 0, 8) }, new GUILayoutOption[0]); 455 | GUILayout.Label("Buff功能", new GUILayoutOption[0]); 456 | if (GUILayout.Button(showOther ? "x" : "+", OpenButton, new GUILayoutOption[] { GUILayout.Width(20), GUILayout.Height(20) })) 457 | { 458 | showOther = !showOther; 459 | } 460 | GUILayout.EndHorizontal(); 461 | if (showOther) 462 | { 463 | buff(); 464 | } 465 | 466 | GUILayout.EndScrollView(); 467 | GUI.DragWindow(); 468 | } 469 | 470 | // Generate correct ingameVersionNumber with rc 471 | string inGameVersion() 472 | { 473 | string versionText = version; 474 | if (rc != "") versionText += " - " + rc; 475 | return versionText; 476 | } 477 | // 技能修改类 478 | void skill() 479 | { 480 | GUILayout.BeginVertical(new GUIStyle() { margin = new RectOffset(8, 8, 0, 0) }, new GUILayoutOption[0]); 481 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 482 | if (GUILayout.Button("30", buttonStyle, new GUILayoutOption[0])) 483 | { 484 | m.player.SetSkillLevel(SkillID.Cooking, 30); 485 | m.player.SetSkillLevel(SkillID.Crafting, 30); 486 | m.player.SetSkillLevel(SkillID.Fishing, 30); 487 | m.player.SetSkillLevel(SkillID.Gardening, 30); 488 | m.player.SetSkillLevel(SkillID.Melee, 30); 489 | m.player.SetSkillLevel(SkillID.Mining, 30); 490 | m.player.SetSkillLevel(SkillID.Range, 30); 491 | m.player.SetSkillLevel(SkillID.Running, 30); 492 | m.player.SetSkillLevel(SkillID.Vitality, 30); 493 | 494 | } 495 | bool btn5 = GUILayout.Button("50", buttonStyle, new GUILayoutOption[0]); 496 | if (btn5) 497 | { 498 | m.player.SetSkillLevel(SkillID.Cooking, 50); 499 | m.player.SetSkillLevel(SkillID.Crafting, 50); 500 | m.player.SetSkillLevel(SkillID.Fishing, 50); 501 | m.player.SetSkillLevel(SkillID.Gardening, 50); 502 | m.player.SetSkillLevel(SkillID.Melee, 50); 503 | m.player.SetSkillLevel(SkillID.Mining, 50); 504 | m.player.SetSkillLevel(SkillID.Range, 50); 505 | m.player.SetSkillLevel(SkillID.Running, 50); 506 | m.player.SetSkillLevel(SkillID.Vitality, 50); 507 | 508 | } 509 | bool btn6 = GUILayout.Button("80", buttonStyle, new GUILayoutOption[0]); 510 | if (btn6) 511 | { 512 | m.player.SetSkillLevel(SkillID.Cooking, 80); 513 | m.player.SetSkillLevel(SkillID.Crafting, 80); 514 | m.player.SetSkillLevel(SkillID.Fishing, 80); 515 | m.player.SetSkillLevel(SkillID.Gardening, 80); 516 | m.player.SetSkillLevel(SkillID.Melee, 80); 517 | m.player.SetSkillLevel(SkillID.Mining, 80); 518 | m.player.SetSkillLevel(SkillID.Range, 80); 519 | m.player.SetSkillLevel(SkillID.Running, 80); 520 | m.player.SetSkillLevel(SkillID.Vitality, 80); 521 | 522 | } 523 | bool btn1 = GUILayout.Button("100", buttonStyle, new GUILayoutOption[0]); 524 | if (btn1) 525 | { 526 | m.player.MaxOutAllSkills(); 527 | } 528 | bool btn2 = GUILayout.Button("重置", buttonStyle, new GUILayoutOption[0]); 529 | if (btn2) 530 | { 531 | m.player.ResetAllSkills(); 532 | } 533 | GUILayout.EndHorizontal(); 534 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 535 | if (GUILayout.Button("挖掘+", buttonStyle, new GUILayoutOption[0])) 536 | { 537 | addSkill(SkillID.Mining, 1); 538 | } 539 | if (GUILayout.Button("奔跑+", buttonStyle, new GUILayoutOption[0])) 540 | { 541 | addSkill(SkillID.Running, 1); 542 | } 543 | if (GUILayout.Button("近战+", buttonStyle, new GUILayoutOption[0])) 544 | { 545 | addSkill(SkillID.Melee, 1); 546 | } 547 | GUILayout.EndHorizontal(); 548 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 549 | if (GUILayout.Button("活力+", buttonStyle, new GUILayoutOption[0])) 550 | { 551 | addSkill(SkillID.Vitality, 1); 552 | } 553 | if (GUILayout.Button("制作+", buttonStyle, new GUILayoutOption[0])) 554 | { 555 | addSkill(SkillID.Crafting, 1); 556 | } 557 | if (GUILayout.Button("远程+", buttonStyle, new GUILayoutOption[0])) 558 | { 559 | addSkill(SkillID.Range, 1); 560 | } 561 | GUILayout.EndHorizontal(); 562 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 563 | if (GUILayout.Button("园艺+", buttonStyle, new GUILayoutOption[0])) 564 | { 565 | addSkill(SkillID.Gardening, 1); 566 | } 567 | if (GUILayout.Button("钓鱼+", buttonStyle, new GUILayoutOption[0])) 568 | { 569 | addSkill(SkillID.Fishing, 1); 570 | } 571 | if (GUILayout.Button("烹饪+", buttonStyle, new GUILayoutOption[0])) 572 | { 573 | addSkill(SkillID.Cooking, 1); 574 | } 575 | GUILayout.EndHorizontal(); 576 | GUILayout.EndVertical(); 577 | } 578 | 579 | // buff类功能 580 | void buff() 581 | { 582 | GUILayout.BeginVertical(new GUIStyle() { margin = new RectOffset(8, 8, 0, 0) }, new GUILayoutOption[0]); 583 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 584 | GUILayout.Label("无敌", new GUILayoutOption[0]); 585 | var btn3 = GUILayout.Button("开", buttonStyle, new GUILayoutOption[0]); 586 | var btn4 = GUILayout.Button("关", buttonStyle, new GUILayoutOption[0]); 587 | if (btn3) 588 | { 589 | m.player.SetInvincibility(true); 590 | } 591 | if (btn4) 592 | { 593 | m.player.SetInvincibility(false); 594 | } 595 | GUILayout.Label("护甲", new GUILayoutOption[0]); 596 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 597 | { 598 | addBuff("ArmorIncrease", 200); 599 | } 600 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 601 | { 602 | delBuff("ArmorIncrease", 200); 603 | 604 | } 605 | GUILayout.EndHorizontal(); 606 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 607 | GUILayout.Label("生命上限", new GUILayoutOption[0]); 608 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 609 | { 610 | addBuff("IncreasedMaxHealth", 1000); 611 | } 612 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 613 | { 614 | delBuff("IncreasedMaxHealth", 1000); 615 | } 616 | GUILayout.Label("移速", new GUILayoutOption[0]); 617 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 618 | { 619 | addBuff("MovementSpeedIncrease", 300); 620 | } 621 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 622 | { 623 | delBuff("MovementSpeedIncrease", 300); 624 | 625 | } 626 | GUILayout.EndHorizontal(); 627 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 628 | GUILayout.Label("近战伤害", new GUILayoutOption[0]); 629 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 630 | { 631 | addBuff("MeleeDamageIncrease", 50); 632 | } 633 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 634 | { 635 | delBuff("MeleeDamageIncrease", 50); 636 | 637 | } 638 | GUILayout.Label("远程伤害", new GUILayoutOption[0]); 639 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 640 | { 641 | addBuff("RangeDamageIncrease", 50); 642 | } 643 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 644 | { 645 | delBuff("RangeDamageIncrease", 50); 646 | 647 | } 648 | GUILayout.EndHorizontal(); 649 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 650 | GUILayout.Label("橙色亮光", new GUILayoutOption[0]); 651 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 652 | { 653 | addBuff("OrangeGlow", 5); 654 | } 655 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 656 | { 657 | delBuff("BlueGlow", 0); 658 | delBuff("OrangeGlow", 0); 659 | 660 | } 661 | GUILayout.Label("挖掘速度", new GUILayoutOption[0]); 662 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 663 | { 664 | addBuff("MiningSpeedIncrease", 30); 665 | } 666 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 667 | { 668 | delBuff("MiningSpeedIncrease", 0); 669 | 670 | } 671 | GUILayout.EndHorizontal(); 672 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 673 | GUILayout.Label("挖掘伤害", new GUILayoutOption[0]); 674 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 675 | { 676 | addBuff("MiningIncrease", 1000); 677 | } 678 | if (GUILayout.Button("KW", buttonStyle, new GUILayoutOption[0])) 679 | { 680 | addBuff("MiningIncrease", 10000000); 681 | } 682 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 683 | { 684 | delBuff("MiningIncrease", 0); 685 | } 686 | GUILayout.Label("暴击", new GUILayoutOption[0]); 687 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 688 | { 689 | addBuff("CriticalHitChanceFromShot", 30); 690 | } 691 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 692 | { 693 | delBuff("CriticalHitChanceFromShot", 0); 694 | 695 | } 696 | GUILayout.EndHorizontal(); 697 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 698 | GUILayout.Label("攻速", new GUILayoutOption[0]); 699 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 700 | { 701 | addBuff("MeleeAttackSpeedIncrease", 30); 702 | addBuff("RangeAttackSpeedIncrease", 30); 703 | } 704 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 705 | { 706 | delBuff("MeleeAttackSpeedIncrease", 0); 707 | delBuff("RangeAttackSpeedIncrease", 0); 708 | 709 | } 710 | GUILayout.Label("金色植物", new GUILayoutOption[0]); 711 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 712 | { 713 | addBuff("ChanceToGainRarePlant", 200); 714 | } 715 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 716 | { 717 | delBuff("ChanceToGainRarePlant", 0); 718 | 719 | } 720 | GUILayout.EndHorizontal(); 721 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 722 | GUILayout.Label("稀有食物", new GUILayoutOption[0]); 723 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 724 | { 725 | addBuff("ChanceForExtraCookedFoodToBeRare", 200); 726 | } 727 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 728 | { 729 | delBuff("ChanceForExtraCookedFoodToBeRare", 0); 730 | 731 | } 732 | GUILayout.Label("日炎圣盾", new GUILayoutOption[0]); 733 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 734 | { 735 | addBuff("AuraApplyBurning", 500); 736 | } 737 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 738 | { 739 | delBuff("AuraApplyBurning", 0); 740 | } 741 | GUILayout.EndHorizontal(); 742 | 743 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 744 | GUILayout.Label("拾取范围", new GUILayoutOption[0]); 745 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 746 | { 747 | addBuff("IncreasedPickUpRadius", 100); 748 | } 749 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 750 | { 751 | delBuff("IncreasedPickUpRadius", 0); 752 | 753 | } 754 | GUILayout.Label("行船速度", new GUILayoutOption[0]); 755 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 756 | { 757 | addBuff("IncreasedBoatSpeed", 100); 758 | } 759 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 760 | { 761 | delBuff("IncreasedBoatSpeed", 0); 762 | } 763 | GUILayout.EndHorizontal(); 764 | 765 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 766 | GUILayout.Label("远程龙卷风", new GUILayoutOption[0]); 767 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 768 | { 769 | addBuff("ChanceOnRangeHitToSpawnOctopusBossProjectile", 100); 770 | } 771 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 772 | { 773 | delBuff("ChanceOnRangeHitToSpawnOctopusBossProjectile", 0); 774 | 775 | } 776 | GUILayout.Label("召唤鬼魂", new GUILayoutOption[0]); 777 | if (GUILayout.Button("+", buttonStyle, new GUILayoutOption[0])) 778 | { 779 | addBuff("ChanceOnKillToSummonGhost", 100); 780 | } 781 | if (GUILayout.Button("移除", buttonStyle, new GUILayoutOption[0])) 782 | { 783 | delBuff("ChanceOnKillToSummonGhost", 0); 784 | } 785 | GUILayout.EndHorizontal(); 786 | 787 | GUILayout.EndVertical(); 788 | } 789 | 790 | void addItem() 791 | { 792 | GUILayout.BeginVertical(new GUIStyle() { margin = new RectOffset(8, 8, 0, 0) }, new GUILayoutOption[0]); 793 | amount = GUILayout.HorizontalSlider(amount, 1, 999, new GUILayoutOption[0]); 794 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 795 | var IDText = "1"; 796 | if (itemID == "" || itemID == null) 797 | { 798 | itemID = "1"; 799 | } 800 | else 801 | { 802 | IDText = Regex.Replace(itemID, @"[^0-9]", ""); 803 | if (IDText == "") IDText = "1"; 804 | } 805 | 806 | GUILayout.Label("物品ID:" + Int32.Parse(IDText), new GUILayoutOption[0]); 807 | GUILayout.Label("数量:" + (int)amount, new GUILayoutOption[0]); 808 | GUILayout.EndHorizontal(); 809 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 810 | var setid = GUILayout.Button("粘贴ID", buttonStyle, new GUILayoutOption[0]); 811 | if (setid) 812 | { 813 | if (UnityEngine.GUIUtility.systemCopyBuffer != null && UnityEngine.GUIUtility.systemCopyBuffer != "" && IsNumeric(UnityEngine.GUIUtility.systemCopyBuffer)) 814 | { 815 | LoggerInstance.Msg("剪切板内容:" + UnityEngine.GUIUtility.systemCopyBuffer); 816 | itemID = UnityEngine.GUIUtility.systemCopyBuffer; 817 | } 818 | 819 | } 820 | bool add = GUILayout.Button("添加", buttonStyle, new GUILayoutOption[0]); 821 | bool add2 = GUILayout.Button("召唤生物", buttonStyle, new GUILayoutOption[0]); 822 | GUILayout.EndHorizontal(); 823 | GUILayout.Label("武器装备等不可叠加的物品 数量尽量为1 否则会卡顿闪退", new GUILayoutOption[0]); 824 | if (add) 825 | { 826 | if (isAdminPlayer()) 827 | { 828 | m.player.playerCommandSystem.CreateAndDropEntity((ObjectID)Enum.Parse(typeof(ObjectID), itemID), m.player.RenderPosition + new Vector3(0, 0, 0), (int)amount); 829 | } 830 | } 831 | if (add2) 832 | { 833 | if (isAdminPlayer()) 834 | { 835 | m.player.playerCommandSystem.CreateEntity((ObjectID)Enum.Parse(typeof(ObjectID), itemID), m.player.RenderPosition + new Vector3(2f, 0, 0)); 836 | } 837 | } 838 | GUILayout.EndVertical(); 839 | } 840 | 841 | void other() 842 | { 843 | GUILayout.BeginVertical(new GUIStyle() { margin = new RectOffset(8, 8, 0, 0) }, new GUILayoutOption[0]); 844 | GUILayout.Label("雷霆光束 [该功能仅限管理员玩家使用]", new GUILayoutOption[0]); 845 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 846 | if (GUILayout.Button("开启", buttonStyle, new GUILayoutOption[0])) 847 | { 848 | if (ThunderBeam == false) 849 | { 850 | ThunderBeam = true; 851 | m._textManager.SpawnCoolText("已获得天空泰坦真传", new Vector3(0, 2, 0), Color.white, TextManager.FontFace.button, 1f, 1, 5, 0.8f, 0.8f); 852 | } 853 | } 854 | if (GUILayout.Button("关闭", buttonStyle, new GUILayoutOption[0])) 855 | { 856 | if (ThunderBeam == true) 857 | { 858 | ThunderBeam = false; 859 | m._textManager.SpawnCoolText("已失去雷霆光束", new Vector3(0, 2, 0), Color.red, TextManager.FontFace.button, 1f, 1, 5, 0.8f, 0.8f); 860 | } 861 | } 862 | GUILayout.EndHorizontal(); 863 | GUILayout.Label("F键普通光束 V键超级光束", new GUILayoutOption[0]); 864 | 865 | GUILayout.Label("地图传送 (鼠标中键点地图)", new GUILayoutOption[0]); 866 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 867 | if (GUILayout.Button("开启", buttonStyle, new GUILayoutOption[0])) 868 | { 869 | if (MapPing == false) 870 | { 871 | MapPing = true; 872 | m._textManager.SpawnCoolText("地图传送已开启", new Vector3(0, 2, 0), Color.white, TextManager.FontFace.button, 1f, 1, 5, 0.8f, 0.8f); 873 | } 874 | } 875 | if (GUILayout.Button("关闭", buttonStyle, new GUILayoutOption[0])) 876 | { 877 | if (MapPing == true) 878 | { 879 | MapPing = false; 880 | m._textManager.SpawnCoolText("地图传送已关闭", new Vector3(0, 2, 0), Color.red, TextManager.FontFace.button, 1f, 1, 5, 0.8f, 0.8f); 881 | } 882 | } 883 | GUILayout.EndHorizontal(); 884 | 885 | /*GUILayout.Label("秒挖地皮 开启后需要重新进存档", new GUILayoutOption[0]); 886 | if (GUILayout.Button("秒挖地皮", buttonStyle, new GUILayoutOption[0])) 887 | { 888 | String[] set = { "GroundDirtBlockEntity", "GroundStoneBlockEntity", "GroundHiveBlockEntity", "GroundGrassBlockEntity", "GroundMoldBlockEntity", "GroundBeachSandBlockEntity", "GroundClayBlockEntity", "GroundSandBlockEntity", "GroundTurfBlockEntity" }; 889 | 890 | HealthCDAuthoring[] objs = Resources.FindObjectsOfTypeAll(); 891 | 892 | foreach (HealthCDAuthoring obj in objs) 893 | { 894 | if (Array.IndexOf(set, obj.name) != -1) 895 | { 896 | obj.maxHealth = 0; 897 | if (Array.IndexOf(set, obj.name) == set.Length) break; 898 | } 899 | } 900 | 901 | }*/ 902 | 903 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 904 | GUILayout.Label("秒挖地皮" + (oneTapClearTile ? "[已开启]" : "[已关闭]"), new GUILayoutOption[0]); 905 | if (GUILayout.Button(oneTapClearTile ? "关闭" : "开启", buttonStyle, new GUILayoutOption[0])) 906 | { 907 | oneTapClearTile = !oneTapClearTile; 908 | } 909 | GUILayout.EndHorizontal(); 910 | 911 | GUILayout.BeginHorizontal(new GUILayoutOption[0]); 912 | GUILayout.Label("吸附掉落物" + (pullLootToPlayer ? "[已开启]" : "[已关闭]"), new GUILayoutOption[0]); 913 | if (GUILayout.Button(pullLootToPlayer ? "关闭" : "开启", buttonStyle, new GUILayoutOption[0])) 914 | { 915 | pullLootToPlayer = !pullLootToPlayer; 916 | } 917 | GUILayout.EndHorizontal(); 918 | 919 | GUILayout.EndVertical(); 920 | } 921 | 922 | void rangebox() 923 | { 924 | GUILayout.BeginVertical(new GUIStyle() { margin = new RectOffset(8, 8, 0, 0) }, new GUILayoutOption[0]); 925 | GUILayout.Label("范围:" + clearRange + " [该功能仅限管理员玩家使用]", new GUILayoutOption[0]); 926 | clearRange = (int)GUILayout.HorizontalSlider(clearRange, 2, 100, new GUILayoutOption[0]); 927 | if (GUILayout.Button(rangeClear ? "关闭" : "开启", buttonStyle, new GUILayoutOption[0])) 928 | { 929 | rangeClear = !rangeClear; 930 | } 931 | GUILayout.EndVertical(); 932 | } 933 | 934 | // 增加Buff 935 | void addBuff(string name, int value) 936 | { 937 | ConditionID Cid = (ConditionID)Enum.Parse(typeof(ConditionID), name); 938 | var Buff = EntityUtility.GetConditionValue(Cid, m.player.entity, m.player.world); 939 | LoggerInstance.Msg("[增加Buff(" + name + ")数值]当前Buff值: " + Buff + " 增加的数值: " + value); 940 | Buff += value; 941 | m.player.playerCommandSystem.AddOrRefreshCondition(m.player.entity, Cid, Buff, 0); 942 | } 943 | 944 | // 减少Buff 945 | void delBuff(string name, int value) 946 | { 947 | LoggerInstance.Msg("[移除Buff(" + name + ")]"); 948 | ConditionID Cid = (ConditionID)Enum.Parse(typeof(ConditionID), name); 949 | m.player.playerCommandSystem.RemoveCondition(m.player.entity, Cid); 950 | } 951 | 952 | void addSkill(SkillID ID, int value) 953 | { 954 | Skills skills = m._saveManager.GetSkills(); 955 | int skv = m._saveManager.GetSkillValue(ID); 956 | int level = SkillData.GetLevelFromSkill(ID, skv); 957 | m.player.SetSkillLevel(ID, level + value); 958 | } 959 | 960 | void superThunderBeam() 961 | { 962 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(1f, 0, 0.1f), m.player.entity,114514); 963 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(1f, 0, 0.2f), m.player.entity,114514); 964 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(1f, 0, 0.3f), m.player.entity,114514); 965 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(1f, 0, -0.1f), m.player.entity,114514); 966 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(1f, 0, -0.2f), m.player.entity,114514); 967 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(1f, 0, -0.3f), m.player.entity,114514); 968 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.9f, 0, 0.5f), m.player.entity,114514); 969 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.8f, 0, 0.6f), m.player.entity,114514); 970 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.7f, 0, 0.7f), m.player.entity,114514); 971 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.6f, 0, 0.8f), m.player.entity,114514); 972 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.5f, 0, 0.9f), m.player.entity,114514); 973 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.4f, 0, 1f), m.player.entity,114514); 974 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.4f, 0, -1f), m.player.entity,114514); 975 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.5f, 0, -0.9f), m.player.entity,114514); 976 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.6f, 0, -0.8f), m.player.entity,114514); 977 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.7f, 0, -0.7f), m.player.entity,114514); 978 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.8f, 0, -0.6f), m.player.entity,114514); 979 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.9f, 0, -0.5f), m.player.entity,114514); 980 | 981 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-1f, 0, 0.1f), m.player.entity, 114514); 982 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-1f, 0, 0.2f), m.player.entity, 114514); 983 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-1f, 0, 0.3f), m.player.entity, 114514); 984 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-1f, 0, -0.1f), m.player.entity, 114514); 985 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-1f, 0, -0.2f), m.player.entity, 114514); 986 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-1f, 0, -0.3f), m.player.entity, 114514); 987 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.9f, 0, 0.5f), m.player.entity, 114514); 988 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.8f, 0, 0.6f), m.player.entity, 114514); 989 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.7f, 0, 0.7f), m.player.entity, 114514); 990 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.6f, 0, 0.8f), m.player.entity, 114514); 991 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.5f, 0, 0.9f), m.player.entity, 114514); 992 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.4f, 0, 1f), m.player.entity, 114514); 993 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.4f, 0, -1f), m.player.entity, 114514); 994 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.5f, 0, -0.9f), m.player.entity, 114514); 995 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.6f, 0, -0.8f), m.player.entity, 114514); 996 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.7f, 0, -0.7f), m.player.entity, 114514); 997 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.8f, 0, -0.6f), m.player.entity, 114514); 998 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.9f, 0, -0.5f), m.player.entity, 114514); 999 | 1000 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.1f, 0, -1f), m.player.entity, 114514); 1001 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.2f, 0, -1f), m.player.entity, 114514); 1002 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.3f, 0, -1f), m.player.entity, 114514); 1003 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.1f, 0, -1f), m.player.entity, 114514); 1004 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.2f, 0, -1f), m.player.entity, 114514); 1005 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.3f, 0, -1f), m.player.entity, 114514); 1006 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.5f, 0, -0.9f), m.player.entity, 114514); 1007 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.6f, 0, -0.8f), m.player.entity, 114514); 1008 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.7f, 0, -0.7f), m.player.entity, 114514); 1009 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.8f, 0, -0.6f), m.player.entity, 114514); 1010 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.9f, 0, -0.5f), m.player.entity, 114514); 1011 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(1f, 0, -0.4f), m.player.entity, 114514); 1012 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-1f, 0, -0.4f), m.player.entity, 114514); 1013 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.9f, 0, -0.5f), m.player.entity, 114514); 1014 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.8f, 0, -0.6f), m.player.entity, 114514); 1015 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.7f, 0, -0.7f), m.player.entity, 114514); 1016 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.6f, 0, -0.8f), m.player.entity, 114514); 1017 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.5f, 0, -0.9f), m.player.entity, 114514); 1018 | 1019 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.1f, 0, 1f), m.player.entity, 114514); 1020 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.2f, 0, 1f), m.player.entity, 114514); 1021 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.3f, 0, 1f), m.player.entity, 114514); 1022 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.1f, 0, 1f), m.player.entity, 114514); 1023 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.2f, 0, 1f), m.player.entity, 114514); 1024 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.3f, 0, 1f), m.player.entity, 114514); 1025 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.5f, 0, 0.9f), m.player.entity, 114514); 1026 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.6f, 0, 0.8f), m.player.entity, 114514); 1027 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.7f, 0, 0.7f), m.player.entity, 114514); 1028 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.8f, 0, 0.6f), m.player.entity, 114514); 1029 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0.9f, 0, 0.5f), m.player.entity, 114514); 1030 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(1f, 0, 0.4f), m.player.entity, 114514); 1031 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-1f, 0, 0.4f), m.player.entity, 114514); 1032 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.9f, 0, 0.5f), m.player.entity, 114514); 1033 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.8f, 0, 0.6f), m.player.entity, 114514); 1034 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.7f, 0, 0.7f), m.player.entity, 114514); 1035 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.6f, 0, 0.8f), m.player.entity, 114514); 1036 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-0.5f, 0, 0.9f), m.player.entity, 114514); 1037 | 1038 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(-1, 0, 0), m.player.entity, 114514); 1039 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(1f, 0, 0), m.player.entity, 114514); 1040 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0, 0, 1f), m.player.entity, 114514); 1041 | m.player.playerCommandSystem.SpawnThunderBeam(new Vector3(0, 0, 0), new Vector3(0, 0, -1f), m.player.entity, 114514); 1042 | 1043 | } 1044 | 1045 | static void rangeClearTile(int range, Unity.Mathematics.int2 position, bool clearGround = false) 1046 | { 1047 | var m = GameObject.FindObjectOfType(); 1048 | if (range <= 0 || !isAdminPlayer()) return; 1049 | var playerEntity = m.player.entity; 1050 | var pos = new Unity.Mathematics.int2(0, 0); 1051 | 1052 | /* 1053 | 判断方向 1054 | x = 1,y = 0时向右 1055 | x = -1,y = 0时向左 1056 | x =0,y = -1时向下 1057 | x =0,y = 1时向上 1058 | x = 1,y = 1 时右上 1059 | x = 1,y = -1 时右下 1060 | x = -1,y = 1 时左上 1061 | x = -1,y = -1 时左下 1062 | */ 1063 | 1064 | // 向左右的时候 1065 | if (position.y == 0) 1066 | { 1067 | for (int y = 0; y < range; y++) 1068 | { 1069 | pos.x = position.x < 0 ? position.x - y : position.x + y; 1070 | 1071 | for (int x = 0; x < range; x++) 1072 | { 1073 | pos.y = position.y + x; 1074 | // MelonLogger.Msg(pos.x); 1075 | if (pos.x == 0 || pos.y == 0) 1076 | { 1077 | m.player.playerCommandSystem.CreateTileDamage(pos, 1000000000, playerEntity, false, true); 1078 | } 1079 | else 1080 | { 1081 | m.player.playerCommandSystem.CreateTileDamage(pos, 1000000000, playerEntity, clearGround, true); 1082 | } 1083 | 1084 | } 1085 | 1086 | for (int x = 0; x < range; x++) 1087 | { 1088 | pos.y = position.y - x; 1089 | // MelonLogger.Msg(pos.x); 1090 | if (pos.x == 0 || pos.y == 0) 1091 | { 1092 | continue; 1093 | } 1094 | else 1095 | { 1096 | m.player.playerCommandSystem.CreateTileDamage(pos, 1000000000, playerEntity, clearGround, true); 1097 | } 1098 | 1099 | } 1100 | } 1101 | } 1102 | // 向上下的时候 1103 | else 1104 | { 1105 | for (int y = 0; y < range; y++) 1106 | { 1107 | pos.y = position.y < 0 ? position.y - y : position.y + y; 1108 | 1109 | for (int x = 0; x < range; x++) 1110 | { 1111 | pos.x = position.x + x; 1112 | // MelonLogger.Msg(pos.x); 1113 | if (pos.x == 0 || pos.y == 0) 1114 | { 1115 | m.player.playerCommandSystem.CreateTileDamage(pos, 1000000000, playerEntity, false, true); 1116 | } 1117 | else 1118 | { 1119 | m.player.playerCommandSystem.CreateTileDamage(pos, 1000000000, playerEntity, clearGround, true); 1120 | } 1121 | 1122 | } 1123 | 1124 | for (int x = 0; x < range; x++) 1125 | { 1126 | pos.x = position.x - x; 1127 | // MelonLogger.Msg(pos.x); 1128 | if (pos.x == 0 || pos.y == 0) 1129 | { 1130 | continue; 1131 | } 1132 | else 1133 | { 1134 | m.player.playerCommandSystem.CreateTileDamage(pos, 1000000000, playerEntity, clearGround, true); 1135 | } 1136 | 1137 | } 1138 | } 1139 | } 1140 | 1141 | 1142 | } 1143 | 1144 | static bool isAdminPlayer() 1145 | { 1146 | /* 1147 | * 有问题adminlist始终只有自己的id 1148 | * 1149 | var m = GameObject.FindObjectOfType(); 1150 | var AdminList = m._networkingManager.adminList; 1151 | foreach(PlayerAdminEntry admin in AdminList.adminList) 1152 | { 1153 | if(admin.steamId == steamId) 1154 | { 1155 | return true; 1156 | } 1157 | } 1158 | return false;*/ 1159 | var m = GameObject.FindObjectOfType(); 1160 | if(m.player.adminPrivileges <= 0) 1161 | { 1162 | m._textManager.SpawnCoolText("非管理员玩家无法使用", new Vector3(0, 2, 0), Color.red, TextManager.FontFace.button, 1f, 1, 5, 0.8f, 0.8f); 1163 | return false; 1164 | } 1165 | 1166 | return true; 1167 | 1168 | } 1169 | 1170 | static bool IsNumeric(string value) 1171 | { 1172 | return Regex.IsMatch(value, @"^[+-]?\d*[.]?\d*$"); 1173 | } 1174 | 1175 | [HarmonyPrefix, HarmonyPatch(typeof(MapUI), "Ping")] 1176 | public static bool FlxsnxMod_MapUI_MapPing_Patch(PlayerController pc, Vector3 worldPos) 1177 | { 1178 | if (MapPing) 1179 | { 1180 | var m = GameObject.FindObjectOfType(); 1181 | if (m.player.playerIndex == pc.playerIndex) 1182 | { 1183 | m.player.SetPlayerPosition(worldPos); 1184 | return false; 1185 | } 1186 | else 1187 | { 1188 | return true; 1189 | } 1190 | 1191 | } 1192 | else 1193 | { 1194 | return true; 1195 | } 1196 | } 1197 | 1198 | // 修复鼠标闪烁问题 1199 | [HarmonyPrefix, HarmonyPatch(typeof(Cursor), "set_visible")] 1200 | public static bool FlxsnxMod_Cursor_set_visible_Patch(bool value) 1201 | { 1202 | if (value == false && showMenu == true) 1203 | { 1204 | return false; 1205 | } 1206 | return true; 1207 | } 1208 | 1209 | [HarmonyPrefix, HarmonyPatch(typeof(Il2CppPlayerCommand.ClientSystem), "CreateTileDamage")] 1210 | public static bool FlxsnxMod_ClientSystem_CreateTileDamage_Patch(Unity.Mathematics.int2 position, ref int damage, ref Unity.Entities.Entity pullAnyLootTowardsPlayerEntity, ref bool pullAnyLootToPlayer, bool canDamageGround = false) 1211 | { 1212 | if (rangeClear && damage != 1000000000) 1213 | { 1214 | rangeClearTile((int)clearRange, position, canDamageGround); 1215 | return false; 1216 | } 1217 | else 1218 | { 1219 | if (oneTapClearTile) 1220 | { 1221 | damage = 19999; 1222 | } 1223 | 1224 | if (pullLootToPlayer) 1225 | { 1226 | var m = GameObject.FindObjectOfType(); 1227 | pullAnyLootTowardsPlayerEntity = m.player.entity; 1228 | pullAnyLootToPlayer = true; 1229 | } 1230 | return true; 1231 | } 1232 | } 1233 | 1234 | /*[HarmonyPostfix, HarmonyPatch(typeof(SteamNetworking), "Initialize")] 1235 | public static void FlxsnxMod_SteamPlatform_Init(SteamNetworking __instance) 1236 | { 1237 | if (steamId == 0) 1238 | { 1239 | steamId = SteamClient.SteamId.Value; 1240 | MelonLogger.Msg("SteamId:" + steamId); 1241 | } 1242 | }*/ 1243 | } 1244 | } 1245 | -------------------------------------------------------------------------------- /FlxsnxMod/FlxsnxMod.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {D956B604-96EC-4A2A-B232-178D5E719772} 8 | Library 9 | Properties 10 | FlxsnxMod 11 | FlxsnxMod 12 | v4.7.2 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | false 33 | 34 | 35 | 36 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\net6\0Harmony.dll 37 | False 38 | 39 | 40 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\Assembly-CSharp.dll 41 | False 42 | 43 | 44 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\Il2CppFacepunch.Steamworks.Win64.dll 45 | False 46 | 47 | 48 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\Il2CppFewesLight.dll 49 | False 50 | 51 | 52 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\net6\Il2CppInterop.Common.dll 53 | 54 | 55 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\net6\Il2CppInterop.Generator.dll 56 | 57 | 58 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\net6\Il2CppInterop.Runtime.dll 59 | 60 | 61 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\Il2Cppmscorlib.dll 62 | False 63 | 64 | 65 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\Il2CppSystem.dll 66 | False 67 | 68 | 69 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\Il2CppSystem.Core.dll 70 | False 71 | 72 | 73 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\net6\MelonLoader.dll 74 | False 75 | 76 | 77 | 78 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\Il2CppPug.Base.dll 79 | False 80 | 81 | 82 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\Il2CppPug.Other.dll 83 | False 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\Unity.Entities.dll 96 | False 97 | 98 | 99 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\Unity.Mathematics.dll 100 | False 101 | 102 | 103 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\UnityEngine.dll 104 | False 105 | 106 | 107 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\UnityEngine.AssetBundleModule.dll 108 | False 109 | 110 | 111 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\UnityEngine.CoreModule.dll 112 | False 113 | 114 | 115 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\UnityEngine.ImageConversionModule.dll 116 | False 117 | 118 | 119 | False 120 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\UnityEngine.IMGUIModule.dll 121 | False 122 | 123 | 124 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\UnityEngine.InputLegacyModule.dll 125 | False 126 | 127 | 128 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\UnityEngine.TextRenderingModule.dll 129 | False 130 | 131 | 132 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\UnityEngine.UI.dll 133 | False 134 | 135 | 136 | F:\Steam\steamapps\common\Core Keeper\MelonLoader\Il2CppAssemblies\UnityEngine.UIModule.dll 137 | False 138 | 139 | 140 | 141 | 142 | 143 | 144 | True 145 | True 146 | Res.resx 147 | 148 | 149 | 150 | 151 | ResXFileCodeGenerator 152 | Designer 153 | Res.Designer.cs 154 | 155 | 156 | 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /FlxsnxMod/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using FlxsnxMod; 5 | 6 | using MelonLoader; 7 | [assembly: MelonInfo(typeof(FlxsnxMod.Flx), "FlxsnxMod", Flx.version, "FlxSNX")] 8 | [assembly: MelonGame(null, null)] 9 | 10 | // 有关程序集的一般信息由以下 11 | // 控制。更改这些特性值可修改 12 | // 与程序集关联的信息。 13 | [assembly: AssemblyTitle("FlxsnxMod")] 14 | [assembly: AssemblyDescription("")] 15 | [assembly: AssemblyConfiguration("")] 16 | [assembly: AssemblyCompany("")] 17 | [assembly: AssemblyProduct("FlxsnxMod")] 18 | [assembly: AssemblyCopyright("Copyright © 2022")] 19 | [assembly: AssemblyTrademark("")] 20 | [assembly: AssemblyCulture("")] 21 | 22 | // 将 ComVisible 设置为 false 会使此程序集中的类型 23 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 24 | //请将此类型的 ComVisible 特性设置为 true。 25 | [assembly: ComVisible(false)] 26 | 27 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 28 | [assembly: Guid("d956b604-96ec-4a2a-b232-178d5e719772")] 29 | 30 | // 程序集的版本信息由下列四个值组成: 31 | // 32 | // 主版本 33 | // 次版本 34 | // 生成号 35 | // 修订号 36 | // 37 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 38 | //通过使用 "*",如下所示: 39 | // [assembly: AssemblyVersion("1.0.*")] 40 | [assembly: AssemblyVersion(Flx.version)] 41 | [assembly: AssemblyFileVersion(Flx.version)] 42 | -------------------------------------------------------------------------------- /FlxsnxMod/Properties/Res.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace FlxsnxMod.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Res { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Res() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FlxsnxMod.Properties.Res", typeof(Res).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 重写当前线程的 CurrentUICulture 属性,对 51 | /// 使用此强类型资源类的所有资源查找执行重写。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// 查找 System.Byte[] 类型的本地化资源。 65 | /// 66 | internal static byte[] mod { 67 | get { 68 | object obj = ResourceManager.GetObject("mod", resourceCulture); 69 | return ((byte[])(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /FlxsnxMod/Properties/Res.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\mod;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 123 | 124 | -------------------------------------------------------------------------------- /FlxsnxMod/Resources/mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlxSNX/FlxSNXMod/7c65198a944fea19b6bd96a1381c703ea8761efa/FlxsnxMod/Resources/mod -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FlxSNXMod 2 | 基于 MelonLoader 的 CoreKeeper(地心护核者) 的作弊Mod 3 | 4 | ![预览图](https://files.catbox.moe/c8brpg.jpg) 5 | ## 更新日志 6 | [ChangeLog](https://github.com/FlxSNX/FlxSNXMod/blob/main/ChangeLog.md) 7 | 8 | ## 功能 9 | * 添加物品 10 | * 召唤Boss 11 | * 修改技能等级 12 | * 增删Buff 13 | * 地图传送 14 | * 雷霆光束 15 | * 背包物品一键清空 16 | * 背包物品一键999 17 | * 范围挖墙&铲地 18 | * 范围虫炮 19 | * 不会饥饿 20 | * 不耗耐久 21 | * 导出物品ID 22 | 23 | ## 说明 24 | 1. 这是我第一次尝试 C# 和 制作Mod 25 | 2. 为什么物品ID不使用文本输入框 26 | - 不知道为何使用了 `GUILayout.TextField` 或 `GUI.TextField` 后就会报错 27 | 3. 不懂用 BepInEx6 如何使用 GUI 所以选用了 MelonLoader 28 | 29 | ## 如何使用 30 | 1. 安装 [MelonLoader](https://github.com/LavaGang/MelonLoader) 到 `地心护核者` 的安装目录 31 | 2. 从 Steam 启动游戏 32 | 3. 使用 Visual Studio 打开项目 33 | 4. 修改 `FlxsnxMod.csproj` 里引用的程序集路径 34 | 5. 生成 FlxSNXMod 35 | 36 | ## 如何使用Mod 37 | 使用Mod前需先安装 MelonLoader 38 | 1. 找到 `地心护核者` 的安装目录 39 | 2. 将生成的 `dll` 文件 放入 `Mods` 文件夹即可 40 | 41 | ## 参考 42 | 本项目参考的资料: 43 | 44 | [Unity游戏Mod/插件制作教程](https://www.bilibili.com/read/cv8997376?spm_id_from=333.999.0.0) 45 | 46 | [从0开始教你使用BepInEx为unity游戏制作插件Mod](https://mod.3dmgame.com/read/3) 47 | 48 | [UnityMod开发教程 11 使用AssetBundle向游戏中加入自制资源](https://www.jianshu.com/p/2794c0c9d84b) 49 | 50 | 感谢以上各位大佬分享的教程~ 51 | --------------------------------------------------------------------------------