mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Fixes jousting bypassing pacifism + Some signal doc (#82986)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request Closes https://github.com/tgstation/tgstation/issues/82983 Title. Jousting now uses a shiny new post-attack signal, only sent if the attack is actually executed. <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game bgus bad <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and it's effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> 🆑 nikothedude fix: Jousting no longer bypasses pacifism /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. -->
This commit is contained in:
@@ -448,7 +448,10 @@
|
||||
/// Prevents click from happening.
|
||||
#define COMPONENT_CANCEL_EQUIPMENT_CLICK (1<<0)
|
||||
|
||||
///from base of /obj/item/attack(): (mob/living, mob/living, params)
|
||||
#define COMSIG_ITEM_ATTACK "item_attack"
|
||||
///from base of /obj/item/attack(): (mob/living, mob/living, params)
|
||||
#define COMSIG_ITEM_POST_ATTACK "item_post_attack" // called only if the attack was executed
|
||||
///from base of obj/item/attack_self(): (/mob)
|
||||
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self"
|
||||
//from base of obj/item/attack_self_secondary(): (/mob)
|
||||
|
||||
@@ -236,6 +236,8 @@
|
||||
user.do_attack_animation(target_mob)
|
||||
target_mob.attacked_by(src, user)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_POST_ATTACK, target_mob, user, params)
|
||||
|
||||
log_combat(user, target_mob, "attacked", src.name, "(COMBAT MODE: [uppertext(user.combat_mode)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(on_examine))
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip))
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(on_drop))
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(on_attack))
|
||||
RegisterSignal(parent, COMSIG_ITEM_POST_ATTACK, PROC_REF(on_successful_attack))
|
||||
RegisterSignal(parent, COMSIG_TRANSFORMING_ON_TRANSFORM, PROC_REF(on_transform))
|
||||
|
||||
/datum/component/jousting/UnregisterFromParent()
|
||||
@@ -53,7 +53,7 @@
|
||||
COMSIG_ATOM_EXAMINE,
|
||||
COMSIG_ITEM_EQUIPPED,
|
||||
COMSIG_ITEM_DROPPED,
|
||||
COMSIG_ITEM_ATTACK,
|
||||
COMSIG_ITEM_POST_ATTACK,
|
||||
COMSIG_TRANSFORMING_ON_TRANSFORM,
|
||||
))
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
* We deduct the minimum tile charge from the current tile charge to get what will actually be buffed
|
||||
* So your charge will only get benefits from each extra tile after the minimum (and before the maximum).
|
||||
*/
|
||||
/datum/component/jousting/proc/on_attack(datum/source, mob/living/target, mob/user)
|
||||
/datum/component/jousting/proc/on_successful_attack(datum/source, mob/living/target, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
if(user != current_holder || !user.buckled)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user