EXILED icon indicating copy to clipboard operation
EXILED copied to clipboard

CustomRole to CustomRole friendly fire damage extenstion (See discord link as to why)

Open Undid-Iridium opened this issue 2 years ago • 5 comments

https://discord.com/channels/656673194693885975/668963275790221346/992910603469463572

https://discord.com/channels/656673194693885975/668963275790221346/992571334188081293

tl;dr custom role to custom role friendly fire rules otherwise you get lazy approach

I am very tempted to consolidate all of this to just the Dict<string, Pair< string, float>> to just avoid all of this code

Undid-Iridium avatar Jul 03 '22 00:07 Undid-Iridium

image

tl;dr

CustomRoles can now damage based on the specific rules set per player, meaning (as shown)

Both are Scp035; however, one has rules where their damage to Scp035's is 0, and the other has rules specifying they can do damage. In the picture you can see that only one of two can be damage in this scenario (The one whose attacker has damage activated), and the other has taken no damage

This also applies if you set the damage to 0, and any other roles added would have same rules. (I would upload gif but too big for github)

Undid-Iridium avatar Jul 03 '22 00:07 Undid-Iridium

I'd just close this PR as we are gonna re-make the CustomRole API soon. Anyway, I'd say that's a bad idea since the word "CustomRole" shouldn't even be in the base API, that's a design pattern I, we, would like to keep.

However, you could make a component using the Exiled component system to make it as a temp solution, which is fine imo.

Note: I'm not gonna close this PR nor telling you to close it, ask to all the other devs about their thoughts on this PR.

NaoUnderscore avatar Jul 03 '22 06:07 NaoUnderscore

@NaoUnderscore Sorry, I use the word "CustomRole" as a place holder for "CustomUniqueRole". The FF system does not support Unique Role to Unique Role damage currently; therefore, this is to fix that. This also includes CustomRole as well; however, this is specifically for people looking for FF rules for CustomUniqueRole (and subsequently CustomRole).

Undid-Iridium avatar Jul 03 '22 16:07 Undid-Iridium

My bad then. Gotcha 👍🏼

NaoUnderscore avatar Jul 03 '22 17:07 NaoUnderscore

Resolve conflicts

Done

Undid-Iridium avatar Jul 12 '22 14:07 Undid-Iridium

Closing due to inactivity from reviewers. If someone wants this, re-open or create new PR.

Undid-Iridium avatar Oct 04 '22 16:10 Undid-Iridium