mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Renames some pre_attack arguments (#30324)
* Renames some pre_attack arguments * fix
This commit is contained in:
@@ -118,11 +118,11 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pre_attack(atom/A, mob/living/user, params)
|
||||
if(!ismob(A))
|
||||
/obj/item/clothing/mask/cigarette/pre_attack(atom/atom_target, mob/living/user, params)
|
||||
if(!ismob(atom_target))
|
||||
return ..()
|
||||
|
||||
var/mob/living/target = A
|
||||
var/mob/living/target = atom_target
|
||||
if(target.on_fire)
|
||||
user.do_attack_animation(target)
|
||||
if(target != user)
|
||||
@@ -140,11 +140,11 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
return FINISH_ATTACK | MELEE_COOLDOWN_PREATTACK
|
||||
|
||||
// The above section doesn't check for carbons to allow ALL burning bodies to be used.
|
||||
if(!iscarbon(A))
|
||||
if(!iscarbon(target))
|
||||
return ..()
|
||||
|
||||
// If the target has no cig, try to give them the cig.
|
||||
var/mob/living/carbon_target = A
|
||||
var/mob/living/carbon_target = target
|
||||
if(user.zone_selected == "mouth" && !carbon_target.wear_mask && user.a_intent == INTENT_HELP)
|
||||
user.drop_item_to_ground(src, force = TRUE)
|
||||
carbon_target.equip_to_slot_if_possible(src, ITEM_SLOT_MASK)
|
||||
|
||||
@@ -168,16 +168,16 @@
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/obj/item/gripper/pre_attack(atom/A, mob/living/user, params)
|
||||
/obj/item/gripper/pre_attack(atom/atom_target, mob/living/user, params)
|
||||
. = FINISH_ATTACK | MELEE_COOLDOWN_PREATTACK
|
||||
if(gripped_item)
|
||||
gripped_item.attack(A, user)
|
||||
gripped_item.attack(atom_target, user)
|
||||
return
|
||||
|
||||
if(!ismob(A))
|
||||
if(!ismob(atom_target))
|
||||
return ..()
|
||||
|
||||
var/mob/living/target = A
|
||||
var/mob/living/target = atom_target
|
||||
// If a human target is horizonal, try to help them up. Unless you're trying to kill them.
|
||||
if(ishuman(target) && user.a_intent == INTENT_HELP && can_help_up)
|
||||
var/mob/living/carbon/human/pickup_target = target
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
if(!. && turned_on && istype(hit_mob))
|
||||
thrown_baton_stun(hit_mob)
|
||||
|
||||
/obj/item/melee/baton/pre_attack(atom/A, mob/living/user, params)
|
||||
/obj/item/melee/baton/pre_attack(atom/atom_target, mob/living/user, params)
|
||||
if(..())
|
||||
return FINISH_ATTACK
|
||||
|
||||
@@ -209,10 +209,10 @@
|
||||
to_chat(user, user.mind.martial_art.no_baton_reason)
|
||||
return FINISH_ATTACK
|
||||
|
||||
if(!ismob(A))
|
||||
if(!ismob(atom_target))
|
||||
return
|
||||
|
||||
var/mob/living/target = A
|
||||
var/mob/living/target = atom_target
|
||||
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return // Harmbaton!
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
base_icon = "teleprod"
|
||||
origin_tech = "combat=2;bluespace=4;materials=3"
|
||||
|
||||
/obj/item/melee/baton/cattleprod/teleprod/pre_attack(atom/A, mob/living/user, params)
|
||||
/obj/item/melee/baton/cattleprod/teleprod/pre_attack(atom/target, mob/living/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -13,10 +13,10 @@
|
||||
if(!turned_on)
|
||||
return FINISH_ATTACK | MELEE_COOLDOWN_PREATTACK
|
||||
|
||||
if(!ismob(A))
|
||||
if(!ismob(target))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/M
|
||||
var/mob/living/carbon/M = target
|
||||
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] accidentally hits [user.p_themselves()] with [src]!</span>",
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
visible_message("<span class='suicide'>[user] is hitting [user.p_themselves()] with [src]! It looks like [user.p_theyre()] trying to ban [user.p_themselves()] from life.</span>")
|
||||
return BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS
|
||||
|
||||
/obj/item/banhammer/pre_attack(atom/A, mob/living/user, params)
|
||||
/obj/item/banhammer/pre_attack(atom/target, mob/living/user, params)
|
||||
if(..())
|
||||
return FINISH_ATTACK
|
||||
|
||||
if(ismob(A))
|
||||
if(ismob(target))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
to_chat(A, "<font color='red'><b>You have been banned FOR NO REISIN by [user]<b></font>")
|
||||
to_chat(user, "<font color='red'>You have <b>BANNED</b> [A]</font>")
|
||||
to_chat(target, "<font color='red'><b>You have been banned FOR NO REISIN by [user]<b></font>")
|
||||
to_chat(user, "<font color='red'>You have <b>BANNED</b> [target]</font>")
|
||||
playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much
|
||||
return FINISH_ATTACK
|
||||
|
||||
|
||||
Reference in New Issue
Block a user