Elin Decompiled Documentation EA 23.102 Nightly
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
Msg Class Reference
Inheritance diagram for Msg:
EClass

Static Public Member Functions

static void SetColor ()
 
static void SetColor (Color color)
 
static void SetColor (string id)
 
static string GetRawText (string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
 
static string GetRawText (string idLang, Card c1, Card c2, string ref1=null, string ref2=null)
 
static string GetRawText (string idLang, Card c1, string ref1=null, string ref2=null, string ref3=null)
 
static string Say (string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
 
static string Say (string idLang, Card c1, Card c2, string ref1=null, string ref2=null)
 
static string Say (string idLang, Card c1, string ref1=null, string ref2=null, string ref3=null)
 
static string Say (string idLang, Card c1, int i, string ref1=null)
 
static string Say (string idLang, int i, string ref1=null, string ref2=null)
 
static string Say (string idLang)
 
static string SayNothingHappen ()
 
static string SayCannotUseHere ()
 
static void SayGod (string s, Card owner=null)
 
static string SayRaw (string text)
 
static void Append (Sprite sprite)
 
static void AquireItem (string itemName)
 
static void Nerun (string lang, string idPortrait="UN_nerun")
 
static void SayHomeMember (string lang)
 
static void SayPic (Card c, string lang)
 
static void SayPic (string idPortrait, string lang, string _idPop=null)
 
static PopItem Talk (Card c, string id)
 
static PopItem TalkHomeMemeber (string id)
 
static PopItem TalkMaid (string id)
 
static string GetGameText (string idLang)
 
static string GetName (Card c)
 
static bool IsThirdPerson (Card c)
 
static bool IsThirdPerson (string n)
 
static bool IsThirdPerson (int i)
 
static void NewLine ()
 
static unsafe void ToUpperFirst (string str)
 
- Static Public Member Functions inherited from EClass
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 

Static Public Attributes

static ThirstPersonInfo thirdPerson1 = new ThirstPersonInfo()
 
static ThirstPersonInfo thirdPerson2 = new ThirstPersonInfo()
 
static Color currentColor = colors.Default
 
static bool alwaysVisible
 
static bool ignoreAll
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

static WidgetMainText mainText [get]
 
static WidgetFeed feed [get]
 
static MsgColors colors [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Detailed Description

Definition at line 4 of file Msg.cs.

Member Function Documentation

◆ Append()

static void Msg.Append ( Sprite  sprite)
inlinestatic

Definition at line 135 of file Msg.cs.

136 {
137 mainText.Append(sprite);
138 }
static WidgetMainText mainText
Definition: Msg.cs:16
void Append(string s, Point pos=null)

References WidgetMainText.Append(), and mainText.

◆ AquireItem()

static void Msg.AquireItem ( string  itemName)
inlinestatic

Definition at line 140 of file Msg.cs.

141 {
142 Say("getItem", itemName ?? "");
143 }
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58

References Say().

Referenced by Hoard.Add().

◆ GetGameText()

static string Msg.GetGameText ( string  idLang)
inlinestatic

Definition at line 252 of file Msg.cs.

253 {
254 LangGame.Row row = EClass.core.sources.langGame.map.TryGetValue(idLang);
255 if (row == null)
256 {
257 return idLang.lang();
258 }
259 if (!row.effect.IsEmpty() && row.effect == "destroy")
260 {
262 }
263 if (!row.color.IsEmpty())
264 {
266 }
267 if (!row.sound.IsEmpty())
268 {
269 EClass.Sound.Play(row.sound);
270 }
271 return row.GetText("text").Split(Environment.NewLine.ToCharArray()).RandomItem();
272 }
SourceManager sources
Definition: Core.cs:33
Definition: EClass.cs:5
static Core core
Definition: EClass.cs:6
static SoundManager Sound
Definition: EClass.cs:46
string sound
Definition: LangGame.cs:16
string color
Definition: LangGame.cs:12
string effect
Definition: LangGame.cs:18
UD_String_Color colors
Definition: MsgColors.cs:23
static MsgColors colors
Definition: Msg.cs:20
static void SetColor()
Definition: Msg.cs:22
string GetText(string id="name", bool returnNull=false)
Definition: SourceData.cs:553
LangGame langGame
Sprite spriteDestroy

References WidgetMainText.Append(), LangGame.Row.color, colors, MsgColors.colors, EClass.core, LangGame.Row.effect, SourceData< T, T2 >.BaseRow.GetText(), SourceManager.langGame, mainText, SetColor(), EClass.Sound, LangGame.Row.sound, Core.sources, and WidgetMainText.spriteDestroy.

Referenced by GetRawText(), and Say().

◆ GetName()

static string Msg.GetName ( Card  c)
inlinestatic

Definition at line 274 of file Msg.cs.

275 {
276 if (c == null)
277 {
278 return "null";
279 }
280 if (c.IsPC)
281 {
282 return "you".lang();
283 }
284 if (!alwaysVisible && (EClass.pc.isBlind || !EClass.pc.CanSee(c)) && c.parent == EClass._zone)
285 {
286 return (c.isChara ? "someone" : "something").lang();
287 }
288 return c.Name;
289 }
string Name
Definition: Card.cs:2013
ICardParent parent
Definition: Card.cs:51
virtual bool IsPC
Definition: Card.cs:2019
virtual bool isChara
Definition: Card.cs:1959
bool CanSee(Card c)
Definition: Chara.cs:1027
bool isBlind
Definition: Chara.cs:125
static Zone _zone
Definition: EClass.cs:20
static Chara pc
Definition: EClass.cs:14
static bool alwaysVisible
Definition: Msg.cs:12

References EClass._zone, alwaysVisible, Chara.CanSee(), Chara.isBlind, Card.isChara, Card.IsPC, Card.Name, Card.parent, and EClass.pc.

Referenced by GetRawText(), Say(), and ActEffect.Wish().

◆ GetRawText() [1/3]

static string Msg.GetRawText ( string  idLang,
Card  c1,
Card  c2,
string  ref1 = null,
string  ref2 = null 
)
inlinestatic

Definition at line 44 of file Msg.cs.

45 {
46 thirdPerson1.Set(c1);
47 thirdPerson2.Set(c2);
48 return GameLang.Parse(GetGameText(idLang), IsThirdPerson(c1), GetName(c1), GetName(c2), ref1, ref2);
49 }
static string Parse(string text, bool thirdPerson, string val1, string val2=null, string val3=null, string val4=null)
Definition: GameLang.cs:123
static bool IsThirdPerson(Card c)
Definition: Msg.cs:291
static string GetGameText(string idLang)
Definition: Msg.cs:252
static ThirstPersonInfo thirdPerson2
Definition: Msg.cs:8
static ThirstPersonInfo thirdPerson1
Definition: Msg.cs:6
static string GetName(Card c)
Definition: Msg.cs:274
void Set(string n)

References GetGameText(), GetName(), IsThirdPerson(), GameLang.Parse(), ThirstPersonInfo.Set(), thirdPerson1, and thirdPerson2.

◆ GetRawText() [2/3]

static string Msg.GetRawText ( string  idLang,
Card  c1,
string  ref1 = null,
string  ref2 = null,
string  ref3 = null 
)
inlinestatic

Definition at line 51 of file Msg.cs.

52 {
53 thirdPerson1.Set(c1);
54 thirdPerson2.Set(ref1);
55 return GameLang.Parse(GetGameText(idLang), IsThirdPerson(c1), GetName(c1), ref1, ref2, ref3);
56 }

References GetGameText(), GetName(), IsThirdPerson(), GameLang.Parse(), ThirstPersonInfo.Set(), thirdPerson1, and thirdPerson2.

◆ GetRawText() [3/3]

static string Msg.GetRawText ( string  idLang,
string  ref1,
string  ref2 = null,
string  ref3 = null,
string  ref4 = null 
)
inlinestatic

Definition at line 37 of file Msg.cs.

38 {
39 thirdPerson1.Set(ref1);
40 thirdPerson2.Set(ref2);
41 return GameLang.Parse(GetGameText(idLang), IsThirdPerson(ref1), ref1, ref2, ref3, ref4);
42 }

References GetGameText(), IsThirdPerson(), GameLang.Parse(), ThirstPersonInfo.Set(), thirdPerson1, and thirdPerson2.

Referenced by FactionBranch.Log().

◆ IsThirdPerson() [1/3]

static bool Msg.IsThirdPerson ( Card  c)
inlinestatic

Definition at line 291 of file Msg.cs.

292 {
293 if (c == null)
294 {
295 return false;
296 }
297 if (c.IsPC || c.Num > 1)
298 {
299 return false;
300 }
301 return true;
302 }
int Num
Definition: Card.cs:154

References Card.IsPC, and Card.Num.

Referenced by GetRawText(), IsThirdPerson(), Say(), and ActEffect.Wish().

◆ IsThirdPerson() [2/3]

static bool Msg.IsThirdPerson ( int  i)
inlinestatic

Definition at line 313 of file Msg.cs.

314 {
315 return i <= 1;
316 }

◆ IsThirdPerson() [3/3]

static bool Msg.IsThirdPerson ( string  n)
inlinestatic

Definition at line 304 of file Msg.cs.

305 {
306 if (!int.TryParse(n, out var result))
307 {
308 return false;
309 }
310 return IsThirdPerson(result);
311 }

References IsThirdPerson().

◆ Nerun()

static void Msg.Nerun ( string  lang,
string  idPortrait = "UN_nerun" 
)
inlinestatic

Definition at line 145 of file Msg.cs.

146 {
147 string text = GameLang.Convert(lang.lang());
148 if ((bool)feed)
149 {
150 feed.Nerun(text, idPortrait);
151 }
152 else if ((bool)mainText)
153 {
154 mainText.Append(text.Bracket(1), colors.Talk);
155 }
156 }
static string Convert(string text)
Definition: GameLang.cs:106
Color Talk
Definition: MsgColors.cs:7
static WidgetFeed feed
Definition: Msg.cs:18
void Nerun(string text, string idPortrait="UN_nerun")
Definition: WidgetFeed.cs:93

References WidgetMainText.Append(), colors, GameLang.Convert(), feed, mainText, WidgetFeed.Nerun(), and MsgColors.Talk.

Referenced by LayerEditPlaylist.Activate(), LayerHoard.OnClickNextMode(), WidgetFeed.OnSetContextMenu(), and LayerHoard.Update().

◆ NewLine()

static void Msg.NewLine ( )
inlinestatic

Definition at line 318 of file Msg.cs.

319 {
320 if ((bool)mainText)
321 {
323 }
324 }

References mainText, and WidgetMainText.NewLine().

Referenced by GameDate.AdvanceMin().

◆ Say() [1/6]

static string Msg.Say ( string  idLang)
inlinestatic

Definition at line 91 of file Msg.cs.

92 {
93 return SayRaw(GetGameText(idLang));
94 }
static string SayRaw(string text)
Definition: Msg.cs:113

References GetGameText(), and SayRaw().

◆ Say() [2/6]

static string Msg.Say ( string  idLang,
Card  c1,
Card  c2,
string  ref1 = null,
string  ref2 = null 
)
inlinestatic

Definition at line 65 of file Msg.cs.

66 {
67 thirdPerson1.Set(c1);
68 thirdPerson2.Set(c2);
69 return SayRaw(GameLang.Parse(GetGameText(idLang), IsThirdPerson(c1), GetName(c1), GetName(c2), ref1, ref2));
70 }

References GetGameText(), GetName(), IsThirdPerson(), GameLang.Parse(), SayRaw(), ThirstPersonInfo.Set(), thirdPerson1, and thirdPerson2.

◆ Say() [3/6]

static string Msg.Say ( string  idLang,
Card  c1,
int  i,
string  ref1 = null 
)
inlinestatic

Definition at line 79 of file Msg.cs.

80 {
81 thirdPerson1.Set(c1);
82 thirdPerson2.Set(ref1);
83 return SayRaw(GameLang.Parse(GetGameText(idLang), IsThirdPerson(i), GetName(c1), i.ToString() ?? "", ref1));
84 }

References GetGameText(), GetName(), IsThirdPerson(), GameLang.Parse(), SayRaw(), ThirstPersonInfo.Set(), thirdPerson1, and thirdPerson2.

◆ Say() [4/6]

static string Msg.Say ( string  idLang,
Card  c1,
string  ref1 = null,
string  ref2 = null,
string  ref3 = null 
)
inlinestatic

Definition at line 72 of file Msg.cs.

73 {
74 thirdPerson1.Set(c1);
75 thirdPerson2.Set(ref1);
76 return SayRaw(GameLang.Parse(GetGameText(idLang), IsThirdPerson(c1), GetName(c1), ref1, ref2, ref3));
77 }

References GetGameText(), GetName(), IsThirdPerson(), GameLang.Parse(), SayRaw(), ThirstPersonInfo.Set(), thirdPerson1, and thirdPerson2.

◆ Say() [5/6]

static string Msg.Say ( string  idLang,
int  i,
string  ref1 = null,
string  ref2 = null 
)
inlinestatic

Definition at line 86 of file Msg.cs.

87 {
88 return SayRaw(GameLang.Parse(GetGameText(idLang), IsThirdPerson(i), ref1, ref2));
89 }

References GetGameText(), IsThirdPerson(), GameLang.Parse(), and SayRaw().

◆ Say() [6/6]

static string Msg.Say ( string  idLang,
string  ref1,
string  ref2 = null,
string  ref3 = null,
string  ref4 = null 
)
inlinestatic

Definition at line 58 of file Msg.cs.

59 {
60 thirdPerson1.Set(ref1);
61 thirdPerson2.Set(ref2);
62 return SayRaw(GameLang.Parse(GetGameText(idLang), IsThirdPerson(ref1), ref1, ref2, ref3, ref4));
63 }

References GetGameText(), IsThirdPerson(), GameLang.Parse(), SayRaw(), ThirstPersonInfo.Set(), thirdPerson1, and thirdPerson2.

Referenced by Chara._Move(), TraitAltar._OnOffer(), InvOwnerChaosOffering._OnProcess(), InvOwnerDeliver._OnProcess(), InvOwnerGene._OnProcess(), InvOwnerMod._OnProcess(), InvOwnerRecycle._OnProcess(), InvOwnerRefuel._OnProcess(), AM_Adv._OnUpdateInput(), TraitGodStatue._OnUse(), Zone.Activate(), MiniGame.Activate(), MeetingManager.Add(), Faction.AddContribution(), Player.AddExpInfluence(), Player.AddExpKnowledge(), Party.AddMemeber(), Zone.AddRandomVisitor(), Player.Flags.AddStory(), Card.AddThing(), LayerSleep.Advance(), GameDate.AdvanceDay(), GameDate.AdvanceHour(), Chara.ApplyDeathPenalty(), AquireItem(), FactionBranch.BanishMember(), TraitDrink.BlendLove(), TraitDrink.BlendPoison(), AI_Shopping.Buy(), DramaOutcome.check_sketch(), ZoneEventSubdue.CheckClear(), Zone.ClaimZone(), Chara.ClearInventory(), ContentCodex.Collect(), RecipeManager.ComeUpWithRandomRecipe(), RecipeManager.ComeUpWithRecipe(), ItemGachaResult.Confirm(), TraitCrafter.Craft(), Recipe.Craft(), RecipeCard.Craft(), LayerDragGrid.CreateChaosOffering(), LayerDragGrid.CreateDeliver(), LayerDragGrid.CreateGacha(), LayerDragGrid.CreateOffering(), LayerDragGrid.CreateRecycle(), Card.DamageHP(), Zone.Deactivate(), QuestDeliver.Deliver(), Card.Die(), Chara.Die(), ActionMode.DoFunc(), Player.DreamSpell(), Recipe.DropIngredients(), Player.DropReward(), Chara.DropThing(), TraitDye.Dye(), Expedition.End(), Player.EnterLocalZone(), CharaBody.Equip(), Player.EquipTool(), Zone.Export(), LayerUploader.ExportMap(), Chara.FallFromZone(), AI_Fuck.Finish(), FactionBranch.GetDailyIncome(), Faction.GetFactionSalary(), AI_Shear.GetFur(), Faction.GetRankIncome(), Faction.GetResidentTax(), Chara.GetRevived(), MiniGame.GetSlotReward(), DramaOutcome.give_sketch_special(), Chara.GiveGift(), QuestDebt.GiveReward(), DramaOutcome.guild_join(), ZoneEventDefenseGame.Horn_Next(), ZoneEventDefenseGame.Horn_Retreat(), Thing.Identify(), TraitFoodEggFertilized.Incubate(), Scene.Init(), CharaBody.IsEquippable(), InvOwnerEquip.IsFailByCurse(), ActWater.IsWaterCanValid(), TaskWater.IsWaterCanValid(), Religion.JoinFaith(), Religion.LeaveFaith(), Card.LevelUp(), TraitMoongate.LoadMap(), TraitSeed.MakeSeed(), Map.MineObj(), Zone.ModDevelopment(), FactionBranch.ModExp(), Player.ModFame(), Zone.ModInfluence(), Player.ModKarma(), Player.ModKeyItem(), Player.MoveZone(), Chara.MoveZone(), ZoneEventDefenseGame.NextWave(), AM_Paint.OnActivate(), TraitHitchingPost.OnActivateTrap(), TraitTrap.OnActivateTrap(), Faction.OnAdvanceMonth(), Player.OnAdvanceRealHour(), TraitDrink.OnBlend(), TraitWell.OnBlend(), TaskDump.OnCancelOrSuccess(), BaseListPeople.OnClick(), ContentCodex.OnClickAddCards(), LayerCraft.OnClickCraft(), TaskHarvest.OnCreateProgress(), InvOwner.OnDrag(), TextureManager.OnDropFile(), QuestRandom.OnDropReward(), TraitFortuneCookie.OnEat(), QuestDeliver.OnEnterZone(), ZoneEventSiege.OnFirstTick(), InvOwnerDraglet.OnInit(), ZoneEventSiege.OnKill(), ElementContainerCard.OnLearn(), ElementContainerZone.OnLearn(), ZoneEventHarvest.OnLeaveZone(), ElementContainerCard.OnLevelDown(), ElementContainerZone.OnLevelUp(), TraitAltar.OnOffer(), InvOwnerDraglet.OnProcess(), AI_Fish.ProgressFish.OnProgressComplete(), AI_Sleep.OnProgressComplete(), TaskCraft.OnProgressComplete(), TaskDig.OnProgressComplete(), ZoneEventHarvest.OnReachTimeLimit(), ZoneEventMusic.OnReachTimeLimit(), TraitBlueprint.OnRead(), TraitDeed.OnRead(), TraitDeedRelocate.OnRead(), TraitDiary.OnRead(), TraitIndulgence.OnRead(), TraitScrollMap.OnRead(), FactionBranch.OnSimulateDay(), RecipeManager.OnSleep(), QuestDeliver.OnStart(), TraitCurrencyMedal.OnStepped(), LayerQuestBoard.OnSwitchContent(), ElementContainerCard.OnTrain(), Scene.OnUpdate(), TraitAmmo.OnUse(), TraitCrafter.OnUse(), TraitDaggerGrave.OnUse(), TraitEditPlaylist.OnUse(), TraitEquipItem.OnUse(), TraitGiftNewYear.OnUse(), TraitPlamoBox.OnUse(), TraitPowerStatue.OnUse(), TraitScrollMapTreasure.OnUse(), TraitStairsLocked.OnUse(), TraitTape.OnUse(), ZoneEventDefenseGame.OnVisit(), TraitContainer.Open(), DramaManager.ParseLine(), InvOwnerDeliver.PayBill(), ActRanged.Perform(), ActRestrain.Perform(), ActRide.Perform(), HotItemActionSleep.Perform(), LayerGachaResult.PlayGacha(), DramaOutcome.poppy_found(), ActEffect.Proc(), InvOwner.Transaction.Process(), FactionRelation.Promote(), Card.PurgeDuplicateArtifact(), FactionBranch.ReceivePackages(), FactionBranch.Recruit(), LayerTravel.Refresh(), Trait.Refuel(), Region.RenewRandomSites(), Chara.Revive(), ActRide.Ride(), AI_Craft_Snowman.Run(), AI_Fish.Run(), AI_Goto.Run(), AI_Idle.Run(), AI_Slaughter.Run(), AI_UseCrafter.Run(), GoalCombat.Run(), TaskCullLife.Run(), TaskDump.Run(), Game.Save(), MiniGame.Say(), Card.Say(), SayCannotUseHere(), SayGod(), SayNothingHappen(), TraitDetector.Search(), ActWait.SearchMedal(), ContentQuest.SelectQuest(), AI_Shopping.SellChara(), Weather.SetCondition(), GameDate.ShipGoods(), Quest.ShowCompleteText(), QuestDialog.ShowCompleteText(), Zone.Simulate(), ZoneEventQuest.SpawnBoss(), ButtonAbility.SpecialHoldAction(), Expedition.Start(), Religion.Talk(), Card.TalkRaw(), Chara.TalkTopic(), Player.TargetRanged(), ActThrow.Throw(), Chara.Tick(), ConSleep.Tick(), Chara.TickConditions(), UI.ToggleFeedback(), Player.TooHeavyToMove(), GoalAutoCombat.TryAbortCombat(), Chara.TryAssignBed(), Chara.TryDropBossLoot(), Zone.TryGenerateBigDaddy(), Recipe.TryGetFirstTimeBonus(), Chara.TryNullifyCurse(), Card.TryPay(), TaskDump.TryPerform(), ActRanged.TryReload(), TraitBed.TrySetAct(), TraitCoreZone.TrySetAct(), TraitNewZone.TrySetAct(), TraitSpecialLantern.TrySetAct(), TraitWaystone.TrySetAct(), TraitToolTorch.TrySetHeldAct(), Map.TryShatter(), InvOwnerCraft.TryStartCraft(), TraitTeleporter.TryTeleport(), ActionMode.UpdateInput(), CoreDebug.UpdateInput(), Quest.UpdateJournal(), QuestManager.UpdateJournal(), HomeResourceWorth.UpdateRank(), FactionBranch.Upgrade(), Chara.UseAbility(), and ActEffect.Wish().

◆ SayCannotUseHere()

static string Msg.SayCannotUseHere ( )
inlinestatic

Definition at line 101 of file Msg.cs.

102 {
103 return Say("cannot_use_here");
104 }

References Say().

Referenced by TraitCrafter.OnUse(), TraitGiftJure.OnUse(), TraitGiftNewYear.OnUse(), TraitGiftPack.OnUse(), TraitParcel.OnUse(), and TraitPlamoBox.OnUse().

◆ SayGod()

static void Msg.SayGod ( string  s,
Card  owner = null 
)
inlinestatic

Definition at line 106 of file Msg.cs.

107 {
109 Say(s.Bracket());
110 owner?.SayRaw("@1" + s);
111 }
void SayRaw(string text, string ref1=null, string ref2=null)
Definition: Card.cs:6025
Color TalkGod
Definition: MsgColors.cs:9

References colors, Say(), SetColor(), and MsgColors.TalkGod.

◆ SayHomeMember()

static void Msg.SayHomeMember ( string  lang)
inlinestatic

Definition at line 158 of file Msg.cs.

159 {
160 string text = GameLang.Convert(lang.lang());
161 if ((bool)feed)
162 {
163 feed.Nerun(text);
164 }
165 else if ((bool)mainText)
166 {
167 mainText.Append(text.Bracket(1), colors.Talk);
168 }
169 }

References WidgetMainText.Append(), colors, GameLang.Convert(), feed, mainText, WidgetFeed.Nerun(), and MsgColors.Talk.

◆ SayNothingHappen()

◆ SayPic() [1/2]

static void Msg.SayPic ( Card  c,
string  lang 
)
inlinestatic

Definition at line 171 of file Msg.cs.

172 {
173 if (c != null)
174 {
175 string text = GameLang.Convert(lang.lang());
176 if ((bool)feed)
177 {
178 feed.SayRaw(c, text);
179 }
180 else if ((bool)mainText)
181 {
182 mainText.Append(text.Bracket(1), colors.Talk);
183 }
184 }
185 }
PopItem SayRaw(Card c, string text)
Definition: WidgetFeed.cs:81

References WidgetMainText.Append(), colors, GameLang.Convert(), feed, mainText, WidgetFeed.SayRaw(), and MsgColors.Talk.

Referenced by LayerHoard.Update().

◆ SayPic() [2/2]

static void Msg.SayPic ( string  idPortrait,
string  lang,
string  _idPop = null 
)
inlinestatic

Definition at line 187 of file Msg.cs.

188 {
189 string text = GameLang.Convert(lang.lang());
190 if ((bool)feed)
191 {
192 feed.SayRaw(idPortrait, text, _idPop);
193 }
194 else if ((bool)mainText)
195 {
196 mainText.Append(text.Bracket(1), colors.Talk);
197 }
198 }

References WidgetMainText.Append(), colors, GameLang.Convert(), feed, mainText, WidgetFeed.SayRaw(), and MsgColors.Talk.

◆ SayRaw()

static string Msg.SayRaw ( string  text)
inlinestatic

Definition at line 113 of file Msg.cs.

114 {
115 if (ignoreAll)
116 {
118 return "";
119 }
120 ToUpperFirst(text);
121 if ((bool)feed)
122 {
123 feed.System(text);
124 }
125 if ((bool)mainText)
126 {
128 }
130 alwaysVisible = false;
131 EClass.game.log.Add(text);
132 return text;
133 }
static Game game
Definition: EClass.cs:8
MsgLog log
Definition: Game.cs:185
Color Default
Definition: MsgColors.cs:5
void Add(Data data)
Definition: MsgLog.cs:53
static Color currentColor
Definition: Msg.cs:10
static bool ignoreAll
Definition: Msg.cs:14
static unsafe void ToUpperFirst(string str)
Definition: Msg.cs:326
void System(string text)
Definition: WidgetFeed.cs:98

References MsgLog.Add(), alwaysVisible, WidgetMainText.Append(), colors, currentColor, MsgColors.Default, feed, EClass.game, ignoreAll, Game.log, mainText, WidgetFeed.System(), and ToUpperFirst().

Referenced by PartialMap.ExportDialog(), Zone.ExportDialog(), Zone_User.OnActivate(), TraitFortuneCookie.OnEat(), Say(), and CoreDebug.UpdateAlways().

◆ SetColor() [1/3]

◆ SetColor() [2/3]

static void Msg.SetColor ( Color  color)
inlinestatic

Definition at line 27 of file Msg.cs.

28 {
29 currentColor = color;
30 }

References currentColor.

◆ SetColor() [3/3]

static void Msg.SetColor ( string  id)
inlinestatic

Definition at line 32 of file Msg.cs.

33 {
35 }

References colors, MsgColors.colors, and currentColor.

◆ Talk()

static PopItem Msg.Talk ( Card  c,
string  id 
)
inlinestatic

Definition at line 200 of file Msg.cs.

201 {
202 PopItem result = null;
203 if (c == null)
204 {
205 return null;
206 }
207 string text = GameLang.Convert(c.GetTalkText(id, stripPun: true));
208 if ((bool)feed && c != null)
209 {
210 result = feed.SayRaw(c, text);
211 }
212 else if ((bool)mainText)
213 {
214 mainText.Append(text.Bracket(1), colors.Talk);
215 }
216 return result;
217 }
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:6073

References WidgetMainText.Append(), colors, GameLang.Convert(), feed, Card.GetTalkText(), mainText, WidgetFeed.SayRaw(), and MsgColors.Talk.

Referenced by TalkHomeMemeber(), and TalkMaid().

◆ TalkHomeMemeber()

static PopItem Msg.TalkHomeMemeber ( string  id)
inlinestatic

Definition at line 219 of file Msg.cs.

220 {
221 Chara chara = null;
222 if (EClass.Branch != null)
223 {
224 for (int i = 0; i < 99; i++)
225 {
226 chara = EClass.Branch.members.RandomItem();
227 if (chara != EClass.pc)
228 {
229 break;
230 }
231 }
232 }
233 if (chara == null)
234 {
235 chara = EClass.pc;
236 }
237 return Talk(chara, id);
238 }
Definition: Chara.cs:10
static FactionBranch Branch
Definition: EClass.cs:22
List< Chara > members
static PopItem Talk(Card c, string id)
Definition: Msg.cs:200

References EClass.Branch, FactionBranch.members, EClass.pc, and Talk().

Referenced by LayerGacha.OnAfterInit(), LayerHoard.OnAfterInit(), LayerGacha.PlayGacha(), ELayer.TalkHomeMemeber(), and TalkMaid().

◆ TalkMaid()

static PopItem Msg.TalkMaid ( string  id)
inlinestatic

Definition at line 240 of file Msg.cs.

241 {
242 foreach (Chara chara in EClass._map.charas)
243 {
244 if (chara.uid == EClass.Branch?.uidMaid)
245 {
246 return Talk(chara, id);
247 }
248 }
249 return TalkHomeMemeber(id);
250 }
int uid
Definition: Card.cs:118
static Map _map
Definition: EClass.cs:18
List< Chara > charas
Definition: Map.cs:81
static PopItem TalkHomeMemeber(string id)
Definition: Msg.cs:219

References EClass._map, EClass.Branch, Map.charas, Talk(), TalkHomeMemeber(), Card.uid, and FactionBranch.uidMaid.

Referenced by ELayer.TalkMaid().

◆ ToUpperFirst()

static unsafe void Msg.ToUpperFirst ( string  str)
inlinestatic

Definition at line 326 of file Msg.cs.

327 {
328 if (str != null)
329 {
330 fixed (char* ptr = str)
331 {
332 *ptr = char.ToUpper(*ptr);
333 }
334 }
335 }

Referenced by SayRaw().

Member Data Documentation

◆ alwaysVisible

bool Msg.alwaysVisible
static

Definition at line 12 of file Msg.cs.

Referenced by GetName(), SayRaw(), and ThirstPersonInfo.Set().

◆ currentColor

Color Msg.currentColor = colors.Default
static

Definition at line 10 of file Msg.cs.

Referenced by SayRaw(), SetColor(), and WidgetFeed.System().

◆ ignoreAll

bool Msg.ignoreAll
static

Definition at line 14 of file Msg.cs.

Referenced by SayRaw().

◆ thirdPerson1

ThirstPersonInfo Msg.thirdPerson1 = new ThirstPersonInfo()
static

Definition at line 6 of file Msg.cs.

Referenced by Chara.Die(), GetRawText(), GameLang.Parse(), Say(), and ActEffect.Wish().

◆ thirdPerson2

ThirstPersonInfo Msg.thirdPerson2 = new ThirstPersonInfo()
static

Definition at line 8 of file Msg.cs.

Referenced by GetRawText(), GameLang.Parse(), and Say().

Property Documentation

◆ colors

◆ feed

WidgetFeed Msg.feed
staticget

Definition at line 18 of file Msg.cs.

Referenced by Nerun(), SayHomeMember(), SayPic(), SayRaw(), and Talk().

◆ mainText

WidgetMainText Msg.mainText
staticget

Definition at line 16 of file Msg.cs.

Referenced by Append(), GetGameText(), Nerun(), NewLine(), SayHomeMember(), SayPic(), SayRaw(), and Talk().


The documentation for this class was generated from the following file: