configure a code style that is not completely cursed

This commit is contained in:
2026-01-07 19:08:34 +01:00
parent a945f17711
commit fff8b5e7f1
18 changed files with 188 additions and 298 deletions
+10 -15
View File
@@ -4,32 +4,27 @@ using Terraria.ModLoader;
namespace YHTMod.Buffs;
public class SummonerAmbitionBuff : ModBuff
{
public override void SetStaticDefaults()
{
public class SummonerAmbitionBuff : ModBuff {
public override void SetStaticDefaults() {
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
}
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
{
var modPlayer = Main.LocalPlayer.TryGetModPlayer<YhtPlayer>(out var mp) ? mp : null;
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare) {
YhtPlayer modPlayer = Main.LocalPlayer.TryGetModPlayer<YhtPlayer>(out var mp) ? mp : null;
if (modPlayer == null) return;
tip = Language.GetTextValue("Mods.YHTMod.Buffs.SummonerAmbitionBuff.Description", modPlayer.SummonerAmbitions.Count);
tip = Language.GetTextValue("Mods.YHTMod.Buffs.SummonerAmbitionBuff.Description",
modPlayer.SummonerAmbitions.Count);
}
public override void Update(Player player, ref int buffIndex)
{
var modPlayer = player.GetModPlayer<YhtPlayer>();
public override void Update(Player player, ref int buffIndex) {
YhtPlayer modPlayer = player.GetModPlayer<YhtPlayer>();
if (modPlayer.SummonerAmbition)
{
if (modPlayer.SummonerAmbition) {
player.buffTime[buffIndex] = 18000;
}
else
{
else {
player.DelBuff(buffIndex);
buffIndex--;
}