Skip to content

Commit 3d17061

Browse files
committed
added Spawn/Pickup messages + delete 035 on pickup
1 parent f9891e6 commit 3d17061

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Scp035/EventHandlers.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private void Pickup(Synapse.Api.Events.SynapseEventArguments.PlayerPickUpItemEve
110110
player = players.ElementAt(UnityEngine.Random.Range(0, players.Count));
111111

112112
player.CustomRole = new Scp035PlayerScript(ev.Player);
113-
ev.Item.Destroy();
113+
RemoveScp035Items(true);
114114
}
115115
}
116116
}

Scp035/PluginClass.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public override void Load()
4040
{
4141
{"035pickup","This Item is an Scp035 Item, so if you drop it and a other Player takes it, Scp035 will take the player as his host" },
4242
{"survived035" , "This was Scp035 but you have survived it" },
43-
{"035interact","You can't use a Scp-035 Item for any interaction with it!" }
43+
{"035interact","You can't use a Scp-035 Item for any interaction with it!" },
44+
{"pickup035","<b>You have picked up <color=red>Scp-035</color>.</b>" },
45+
{"spawn035","<b>You are <color=red>SCP-035</color></b>" }
4446
};
4547
Translation.CreateTranslations(translation);
4648
trans = Translation;

Scp035/Scp035PlayerScript.cs

+4
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,15 @@ public override void Spawn()
4343
Player.Ammo9 = _target.Ammo9;
4444

4545
_target.RoleID = (int)RoleType.Spectator;
46+
47+
_target.SendBroadcast(5, PluginClass.GetTranslation("pickup035"));
4648
}
4749

4850
Player.Health = PluginClass.Config.Scp035Health;
4951
Player.MaxHealth = PluginClass.Config.Scp035Health;
5052
Player.DisplayInfo = $"<color={PluginClass.Config.DisplayColor}>{PluginClass.Config.DisplayName}</color>";
53+
54+
Player.SendBroadcast(5, PluginClass.GetTranslation("spawn035"));
5155
}
5256

5357
public override void DeSpawn() => Player.DisplayInfo = "";

0 commit comments

Comments
 (0)