mirror of
https://github.com/YouHaveTrouble/YHTMod.git
synced 2026-05-12 05:56:56 +00:00
configure a code style that is not completely cursed
This commit is contained in:
@@ -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--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user