|
19 | 19 | return
|
20 | 20 | if(!stored_machette || QDELETED(stored_machette))
|
21 | 21 | stored_machette = new /obj/item/slasher_machette
|
22 |
| - var/datum/antagonist/slasher/slasherdatum = owner.mind.has_antag_datum(/datum/antagonist/slasher) |
| 22 | + var/datum/antagonist/slasher/slasherdatum = IS_SLASHER(owner) |
23 | 23 | if(!slasherdatum)
|
24 | 24 | return
|
25 | 25 | slasherdatum.linked_machette = stored_machette
|
|
66 | 66 | /obj/item/slasher_machette/proc/pre_throw(obj/item/source, list/arguments)
|
67 | 67 | SIGNAL_HANDLER
|
68 | 68 | var/mob/living/thrower = arguments[4]
|
69 |
| - if(!istype(thrower) || !thrower.mind.has_antag_datum(/datum/antagonist/slasher)) |
| 69 | + if(!istype(thrower) || !IS_SLASHER(thrower)) |
70 | 70 | // Just in case our thrower isn't actually a slasher (somehow). This shouldn't ever come up,
|
71 | 71 | // but if it does, then we just prevent the throw.
|
72 | 72 | return COMPONENT_CANCEL_THROW
|
|
102 | 102 | living_user.adjustBruteLoss(force)
|
103 | 103 | to_chat(user, span_warning("You scream out in pain as you hold the [src]!"))
|
104 | 104 | return FALSE
|
105 |
| - var/datum/antagonist/slasher/slasherdatum = user.mind?.has_antag_datum(/datum/antagonist/slasher) |
| 105 | + var/datum/antagonist/slasher/slasherdatum = IS_SLASHER(user) |
106 | 106 | if(slasherdatum?.active_action && istype(slasherdatum.active_action, /datum/action/cooldown/slasher/soul_steal))
|
107 | 107 | return FALSE // Blocks the attack
|
108 | 108 | return ..() // Proceeds with normal attack if no soul steal is active
|
109 | 109 |
|
110 | 110 | /obj/item/slasher_machette/attack(mob/living/target_mob, mob/living/user, params)
|
111 | 111 | if(isliving(user))
|
112 | 112 | var/mob/living/living_user = user
|
113 |
| - if(!user.mind.has_antag_datum(/datum/antagonist/slasher)) |
| 113 | + if(!IS_SLASHER(user)) |
114 | 114 | forceMove(get_turf(user))
|
115 | 115 | user.emote("scream")
|
116 | 116 | living_user.adjustBruteLoss(force)
|
117 | 117 | to_chat(user, span_warning("You scream out in pain as you hold the [src]!"))
|
118 | 118 | return
|
119 |
| - var/datum/antagonist/slasher/slasherdatum = user.mind?.has_antag_datum(/datum/antagonist/slasher) |
| 119 | + var/datum/antagonist/slasher/slasherdatum = IS_SLASHER(user) |
120 | 120 | if(slasherdatum?.active_action)
|
121 | 121 | return TRUE // Blocks the attack
|
122 | 122 | return ..()
|
123 | 123 |
|
124 | 124 | /obj/machinery/door/airlock/proc/attack_slasher_machete(atom/target, mob/living/user)
|
125 |
| - if(!user.mind.has_antag_datum(/datum/antagonist/slasher)) |
| 125 | + if(!IS_SLASHER(user)) |
126 | 126 | return
|
127 | 127 | if(isElectrified() && shock(user, 100)) //Mmm, fried slasher!
|
128 | 128 | add_fingerprint(user)
|
|
0 commit comments