EXILED icon indicating copy to clipboard operation
EXILED copied to clipboard

Added `Scp3114::Slapped` Event

Open CatyFoxt opened this issue 1 year ago • 8 comments

Added Scp3114 Slapped Event

CatyFoxt avatar Feb 10 '24 10:02 CatyFoxt

We prefer to use Hurt method cuz it's more common and covering all such events. I don't really think that this is useful

VALERA771 avatar Feb 10 '24 10:02 VALERA771

@VALERA771, I saw that Scp939 has a Clawed event. That is why i created this event. And it is for the helpful for new developers because it is much more spesific for just Slapping. Hurt method can contains all type of hurting that Scp3114 can do.

CatyFoxt avatar Feb 10 '24 10:02 CatyFoxt

@VALERA771, I saw that Scp939 has a Clawed event. That is why i created this event. And it is for the helpful for new developers because it is much more spesific for just Slapping. Hurt method can contains all type of hurting that Scp3114 can do.

Clawed event is also firied when you claws "air" (aka no target). As far as I can see, your event won't work like this

VALERA771 avatar Feb 10 '24 13:02 VALERA771

@VALERA771, You are wrong the event i did is firing every time Scp3114 tries to Slap. This contains air, targets and every slapping action.

CatyFoxt avatar Feb 10 '24 13:02 CatyFoxt

Okay, then yeah

VALERA771 avatar Feb 10 '24 13:02 VALERA771

@louis1706, I changed the index of the method and fixed the orders of the using lines.

CatyFoxt avatar Feb 10 '24 15:02 CatyFoxt

@louis1706, I changed the index of the method and fixed the orders of the using lines.

i thinks this place would be better to put the code

			SlappedEventArgs ev = new(Player.Get(Owner), _syncAttack);
			Handlers.Scp3114.OnSlapped(ev)

			float num = this._humeShield.CurValue + ev.HumeShieldReward;
			this._humeShield.CurValue = Mathf.Min(num, this._humeShield.MaxValue);

louis1706 avatar Feb 10 '24 15:02 louis1706

you can use the const to take the HumeShield value

louis1706 avatar Feb 10 '24 15:02 louis1706