mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
some fixes & improvements
This commit is contained in:
1 parent
750cfb2eb8
commit
aac64fbb4f
7 files changed
+72
-34
No files matched your search
@@ -99,14 +99,13 @@ public class Shadow : CovenBase
|
||||
|
||||
OriginalOutfit = Camouflage.PlayerSkins[pc.PlayerId];
|
||||
Utils.RpcChangeSkin(pc, new NetworkedPlayerInfo.PlayerOutfit().Set("", 15, "", "", "", "", ""));
|
||||
Utils.NotifyRoles(SpecifyTarget: pc);
|
||||
|
||||
SelfTimer = new CountdownTimer(SelfCamoDuration.GetFloat(), () =>
|
||||
{
|
||||
SelfTimer = null;
|
||||
if (Camouflage.IsCamouflage || !pc) return;
|
||||
Utils.RpcChangeSkin(pc, OriginalOutfit);
|
||||
Utils.NotifyRoles(SpecifyTarget: pc);
|
||||
LateTask.New(() => Utils.NotifyRoles(SpecifyTarget: pc, NoCache: true), 0.2f);
|
||||
pc.RpcResetAbilityCooldown();
|
||||
}, cancelOnMeeting: false, onCanceled: () => SelfTimer = null);
|
||||
|
||||
@@ -164,14 +163,13 @@ public class Shadow : CovenBase
|
||||
TargetId = target.PlayerId;
|
||||
OriginalTargetOutfit = Camouflage.PlayerSkins[target.PlayerId];
|
||||
Utils.RpcChangeSkin(target, new NetworkedPlayerInfo.PlayerOutfit().Set("", 15, "", "", "", "", ""));
|
||||
Utils.NotifyRoles(SpecifyTarget: target);
|
||||
|
||||
OthersCamoTimer = new CountdownTimer(OthersCamoDuration.GetFloat(), () =>
|
||||
{
|
||||
OthersCamoTimer = null;
|
||||
if (Camouflage.IsCamouflage || !target) return;
|
||||
Utils.RpcChangeSkin(target, OriginalTargetOutfit);
|
||||
Utils.NotifyRoles(SpecifyTarget: target);
|
||||
LateTask.New(() => Utils.NotifyRoles(SpecifyTarget: target, NoCache: true), 0.2f);
|
||||
}, cancelOnMeeting: false, onCanceled: () => OthersCamoTimer = null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ internal class Revenant : RoleBase
|
||||
|
||||
public override void OnReportDeadBody()
|
||||
{
|
||||
ShouldBeRevived = false;
|
||||
PlayerControl pc = RevenantId.GetPlayer();
|
||||
|
||||
if (pc && pc.IsAlive() && !pc.AllTasksCompleted())
|
||||
@@ -66,4 +67,9 @@ internal class Revenant : RoleBase
|
||||
}
|
||||
}, 2f, "Revenant Revive Delay");
|
||||
}
|
||||
|
||||
public override void OnRevived(PlayerControl pc)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class Altruist : RoleBase
|
||||
|
||||
RevivedPlayers.Add(ReviveTarget);
|
||||
|
||||
if (killer != null && ReviveTargetsKillerGetsAlert.GetBool())
|
||||
if (killer && ReviveTargetsKillerGetsAlert.GetBool())
|
||||
{
|
||||
if (ReviveTargetsKillerGetsArrow.GetBool()) TargetArrow.Add(killer.PlayerId, ReviveTarget);
|
||||
|
||||
@@ -97,7 +97,7 @@ public class Altruist : RoleBase
|
||||
ReviveTarget = byte.MaxValue;
|
||||
ReviveTargetPos = Vector2.zero;
|
||||
|
||||
if (reporter.AmOwner && rtg != null && !rtg.Is(Team.Crewmate))
|
||||
if (reporter.AmOwner && rtg && !rtg.Is(Team.Crewmate))
|
||||
Achievements.Type.IWishIReported.Complete();
|
||||
}, onTick: () => Utils.NotifyRoles(SpecifySeer: reporter, SpecifyTarget: reporter), onCanceled: () =>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user