这个是攻略哈,因为要改DLL所以不考虑放mods出来了
具体作用就是右键打开传送菜单可以传送到任意建筑,不需要啥权限和上帝模式。
左键?表当然是看时间的啊!
具体SDX代码如下:
using System;
using UnityEngine;
internal class ItemClassWatch : ItemClass
{
public override void OnHoldingUpdate(ItemInventoryData _data)
{
// 左键看时间
if (Input.GetKey(Mouse0))
{
int num = GameUtils.WorldTimeToDays(GameManager.Instance.World.GetWorldTime());
int num2 = GameUtils.WorldTimeToHours(GameManager.Instance.World.GetWorldTime());
int num3 = GameUtils.WorldTimeToMinutes(GameManager.Instance.World.GetWorldTime());
string str = string.Format(“当前时间: {1:00}:{2:00} 第 {0}天”, num, num2, num3);
EntityPlayerLocal player = _data.holdingEntity as EntityPlayerLocal;
this.DisplayToolTipText(player, str);
}
// 右键传送
if (Input.GetKey(Mouse1)
{
LocalPlayerUI.GetUIForPrimaryPlayer().windowManager.Open(XUiC_PoiTeleportMenu.ID, true, false, true);
}
}
private void DisplayToolTipText(EntityPlayerLocal player, string str)
{
if (DateTime.Now > this.dteNextToolTipDisplayTime)
{
GameManager.ShowTooltip(player, str);
this.dteNextToolTipDisplayTime = DateTime.Now.AddSeconds(5.0);
}
}
// 看时间有5sCD,免得你一直看时间
private DateTime dteNextToolTipDisplayTime;
}
使用时只需要把想要改的道具(不一定是表哈)的ItemClass改成这个就行。