コード例 #1
0
ファイル: Lang.cs プロジェクト: egshels/Sources
 public static object CreateDialogSubstitutionObject(NPC npc = null)
 {
     return(new
     {
         Nurse = NPC.GetFirstNPCNameOrNull(18),
         Merchant = NPC.GetFirstNPCNameOrNull(17),
         ArmsDealer = NPC.GetFirstNPCNameOrNull(19),
         Dryad = NPC.GetFirstNPCNameOrNull(20),
         Demolitionist = NPC.GetFirstNPCNameOrNull(38),
         Clothier = NPC.GetFirstNPCNameOrNull(54),
         Guide = NPC.GetFirstNPCNameOrNull(22),
         Wizard = NPC.GetFirstNPCNameOrNull(108),
         GoblinTinkerer = NPC.GetFirstNPCNameOrNull(107),
         Mechanic = NPC.GetFirstNPCNameOrNull(124),
         Truffle = NPC.GetFirstNPCNameOrNull(160),
         Steampunker = NPC.GetFirstNPCNameOrNull(178),
         DyeTrader = NPC.GetFirstNPCNameOrNull(207),
         PartyGirl = NPC.GetFirstNPCNameOrNull(208),
         Cyborg = NPC.GetFirstNPCNameOrNull(209),
         Painter = NPC.GetFirstNPCNameOrNull(227),
         WitchDoctor = NPC.GetFirstNPCNameOrNull(228),
         Pirate = NPC.GetFirstNPCNameOrNull(229),
         Stylist = NPC.GetFirstNPCNameOrNull(353),
         TravelingMerchant = NPC.GetFirstNPCNameOrNull(368),
         Angler = NPC.GetFirstNPCNameOrNull(369),
         Bartender = NPC.GetFirstNPCNameOrNull(550),
         WorldName = Main.worldName,
         Day = Main.dayTime,
         BloodMoon = Main.bloodMoon,
         Eclipse = Main.eclipse,
         MoonLordDefeated = NPC.downedMoonlord,
         HardMode = Main.hardMode,
         Homeless = (npc?.homeless ?? false),
         InventoryKey = Main.cInv,
         PlayerName = Main.player[Main.myPlayer].name,
         GolfGuy = NPC.GetFirstNPCNameOrNull(588),
         TaxCollector = NPC.GetFirstNPCNameOrNull(441),
         Rain = Main.raining,
         Graveyard = Main.LocalPlayer.ZoneGraveyard,
         AnglerCompletedQuestsCount = Main.LocalPlayer.anglerQuestsFinished,
         InputTriggerUI_BuildFromInventory = PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay: false, "QuickMount"),
         InputTriggerUI_SellItem = PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay: false, "SmartSelect"),
         InputTriggerUI_Trash = PlayerInput.GenerateInputTag_ForCurrentGamemode_WithHacks(tagForGameplay: false, "SmartSelect"),
         InputTriggerUI_FavoriteItem = PlayerInput.GenerateInputTag_ForCurrentGamemode_WithHacks(tagForGameplay: false, "SmartCursor"),
         InputTrigger_QuickEquip = PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay: false, "Grapple"),
         InputTrigger_LockOn = PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay: true, "LockOn"),
         InputTrigger_RadialQuickbar = PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay: true, "HotbarMinus"),
         InputTrigger_RadialHotbar = PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay: true, "HotbarPlus"),
         InputTrigger_SmartCursor = PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay: true, "SmartCursor"),
         InputTrigger_UseOrAttack = PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay: true, "MouseLeft"),
         InputTrigger_InteractWithTile = PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay: true, "MouseRight"),
         InputTrigger_SmartSelect = PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay: true, "SmartSelect")
     });
 }
コード例 #2
0
ファイル: Lang.cs プロジェクト: xiongyaya/Terraria
 public static object CreateDialogSubstitutionObject(NPC npc = null)
 {
     return((object)new
     {
         Nurse = NPC.GetFirstNPCNameOrNull(18),
         Merchant = NPC.GetFirstNPCNameOrNull(17),
         ArmsDealer = NPC.GetFirstNPCNameOrNull(19),
         Dryad = NPC.GetFirstNPCNameOrNull(20),
         Demolitionist = NPC.GetFirstNPCNameOrNull(38),
         Clothier = NPC.GetFirstNPCNameOrNull(54),
         Guide = NPC.GetFirstNPCNameOrNull(22),
         Wizard = NPC.GetFirstNPCNameOrNull(108),
         GoblinTinkerer = NPC.GetFirstNPCNameOrNull(107),
         Mechanic = NPC.GetFirstNPCNameOrNull(124),
         Truffle = NPC.GetFirstNPCNameOrNull(160),
         Steampunker = NPC.GetFirstNPCNameOrNull(178),
         DyeTrader = NPC.GetFirstNPCNameOrNull(207),
         PartyGirl = NPC.GetFirstNPCNameOrNull(208),
         Cyborg = NPC.GetFirstNPCNameOrNull(209),
         Painter = NPC.GetFirstNPCNameOrNull(227),
         WitchDoctor = NPC.GetFirstNPCNameOrNull(228),
         Pirate = NPC.GetFirstNPCNameOrNull(229),
         Stylist = NPC.GetFirstNPCNameOrNull(353),
         TravelingMerchant = NPC.GetFirstNPCNameOrNull(368),
         Angler = NPC.GetFirstNPCNameOrNull(369),
         Bartender = NPC.GetFirstNPCNameOrNull(550),
         WorldName = Main.ActiveWorldFileData.Name,
         Day = Main.dayTime,
         BloodMoon = Main.bloodMoon,
         MoonLordDefeated = NPC.downedMoonlord,
         HardMode = Main.hardMode,
         Homeless = (npc != null && npc.homeless),
         InventoryKey = Main.cInv,
         PlayerName = Main.player[Main.myPlayer].name
     });
 }