fix some whitespace, add braces, split lines up

This commit is contained in:
Mister_Nebula 2021-07-07 09:05:39 +01:00
parent f267276ccf
commit e2dc1e8899
2 changed files with 21 additions and 7 deletions

View File

@ -16,7 +16,7 @@ namespace QSB.Animation.NPC.WorldObjects
public abstract CharacterDialogueTree GetDialogueTree();
public virtual void StartConversation()
=> GetDialogueTree().RaiseEvent("OnStartConversation");
=> GetDialogueTree().RaiseEvent("OnStartConversation");
public virtual void EndConversation()
=> GetDialogueTree().RaiseEvent("OnEndConversation");

View File

@ -37,25 +37,39 @@ namespace QSB.Player.Events
}
// TODO : CLEAN. THIS. SHIT.
QSBWorldSync.DialogueConditions.ForEach(condition => QSBEventManager.FireEvent(EventNames.DialogueCondition, condition.Key, condition.Value));
QSBWorldSync.DialogueConditions.ForEach(condition
=> QSBEventManager.FireEvent(EventNames.DialogueCondition, condition.Key, condition.Value));
QSBWorldSync.ShipLogFacts.ForEach(fact => QSBEventManager.FireEvent(EventNames.QSBRevealFact, fact.Id, fact.SaveGame, false));
QSBWorldSync.ShipLogFacts.ForEach(fact
=> QSBEventManager.FireEvent(EventNames.QSBRevealFact, fact.Id, fact.SaveGame, false));
//We could add a nested ForEach here, but, in my opinion, it would reduce readbility in this case - ShoosGun(Locochoco)
foreach (var wallText in QSBWorldSync.GetWorldObjects<QSBWallText>().Where(x => x.AttachedObject.GetValue<bool>("_initialized") && x.AttachedObject.GetNumTextBlocks() > 0))
wallText.GetTranslatedIds().ForEach(id => QSBEventManager.FireEvent(EventNames.QSBTextTranslated, NomaiTextType.WallText, wallText.ObjectId, id));
{
wallText.GetTranslatedIds().ForEach(id
=> QSBEventManager.FireEvent(EventNames.QSBTextTranslated, NomaiTextType.WallText, wallText.ObjectId, id));
}
foreach (var computer in QSBWorldSync.GetWorldObjects<QSBComputer>().Where(x => x.AttachedObject.GetValue<bool>("_initialized") && x.AttachedObject.GetNumTextBlocks() > 0))
computer.GetTranslatedIds().ForEach(id => QSBEventManager.FireEvent(EventNames.QSBTextTranslated, NomaiTextType.Computer, computer.ObjectId, id));
{
computer.GetTranslatedIds().ForEach(id
=> QSBEventManager.FireEvent(EventNames.QSBTextTranslated, NomaiTextType.Computer, computer.ObjectId, id));
}
foreach (var vesselComputer in QSBWorldSync.GetWorldObjects<QSBVesselComputer>().Where(x => x.AttachedObject.GetValue<bool>("_initialized") && x.AttachedObject.GetNumTextBlocks() > 0))
vesselComputer.GetTranslatedIds().ForEach(id => QSBEventManager.FireEvent(EventNames.QSBTextTranslated, NomaiTextType.VesselComputer, vesselComputer.ObjectId, id));
{
vesselComputer.GetTranslatedIds().ForEach(id
=> QSBEventManager.FireEvent(EventNames.QSBTextTranslated, NomaiTextType.VesselComputer, vesselComputer.ObjectId, id));
}
var list = QSBWorldSync.GetWorldObjects<IQSBQuantumObject>().ToList();
for (var i = 0; i < list.Count; i++)
{
QSBEventManager.FireEvent(EventNames.QSBQuantumAuthority, i, list[i].ControllingPlayer);
}
QSBWorldSync.GetWorldObjects<QSBCampfire>().ForEach(campfire => QSBEventManager.FireEvent(EventNames.QSBCampfireState, campfire.ObjectId, campfire.GetState()));
QSBWorldSync.GetWorldObjects<QSBCampfire>().ForEach(campfire
=> QSBEventManager.FireEvent(EventNames.QSBCampfireState, campfire.ObjectId, campfire.GetState()));
}
}
}