mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 22:42:26 +01:00
Refactored the attack proc (#19908)
Refactored the attack proc signature. Added signals and components for the attack proc. Added signals and components for the attackby proc. Adjusted some leftover attackby procs signatures. Added grep test to ensure people don't keep adding attack/attackby procs with the wrong signature.
This commit is contained in:
@@ -168,6 +168,7 @@
|
||||
#include "code\__DEFINES\dcs\signals\signals_spatial_grid.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_subsystem.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_turf.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_attack.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_main.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_movable.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_movement.dm"
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// Atom attack signals. Format:
|
||||
// When the signal is called: (signal arguments)
|
||||
// All signals send the source datum of the signal as the first argument
|
||||
|
||||
///from base of atom/attackby(): (/obj/item, /mob/living, params)
|
||||
#define COMSIG_ATOM_ATTACKBY "atom_attackby"
|
||||
|
||||
/// From [/item/attack()], sent by an atom which was just attacked by an item: (/obj/item/weapon, /mob/user, proximity_flag, click_parameters)
|
||||
#define COMSIG_ATOM_AFTER_ATTACKEDBY "atom_after_attackby"
|
||||
|
||||
///Return this in response if you don't want afterattack to be called
|
||||
#define COMPONENT_NO_AFTERATTACK (1<<0)
|
||||
|
||||
///Ends the attack chain. If sent early might cause posterior attacks not to happen.
|
||||
#define COMPONENT_CANCEL_ATTACK_CHAIN (1<<0)
|
||||
///Skips the specific attack step, continuing for the next one to happen.
|
||||
#define COMPONENT_SKIP_ATTACK (1<<1)
|
||||
@@ -12,5 +12,8 @@
|
||||
/// The arugment of move_args which dictates our movement direction
|
||||
#define MOVE_ARG_DIRECTION 2
|
||||
|
||||
///from base of /obj/item/attack(): (mob/M, mob/user)
|
||||
#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack"
|
||||
|
||||
///From base of mob/update_movespeed():area
|
||||
#define COMSIG_MOB_MOVESPEED_UPDATED "mob_update_movespeed"
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
///from base of obj/item/pickup(): (mob/user)
|
||||
#define COMSIG_ITEM_PICKUP "item_pickup"
|
||||
|
||||
///from base of /obj/item/attack(): (mob/living, mob/living, params)
|
||||
#define COMSIG_ITEM_ATTACK "item_attack"
|
||||
|
||||
///from base of [obj/item/attack()]: (atom/target, mob/user, proximity_flag, click_parameters)
|
||||
#define COMSIG_ITEM_AFTERATTACK "item_afterattack"
|
||||
|
||||
// /obj/projectile signals (sent to the firer)
|
||||
|
||||
///from base of /obj/projectile/proc/on_hit(), like COMSIG_PROJECTILE_ON_HIT but on the projectile itself and with the hit limb (if any): (atom/movable/firer, atom/target, angle, hit_limb, blocked)
|
||||
|
||||
@@ -28,7 +28,6 @@ avoid code duplication. This includes items that may sometimes act as a standard
|
||||
log_attack("[A] at [A?.loc]/[A.x]-[A.y]-[A.z] got ITEM attacked by [usr]/[usr?.ckey] on INTENT [usr?.a_intent] with [src]")
|
||||
return A.attackby(src, user, click_parameters)
|
||||
|
||||
// attackby should return TRUE if all desired actions are resolved from that attack, within attackby. This prevents afterattack being called.
|
||||
/**
|
||||
* Called on an object being hit by an item
|
||||
*
|
||||
@@ -41,38 +40,46 @@ avoid code duplication. This includes items that may sometimes act as a standard
|
||||
* * params - Click params such as alt/shift etc
|
||||
*/
|
||||
/atom/proc/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACKBY, attacking_item, user, params) & COMPONENT_NO_AFTERATTACK)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/atom/movable/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
if((user?.a_intent == I_HURT) && !(attacking_item.item_flags & ITEM_FLAG_NO_BLUDGEON))
|
||||
visible_message(SPAN_DANGER("[src] has been hit by [user] with [attacking_item]."))
|
||||
|
||||
/mob/living/attackby(obj/item/I, mob/user)
|
||||
/mob/living/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
if(!ismob(user))
|
||||
return FALSE
|
||||
|
||||
var/selected_zone = user.zone_sel ? user.zone_sel.selecting : BP_CHEST
|
||||
var/operating = can_operate(src)
|
||||
if(operating == SURGERY_SUCCESS)
|
||||
if(do_surgery(src, user, I))
|
||||
if(do_surgery(src, user, attacking_item))
|
||||
return TRUE
|
||||
else
|
||||
return I.attack(src, user, selected_zone) //This is necessary to make things like health analyzers work. -mattatlas
|
||||
return attacking_item.attack(src, user, selected_zone) //This is necessary to make things like health analyzers work. -mattatlas
|
||||
if(operating == SURGERY_FAIL)
|
||||
if(do_surgery(src, user, I, TRUE))
|
||||
if(do_surgery(src, user, attacking_item, TRUE))
|
||||
return TRUE
|
||||
else
|
||||
return I.attack(src, user, selected_zone)
|
||||
return attacking_item.attack(src, user, selected_zone)
|
||||
else
|
||||
return I.attack(src, user, selected_zone)
|
||||
return attacking_item.attack(src, user, selected_zone)
|
||||
|
||||
/mob/living/carbon/human/attackby(obj/item/I, mob/user)
|
||||
if(user == src && user.a_intent == I_GRAB && zone_sel?.selecting == BP_MOUTH && can_devour(I, silent = TRUE))
|
||||
/mob/living/carbon/human/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(user == src && user.a_intent == I_GRAB && zone_sel?.selecting == BP_MOUTH && can_devour(attacking_item, silent = TRUE))
|
||||
var/obj/item/blocked = src.check_mouth_coverage()
|
||||
if(blocked)
|
||||
to_chat(user, SPAN_WARNING("\The [blocked] is in the way!"))
|
||||
return TRUE
|
||||
if(devour(I))
|
||||
if(devour(attacking_item))
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
@@ -88,12 +95,25 @@ avoid code duplication. This includes items that may sometimes act as a standard
|
||||
else
|
||||
return Clamp(w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
|
||||
|
||||
//I would prefer to rename this attack_as_weapon(), but that would involve touching hundreds of files.
|
||||
/obj/item/proc/attack(mob/living/M, mob/living/user, var/target_zone = BP_CHEST)
|
||||
/**
|
||||
* Called from [/mob/living/proc/attackby] (usually)
|
||||
*
|
||||
* Arguments:
|
||||
* * mob/living/target_mob - The mob being hit by this item
|
||||
* * mob/living/user - The mob hitting with this item
|
||||
* * target_zone - The target zone aimed at, **THIS DIFFERS FROM TG WHERE IT TAKES THE CLICK PARAMS**
|
||||
*/
|
||||
/obj/item/proc/attack(mob/living/target_mob, mob/living/user, target_zone = BP_CHEST)
|
||||
var/signal_return = SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, target_mob, user) || SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, target_mob, user)
|
||||
if(signal_return & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
return TRUE
|
||||
if(signal_return & COMPONENT_SKIP_ATTACK)
|
||||
return FALSE
|
||||
|
||||
if(item_flags & ITEM_FLAG_NO_BLUDGEON)
|
||||
return 0
|
||||
|
||||
if(M == user && user.a_intent != I_HURT)
|
||||
if(target_mob == user && user.a_intent != I_HURT)
|
||||
return 0
|
||||
|
||||
if(user.incapacitated(INCAPACITATION_STUNNED|INCAPACITATION_KNOCKOUT|INCAPACITATION_KNOCKDOWN|INCAPACITATION_FORCELYING))
|
||||
@@ -104,11 +124,11 @@ avoid code duplication. This includes items that may sometimes act as a standard
|
||||
return 0
|
||||
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(M, src)
|
||||
user.do_attack_animation(target_mob, src)
|
||||
if(!user.aura_check(AURA_TYPE_WEAPON, src, user))
|
||||
return FALSE
|
||||
|
||||
var/mob/living/victim = M.get_attack_victim(src, user, target_zone)
|
||||
var/mob/living/victim = target_mob.get_attack_victim(src, user, target_zone)
|
||||
var/hit_zone
|
||||
if(victim)
|
||||
hit_zone = victim.resolve_item_attack(src, user, target_zone)
|
||||
@@ -118,20 +138,23 @@ avoid code duplication. This includes items that may sometimes act as a standard
|
||||
// Null hitzone means a miss.
|
||||
if(hit_zone)
|
||||
if(!force)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1)
|
||||
playsound(src, 'sound/weapons/tap.ogg', get_clamped_volume(), TRUE, -1)
|
||||
else if(hitsound)
|
||||
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
|
||||
playsound(src, hitsound, get_clamped_volume(), TRUE, -1, falloff_distance = 0)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss2.ogg', get_clamped_volume(), 1, -1)
|
||||
playsound(src, 'sound/weapons/punchmiss2.ogg', get_clamped_volume(), TRUE, -1)
|
||||
|
||||
/////////////////////////
|
||||
user.lastattacked = M
|
||||
M.lastattacker = user
|
||||
user.lastattacked = target_mob
|
||||
target_mob.lastattacker = user
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_AFTERATTACK, target_mob, user)
|
||||
SEND_SIGNAL(target_mob, COMSIG_ATOM_AFTER_ATTACKEDBY, src, user)
|
||||
|
||||
if(!no_attack_log)
|
||||
user.attack_log += "\[[time_stamp()]\]<span class='warning'> [hit_zone ? "Attacked" : "Missed"] [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</span>"
|
||||
M.attack_log += "\[[time_stamp()]\]<font color='orange'> [hit_zone ? "Attacked" : "Missed"] by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
|
||||
msg_admin_attack("[key_name(user, highlight_special = 1)] [hit_zone ? "attacked" : "missed"] [key_name(M, highlight_special = 1)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M) )
|
||||
user.attack_log += "\[[time_stamp()]\]<span class='warning'> [hit_zone ? "Attacked" : "Missed"] [target_mob.name] ([target_mob.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</span>"
|
||||
target_mob.attack_log += "\[[time_stamp()]\]<font color='orange'> [hit_zone ? "Attacked" : "Missed"] by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
|
||||
msg_admin_attack("[key_name(user, highlight_special = 1)] [hit_zone ? "attacked" : "missed"] [key_name(target_mob, highlight_special = 1)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(target_mob) )
|
||||
/////////////////////////
|
||||
|
||||
return 1
|
||||
|
||||
+43
-43
@@ -58,13 +58,13 @@
|
||||
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
|
||||
var/can_support = TRUE
|
||||
|
||||
/obj/item/cane/attack(mob/living/target, mob/living/carbon/human/user, target_zone = BP_CHEST)
|
||||
/obj/item/cane/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
|
||||
if(!(istype(target) && istype(user)))
|
||||
if(!(istype(target_mob) && istype(user)))
|
||||
return ..()
|
||||
|
||||
var/targetIsHuman = ishuman(target)
|
||||
var/mob/living/carbon/human/targetashuman = target
|
||||
var/targetIsHuman = ishuman(target_mob)
|
||||
var/mob/living/carbon/human/targetashuman = target_mob
|
||||
var/wasselfattack = 0
|
||||
var/verbtouse = pick(attack_verb)
|
||||
var/punct = "!"
|
||||
@@ -80,11 +80,11 @@
|
||||
wasselfattack = 1
|
||||
|
||||
if (user.a_intent == I_HURT)
|
||||
target_zone = get_zone_with_miss_chance(target_zone, target) //Vary the attack
|
||||
target_zone = get_zone_with_miss_chance(target_zone, target_mob) //Vary the attack
|
||||
damagetype = DAMAGE_BRUTE
|
||||
|
||||
if (targetIsHuman)
|
||||
var/mob/living/carbon/human/targethuman = target
|
||||
var/mob/living/carbon/human/targethuman = target_mob
|
||||
armorpercent = targethuman.get_blocked_ratio(target_zone, DAMAGE_BRUTE, damage = force)*100
|
||||
wasblocked = (targethuman.check_shields(force, src, user, target_zone, null) in list(BULLET_ACT_BLOCK, BULLET_ACT_FORCE_PIERCE))
|
||||
|
||||
@@ -105,19 +105,19 @@
|
||||
soundname = "punch"
|
||||
if(targetIsHuman)
|
||||
user.visible_message("<span class='[class]'>[user] flips [user.get_pronoun("his")] [name]...</span>", "<span class='[class]'>You flip [src], preparing a disarm...</span>")
|
||||
if (do_mob(user,target,chargedelay,display_progress=0))
|
||||
if (do_mob(user,target_mob,chargedelay,display_progress=0))
|
||||
if(!wasblocked && damageamount)
|
||||
var/chancemod = (100 - armorpercent)*0.05*damageamount // Lower chance if lower damage + high armor. Base chance is 50% at 10 damage.
|
||||
if(target_zone == BP_L_HAND || target_zone == BP_L_ARM)
|
||||
if (prob(chancemod) && target.l_hand && target.l_hand != src)
|
||||
if (prob(chancemod) && target_mob.l_hand && target_mob.l_hand != src)
|
||||
shoulddisarm = 1
|
||||
else if(target_zone == BP_R_HAND || target_zone == BP_R_ARM)
|
||||
if (prob(chancemod) && target.r_hand && target.r_hand != src)
|
||||
if (prob(chancemod) && target_mob.r_hand && target_mob.r_hand != src)
|
||||
shoulddisarm = 2
|
||||
else
|
||||
if (prob(chancemod*0.5) && target.l_hand && target.l_hand != src)
|
||||
if (prob(chancemod*0.5) && target_mob.l_hand && target_mob.l_hand != src)
|
||||
shoulddisarm = 1
|
||||
if (prob(chancemod*0.5) && target.r_hand && target.r_hand != src)
|
||||
if (prob(chancemod*0.5) && target_mob.r_hand && target_mob.r_hand != src)
|
||||
shoulddisarm += 2
|
||||
else
|
||||
user.visible_message("<span class='[class]'>[user] flips [user.get_pronoun("his")] [name] back to its original position.</span>", "<span class='[class]'>You flip [src] back to its original position.</span>")
|
||||
@@ -128,9 +128,9 @@
|
||||
soundname = "punch"
|
||||
if(targetIsHuman)
|
||||
user.visible_message("<span class='[class]'>[user] flips [user.get_pronoun("his")] [name]...</span>", "<span class='[class]'>You flip [src], preparing a grab...</span>")
|
||||
if (do_mob(user,target,chargedelay,display_progress=0))
|
||||
if (do_mob(user,target_mob,chargedelay,display_progress=0))
|
||||
if(!wasblocked && damageamount)
|
||||
user.start_pulling(target)
|
||||
user.start_pulling(target_mob)
|
||||
else
|
||||
verbtouse = pick("awkwardly tries to hook","fails to grab")
|
||||
else
|
||||
@@ -142,80 +142,80 @@
|
||||
|
||||
// Damage Logs
|
||||
/////////////////////////
|
||||
user.lastattacked = target
|
||||
target.lastattacker = user
|
||||
user.lastattacked = target_mob
|
||||
target_mob.lastattacker = user
|
||||
if(!no_attack_log)
|
||||
user.attack_log += "\[[time_stamp()]\]<span class='warning'> Attacked [target.name] ([target.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damagetype)])</span>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damagetype)])</font>"
|
||||
msg_admin_attack("[key_name(user, highlight_special = 1)] attacked [key_name(target, highlight_special = 1)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damagetype)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(target) )
|
||||
user.attack_log += "\[[time_stamp()]\]<span class='warning'> Attacked [target_mob.name] ([target_mob.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damagetype)])</span>"
|
||||
target_mob.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damagetype)])</font>"
|
||||
msg_admin_attack("[key_name(user, highlight_special = 1)] attacked [key_name(target_mob, highlight_special = 1)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damagetype)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(target_mob) )
|
||||
/////////////////////////
|
||||
|
||||
var/washit = 0
|
||||
var/endmessage1st
|
||||
var/endmessage3rd
|
||||
|
||||
if(!target_zone || get_dist(user,target) > 1) //Dodged
|
||||
endmessage1st = "Your [name] was dodged by [target]"
|
||||
endmessage3rd = "[target] dodged the [name]"
|
||||
if(!target_zone || get_dist(user,target_mob) > 1) //Dodged
|
||||
endmessage1st = "Your [name] was dodged by [target_mob]"
|
||||
endmessage3rd = "[target_mob] dodged the [name]"
|
||||
soundname = "punchmiss"
|
||||
else if(wasblocked) // Blocked by Shield
|
||||
endmessage1st = "Your [name] was blocked by [target]"
|
||||
endmessage3rd = "[target] blocks the [name]"
|
||||
endmessage1st = "Your [name] was blocked by [target_mob]"
|
||||
endmessage3rd = "[target_mob] blocks the [name]"
|
||||
soundname = "punchmiss"
|
||||
else
|
||||
|
||||
washit = 1
|
||||
var/noun = "[target]"
|
||||
var/noun = "[target_mob]"
|
||||
var/selfnoun = "your"
|
||||
|
||||
if(shoulddisarm)
|
||||
if(wasselfattack)
|
||||
selfnoun = "your grip"
|
||||
noun = "[target.get_pronoun("his")] grip"
|
||||
noun = "[target_mob.get_pronoun("his")] grip"
|
||||
else
|
||||
noun = "[target]'s grip"
|
||||
noun = "[target_mob]'s grip"
|
||||
selfnoun = noun
|
||||
if (targetIsHuman && shoulddisarm != 3) // Query: Can non-humans hold objects in hands?
|
||||
var/mob/living/carbon/human/targethuman = target
|
||||
var/mob/living/carbon/human/targethuman = target_mob
|
||||
var/obj/item/organ/external/O = targethuman.get_organ(target_zone)
|
||||
if (O.is_stump())
|
||||
if(wasselfattack)
|
||||
selfnoun = "your missing [O.name]"
|
||||
noun = "[target.get_pronoun("his")] missing [O.name]"
|
||||
noun = "[target_mob.get_pronoun("his")] missing [O.name]"
|
||||
else
|
||||
noun = "[target]'s missing [O.name]"
|
||||
noun = "[target_mob]'s missing [O.name]"
|
||||
selfnoun = noun
|
||||
else
|
||||
if(wasselfattack)
|
||||
selfnoun = "your [O.name]"
|
||||
noun = "[target.get_pronoun("his")] [O.name]"
|
||||
noun = "[target_mob.get_pronoun("his")] [O.name]"
|
||||
else
|
||||
noun = "[target]'s [O.name]"
|
||||
noun = "[target_mob]'s [O.name]"
|
||||
selfnoun = noun
|
||||
|
||||
switch(shoulddisarm)
|
||||
if(1)
|
||||
endmessage1st = "You [verbtouse] the [target.l_hand.name] out of [selfnoun]"
|
||||
endmessage3rd = "[user] [verbtouse] the [target.l_hand.name] out of [noun]"
|
||||
target.drop_l_hand()
|
||||
endmessage1st = "You [verbtouse] the [target_mob.l_hand.name] out of [selfnoun]"
|
||||
endmessage3rd = "[user] [verbtouse] the [target_mob.l_hand.name] out of [noun]"
|
||||
target_mob.drop_l_hand()
|
||||
if(2)
|
||||
endmessage1st = "You [verbtouse] the [target.r_hand.name] out of [selfnoun]"
|
||||
endmessage3rd = "[user] [verbtouse] the [target.r_hand.name] out of [noun]"
|
||||
target.drop_r_hand()
|
||||
endmessage1st = "You [verbtouse] the [target_mob.r_hand.name] out of [selfnoun]"
|
||||
endmessage3rd = "[user] [verbtouse] the [target_mob.r_hand.name] out of [noun]"
|
||||
target_mob.drop_r_hand()
|
||||
if(3)
|
||||
endmessage1st = "You [verbtouse] both the [target.r_hand.name] and the [target.l_hand.name] out of [selfnoun]"
|
||||
endmessage3rd = "[user] [verbtouse] both the [target.r_hand.name] and the [target.l_hand.name] out of [noun]"
|
||||
target.drop_l_hand()
|
||||
target.drop_r_hand()
|
||||
endmessage1st = "You [verbtouse] both the [target_mob.r_hand.name] and the [target_mob.l_hand.name] out of [selfnoun]"
|
||||
endmessage3rd = "[user] [verbtouse] both the [target_mob.r_hand.name] and the [target_mob.l_hand.name] out of [noun]"
|
||||
target_mob.drop_l_hand()
|
||||
target_mob.drop_r_hand()
|
||||
else
|
||||
endmessage1st = "You [verbtouse] [selfnoun] with the [name]"
|
||||
endmessage3rd = "[user] [verbtouse] [noun] with the [name]"
|
||||
|
||||
if(damageamount > 0) // Poking will no longer do damage until there is some fix that makes it so that 0.0001 HALLOS doesn't cause bleed.
|
||||
target.standard_weapon_hit_effects(src, user, damageamount, armorpercent, target_zone)
|
||||
target_mob.standard_weapon_hit_effects(src, user, damageamount, armorpercent, target_zone)
|
||||
|
||||
user.visible_message("<span class='[class]'>[endmessage3rd][punct]</span>", "<span class='[class]'>[endmessage1st][punct]</span>")
|
||||
user.do_attack_animation(target)
|
||||
user.do_attack_animation(target_mob)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
|
||||
if(soundname)
|
||||
|
||||
@@ -397,9 +397,9 @@
|
||||
master = null
|
||||
. = ..()
|
||||
|
||||
/atom/movable/overlay/attackby(a, b)
|
||||
/atom/movable/overlay/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if (src.master)
|
||||
return src.master.attackby(a, b)
|
||||
return src.master.attackby(arglist(args))
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attack_hand(a, b, c)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/obj/item/melee/cultblade/cultify()
|
||||
return
|
||||
|
||||
/obj/item/melee/cultblade/attack(mob/living/M, mob/living/user, var/target_zone)
|
||||
/obj/item/melee/cultblade/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(iscultist(user) || !does_cult_check)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -9,32 +9,32 @@
|
||||
unique = TRUE
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/book/tome/attack(mob/living/M, mob/living/user)
|
||||
if(isobserver(M))
|
||||
var/mob/abstract/observer/D = M
|
||||
/obj/item/book/tome/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(isobserver(target_mob))
|
||||
var/mob/abstract/observer/D = target_mob
|
||||
D.manifest(user)
|
||||
attack_admins(D, user)
|
||||
return
|
||||
|
||||
if(!istype(M))
|
||||
if(!istype(target_mob))
|
||||
return
|
||||
|
||||
if(!iscultist(user))
|
||||
return ..()
|
||||
|
||||
if(iscultist(M))
|
||||
if(iscultist(target_mob))
|
||||
return
|
||||
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
M.take_organ_damage(0, rand(5,20)) //really lucky - 5 hits for a crit
|
||||
visible_message(SPAN_WARNING("\The [user] beats \the [M] with \the [src]!"))
|
||||
to_chat(M, SPAN_DANGER("You feel searing heat inside!"))
|
||||
attack_admins(M, user)
|
||||
target_mob.take_organ_damage(0, rand(5,20)) //really lucky - 5 hits for a crit
|
||||
visible_message(SPAN_WARNING("\The [user] beats \the [target_mob] with \the [src]!"))
|
||||
to_chat(target_mob, SPAN_DANGER("You feel searing heat inside!"))
|
||||
attack_admins(target_mob, user)
|
||||
|
||||
/obj/item/book/tome/proc/attack_admins(var/mob/living/M, var/mob/living/user)
|
||||
M.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had the [name] used on them by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used [name] on [M.name] ([M.ckey])</span>"
|
||||
msg_admin_attack("[key_name_admin(user)] used [name] on [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
|
||||
/obj/item/book/tome/proc/attack_admins(var/mob/living/target_mob, var/mob/living/user)
|
||||
target_mob.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had the [name] used on them by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used [name] on [target_mob.name] ([target_mob.ckey])</span>"
|
||||
msg_admin_attack("[key_name_admin(user)] used [name] on [target_mob.name] ([target_mob.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(target_mob))
|
||||
|
||||
|
||||
/obj/item/book/tome/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
Consume(user)
|
||||
|
||||
/turf/unsimulated/wall/supermatter/attackby(obj/item/attacking_item, mob/living/user)
|
||||
/turf/unsimulated/wall/supermatter/attackby(obj/item/attacking_item, mob/user)
|
||||
user.visible_message("<span class=\"warning\">\The [user] touches \a [attacking_item] to \the [src] as a silence fills the room...</span>",\
|
||||
"<span class=\"danger\">You touch \the [attacking_item] to \the [src] when everything suddenly goes silent.\"</span>\n<span class=\"notice\">\The [attacking_item] flashes into dust as you flinch away from \the [src].</span>",\
|
||||
"<span class=\"warning\">Everything suddenly goes silent.</span>")
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(I && pay_energy(200))
|
||||
var/prox = user.Adjacent(chosen_target)
|
||||
if(prox) // Needed or else they can attack with melee from afar.
|
||||
I.attack(chosen_target,owner)
|
||||
I.attack(chosen_target, owner)
|
||||
I.afterattack(chosen_target,owner, prox)
|
||||
adjust_instability(2)
|
||||
|
||||
|
||||
@@ -299,9 +299,9 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/optable/attackby(obj/item/W, mob/living/carbon/user)
|
||||
if(istype(W, /obj/item/grab))
|
||||
var/obj/item/grab/G = W
|
||||
/obj/machinery/optable/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(istype(attacking_item, /obj/item/grab))
|
||||
var/obj/item/grab/G = attacking_item
|
||||
|
||||
var/mob/living/carbon/human/occupant_resolved = occupant?.resolve()
|
||||
if(occupant_resolved)
|
||||
@@ -319,11 +319,11 @@
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts putting \the [L] onto \the [src]."), SPAN_NOTICE("You start putting \the [L] onto \the [src]."), range = 3)
|
||||
if(do_mob(user, L, 10, needhand = FALSE))
|
||||
take_occupant(G.affecting,usr)
|
||||
qdel(W)
|
||||
qdel(attacking_item)
|
||||
return TRUE
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
if(default_deconstruction_screwdriver(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
if(default_deconstruction_crowbar(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_part_replacement(user, W))
|
||||
if(default_part_replacement(user, attacking_item))
|
||||
return TRUE
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
linkedServer = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/message_monitor/attackby(obj/item/attacking_item, mob/living/user)
|
||||
/obj/machinery/computer/message_monitor/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return ..()
|
||||
if(!istype(user))
|
||||
|
||||
@@ -137,21 +137,21 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/pen/crayon/attack(mob/user, var/target_zone)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
/obj/item/pen/crayon/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(ishuman(target_mob))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
if(H.check_has_mouth())
|
||||
user.visible_message(SPAN_NOTICE("[user] takes a bite of their crayon and swallows it."),
|
||||
target_mob.visible_message(SPAN_NOTICE("[target_mob] takes a bite of their crayon and swallows it."),
|
||||
SPAN_NOTICE("You take a bite of your crayon and swallow it."))
|
||||
|
||||
user.adjustNutritionLoss(-1)
|
||||
reagents.trans_to_mob(user, 2, CHEM_INGEST)
|
||||
target_mob.adjustNutritionLoss(-1)
|
||||
reagents.trans_to_mob(target_mob, 2, CHEM_INGEST)
|
||||
if(reagents.total_volume <= 0)
|
||||
user.visible_message(SPAN_NOTICE("[user] finished their crayon!"), SPAN_WARNING("You ate your crayon!"))
|
||||
target_mob.visible_message(SPAN_NOTICE("[target_mob] finished their crayon!"), SPAN_WARNING("You ate your crayon!"))
|
||||
qdel(src)
|
||||
return TRUE
|
||||
else
|
||||
..(user, target_zone)
|
||||
return ..()
|
||||
|
||||
/obj/item/pen/crayon/attack_self(var/mob/user)
|
||||
return
|
||||
|
||||
@@ -342,8 +342,8 @@
|
||||
/obj/item/shockpaddles/proc/checked_use(charge_amt)
|
||||
return 0
|
||||
|
||||
/obj/item/shockpaddles/attack(mob/living/M, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/H = M
|
||||
/obj/item/shockpaddles/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
if(!istype(H) || user.a_intent == I_HURT)
|
||||
return ..() //Do a regular attack. Harm intent shocking happens as a hit effect
|
||||
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
message += SPAN_WARNING("inactive.")
|
||||
. += message
|
||||
|
||||
/obj/item/aicard/attack(mob/living/silicon/decoy/M as mob, mob/user as mob, var/target_zone)
|
||||
if (!istype (M, /mob/living/silicon/decoy))
|
||||
/obj/item/aicard/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/silicon/decoy/M = target_mob
|
||||
if (!istype(M))
|
||||
return ..()
|
||||
else
|
||||
M.death()
|
||||
|
||||
@@ -140,7 +140,8 @@
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/auto_cpr/attack(mob/living/carbon/human/H, mob/living/user, var/target_zone)
|
||||
/obj/item/auto_cpr/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
if(istype(H) && user.a_intent == I_HELP)
|
||||
if(panel_open)
|
||||
to_chat(user, SPAN_WARNING("You must screw \the [src]'s panel closed before fitting it onto anyone!"))
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
/obj/item/device/orbital_dropper/attack_self(mob/user)
|
||||
zoom(user, tileoffset, viewsize)
|
||||
|
||||
/obj/item/device/orbital_dropper/attack(mob/living/M, mob/user)
|
||||
laser_act(M, user)
|
||||
/obj/item/device/orbital_dropper/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
laser_act(target_mob, user)
|
||||
|
||||
/obj/item/device/orbital_dropper/afterattack(var/atom/target, var/mob/living/user, flag, params)
|
||||
if(flag) //we're placing the targetter on a table or in backpack
|
||||
|
||||
@@ -87,22 +87,22 @@
|
||||
QDEL_IN(animation, 5)
|
||||
|
||||
//attack_as_weapon
|
||||
/obj/item/device/flash/attack(mob/living/L, mob/living/user, target_zone)
|
||||
/obj/item/device/flash/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
// Single-target flash
|
||||
if(!L || !user || !clumsy_check(user) || !cooldown())
|
||||
if(!target_mob || !user || !clumsy_check(user) || !cooldown())
|
||||
return
|
||||
|
||||
if(L == user)
|
||||
if(target_mob == user)
|
||||
if(user.a_intent == I_HURT)
|
||||
attack_self(user)
|
||||
return
|
||||
|
||||
L.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [src.name] to flash [L.name] ([L.ckey])</span>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [L.name] ([L.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(L))
|
||||
target_mob.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [src.name] to flash [target_mob.name] ([target_mob.ckey])</span>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [target_mob.name] ([target_mob.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(target_mob))
|
||||
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(L)
|
||||
user.do_attack_animation(target_mob)
|
||||
if(broken)
|
||||
to_chat(user, SPAN_WARNING("\The [src] is broken."))
|
||||
return
|
||||
@@ -115,13 +115,13 @@
|
||||
if(isrobot(user))
|
||||
robot_flash(user)
|
||||
|
||||
if(flash(L))
|
||||
if(issilicon(L))
|
||||
user.visible_message(SPAN_WARNING("[user] overloads [L]'s sensors with \the [src]!"))
|
||||
if(flash(target_mob))
|
||||
if(issilicon(target_mob))
|
||||
user.visible_message(SPAN_WARNING("[user] overloads [target_mob]'s sensors with \the [src]!"))
|
||||
else
|
||||
user.visible_message(SPAN_WARNING("[user] blinds [L] with \the [src]!"))
|
||||
user.visible_message(SPAN_WARNING("[user] blinds [target_mob] with \the [src]!"))
|
||||
else
|
||||
user.visible_message(SPAN_NOTICE("[user] fails to blind [L] with \the [src]."))
|
||||
user.visible_message(SPAN_NOTICE("[user] fails to blind [target_mob] with \the [src]."))
|
||||
|
||||
/obj/item/device/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
// AOE flash
|
||||
|
||||
@@ -86,13 +86,13 @@
|
||||
|
||||
play_message(SPAN_NOTICE("\The [src] pings, \"Active warrant modified.\""))
|
||||
|
||||
/obj/item/device/holowarrant/attack(mob/living/victim, mob/living/user)
|
||||
/obj/item/device/holowarrant/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!selected_warrant)
|
||||
to_chat(user, SPAN_WARNING("There are no warrants loaded!"))
|
||||
return
|
||||
|
||||
user.visible_message("<b>[user]</b> holds \the [src] up to \the [victim].", SPAN_NOTICE("You hold up \the [src] to \the [victim]."))
|
||||
show_content(victim)
|
||||
user.visible_message("<b>[user]</b> holds \the [src] up to \the [target_mob].", SPAN_NOTICE("You hold up \the [src] to \the [target_mob]."))
|
||||
show_content(target_mob)
|
||||
|
||||
/obj/item/device/holowarrant/update_icon()
|
||||
if(selected_warrant)
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/device/laser_pointer/attack(mob/living/M, mob/user)
|
||||
laser_act(M, user)
|
||||
/obj/item/device/laser_pointer/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
laser_act(target_mob, user)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
|
||||
/obj/item/device/laser_pointer/attackby(obj/item/attacking_item, mob/user)
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
|
||||
/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
/obj/item/device/flashlight/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
add_fingerprint(user)
|
||||
if(on && user.zone_sel.selecting == BP_EYES)
|
||||
|
||||
@@ -231,10 +231,10 @@
|
||||
to_chat(user, SPAN_WARNING("This light is too dim to see anything with!"))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M //mob has protective eyewear
|
||||
var/mob/living/carbon/human/H = target_mob //mob has protective eyewear
|
||||
if(istype(H))
|
||||
if(H.get_flash_protection())
|
||||
to_chat(user, SPAN_WARNING("You're going to need to remove \the [M]'s eye protection first."))
|
||||
to_chat(user, SPAN_WARNING("You're going to need to remove \the [H]'s eye protection first."))
|
||||
return
|
||||
|
||||
var/obj/item/organ/vision
|
||||
@@ -244,8 +244,8 @@
|
||||
to_chat(user, SPAN_WARNING("You can't find any [H.species.vision_organ ? H.species.vision_organ : "eyes"] on [H]!"))
|
||||
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("\The [user] directs [src] to [M]'s eyes."),
|
||||
SPAN_NOTICE("You direct [src] to [M]'s eyes.")
|
||||
SPAN_NOTICE("\The [user] directs [src] to [H]'s eyes."),
|
||||
SPAN_NOTICE("You direct [src] to [H]'s eyes.")
|
||||
)
|
||||
|
||||
inspect_vision(vision, user)
|
||||
|
||||
@@ -24,7 +24,7 @@ BREATH ANALYZER
|
||||
var/mode = 1
|
||||
var/sound_scan = FALSE
|
||||
|
||||
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/user)
|
||||
/obj/item/device/healthanalyzer/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
sound_scan = FALSE
|
||||
if(last_scan <= world.time - 20) //Spam limiter.
|
||||
last_scan = world.time
|
||||
@@ -32,7 +32,7 @@ BREATH ANALYZER
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(src)
|
||||
flick("[icon_state]-scan", src) //makes it so that it plays the scan animation on a successful scan
|
||||
health_scan_mob(M, user, mode, sound_scan = sound_scan)
|
||||
health_scan_mob(target_mob, user, mode, sound_scan = sound_scan)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/device/healthanalyzer/attack_self(mob/user)
|
||||
@@ -533,11 +533,12 @@ BREATH ANALYZER
|
||||
throw_range = 7
|
||||
matter = list(MATERIAL_ALUMINIUM = 30, MATERIAL_GLASS = 20)
|
||||
|
||||
/obj/item/device/slime_scanner/attack(mob/living/M, mob/living/user)
|
||||
if(!isslime(M))
|
||||
/obj/item/device/slime_scanner/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!isslime(target_mob))
|
||||
to_chat(user, SPAN_WARNING("This device can only scan slimes!"))
|
||||
return
|
||||
var/mob/living/carbon/slime/T = M
|
||||
|
||||
var/mob/living/carbon/slime/T = target_mob
|
||||
to_chat(user, SPAN_NOTICE("**************************"))
|
||||
to_chat(user, SPAN_NOTICE("Slime scan results:"))
|
||||
to_chat(user, SPAN_NOTICE(capitalize_first_letters("[T.colour] [T.is_adult ? "adult" : "baby"] slime")))
|
||||
@@ -599,7 +600,9 @@ BREATH ANALYZER
|
||||
matter = list(MATERIAL_ALUMINIUM = 30, MATERIAL_GLASS = 20)
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
|
||||
/obj/item/device/breath_analyzer/attack(mob/living/carbon/human/H, mob/living/user as mob)
|
||||
/obj/item/device/breath_analyzer/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
|
||||
if (!istype(H))
|
||||
to_chat(user,SPAN_WARNING("You can't find a way to use \the [src] on [H]!"))
|
||||
@@ -716,14 +719,14 @@ BREATH ANALYZER
|
||||
QDEL_NULL(connected)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/advanced_healthanalyzer/attack(mob/living/M, mob/living/user)
|
||||
/obj/item/device/advanced_healthanalyzer/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!connected)
|
||||
return
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<b>[user]</b> starts scanning \the [M] with \the [src].", SPAN_NOTICE("You start scanning \the [M] with \the [src]."))
|
||||
if(do_after(user, 7 SECONDS, M, DO_UNIQUE))
|
||||
print_scan(M, user)
|
||||
user.visible_message("<b>[user]</b> starts scanning \the [target_mob] with \the [src].", SPAN_NOTICE("You start scanning \the [target_mob] with \the [src]."))
|
||||
if(do_after(user, 7 SECONDS, target_mob, DO_UNIQUE))
|
||||
print_scan(target_mob, user)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/device/advanced_healthanalyzer/proc/print_scan(var/mob/M, var/mob/living/user)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/device/animaltagger/attack()
|
||||
/obj/item/device/animaltagger/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/device/animaltagger/afterattack(atom/A as mob|obj, mob/user as mob)
|
||||
|
||||
@@ -57,7 +57,7 @@ effective or pretty fucking useless.
|
||||
desc = "Use this single-use injector on a Vaurca to grant them access to the Lii'dra Hivenet. Use it on an organic non-Vaurca to infect them with black k'ois. This is an OOC item, do not let anyone see it!"
|
||||
icon_state = "animal_tagger1"
|
||||
|
||||
/obj/item/device/liidrafier/attack()
|
||||
/obj/item/device/liidrafier/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/device/liidrafier/afterattack(atom/A as mob, mob/user as mob)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
if(I)
|
||||
AddOverlays(I)
|
||||
|
||||
/obj/item/sampler/attack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
/obj/item/sampler/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!vial || vial.reagents.total_volume)
|
||||
return ..()
|
||||
else
|
||||
|
||||
@@ -29,9 +29,9 @@ Contains:
|
||||
var/apply_sounds
|
||||
var/applied_sounds
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/M as mob, mob/user as mob)
|
||||
if (!istype(M) || istype(M, /mob/living/silicon) || istype(M, /mob/living/simple_animal/spiderbot))
|
||||
to_chat(user, SPAN_WARNING("\The [src] cannot be applied to [M]!"))
|
||||
/obj/item/stack/medical/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if (!istype(target_mob) || istype(target_mob, /mob/living/silicon) || istype(target_mob, /mob/living/simple_animal/spiderbot))
|
||||
to_chat(user, SPAN_WARNING("\The [src] cannot be applied to [target_mob]!"))
|
||||
return 1
|
||||
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
@@ -39,8 +39,8 @@ Contains:
|
||||
to_chat(user, SPAN_WARNING("You don't have the dexterity to do this!"))
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (istype(target_mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.name == BP_HEAD)
|
||||
@@ -54,17 +54,17 @@ Contains:
|
||||
|
||||
if(affecting.status & ORGAN_LIFELIKE)
|
||||
if(!(affecting.brute_dam || affecting.burn_dam))
|
||||
to_chat(user, SPAN_NOTICE("[M] seems healthy, there are no wounds to treat! "))
|
||||
to_chat(user, SPAN_NOTICE("[target_mob] seems healthy, there are no wounds to treat! "))
|
||||
return 1
|
||||
|
||||
user.visible_message( \
|
||||
SPAN_NOTICE("[user] starts applying \the [src] to [M]."), \
|
||||
SPAN_NOTICE("You start applying \the [src] to [M].")\
|
||||
SPAN_NOTICE("[user] starts applying \the [src] to [target_mob]."), \
|
||||
SPAN_NOTICE("You start applying \the [src] to [target_mob].")\
|
||||
)
|
||||
if (do_mob(user, M, 30))
|
||||
if (do_mob(user, target_mob, 30))
|
||||
user.visible_message( \
|
||||
SPAN_NOTICE("[M] has been applied with [src] by [user]."), \
|
||||
SPAN_NOTICE("You apply \the [src] to [M].")\
|
||||
SPAN_NOTICE("[target_mob] has been applied with [src] by [user]."), \
|
||||
SPAN_NOTICE("You apply \the [src] to [target_mob].")\
|
||||
)
|
||||
use(1)
|
||||
return 1
|
||||
@@ -76,23 +76,23 @@ Contains:
|
||||
H.UpdateDamageIcon()
|
||||
|
||||
else
|
||||
if (!M.getBruteLoss() && !M.getFireLoss())
|
||||
to_chat(user, SPAN_NOTICE("[M] seems healthy, there are no wounds to treat! "))
|
||||
if (!target_mob.getBruteLoss() && !target_mob.getFireLoss())
|
||||
to_chat(user, SPAN_NOTICE("[target_mob] seems healthy, there are no wounds to treat! "))
|
||||
return 1
|
||||
|
||||
user.visible_message( \
|
||||
SPAN_NOTICE("[user] starts applying \the [src] to [M]."), \
|
||||
SPAN_NOTICE("You start applying \the [src] to [M].")\
|
||||
SPAN_NOTICE("[user] starts applying \the [src] to [target_mob]."), \
|
||||
SPAN_NOTICE("You start applying \the [src] to [target_mob].")\
|
||||
)
|
||||
if (do_mob(user, M, 30))
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
if (do_mob(user, target_mob, 30))
|
||||
target_mob.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
user.visible_message( \
|
||||
SPAN_NOTICE("[M] has been applied with [src] by [user]."), \
|
||||
SPAN_NOTICE("You apply \the [src] to [M].")\
|
||||
SPAN_NOTICE("[target_mob] has been applied with [src] by [user]."), \
|
||||
SPAN_NOTICE("You apply \the [src] to [target_mob].")\
|
||||
)
|
||||
use(1)
|
||||
|
||||
M.updatehealth()
|
||||
target_mob.updatehealth()
|
||||
|
||||
/obj/item/stack/medical/use()
|
||||
. = ..()
|
||||
@@ -134,44 +134,44 @@ Contains:
|
||||
amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
/obj/item/stack/medical/bruise_pack/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (!can_use(1, user))
|
||||
return 0
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (istype(target_mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.is_bandaged())
|
||||
to_chat(user, SPAN_WARNING("The wounds on [M]'s [affecting.name] have already been bandaged."))
|
||||
to_chat(user, SPAN_WARNING("The wounds on [target_mob]'s [affecting.name] have already been bandaged."))
|
||||
return 1
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts treating [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start treating [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts treating [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start treating [target_mob]'s [affecting.name]."))
|
||||
var/used = 0
|
||||
for (var/datum/wound/W in affecting.wounds)
|
||||
if(W.bandaged)
|
||||
continue
|
||||
if(used == amount)
|
||||
break
|
||||
if(!do_mob(user, M, W.damage/5))
|
||||
if(!do_mob(user, target_mob, W.damage/5))
|
||||
to_chat(user, SPAN_NOTICE("You must stand still to bandage wounds."))
|
||||
break
|
||||
if (W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] bandages \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You bandage \a [W.desc] on [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] bandages \a [W.desc] on [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You bandage \a [W.desc] on [target_mob]'s [affecting.name]."))
|
||||
//H.add_side_effect("Itch")
|
||||
else if (W.damage_type == BRUISE)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] places a bruise patch over \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You place a bruise patch over \a [W.desc] on [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] places a bruise patch over \a [W.desc] on [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You place a bruise patch over \a [W.desc] on [target_mob]'s [affecting.name]."))
|
||||
else
|
||||
user.visible_message(SPAN_NOTICE("\The [user] places a bandaid over \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You place a bandaid over \a [W.desc] on [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] places a bandaid over \a [W.desc] on [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You place a bandaid over \a [W.desc] on [target_mob]'s [affecting.name]."))
|
||||
W.bandage()
|
||||
playsound(src, apply_sounds, 25)
|
||||
used++
|
||||
@@ -209,31 +209,31 @@ Contains:
|
||||
amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/medical/ointment/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
/obj/item/stack/medical/ointment/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (!can_use(1, user))
|
||||
return 0
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (istype(target_mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.is_salved())
|
||||
to_chat(user, SPAN_WARNING("The wounds on [M]'s [affecting.name] have already been salved."))
|
||||
to_chat(user, SPAN_WARNING("The wounds on [target_mob]'s [affecting.name] have already been salved."))
|
||||
return 1
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts salving wounds on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start salving the wounds on [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts salving wounds on [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start salving the wounds on [target_mob]'s [affecting.name]."))
|
||||
playsound(src, pick(apply_sounds), 25)
|
||||
if(!do_mob(user, M, 10))
|
||||
if(!do_mob(user, target_mob, 10))
|
||||
to_chat(user, SPAN_NOTICE("You must stand still to salve wounds."))
|
||||
return 1
|
||||
user.visible_message(SPAN_NOTICE("[user] salved wounds on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You salved wounds on [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("[user] salved wounds on [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You salved wounds on [target_mob]'s [affecting.name]."))
|
||||
use(1)
|
||||
affecting.salve()
|
||||
else
|
||||
@@ -260,44 +260,44 @@ Contains:
|
||||
amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/medical/advanced/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
/obj/item/stack/medical/advanced/bruise_pack/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (!can_use(1, user))
|
||||
return 0
|
||||
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (ishuman(target_mob))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.is_bandaged() && affecting.is_disinfected())
|
||||
to_chat(user, SPAN_WARNING("The wounds on [M]'s [affecting.name] have already been treated."))
|
||||
to_chat(user, SPAN_WARNING("The wounds on [target_mob]'s [affecting.name] have already been treated."))
|
||||
return 1
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts treating [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start treating [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts treating [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start treating [target_mob]'s [affecting.name]."))
|
||||
var/used = 0
|
||||
for (var/datum/wound/W in affecting.wounds)
|
||||
if (W.bandaged && W.disinfected)
|
||||
continue
|
||||
if(used == amount)
|
||||
break
|
||||
if(!do_mob(user, M, W.damage/5))
|
||||
if(!do_mob(user, target_mob, W.damage/5))
|
||||
to_chat(user, SPAN_NOTICE("You must stand still to bandage wounds."))
|
||||
break
|
||||
if (W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] cleans \a [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue."), \
|
||||
SPAN_NOTICE("You clean and seal \a [W.desc] on [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] cleans \a [W.desc] on [target_mob]'s [affecting.name] and seals the edges with bioglue."), \
|
||||
SPAN_NOTICE("You clean and seal \a [W.desc] on [target_mob]'s [affecting.name]."))
|
||||
//H.add_side_effect("Itch")
|
||||
else if (W.damage_type == BRUISE)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] places a medical patch over \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You place a medical patch over \a [W.desc] on [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] places a medical patch over \a [W.desc] on [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You place a medical patch over \a [W.desc] on [target_mob]'s [affecting.name]."))
|
||||
else
|
||||
user.visible_message(SPAN_NOTICE("\The [user] smears some bioglue over \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You smear some bioglue over \a [W.desc] on [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] smears some bioglue over \a [W.desc] on [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You smear some bioglue over \a [W.desc] on [target_mob]'s [affecting.name]."))
|
||||
playsound(src, pick(apply_sounds), 25)
|
||||
W.bandage()
|
||||
W.disinfect()
|
||||
@@ -335,28 +335,28 @@ Contains:
|
||||
amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/medical/advanced/ointment/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
/obj/item/stack/medical/advanced/ointment/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (istype(target_mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.is_salved())
|
||||
to_chat(user, SPAN_WARNING("The wounds on [M]'s [affecting.name] have already been salved."))
|
||||
to_chat(user, SPAN_WARNING("The wounds on [target_mob]'s [affecting.name] have already been salved."))
|
||||
return 1
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts salving wounds on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start salving the wounds on [M]'s [affecting.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts salving wounds on [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start salving the wounds on [target_mob]'s [affecting.name]."))
|
||||
playsound(src, pick(apply_sounds), 25)
|
||||
if(!do_mob(user, M, 10))
|
||||
if(!do_mob(user, target_mob, 10))
|
||||
to_chat(user, SPAN_NOTICE("You must stand still to salve wounds."))
|
||||
return 1
|
||||
user.visible_message(SPAN_NOTICE("[user] covers wounds on [M]'s [affecting.name] with regenerative membrane."), \
|
||||
SPAN_NOTICE("You cover wounds on [M]'s [affecting.name] with regenerative membrane."))
|
||||
user.visible_message(SPAN_NOTICE("[user] covers wounds on [target_mob]'s [affecting.name] with regenerative membrane."), \
|
||||
SPAN_NOTICE("You cover wounds on [target_mob]'s [affecting.name] with regenerative membrane."))
|
||||
affecting.heal_damage(0,heal_burn)
|
||||
use(1)
|
||||
affecting.salve()
|
||||
@@ -383,33 +383,33 @@ Contains:
|
||||
amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
/obj/item/stack/medical/splint/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (!can_use(1, user))
|
||||
return 0
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (istype(target_mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
var/limb = affecting.name
|
||||
if(!(affecting.limb_name in splintable_organs))
|
||||
to_chat(user, SPAN_DANGER("You can't apply a splint there!"))
|
||||
return
|
||||
if(affecting.status & ORGAN_SPLINTED)
|
||||
to_chat(user, SPAN_DANGER("[M]'s [limb] is already splinted!"))
|
||||
to_chat(user, SPAN_DANGER("[target_mob]'s [limb] is already splinted!"))
|
||||
return
|
||||
if (M != user)
|
||||
user.visible_message(SPAN_DANGER("[user] starts to apply \the [src] to [M]'s [limb]."), SPAN_DANGER("You start to apply \the [src] to [M]'s [limb]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
if (target_mob != user)
|
||||
user.visible_message(SPAN_DANGER("[user] starts to apply \the [src] to [target_mob]'s [limb]."), SPAN_DANGER("You start to apply \the [src] to [target_mob]'s [limb]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
else
|
||||
if((!user.hand && affecting.limb_name == BP_R_ARM) || (user.hand && affecting.limb_name == BP_L_ARM))
|
||||
to_chat(user, SPAN_DANGER("You can't apply a splint to the arm you're using!"))
|
||||
return
|
||||
user.visible_message(SPAN_DANGER("[user] starts to apply \the [src] to their [limb]."), SPAN_DANGER("You start to apply \the [src] to your [limb]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
if(do_after(user, 5 SECONDS, M))
|
||||
if (M != user)
|
||||
user.visible_message(SPAN_DANGER("[user] finishes applying \the [src] to [M]'s [limb]."), SPAN_DANGER("You finish applying \the [src] to [M]'s [limb]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
if(do_after(user, 5 SECONDS, target_mob))
|
||||
if (target_mob != user)
|
||||
user.visible_message(SPAN_DANGER("[user] finishes applying \the [src] to [target_mob]'s [limb]."), SPAN_DANGER("You finish applying \the [src] to [target_mob]'s [limb]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
else
|
||||
if(prob(25))
|
||||
user.visible_message(SPAN_DANGER("[user] successfully applies \the [src] to their [limb]."), SPAN_DANGER("You successfully apply \the [src] to your [limb]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
|
||||
@@ -24,17 +24,17 @@
|
||||
icon_state = "[initial(icon_state)]-empty"
|
||||
check_maptext(SMALL_FONTS(7, amount))
|
||||
|
||||
/obj/item/stack/nanopaste/attack(atom/M, mob/user, var/target_zone)
|
||||
if(!ismob(M) || !istype(user))
|
||||
/obj/item/stack/nanopaste/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!ismob(target_mob) || !istype(user))
|
||||
return 0
|
||||
if (!can_use(1, user))
|
||||
return 0
|
||||
|
||||
if (isrobot(M)) //Repairing cyborgs
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if (isrobot(target_mob)) //Repairing cyborgs
|
||||
var/mob/living/silicon/robot/R = target_mob
|
||||
if (R.getBruteLoss() || R.getFireLoss() )
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(do_mob(user, M, 7))
|
||||
if(do_mob(user, target_mob, 7))
|
||||
R.adjustBruteLoss(-15)
|
||||
R.adjustFireLoss(-15)
|
||||
R.updatehealth()
|
||||
@@ -44,8 +44,8 @@
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("All [R]'s systems are nominal."))
|
||||
|
||||
else if(ishuman(M)) //Repairing robolimbs
|
||||
var/mob/living/carbon/human/H = M
|
||||
else if(ishuman(target_mob)) //Repairing robolimbs
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/S = H.get_organ(target_zone)
|
||||
|
||||
if (S && (S.status & ORGAN_ASSISTED))
|
||||
@@ -61,12 +61,12 @@
|
||||
to_chat(user, SPAN_WARNING("You can't apply [src] through [H.wear_suit]!"))
|
||||
return
|
||||
|
||||
if(do_mob(user, M, 7))
|
||||
if(do_mob(user, target_mob, 7))
|
||||
S.heal_damage(15, 15, robo_repair = 1)
|
||||
H.updatehealth()
|
||||
use(1)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the [user]"] [S.name] with \the [src]."),\
|
||||
SPAN_NOTICE("You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.name]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] applies some nanite paste at[user != target_mob ? " \the [target_mob]'s" : " \the [user]"] [S.name] with \the [src]."),\
|
||||
SPAN_NOTICE("You apply some nanite paste at [user == target_mob ? "your" : "[target_mob]'s"] [S.name]."))
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("Nothing to fix here."))
|
||||
else
|
||||
@@ -87,7 +87,8 @@
|
||||
var/used = FALSE
|
||||
construction_cost = null
|
||||
|
||||
/obj/item/stack/nanopaste/surge/attack(mob/living/carbon/human/M as mob, mob/user as mob, var/target_zone)
|
||||
/obj/item/stack/nanopaste/surge/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/M = target_mob
|
||||
if (!istype(M) || !istype(user))
|
||||
return 0
|
||||
|
||||
|
||||
@@ -66,11 +66,11 @@
|
||||
if(distance <= 1)
|
||||
. += "There [amount == 1 ? "is" : "are"] about [amount] [singular_name]\s of paper left!"
|
||||
|
||||
/obj/item/stack/wrapping_paper/attack(mob/target, mob/user)
|
||||
if(!ishuman(target))
|
||||
/obj/item/stack/wrapping_paper/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!ishuman(target_mob))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket) || H.stat)
|
||||
if(src.amount >= 2)
|
||||
var/obj/effect/spresent/present = new /obj/effect/spresent (H.loc)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
/obj/item/toy/waterballoon/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
/obj/item/toy/waterballoon/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/toy/waterballoon/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
|
||||
@@ -486,17 +486,17 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/toy/crossbow/attack(mob/M, mob/user)
|
||||
/obj/item/toy/crossbow/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if (src.dart_count > 0 && M.lying) // Check
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if (src.dart_count > 0 && target_mob.lying) // Check
|
||||
for(var/mob/O in viewers(target_mob, null))
|
||||
if(O.client)
|
||||
O.show_message(SPAN_NOTICE("\The [user] casually lines up a shot with [M]'s head and pulls the trigger."), 1)
|
||||
O.show_message(SPAN_WARNING("\The [M] was hit in the head by the foam dart!"), 1)
|
||||
O.show_message(SPAN_NOTICE("\The [user] casually lines up a shot with [target_mob]'s head and pulls the trigger."), 1)
|
||||
O.show_message(SPAN_WARNING("\The [target_mob] was hit in the head by the foam dart!"), 1)
|
||||
|
||||
playsound(src, 'sound/items/syringeproj.ogg', 50, TRUE)
|
||||
new /obj/item/toy/ammo/crossbow(M.loc)
|
||||
new /obj/item/toy/ammo/crossbow(target_mob.loc)
|
||||
src.dart_count--
|
||||
return
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
drop_sound = 'sound/items/drop/wrapper.ogg'
|
||||
pickup_sound = 'sound/items/pickup/wrapper.ogg'
|
||||
|
||||
/obj/item/trash/attack(mob/M as mob, mob/living/user as mob)
|
||||
/obj/item/trash/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/trash/koisbar
|
||||
|
||||
@@ -62,7 +62,7 @@ ABSTRACT_TYPE(/obj/item/rfd)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/rfd/attack()
|
||||
/obj/item/rfd/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return FALSE
|
||||
|
||||
/obj/item/rfd/proc/can_use(var/mob/user,var/turf/T)
|
||||
|
||||
@@ -151,7 +151,8 @@
|
||||
|
||||
usr.put_in_hands(P)
|
||||
|
||||
/obj/item/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
||||
/obj/item/autopsy_scanner/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/M = target_mob
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
|
||||
@@ -234,22 +234,22 @@ var/const/NO_EMAG_ACT = -50
|
||||
blind_message += " [blind_add_text]"
|
||||
user.visible_message(message, blind_message)
|
||||
|
||||
/obj/item/card/id/attack(var/mob/living/M, var/mob/user, proximity)
|
||||
/obj/item/card/id/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
|
||||
if(user.zone_sel.selecting == BP_R_HAND || user.zone_sel.selecting == BP_L_HAND)
|
||||
|
||||
if(!ishuman(M))
|
||||
if(!ishuman(target_mob))
|
||||
return ..()
|
||||
|
||||
if (dna_hash == ID_CARD_UNSET && ishuman(user))
|
||||
var/response = alert(user, "This ID card has not been imprinted with biometric data. Would you like to imprint [M]'s now?", "Biometric Imprinting", "Yes", "No")
|
||||
var/response = alert(user, "This ID card has not been imprinted with biometric data. Would you like to imprint [target_mob]'s now?", "Biometric Imprinting", "Yes", "No")
|
||||
if (response == "Yes")
|
||||
|
||||
if (!user.Adjacent(M) || user.restrained() || user.lying || user.stat)
|
||||
to_chat(user, SPAN_WARNING("You must remain adjacent to [M] to scan their biometric data."))
|
||||
if (!user.Adjacent(target_mob) || user.restrained() || user.lying || user.stat)
|
||||
to_chat(user, SPAN_WARNING("You must remain adjacent to [target_mob] to scan their biometric data."))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
|
||||
if(H.gloves)
|
||||
to_chat(user, SPAN_WARNING("\The [H] is wearing gloves."))
|
||||
|
||||
@@ -254,10 +254,10 @@
|
||||
qdel(src)
|
||||
user.put_in_hands(chosenitem)
|
||||
|
||||
/obj/item/nullrod/attack(mob/M as mob, mob/living/user as mob)
|
||||
/obj/item/nullrod/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(M)
|
||||
user.do_attack_animation(target_mob)
|
||||
|
||||
if(LAZYLEN(user.spell_list))
|
||||
user.silence_spells(300) //30 seconds
|
||||
@@ -275,8 +275,8 @@
|
||||
user.Paralyse(20)
|
||||
return
|
||||
|
||||
if(M.stat != DEAD && ishuman(M) && user.a_intent != I_HURT)
|
||||
var/mob/living/K = M
|
||||
if(target_mob.stat != DEAD && ishuman(target_mob) && user.a_intent != I_HURT)
|
||||
var/mob/living/K = target_mob
|
||||
var/datum/vampire/vampire = K.mind.antag_datums[MODE_VAMPIRE]
|
||||
if(vampire)
|
||||
if(vampire.status & VAMP_ISTHRALL)
|
||||
@@ -288,12 +288,12 @@
|
||||
K.visible_message(SPAN_WARNING("The gaze in [K]'s eyes remains determined."), SPAN_NOTICE("You turn away from the light, remaining true to your vampiric master!"))
|
||||
K.say("*scream")
|
||||
K.take_overall_damage(5, 15)
|
||||
admin_attack_log(user, M, "attempted to deconvert", "was unsuccessfully deconverted by", "attempted to deconvert")
|
||||
admin_attack_log(user, target_mob, "attempted to deconvert", "was unsuccessfully deconverted by", "attempted to deconvert")
|
||||
if("Give in")
|
||||
K.visible_message(SPAN_NOTICE("[K]'s eyes become clearer, the evil gone, but not without leaving scars."))
|
||||
K.take_overall_damage(10, 20)
|
||||
thralls.remove_antagonist(K.mind)
|
||||
admin_attack_log(user, M, "successfully deconverted", "was successfully deconverted by", "successfully deconverted")
|
||||
admin_attack_log(user, target_mob, "successfully deconverted", "was successfully deconverted by", "successfully deconverted")
|
||||
else if (vampire.status & VAMP_FRENZIED)
|
||||
K.visible_message(SPAN_DANGER("[user] thrusts \the [src] towards [K], who recoils in horror as they erupt into flames!"), SPAN_DANGER("[user] thrusts \the [src] towards you, its holy light scorching your corrupted flesh!"))
|
||||
K.adjust_fire_stacks(10)
|
||||
@@ -307,19 +307,19 @@
|
||||
K.visible_message(SPAN_WARNING("The gaze in [K]'s eyes remains determined."), SPAN_NOTICE("You turn away from the light, remaining true to the Geometer!"))
|
||||
K.say("*scream")
|
||||
K.take_overall_damage(5, 15)
|
||||
admin_attack_log(user, M, "attempted to deconvert", "was unsuccessfully deconverted by", "attempted to deconvert")
|
||||
admin_attack_log(user, target_mob, "attempted to deconvert", "was unsuccessfully deconverted by", "attempted to deconvert")
|
||||
if("Give in")
|
||||
K.visible_message(SPAN_NOTICE("[K]'s eyes become clearer, the evil gone, but not without leaving scars."))
|
||||
K.take_overall_damage(10, 20)
|
||||
cult.remove_antagonist(K.mind)
|
||||
admin_attack_log(user, M, "successfully deconverted", "was successfully deconverted by", "successfully deconverted")
|
||||
admin_attack_log(user, target_mob, "successfully deconverted", "was successfully deconverted by", "successfully deconverted")
|
||||
else
|
||||
user.visible_message(SPAN_WARNING("[user]'s concentration is broken!"), SPAN_WARNING("Your concentration is broken! You and your target need to stay uninterrupted for longer!"))
|
||||
return
|
||||
|
||||
else
|
||||
to_chat(user, SPAN_DANGER("The [src] appears to do nothing."))
|
||||
M.visible_message(SPAN_DANGER("\The [user] waves \the [src] over \the [M]'s head."))
|
||||
target_mob.visible_message(SPAN_DANGER("\The [user] waves \the [src] over \the [target_mob]'s head."))
|
||||
return
|
||||
else if(user.a_intent != I_HURT) // to prevent the chaplain from hurting peoples accidentally
|
||||
to_chat(user, SPAN_NOTICE("The [src] appears to do nothing."))
|
||||
|
||||
@@ -333,7 +333,9 @@ ABSTRACT_TYPE(/obj/item/clothing/mask/smokable)
|
||||
if(lit)
|
||||
die(TRUE)
|
||||
|
||||
/obj/item/clothing/mask/smokable/cigarette/attack(mob/living/carbon/human/H, mob/user, def_zone)
|
||||
/obj/item/clothing/mask/smokable/cigarette/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
|
||||
if(lit && H == user && istype(H))
|
||||
var/obj/item/blocked = H.check_mouth_coverage()
|
||||
if(blocked)
|
||||
@@ -972,8 +974,10 @@ ABSTRACT_TYPE(/obj/item/clothing/mask/smokable)
|
||||
/obj/item/flame/lighter/vendor_action(var/obj/machinery/vending/V)
|
||||
handle_lighting()
|
||||
|
||||
/obj/item/flame/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
/obj/item/flame/lighter/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/M = target_mob
|
||||
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
if(lit && M.IgniteMob())
|
||||
|
||||
@@ -111,13 +111,15 @@
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
/obj/item/lipstick/attack(mob/M as mob, mob/user as mob)
|
||||
if(!open) return
|
||||
/obj/item/lipstick/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!open)
|
||||
return
|
||||
|
||||
if(!istype(M, /mob)) return
|
||||
if(!istype(target_mob))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(ishuman(target_mob))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
if(H.lipstick_color) //if they already have lipstick on
|
||||
to_chat(user, SPAN_NOTICE("You need to wipe off the old lipstick first!"))
|
||||
return
|
||||
@@ -173,11 +175,11 @@
|
||||
playsound(H, 'sound/items/welder_pry.ogg', 20, 1)
|
||||
|
||||
|
||||
/obj/item/razor/attack(mob/M, mob/user, var/target_zone)
|
||||
if(!ishuman(M))
|
||||
/obj/item/razor/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!ishuman(target_mob))
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/E = H.get_organ(target_zone)
|
||||
|
||||
if(!E || E.is_stump())
|
||||
|
||||
@@ -97,15 +97,16 @@
|
||||
qdel(src)
|
||||
return uses
|
||||
|
||||
/obj/item/dnainjector/attack(mob/M as mob, mob/user as mob)
|
||||
if (!istype(M, /mob))
|
||||
/obj/item/dnainjector/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if (!istype(target_mob))
|
||||
return
|
||||
|
||||
if (!usr.IsAdvancedToolUser())
|
||||
return
|
||||
if(inuse)
|
||||
return 0
|
||||
|
||||
user.visible_message(SPAN_DANGER("\The [user] is trying to inject \the [M] with \the [src]!"))
|
||||
user.visible_message(SPAN_DANGER("\The [user] is trying to inject \the [target_mob] with \the [src]!"))
|
||||
inuse = 1
|
||||
s_time = world.time
|
||||
spawn(50)
|
||||
@@ -115,11 +116,11 @@
|
||||
return
|
||||
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(M)
|
||||
user.do_attack_animation(target_mob)
|
||||
|
||||
M.visible_message(SPAN_DANGER("\The [M] has been injected with \the [src] by \the [user]."))
|
||||
target_mob.visible_message(SPAN_DANGER("\The [target_mob] has been injected with \the [src] by \the [user]."))
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
if(!istype(H))
|
||||
to_chat(user, SPAN_WARNING("Apparently it didn't work..."))
|
||||
return
|
||||
@@ -132,13 +133,13 @@
|
||||
if((buf.types & DNA2_BUF_SE) && (block ? (GetState() && block == MONKEYBLOCK) : GetState(MONKEYBLOCK)))
|
||||
injected_with_monkey = SPAN_DANGER(" (MONKEY)")
|
||||
|
||||
M.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [name] to inject [M.name] ([M.ckey])</span>"
|
||||
log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])")
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with \the [src][injected_with_monkey]")
|
||||
target_mob.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [name] to inject [target_mob.name] ([target_mob.ckey])</span>"
|
||||
log_attack("[user.name] ([user.ckey]) used the [name] to inject [target_mob.name] ([target_mob.ckey])")
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(target_mob)] with \the [src][injected_with_monkey]")
|
||||
|
||||
// Apply the DNA shit.
|
||||
inject(M, user)
|
||||
inject(target_mob, user)
|
||||
return
|
||||
|
||||
/obj/item/dnainjector/hulkmut
|
||||
|
||||
@@ -173,7 +173,9 @@
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("\The [src] needs to be in one of your hands."))
|
||||
|
||||
/obj/item/clothing/mask/smokable/ecig/attack(mob/living/carbon/human/C, mob/user, def_zone)
|
||||
/obj/item/clothing/mask/smokable/ecig/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/C = target_mob
|
||||
|
||||
if(active && C == user && istype(C))
|
||||
var/obj/item/blocked = C.check_mouth_coverage()
|
||||
if(blocked)
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/item/plastique/attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
/obj/item/plastique/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/plastique/cyborg
|
||||
|
||||
@@ -137,8 +137,8 @@
|
||||
. += SPAN_NOTICE("The safety is [safety ? "on" : "off"].")
|
||||
return
|
||||
|
||||
/obj/item/extinguisher/attack(mob/living/M, mob/living/user, target_zone)
|
||||
if(ismob(M) && user.a_intent != I_HURT)
|
||||
/obj/item/extinguisher/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(ismob(target_mob) && user.a_intent != I_HURT)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -25,7 +25,11 @@
|
||||
drop_sound = 'sound/items/drop/accessory.ogg'
|
||||
pickup_sound = 'sound/items/pickup/accessory.ogg'
|
||||
|
||||
/obj/item/handcuffs/attack(var/mob/living/carbon/C, var/mob/living/user)
|
||||
/obj/item/handcuffs/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/C = target_mob
|
||||
if(!istype(C))
|
||||
return
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/implanter/attack(mob/living/carbon/human/M, mob/user, var/target_zone)
|
||||
/obj/item/implanter/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/M = target_mob
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
@@ -81,15 +82,15 @@
|
||||
icon_state = "cimplanter0"
|
||||
return
|
||||
|
||||
/obj/item/implanter/ipc_tag/attack(mob/M, mob/user)
|
||||
if(!ishuman(M))
|
||||
/obj/item/implanter/ipc_tag/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!ishuman(target_mob))
|
||||
return
|
||||
|
||||
if(!ipc_tag)
|
||||
to_chat(user, SPAN_WARNING("\The [src] doesn't have an IPC tag loaded!"))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
if(!H.species || !isipc(H) || !H.organs_by_name[BP_HEAD])
|
||||
to_chat(user, SPAN_WARNING("You cannot use \the [src] on a non-IPC!"))
|
||||
return
|
||||
@@ -98,16 +99,16 @@
|
||||
to_chat(user, SPAN_WARNING("\The [H] is already tagged!"))
|
||||
return
|
||||
|
||||
user.visible_message(SPAN_WARNING("\The [user] tags \the [M] with \the [src]!"), SPAN_NOTICE("You tag \the [M] with \the [src]."), range = 3)
|
||||
user.visible_message(SPAN_WARNING("\The [user] tags \the [target_mob] with \the [src]!"), SPAN_NOTICE("You tag \the [target_mob] with \the [src]."), range = 3)
|
||||
|
||||
M.attack_log += "\[[time_stamp()]\] <font color='orange'> Implanted with [name] ([ipc_tag.name]) by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [name] ([ipc_tag.name]) to implant [M.name] ([M.ckey])</span>"
|
||||
msg_admin_attack("[key_name_admin(user)] implanted [key_name_admin(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
|
||||
target_mob.attack_log += "\[[time_stamp()]\] <font color='orange'> Implanted with [name] ([ipc_tag.name]) by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [name] ([ipc_tag.name]) to implant [target_mob.name] ([target_mob.ckey])</span>"
|
||||
msg_admin_attack("[key_name_admin(user)] implanted [key_name_admin(target_mob)] with [name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(target_mob))
|
||||
|
||||
ipc_tag.replaced(H, H.organs_by_name[BP_HEAD])
|
||||
ipc_tag.forceMove(M)
|
||||
ipc_tag.forceMove(target_mob)
|
||||
if(ipc_tag.auto_generate)
|
||||
ipc_tag.serial_number = uppertext(dd_limittext(md5(M.real_name), 12))
|
||||
ipc_tag.serial_number = uppertext(dd_limittext(md5(target_mob.real_name), 12))
|
||||
ipc_tag = null
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -29,17 +29,17 @@
|
||||
QDEL_NULL(wires)
|
||||
return ..()
|
||||
|
||||
/obj/item/ipc_tag_scanner/attack(mob/living/M, mob/living/user)
|
||||
/obj/item/ipc_tag_scanner/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
add_fingerprint(user)
|
||||
if(!powered)
|
||||
to_chat(user, SPAN_WARNING("\The [src] reads, \"Scanning failure, please submit scanner for repairs.\""))
|
||||
return
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts analyzing \the [M] with \the [src]..."), SPAN_NOTICE("You start analyzing \the [M] with \the [src]..."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts analyzing \the [target_mob] with \the [src]..."), SPAN_NOTICE("You start analyzing \the [target_mob] with \the [src]..."))
|
||||
if(do_after(user, 5 SECONDS, src, DO_UNIQUE))
|
||||
if(!isipc(M))
|
||||
to_chat(user, SPAN_WARNING("You analyze \the [M], but find that they're not an IPC at all!"))
|
||||
if(!isipc(target_mob))
|
||||
to_chat(user, SPAN_WARNING("You analyze \the [target_mob], but find that they're not an IPC at all!"))
|
||||
return
|
||||
var/mob/living/carbon/human/IPC = M
|
||||
var/mob/living/carbon/human/IPC = target_mob
|
||||
var/obj/item/organ/internal/ipc_tag/tag = IPC.internal_organs_by_name[BP_IPCTAG]
|
||||
if(isnull(tag) || !tag)
|
||||
to_chat(user, SPAN_WARNING("Error: Serial Identification Missing."))
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
src.pixel_y = rand(0, 4)
|
||||
create_reagents(5)
|
||||
|
||||
/obj/item/material/kitchen/utensil/attack(mob/living/carbon/M, mob/user, var/target_zone)
|
||||
/obj/item/material/kitchen/utensil/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/M = target_mob
|
||||
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
@@ -154,7 +156,7 @@
|
||||
applies_material_colour = 0
|
||||
unbreakable = 1
|
||||
|
||||
/obj/item/material/kitchen/utensil/knife/attack(mob/target, mob/living/user, var/target_zone)
|
||||
/obj/item/material/kitchen/utensil/knife/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if ((user.is_clumsy()) && prob(50))
|
||||
to_chat(user, SPAN_WARNING("You accidentally cut yourself with \the [src]."))
|
||||
user.take_organ_damage(20)
|
||||
@@ -182,7 +184,7 @@
|
||||
use_material_name = TRUE
|
||||
applies_material_colour = TRUE
|
||||
|
||||
/obj/item/material/kitchen/rollingpin/attack(mob/living/M, mob/living/user, var/target_zone)
|
||||
/obj/item/material/kitchen/rollingpin/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if ((user.is_clumsy()) && prob(50))
|
||||
to_chat(user, SPAN_WARNING("\The [src] slips out of your hand and hits your head."))
|
||||
user.drop_from_inventory(src)
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
. = ..()
|
||||
src.add_blood()
|
||||
|
||||
/obj/item/material/knife/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone)
|
||||
/obj/item/material/knife/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(active == 1)
|
||||
if((target_zone != BP_EYES && target_zone != BP_HEAD) || M.eyes_protected(src, FALSE))
|
||||
if((target_zone != BP_EYES && target_zone != BP_HEAD) || target_mob.eyes_protected(src, FALSE))
|
||||
return ..()
|
||||
if((user.is_clumsy()) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
target_mob = user
|
||||
return eyestab(target_mob,user)
|
||||
|
||||
/obj/item/material/knife/verb/extract_embedded(var/mob/living/carbon/human/H as mob in view(1))
|
||||
set name = "Extract Embedded Item"
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
icon_state = "spearglass[wielded]"
|
||||
item_state = "spearglass[wielded]"
|
||||
|
||||
/obj/item/material/twohanded/spear/attack(mob/living/target, mob/living/user, var/target_zone)
|
||||
/obj/item/material/twohanded/spear/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
..()
|
||||
|
||||
if(wielded && explosive)
|
||||
@@ -481,7 +481,7 @@
|
||||
if(powered)
|
||||
. += SPAN_NOTICE("It is currently powered on.")
|
||||
|
||||
/obj/item/material/twohanded/chainsaw/attack(mob/M as mob, mob/living/user as mob)
|
||||
/obj/item/material/twohanded/chainsaw/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
. = ..()
|
||||
if(powered)
|
||||
playsound(loc, 'sound/weapons/saw/chainsword.ogg', 25, 0, 30)
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
icon_state = initial(icon_state)
|
||||
to_chat(user, SPAN_NOTICE("\The [src] is de-energised."))
|
||||
|
||||
/obj/item/melee/energy/glaive/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
||||
/obj/item/melee/energy/glaive/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
user.setClickCooldown(16)
|
||||
..()
|
||||
|
||||
|
||||
@@ -109,26 +109,26 @@
|
||||
icon_state = "hammeroff"
|
||||
item_state = "hammeroff"
|
||||
|
||||
/obj/item/melee/hammer/powered/attack(var/mob/target, var/mob/living/user, var/target_zone)
|
||||
/obj/item/melee/hammer/powered/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
..()
|
||||
if(prob(trigger_chance))
|
||||
if(!on)
|
||||
to_chat(user, SPAN_WARNING("\The [src] buzzes!"))
|
||||
return
|
||||
playsound(user, 'sound/weapons/beartrap_shut.ogg', 50, 1, -1)
|
||||
user.visible_message(SPAN_DANGER("\The [user] slams \the [target] away with \the [src]!"))
|
||||
user.visible_message(SPAN_DANGER("\The [user] slams \the [target_mob] away with \the [src]!"))
|
||||
var/T = get_turf(user)
|
||||
spark(T, 3, GLOB.alldirs)
|
||||
step_away(target,user,15)
|
||||
step_away(target_mob,user,15)
|
||||
sleep(1)
|
||||
step_away(target,user,15)
|
||||
step_away(target_mob,user,15)
|
||||
sleep(1)
|
||||
step_away(target,user,15)
|
||||
step_away(target_mob,user,15)
|
||||
sleep(1)
|
||||
step_away(target,user,15)
|
||||
step_away(target_mob,user,15)
|
||||
sleep(1)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(ishuman(target_mob))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
H.apply_effect(2, WEAKEN)
|
||||
on = FALSE
|
||||
update_icon()
|
||||
@@ -163,17 +163,17 @@
|
||||
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
|
||||
hitsound = 'sound/weapons/whip.ogg'
|
||||
|
||||
/obj/item/melee/whip/attack(mob/target as mob, mob/living/user as mob, var/target_zone)
|
||||
/obj/item/melee/whip/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
..()
|
||||
if(ishuman(target))
|
||||
if(ishuman(target_mob))
|
||||
if(prob(25))
|
||||
if(target_zone == BP_L_HAND || target_zone == BP_L_ARM)
|
||||
if (target.l_hand && target.l_hand != src)
|
||||
target.drop_l_hand()
|
||||
if (target_mob.l_hand && target_mob.l_hand != src)
|
||||
target_mob.drop_l_hand()
|
||||
else if(target_zone == BP_R_HAND || target_zone == BP_R_ARM)
|
||||
if (target.r_hand && target.r_hand != src)
|
||||
target.drop_r_hand()
|
||||
user.visible_message(SPAN_DANGER("\The [user] disarms \the [target] with \the [src]!"))
|
||||
if (target_mob.r_hand && target_mob.r_hand != src)
|
||||
target_mob.drop_r_hand()
|
||||
user.visible_message(SPAN_DANGER("\The [user] disarms \the [target_mob] with \the [src]!"))
|
||||
return
|
||||
|
||||
/obj/item/melee/ceremonial_sword
|
||||
|
||||
@@ -5,6 +5,3 @@
|
||||
src.machine = M
|
||||
else
|
||||
user.visible_message("[user] dumbly fumbles to find a place on [M] to plug in [src].", "There aren't any ports on [M] that match the jack belonging to [src].")
|
||||
|
||||
/obj/item/pai_cable/attack(obj/machinery/M as obj, mob/user as mob)
|
||||
src.plugin(M, user)
|
||||
|
||||
@@ -98,9 +98,9 @@
|
||||
return
|
||||
|
||||
//attack_as_weapon
|
||||
/obj/item/soap/attack(mob/living/target, mob/living/user, var/target_zone)
|
||||
if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == BP_MOUTH )
|
||||
user.visible_message(SPAN_DANGER("\The [user] washes \the [target]'s mouth out with soap!"))
|
||||
/obj/item/soap/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(target_mob && user && ishuman(target_mob) && ishuman(user) && !target_mob.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == BP_MOUTH )
|
||||
user.visible_message(SPAN_DANGER("\The [user] washes \the [target_mob]'s mouth out with soap!"))
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //prevent spam
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -326,39 +326,39 @@
|
||||
reagents.trans_to_obj(C, (reagents.total_volume/contents.len))
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/box/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, target_zone)
|
||||
if(!ismob(M))
|
||||
/obj/item/storage/box/fancy/cigarettes/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!ismob(target_mob))
|
||||
return
|
||||
if(!opened)
|
||||
to_chat(user, SPAN_WARNING("\The [src] is closed."))
|
||||
return
|
||||
if(target_zone == BP_MOUTH && contents.len > 0)
|
||||
if(M.wear_mask)
|
||||
to_chat(user, SPAN_WARNING("\The [M.wear_mask] is in the way."))
|
||||
if(target_mob.wear_mask)
|
||||
to_chat(user, SPAN_WARNING("\The [target_mob.wear_mask] is in the way."))
|
||||
return
|
||||
var/obj/item/clothing/mask/smokable/cigarette/cig = locate() in src
|
||||
if(!istype(cig))
|
||||
to_chat(user, SPAN_WARNING("There isn't a cigarette in \the [src]!"))
|
||||
return
|
||||
if(M != user)
|
||||
if(!use_check(M))
|
||||
to_chat(user, SPAN_WARNING("[M.name] is in no condition to handle items!"))
|
||||
if(target_mob != user)
|
||||
if(!use_check(target_mob))
|
||||
to_chat(user, SPAN_WARNING("[target_mob.name] is in no condition to handle items!"))
|
||||
return
|
||||
user.visible_message(SPAN_NOTICE("\The <b>[user]</b> holds up the open [src.name] to \the [M]'s mouth."), SPAN_NOTICE("You hold up the open [src.name] to \the [M]'s mouth, waiting for them to accept."))
|
||||
var/response = alert(M, "\The [user] offers you \a [cig.name]. Do you accept?", "Smokable Offer", "Accept", "Decline")
|
||||
user.visible_message(SPAN_NOTICE("\The <b>[user]</b> holds up the open [src.name] to \the [target_mob]'s mouth."), SPAN_NOTICE("You hold up the open [src.name] to \the [target_mob]'s mouth, waiting for them to accept."))
|
||||
var/response = alert(target_mob, "\The [user] offers you \a [cig.name]. Do you accept?", "Smokable Offer", "Accept", "Decline")
|
||||
if(response != "Accept")
|
||||
M.visible_message(SPAN_NOTICE("<b>[M]</b> pushes [user]'s [src.name] away."))
|
||||
target_mob.visible_message(SPAN_NOTICE("<b>[target_mob]</b> pushes [user]'s [src.name] away."))
|
||||
return
|
||||
if(!M.Adjacent(user))
|
||||
if(!target_mob.Adjacent(user))
|
||||
to_chat(user, SPAN_WARNING("You need to stay in reaching distance while giving an object."))
|
||||
to_chat(M, SPAN_WARNING("\The [user] moved too far away."))
|
||||
to_chat(target_mob, SPAN_WARNING("\The [user] moved too far away."))
|
||||
return
|
||||
remove_from_storage(cig, get_turf(M))
|
||||
M.equip_to_slot_if_possible(cig, slot_wear_mask)
|
||||
M.visible_message(SPAN_NOTICE("<b>[M]</b> casually pulls out a [icon_type] from \the [src] with [M.get_pronoun("his")] mouth."), SPAN_NOTICE("You casually pull out a [icon_type] from \the [src] with your mouth."), range = 3)
|
||||
remove_from_storage(cig, get_turf(target_mob))
|
||||
target_mob.equip_to_slot_if_possible(cig, slot_wear_mask)
|
||||
target_mob.visible_message(SPAN_NOTICE("<b>[target_mob]</b> casually pulls out a [icon_type] from \the [src] with [target_mob.get_pronoun("his")] mouth."), SPAN_NOTICE("You casually pull out a [icon_type] from \the [src] with your mouth."), range = 3)
|
||||
update_icon()
|
||||
return
|
||||
if(M == user && target_zone == BP_R_HAND || target_zone == BP_L_HAND) // Cig packing. Because obsessive smokers do it.
|
||||
if(target_mob == user && target_zone == BP_R_HAND || target_zone == BP_L_HAND) // Cig packing. Because obsessive smokers do it.
|
||||
user.visible_message(SPAN_NOTICE("<b>[user]</b> taps \the [src] against [user.get_pronoun("his")] palm."), SPAN_NOTICE("You tap \the [src] against your palm."))
|
||||
else
|
||||
..()
|
||||
@@ -475,7 +475,7 @@
|
||||
else
|
||||
AddOverlays("ledb")
|
||||
|
||||
/obj/item/storage/lockbox/vials/attackby(attacking_item, mob/user)
|
||||
/obj/item/storage/lockbox/vials/attackby(obj/item/attacking_item, mob/user, params)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/icon_broken = "lockbox+b"
|
||||
|
||||
|
||||
/obj/item/storage/lockbox/attackby(attacking_item, mob/user)
|
||||
/obj/item/storage/lockbox/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(istype(attacking_item, /obj/item/card/id))
|
||||
if(src.broken)
|
||||
to_chat(user, SPAN_WARNING("It appears to be broken."))
|
||||
|
||||
@@ -131,14 +131,14 @@
|
||||
update_force()
|
||||
|
||||
|
||||
/obj/item/storage/toolbox/attack(mob/living/M as mob, mob/user as mob, var/target_zone)
|
||||
/obj/item/storage/toolbox/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
update_force()
|
||||
if (..())
|
||||
if (contents.len)
|
||||
spill(3, get_turf(M))
|
||||
playsound(M, /singleton/sound_category/tray_hit_sound, 100, 1) //sound playin' again
|
||||
spill(3, get_turf(target_mob))
|
||||
playsound(target_mob, /singleton/sound_category/tray_hit_sound, 100, 1) //sound playin' again
|
||||
update_force()
|
||||
user.visible_message(SPAN_DANGER("[user] smashes the [src] into [M], causing it to break open and strew its contents across the area"))
|
||||
user.visible_message(SPAN_DANGER("[user] smashes the [src] into [target_mob], causing it to break open and strew its contents across the area"))
|
||||
|
||||
/obj/item/storage/toolbox/lunchbox
|
||||
name = "rainbow lunchbox"
|
||||
|
||||
@@ -107,8 +107,9 @@
|
||||
to_chat(user, SPAN_WARNING("[src] is out of charge."))
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/baton/attack(mob/living/L, mob/user, var/hit_zone)
|
||||
if(!L) return
|
||||
/obj/item/melee/baton/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!target_mob)
|
||||
return
|
||||
|
||||
if(status && (user.is_clumsy()) && prob(50))
|
||||
to_chat(user, SPAN_DANGER("You accidentally hit yourself with the [src]!"))
|
||||
@@ -116,7 +117,7 @@
|
||||
deductcharge(hitcost)
|
||||
return
|
||||
|
||||
if(isrobot(L))
|
||||
if(isrobot(target_mob))
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -124,18 +125,18 @@
|
||||
var/stun = stunforce
|
||||
|
||||
if(user.is_pacified())
|
||||
to_chat(user, SPAN_NOTICE("You don't want to risk hurting [L]!"))
|
||||
to_chat(user, SPAN_NOTICE("You don't want to risk hurting [target_mob]!"))
|
||||
return 0
|
||||
|
||||
var/target_zone = check_zone(hit_zone)
|
||||
target_zone = check_zone(target_zone)
|
||||
if(user.a_intent == I_HURT)
|
||||
if (!..()) //item/attack() does it's own messaging and logs
|
||||
return 0 // item/attack() will return 1 if they hit, 0 if they missed.
|
||||
stun *= 0.5
|
||||
if(status) //Checks to see if the stunbaton is on.
|
||||
agony *= 0.5 //whacking someone causes a much poorer contact than prodding them.
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
if(iscarbon(target_mob))
|
||||
var/mob/living/carbon/C = target_mob
|
||||
if(sheathed) //however breaking the skin results in a more potent electric shock or some bullshit. im a coder, not a doctor
|
||||
C.electrocute_act(force * 2, src, def_zone = target_zone)
|
||||
else
|
||||
@@ -145,38 +146,38 @@
|
||||
//we can't really extract the actual hit zone from ..(), unfortunately. Just act like they attacked the area they intended to.
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(L)
|
||||
user.do_attack_animation(target_mob)
|
||||
//copied from human_defense.dm - human defence code should really be refactored some time.
|
||||
if (ishuman(L))
|
||||
user.lastattacked = L //are these used at all, if we have logs?
|
||||
L.lastattacker = user
|
||||
if (ishuman(target_mob))
|
||||
user.lastattacked = target_mob //are these used at all, if we have logs?
|
||||
target_mob.lastattacker = user
|
||||
|
||||
if (user != L) // Attacking yourself can't miss
|
||||
target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, L)
|
||||
if (user != target_mob) // Attacking yourself can't miss
|
||||
target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, target_mob)
|
||||
|
||||
if(!target_zone)
|
||||
L.visible_message(SPAN_WARNING("[user] misses [L] with \the [src]!"))
|
||||
target_mob.visible_message(SPAN_WARNING("[user] misses [target_mob] with \the [src]!"))
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/affecting = H.get_organ(target_zone)
|
||||
if (affecting)
|
||||
if(!status)
|
||||
L.visible_message(SPAN_WARNING("[L] has been prodded in the [affecting.name] with \the [src] by [user]. Luckily it was off."))
|
||||
target_mob.visible_message(SPAN_WARNING("[target_mob] has been prodded in the [affecting.name] with \the [src] by [user]. Luckily it was off."))
|
||||
return 1
|
||||
else
|
||||
H.visible_message(SPAN_DANGER("[L] has been prodded in the [affecting.name] with \the [src] by [user]!"))
|
||||
H.visible_message(SPAN_DANGER("[target_mob] has been prodded in the [affecting.name] with \the [src] by [user]!"))
|
||||
var/intent = "(INTENT: [user? uppertext(user.a_intent) : "N/A"])"
|
||||
admin_attack_log(user, L, "was stunned by this mob with [src] [intent]", "stunned this mob with [src] [intent]", "stunned with [src]")
|
||||
admin_attack_log(user, target_mob, "was stunned by this mob with [src] [intent]", "stunned this mob with [src] [intent]", "stunned with [src]")
|
||||
if(!sheathed)
|
||||
H.electrocute_act(force * 2, src, ground_zero = target_zone)
|
||||
if(isslime(L))
|
||||
var/mob/living/carbon/slime/S = L
|
||||
if(isslime(target_mob))
|
||||
var/mob/living/carbon/slime/S = target_mob
|
||||
if(!status)
|
||||
L.visible_message(SPAN_WARNING("[S] has been prodded with \the [src] by [user]. Too bad it was off."))
|
||||
target_mob.visible_message(SPAN_WARNING("[S] has been prodded with \the [src] by [user]. Too bad it was off."))
|
||||
return TRUE
|
||||
else
|
||||
L.visible_message(SPAN_DANGER("[S] has been prodded with \the [src] by [user]!"))
|
||||
target_mob.visible_message(SPAN_DANGER("[S] has been prodded with \the [src] by [user]!"))
|
||||
|
||||
S.discipline++
|
||||
if(prob(1))
|
||||
@@ -185,13 +186,13 @@
|
||||
|
||||
else
|
||||
if(!status)
|
||||
L.visible_message(SPAN_WARNING("[L] has been prodded with \the [src] by [user]. Luckily it was off."))
|
||||
target_mob.visible_message(SPAN_WARNING("[target_mob] has been prodded with \the [src] by [user]. Luckily it was off."))
|
||||
return TRUE
|
||||
else
|
||||
L.visible_message(SPAN_DANGER("[L] has been prodded with \the [src] by [user]!"))
|
||||
target_mob.visible_message(SPAN_DANGER("[target_mob] has been prodded with \the [src] by [user]!"))
|
||||
|
||||
//stun effects
|
||||
L.stun_effect_act(stun, agony, target_zone, src)
|
||||
target_mob.stun_effect_act(stun, agony, target_zone, src)
|
||||
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
|
||||
|
||||
@@ -287,11 +287,11 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/storage/box/fancy/tray/attack(mob/living/M as mob, mob/user as mob, var/target_zone)
|
||||
/obj/item/storage/box/fancy/tray/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(..() && contents.len)
|
||||
spill(3, get_turf(M))
|
||||
playsound(M, /singleton/sound_category/tray_hit_sound, 50, 1) //sound playin' again
|
||||
user.visible_message(SPAN_DANGER("[user] smashes \the [src] into [M], causing it to spill its contents across the area!"))
|
||||
spill(3, get_turf(target_mob))
|
||||
playsound(target_mob, /singleton/sound_category/tray_hit_sound, 50, 1) //sound playin' again
|
||||
user.visible_message(SPAN_DANGER("[user] smashes \the [src] into [target_mob], causing it to spill its contents across the area!"))
|
||||
|
||||
/obj/item/storage/box/fancy/tray/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
drop_sound = 'sound/items/drop/crowbar.ogg'
|
||||
pickup_sound = 'sound/items/pickup/crowbar.ogg'
|
||||
|
||||
/obj/item/melee/classic_baton/attack(mob/M as mob, mob/living/user as mob, var/target_zone)
|
||||
/obj/item/melee/classic_baton/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if ((user.is_clumsy()) && prob(50))
|
||||
to_chat(user, SPAN_WARNING("You club yourself over the head."))
|
||||
user.Weaken(3 * force)
|
||||
@@ -88,9 +88,9 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/melee/telebaton/attack(mob/target, mob/living/user, var/target_zone)
|
||||
/obj/item/melee/telebaton/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(on)
|
||||
do_special_effects(target)
|
||||
do_special_effects(target_mob)
|
||||
if(user.is_clumsy() && prob(50))
|
||||
to_chat(user, SPAN_WARNING("You club yourself over the head."))
|
||||
user.Weaken(3 * force)
|
||||
@@ -101,8 +101,8 @@
|
||||
user.take_organ_damage(2 * force)
|
||||
return
|
||||
if(..() && user.a_intent == I_DISARM)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/T = target
|
||||
if(ishuman(target_mob))
|
||||
var/mob/living/carbon/human/T = target_mob
|
||||
T.apply_damage(40, DAMAGE_PAIN, target_zone)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
/obj/item/syndie/teleporter/set_initial_maptext()
|
||||
held_maptext = SMALL_FONTS(7, "Ready")
|
||||
|
||||
/obj/item/syndie/teleporter/attack()
|
||||
/obj/item/syndie/teleporter/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/syndie/teleporter/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
pickup_sound = 'sound/items/pickup/cardboardbox.ogg'
|
||||
surgerysound = /singleton/sound_category/rip_sound
|
||||
|
||||
/obj/item/tape_roll/attack(var/mob/living/carbon/human/H, var/mob/user, var/target_zone)
|
||||
/obj/item/tape_roll/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
if(istype(H))
|
||||
if(target_zone == BP_EYES)
|
||||
|
||||
|
||||
@@ -103,7 +103,9 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/screwdriver/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone)
|
||||
/obj/item/screwdriver/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/M = target_mob
|
||||
|
||||
if(!istype(M) || user.a_intent == "help")
|
||||
return ..()
|
||||
if((target_zone != BP_EYES && target_zone != BP_HEAD) || M.eyes_protected(src, FALSE))
|
||||
@@ -181,7 +183,11 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user, var/target_zone)
|
||||
/obj/item/wirecutters/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/C = target_mob
|
||||
if(!istype(C))
|
||||
return
|
||||
|
||||
if(user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/handcuffs/cable)))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] cuts \the [C]'s restraints with \the [src]!"),\
|
||||
SPAN_NOTICE("You cut \the [C]'s restraints with \the [src]!"),\
|
||||
@@ -390,9 +396,9 @@
|
||||
if (istype(location, /turf))
|
||||
location.hotspot_expose(700, 5)
|
||||
|
||||
/obj/item/weldingtool/attack(mob/living/M, mob/user, var/target_zone)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
/obj/item/weldingtool/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(ishuman(target_mob))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/S = H.organs_by_name[target_zone]
|
||||
|
||||
if(!S)
|
||||
|
||||
@@ -14,10 +14,12 @@
|
||||
drop_sound = 'sound/items/drop/cloth.ogg'
|
||||
pickup_sound = 'sound/items/pickup/cloth.ogg'
|
||||
|
||||
/obj/item/towel/attack_self(mob/living/user as mob)
|
||||
attack(user,user)
|
||||
/obj/item/towel/attack_self(mob/living/user)
|
||||
attack(user, user)
|
||||
|
||||
/obj/item/towel/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/M = target_mob
|
||||
|
||||
/obj/item/towel/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
||||
if(istype(M) && user.a_intent == I_HELP)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(user.on_fire)
|
||||
|
||||
@@ -726,15 +726,15 @@
|
||||
if(captured)
|
||||
release(user, user.loc)
|
||||
|
||||
/obj/item/trap/animal/attack(var/target, mob/living/user)
|
||||
/obj/item/trap/animal/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!deployed)
|
||||
return
|
||||
|
||||
if(captured) // It is full
|
||||
return
|
||||
|
||||
if(isliving(target))
|
||||
var/mob/living/capturing_mob = target
|
||||
if(isliving(target_mob))
|
||||
var/mob/living/capturing_mob = target_mob
|
||||
if(capturing_mob.mob_size > max_mob_size)
|
||||
to_chat(user, SPAN_WARNING("\The [capturing_mob] doesn't fit in \the [src]!"))
|
||||
return
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
base_block_chance = 60
|
||||
shield_power = 150
|
||||
|
||||
/obj/item/melee/energy/vaurca_zweihander/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
||||
/obj/item/melee/energy/vaurca_zweihander/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
user.setClickCooldown(16)
|
||||
..()
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
throw_range = 15
|
||||
attack_verb = list("banned")
|
||||
|
||||
/obj/item/banhammer/attack(mob/M as mob, mob/user as mob)
|
||||
to_chat(M, SPAN_WARNING("<b> You have been banned FOR NO REISIN by [user]</b>"))
|
||||
to_chat(user, SPAN_WARNING(" You have <b>BANNED</b> [M]"))
|
||||
/obj/item/banhammer/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
to_chat(target_mob, SPAN_WARNING("<b> You have been banned FOR NO REISIN by [user]</b>"))
|
||||
to_chat(user, SPAN_WARNING(" You have <b>BANNED</b> [target_mob]"))
|
||||
playsound(loc, 'sound/effects/adminhelp.ogg', 15)
|
||||
|
||||
@@ -25,19 +25,19 @@
|
||||
if(user.isSynthetic())
|
||||
to_chat(user, SPAN_NOTICE("\The [src] does not seem to be doing anything, but you can feel it. A signal, beyond anything you can consciously understand, weaving and scratching a shield around the back of your mind."))
|
||||
|
||||
/obj/structure/ecd/attackby(obj/item/W, mob/user)
|
||||
if(W.iswrench())
|
||||
/obj/structure/ecd/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(attacking_item.iswrench())
|
||||
switch(state)
|
||||
if(ECD_LOOSE)
|
||||
state = ECD_BOLTED
|
||||
W.play_tool_sound(get_turf(src), 75)
|
||||
attacking_item.play_tool_sound(get_turf(src), 75)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] secures \the [src] to the floor."), \
|
||||
SPAN_NOTICE("You secure \the [src]'s external reinforcing bolts to the floor."), \
|
||||
SPAN_WARNING("You hear a ratcheting noise."))
|
||||
anchored = TRUE
|
||||
if(ECD_BOLTED)
|
||||
state = ECD_LOOSE
|
||||
W.play_tool_sound(get_turf(src), 75)
|
||||
attacking_item.play_tool_sound(get_turf(src), 75)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] unsecures \the [src]'s reinforcing bolts from the floor."), \
|
||||
SPAN_NOTICE("You undo \the [src]'s external reinforcing bolts."), \
|
||||
SPAN_WARNING("You hear a ratcheting noise."))
|
||||
@@ -46,8 +46,8 @@
|
||||
to_chat(user, SPAN_WARNING("\The [src] needs to be unwelded from the floor."))
|
||||
return
|
||||
|
||||
if(W.iswelder())
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(attacking_item.iswelder())
|
||||
var/obj/item/weldingtool/WT = attacking_item
|
||||
switch(state)
|
||||
if(ECD_LOOSE)
|
||||
to_chat(user, SPAN_WARNING("\The [src] needs to be wrenched to the floor."))
|
||||
@@ -57,7 +57,7 @@
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts to weld \the [src] to the floor."), \
|
||||
SPAN_NOTICE("You start to weld \the [src] to the floor."), \
|
||||
SPAN_WARNING("You hear the sound of metal being welded."))
|
||||
if(W.use_tool(src, user, 20, volume = 50))
|
||||
if(attacking_item.use_tool(src, user, 20, volume = 50))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
state = ECD_WELDED
|
||||
@@ -70,14 +70,13 @@
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts to cut \the [src] free from the floor."), \
|
||||
SPAN_NOTICE("You start to cut \the [src] free from the floor."), \
|
||||
SPAN_WARNING("You hear the sound of metal being welded."))
|
||||
if(W.use_tool(src, user, 20, volume = 50))
|
||||
if(attacking_item.use_tool(src, user, 20, volume = 50))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
state = ECD_BOLTED
|
||||
to_chat(user, SPAN_NOTICE("You cut \the [src] free from the floor."))
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You need more welding fuel to complete this task."))
|
||||
return
|
||||
|
||||
#undef ECD_LOOSE
|
||||
#undef ECD_BOLTED
|
||||
|
||||
@@ -33,21 +33,21 @@
|
||||
if(start_deployed)
|
||||
deploy()
|
||||
|
||||
/obj/structure/survey_probe/attackby(obj/item/item, mob/living/user)
|
||||
if(!timer_id && item.iswrench())
|
||||
/obj/structure/survey_probe/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(!timer_id && attacking_item.iswrench())
|
||||
if(!anchored)
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("\The [user] unfastens the locking bolts on \the [src], deploying it."),
|
||||
SPAN_NOTICE("You unfasten the locking bolts on \the [src], and it deploys, lowering its devices and drill bits to the ground. It is ready to survey."),
|
||||
)
|
||||
item.play_tool_sound(user, 30)
|
||||
attacking_item.play_tool_sound(user, 30)
|
||||
deploy()
|
||||
else
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("\The [user] fastens the locking bolts on \the [src], stowing it."),
|
||||
SPAN_NOTICE("You fasten the locking bolts \the [src], stowing it. It retracts its devices and drill bits."),
|
||||
)
|
||||
item.play_tool_sound(user, 30)
|
||||
attacking_item.play_tool_sound(user, 30)
|
||||
undeploy()
|
||||
|
||||
/obj/structure/survey_probe/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
force = 2
|
||||
sharp = TRUE
|
||||
|
||||
/obj/item/clothing/shoes/heels/attack(mob/living/carbon/M, mob/living/carbon/user, var/target_zone)
|
||||
/obj/item/clothing/shoes/heels/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/M = target_mob
|
||||
|
||||
if(!istype(M) || user.a_intent == "help")
|
||||
return ..()
|
||||
if((target_zone != BP_EYES && target_zone != BP_HEAD) || M.eyes_protected(src, FALSE))
|
||||
|
||||
@@ -266,7 +266,9 @@
|
||||
flippable = 1
|
||||
var/auto_examine = FALSE
|
||||
|
||||
/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/user)
|
||||
/obj/item/clothing/accessory/stethoscope/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/human/M = target_mob
|
||||
|
||||
if(ishuman(M) && isliving(user))
|
||||
if(user.a_intent == I_HELP)
|
||||
var/obj/item/organ/organ = M.get_organ(user.zone_sel.selecting)
|
||||
|
||||
@@ -79,10 +79,10 @@
|
||||
user.visible_message(SPAN_NOTICE("[user] displays their [src.name]."),
|
||||
SPAN_NOTICE("You display your [src.name]."))
|
||||
|
||||
/obj/item/clothing/accessory/badge/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
/obj/item/clothing/accessory/badge/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(isliving(user))
|
||||
user.visible_message(SPAN_DANGER("[user] invades [M]'s personal space, thrusting [src] into their face insistently."),
|
||||
SPAN_DANGER("You invade [M]'s personal space, thrusting [src] into their face insistently."))
|
||||
user.visible_message(SPAN_DANGER("[user] invades [target_mob]'s personal space, thrusting [src] into their face insistently."),
|
||||
SPAN_DANGER("You invade [target_mob]'s personal space, thrusting [src] into their face insistently."))
|
||||
|
||||
/obj/item/clothing/accessory/badge/verb/flip_side()
|
||||
set category = "Object"
|
||||
|
||||
@@ -349,14 +349,14 @@
|
||||
/obj/item/clothing/accessory/tajaran/charm/get_mask_examine_text(mob/user)
|
||||
return "around [user.get_pronoun("his")] neck"
|
||||
|
||||
/obj/item/clothing/accessory/tajaran/charm/attack(mob/M as mob, mob/living/user as mob, target_zone = BP_CHEST)
|
||||
if(user.a_intent != I_HURT && M != user)
|
||||
if(target_zone == BP_HEAD | M.lying)
|
||||
user.visible_message("<b>\The [user]</b> holds \the [src] above <b>\the [M]</b>")
|
||||
/obj/item/clothing/accessory/tajaran/charm/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(user.a_intent != I_HURT && target_mob != user)
|
||||
if(target_zone == BP_HEAD | target_mob.lying)
|
||||
user.visible_message("<b>\The [user]</b> holds \the [src] above <b>\the [target_mob]</b>")
|
||||
else if(target_zone == BP_CHEST)
|
||||
user.visible_message("<b>\The [user]</b> holds \the [src] out in front of <b>\the [M]</b>")
|
||||
user.visible_message("<b>\The [user]</b> holds \the [src] out in front of <b>\the [target_mob]</b>")
|
||||
else
|
||||
user.visible_message("<b>\The [user]</b> holds \the [src] up near <b>\the [M]</b>")
|
||||
user.visible_message("<b>\The [user]</b> holds \the [src] up near <b>\the [target_mob]</b>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -60,11 +60,11 @@ Plates that can hold your cooking stuff
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/bowl/attack(mob/living/M, mob/living/user, target_zone)
|
||||
/obj/item/reagent_containers/bowl/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(isipc(user))
|
||||
to_chat(user, SPAN_NOTICE("You don't have a mouth, so you can't lick \the [src] clean."))
|
||||
return
|
||||
if(grease && !reagents.total_volume && (M == user))
|
||||
if(grease && !reagents.total_volume && (target_mob == user))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] starts to lick \the [src] clean."),
|
||||
SPAN_NOTICE("You start to lick \the [src] clean.")
|
||||
@@ -157,11 +157,11 @@ Plates that can hold your cooking stuff
|
||||
to_chat(user, SPAN_NOTICE("You take \the [F.name] from \the [name]."))
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/bowl/plate/attack(mob/living/M, mob/living/user, target_zone)
|
||||
/obj/item/reagent_containers/bowl/plate/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(istype(holding, /obj/item/reagent_containers/food/snacks))
|
||||
var/obj/item/reagent_containers/food/snacks/S = holding
|
||||
S.standard_feed_mob(user, M)
|
||||
else if(grease && !holding && (M == user))
|
||||
S.standard_feed_mob(user, target_mob)
|
||||
else if(grease && !holding && (target_mob == user))
|
||||
user.visible_message(SPAN_NOTICE("[user] starts to lick \the [src] clean."), SPAN_NOTICE("You start to lick \the [src] clean."))
|
||||
if(do_after(user, 5))
|
||||
grease = FALSE
|
||||
|
||||
@@ -27,8 +27,8 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
|
||||
return
|
||||
|
||||
/obj/item/implanter/fluff/attack(mob/M as mob, mob/user as mob, var/target_zone)
|
||||
if (!M.ckey || M.ckey != allowed_ckey)
|
||||
/obj/item/implanter/fluff/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if (!target_mob.ckey || target_mob.ckey != allowed_ckey)
|
||||
return
|
||||
|
||||
..()
|
||||
@@ -415,11 +415,11 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
has_spear = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/fluff/tokash_spear/attackby(var/obj/item/W, var/mob/user)
|
||||
if(!has_spear && istype(W, /obj/item/fluff/tokash_spearhead))
|
||||
to_chat(user, SPAN_NOTICE("You place \the [W] on the [src]."))
|
||||
user.drop_from_inventory(W,src)
|
||||
qdel(W)
|
||||
/obj/item/fluff/tokash_spear/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(!has_spear && istype(attacking_item, /obj/item/fluff/tokash_spearhead))
|
||||
to_chat(user, SPAN_NOTICE("You place \the [attacking_item] on the [src]."))
|
||||
user.drop_from_inventory(attacking_item,src)
|
||||
qdel(attacking_item)
|
||||
has_spear = TRUE
|
||||
update_icon()
|
||||
else
|
||||
@@ -821,13 +821,13 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
var/obj/item/device/megaphone/fluff/akinyi_mic/mic
|
||||
var/collapsed = TRUE
|
||||
|
||||
/obj/item/fluff/akinyi_stand/attackby(obj/item/O, mob/user)
|
||||
if(istype(O, /obj/item/device/megaphone/fluff/akinyi_mic))
|
||||
/obj/item/fluff/akinyi_stand/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(istype(attacking_item, /obj/item/device/megaphone/fluff/akinyi_mic))
|
||||
if(!mic && !collapsed)
|
||||
user.unEquip(O)
|
||||
O.forceMove(src)
|
||||
mic = O
|
||||
to_chat(user, SPAN_NOTICE("You place \the [O] on \the [src]."))
|
||||
user.unEquip(attacking_item)
|
||||
attacking_item.forceMove(src)
|
||||
mic = attacking_item
|
||||
to_chat(user, SPAN_NOTICE("You place \the [attacking_item] on \the [src]."))
|
||||
update_icon()
|
||||
|
||||
/obj/item/fluff/akinyi_stand/MouseDrop(mob/user as mob)
|
||||
@@ -994,15 +994,15 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/fluff/holoconsole/attackby(obj/item/I, mob/user)
|
||||
switch(I.type)
|
||||
/obj/item/fluff/holoconsole/attackby(obj/item/attacking_item, mob/user, params)
|
||||
switch(attacking_item.type)
|
||||
if(/obj/item/fluff/holoconsole_controller)
|
||||
if(left_controller)
|
||||
to_chat(user, SPAN_WARNING("\The [src] already has its left controller connected!"))
|
||||
return
|
||||
user.visible_message("<b>[user]</b> slots \the [I] back into to \the [src].", SPAN_NOTICE("You slot \the [I] back into \the [src]."))
|
||||
user.drop_from_inventory(I, src)
|
||||
left_controller = I
|
||||
user.visible_message("<b>[user]</b> slots \the [attacking_item] back into to \the [src].", SPAN_NOTICE("You slot \the [attacking_item] back into \the [src]."))
|
||||
user.drop_from_inventory(attacking_item, src)
|
||||
left_controller = attacking_item
|
||||
left_controller.parent_console = null
|
||||
verbs += /obj/item/fluff/holoconsole/proc/remove_left
|
||||
update_icon()
|
||||
@@ -1011,9 +1011,9 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
if(right_controller)
|
||||
to_chat(user, SPAN_WARNING("\The [src] already has its right controller connected!"))
|
||||
return
|
||||
user.visible_message("<b>[user]</b> slots \the [I] back into to \the [src].", SPAN_NOTICE("You slot \the [I] back into \the [src]."))
|
||||
user.drop_from_inventory(I, src)
|
||||
right_controller = I
|
||||
user.visible_message("<b>[user]</b> slots \the [attacking_item] back into to \the [src].", SPAN_NOTICE("You slot \the [attacking_item] back into \the [src]."))
|
||||
user.drop_from_inventory(attacking_item, src)
|
||||
right_controller = attacking_item
|
||||
right_controller.parent_console = null
|
||||
verbs += /obj/item/fluff/holoconsole/proc/remove_right
|
||||
update_icon()
|
||||
@@ -1123,13 +1123,13 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/fluff/holocase/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/fluff/holoconsole))
|
||||
/obj/item/fluff/holocase/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(istype(attacking_item, /obj/item/fluff/holoconsole))
|
||||
if(contained_console)
|
||||
to_chat(user, SPAN_WARNING("\The [src] already contains a holoconsole!"))
|
||||
return
|
||||
user.drop_from_inventory(I, src)
|
||||
contained_console = I
|
||||
user.drop_from_inventory(attacking_item, src)
|
||||
contained_console = attacking_item
|
||||
user.visible_message("<b>[usr]</b> puts \the [contained_console] into \the [src], zipping it back up.", SPAN_NOTICE("You put \the [contained_console] into \the [src], zipping it back up."))
|
||||
update_icon()
|
||||
return
|
||||
@@ -1547,25 +1547,25 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
icon_state = initial(icon_state)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/fluff/nasira_burner/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/item/fluff/nasira_burner/attackby(obj/item/attacking_item, mob/user, params)
|
||||
..()
|
||||
if(W.isFlameSource())
|
||||
if(attacking_item.isFlameSource())
|
||||
var/text = matchmsg
|
||||
if(istype(W, /obj/item/flame/match))
|
||||
if(istype(attacking_item, /obj/item/flame/match))
|
||||
text = matchmsg
|
||||
else if(istype(W, /obj/item/flame/lighter/zippo))
|
||||
else if(istype(attacking_item, /obj/item/flame/lighter/zippo))
|
||||
text = zippomsg
|
||||
else if(istype(W, /obj/item/flame/lighter))
|
||||
else if(istype(attacking_item, /obj/item/flame/lighter))
|
||||
text = lightermsg
|
||||
else if(W.iswelder())
|
||||
else if(attacking_item.iswelder())
|
||||
text = weldermsg
|
||||
else if(istype(W, /obj/item/device/assembly/igniter))
|
||||
else if(istype(attacking_item, /obj/item/device/assembly/igniter))
|
||||
text = ignitermsg
|
||||
else
|
||||
text = genericmsg
|
||||
text = replacetext(text, "USER", "\the [user]")
|
||||
text = replacetext(text, "NAME", "\the [name]")
|
||||
text = replacetext(text, "FLAME", "\the [W.name]")
|
||||
text = replacetext(text, "FLAME", "\the [attacking_item.name]")
|
||||
light(text)
|
||||
|
||||
/obj/item/fluff/nasira_burner/process()
|
||||
|
||||
@@ -125,11 +125,11 @@
|
||||
user.visible_message("<b>[user]</b> finishes wiping [A].")
|
||||
A.on_rag_wipe(src)
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
|
||||
if(isliving(target))
|
||||
var/mob/living/M = target
|
||||
/obj/item/reagent_containers/glass/rag/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(isliving(target_mob))
|
||||
var/mob/living/M = target_mob
|
||||
if(on_fire)
|
||||
user.visible_message(SPAN_DANGER("\The [user] hits \the [target] with \the [src]!"))
|
||||
user.visible_message(SPAN_DANGER("\The [user] hits \the [target_mob] with \the [src]!"))
|
||||
user.do_attack_animation(src)
|
||||
M.IgniteMob()
|
||||
else if(ishuman(M))
|
||||
@@ -164,18 +164,18 @@
|
||||
if(user.zone_sel.selecting == BP_MOUTH && !(M.wear_mask && M.wear_mask.item_flags & ITEM_FLAG_AIRTIGHT))
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message(
|
||||
SPAN_DANGER("\The [user] smothers [target] with [src]!"),
|
||||
SPAN_WARNING("You smother [target] with [src]!"),
|
||||
SPAN_DANGER("\The [user] smothers [target_mob] with [src]!"),
|
||||
SPAN_WARNING("You smother [target_mob] with [src]!"),
|
||||
"You hear some struggling and muffled cries of surprise."
|
||||
)
|
||||
|
||||
//it's inhaled, so... maybe CHEM_BLOOD doesn't make a whole lot of sense but it's the best we can do for now
|
||||
//^HA HA HA
|
||||
reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BREATHE)
|
||||
reagents.trans_to_mob(target_mob, amount_per_transfer_from_this, CHEM_BREATHE)
|
||||
update_name()
|
||||
update_icon()
|
||||
else
|
||||
wipe_down(target, user)
|
||||
wipe_down(target_mob, user)
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
to_chat(user, SPAN_NOTICE("You overlay \the [src] and \the [initial(supplied.name)], combining the print records."))
|
||||
return 1
|
||||
|
||||
/obj/item/sample/attackby(obj/item/attacking_item, var/mob/user)
|
||||
/obj/item/sample/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(attacking_item.type == src.type)
|
||||
user.unEquip(attacking_item)
|
||||
if(merge_evidence(attacking_item, user))
|
||||
@@ -110,15 +110,15 @@
|
||||
name = "[initial(name)] (\the [H])"
|
||||
icon_state = "fingerprint1"
|
||||
|
||||
/obj/item/sample/print/attack(var/mob/living/M, var/mob/user, var/target_zone)
|
||||
/obj/item/sample/print/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
|
||||
if(!ishuman(M))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
if(!istype(H))
|
||||
return ..()
|
||||
|
||||
if(LAZYLEN(evidence))
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.gloves)
|
||||
to_chat(user, SPAN_WARNING("\The [H] is wearing gloves."))
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
/obj/item/forensics/swab/proc/is_used()
|
||||
return used
|
||||
|
||||
/obj/item/forensics/swab/attack(var/mob/living/M, var/mob/user, var/target_zone)
|
||||
/obj/item/forensics/swab/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
|
||||
if(!ishuman(M))
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
if(!istype(H))
|
||||
return ..()
|
||||
|
||||
if(is_used())
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/sample_type
|
||||
|
||||
if(!H.dna || !H.dna.unique_enzymes)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
var/software = english_list(restricted_software, and_text = ", ")
|
||||
. += SPAN_NOTICE("<b>Exosuit Software Requirement:</b> [software]")
|
||||
|
||||
/obj/item/mecha_equipment/attack() //Generally it's not desired to be able to attack with items
|
||||
/obj/item/mecha_equipment/attack(mob/living/target_mob, mob/living/user, target_zone) //Generally it's not desired to be able to attack with items
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_equipment/proc/get_effective_obj()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
. = ..()
|
||||
doomblade = new /obj/item/melee/cultblade/mounted(src)
|
||||
|
||||
/obj/item/mecha_equipment/doomblade/attack(mob/living/M, mob/living/user)
|
||||
/obj/item/mecha_equipment/doomblade/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!owner)
|
||||
return
|
||||
doomblade.attack(M, user, user.zone_sel.selecting)
|
||||
doomblade.attack(target_mob, user, user.zone_sel.selecting)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if(.)
|
||||
sleeper.ui_interact(user)
|
||||
|
||||
/obj/item/mecha_equipment/sleeper/attack()
|
||||
/obj/item/mecha_equipment/sleeper/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/mecha_equipment/sleeper/attackby(obj/item/attacking_item, mob/user)
|
||||
@@ -302,16 +302,19 @@
|
||||
HA.fullScan = !HA.fullScan
|
||||
to_chat(user, SPAN_NOTICE("You switch to \the [src]'s [HA.fullScan ? "full body" : "basic"] scan mode."))
|
||||
|
||||
/obj/item/device/healthanalyzer/mech/attack(mob/living/M, var/mob/living/heavy_vehicle/user)
|
||||
/obj/item/device/healthanalyzer/mech/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(src)
|
||||
if(!fullScan)
|
||||
for(var/mob/pilot in user.pilots)
|
||||
health_scan_mob(M, pilot, TRUE, TRUE, sound_scan = TRUE)
|
||||
var/mob/living/heavy_vehicle/user_vehicle = user
|
||||
if(istype(user_vehicle))
|
||||
for(var/mob/pilot in user_vehicle.pilots)
|
||||
health_scan_mob(target_mob, pilot, TRUE, TRUE, sound_scan = TRUE)
|
||||
else
|
||||
user.visible_message("<b>[user]</b> starts scanning \the [M] with \the [src].", SPAN_NOTICE("You start scanning \the [M] with \the [src]."))
|
||||
user.visible_message("<b>[user]</b> starts scanning \the [target_mob] with \the [src].",
|
||||
SPAN_NOTICE("You start scanning \the [target_mob] with \the [src]."))
|
||||
if(do_after(user, 7 SECONDS))
|
||||
print_scan(M, user)
|
||||
print_scan(target_mob, user)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/device/healthanalyzer/mech/proc/print_scan(var/mob/M, var/mob/living/user)
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
desc = "Directions for use: Requires two people, one to pull each end."
|
||||
var/cracked = 0
|
||||
|
||||
/obj/item/toy/xmas_cracker/attack(mob/target, mob/user, var/target_zone)
|
||||
if( !cracked && istype(target,/mob/living/carbon/human) && (target.stat == CONSCIOUS) && !target.get_active_hand() )
|
||||
target.visible_message(SPAN_NOTICE("[user] and [target] pop \an [src]! *pop*"),
|
||||
SPAN_NOTICE("You pull \an [src] with [target]! *pop*"),
|
||||
/obj/item/toy/xmas_cracker/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if( !cracked && istype(target_mob,/mob/living/carbon/human) && (target_mob.stat == CONSCIOUS) && !target_mob.get_active_hand() )
|
||||
target_mob.visible_message(SPAN_NOTICE("[user] and [target_mob] pop \an [src]! *pop*"),
|
||||
SPAN_NOTICE("You pull \an [src] with [target_mob]! *pop*"),
|
||||
SPAN_NOTICE("You hear a *pop*."))
|
||||
|
||||
var/obj/item/paper/Joke = new /obj/item/paper(user.loc)
|
||||
@@ -27,14 +27,14 @@
|
||||
"Why is Christmas just like life in NanoTrasen?\n\n<i>You do all the work and the fat guy gets all the credit.</i>",
|
||||
"Why doesn't Santa have any children?\n\n<i>Because he only comes down the chimney.</i>")
|
||||
Joke.set_content_unsafe(title, content)
|
||||
new /obj/item/clothing/head/festive(target.loc)
|
||||
new /obj/item/clothing/head/festive(target_mob.loc)
|
||||
user.update_icon()
|
||||
cracked = 1
|
||||
icon_state = "cracker1"
|
||||
var/obj/item/toy/xmas_cracker/other_half = new /obj/item/toy/xmas_cracker(target)
|
||||
var/obj/item/toy/xmas_cracker/other_half = new /obj/item/toy/xmas_cracker(target_mob)
|
||||
other_half.cracked = 1
|
||||
other_half.icon_state = "cracker2"
|
||||
target.put_in_active_hand(other_half)
|
||||
target_mob.put_in_active_hand(other_half)
|
||||
playsound(user, 'sound/effects/snap.ogg', 50, 1)
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
@@ -310,11 +310,11 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/book/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone)
|
||||
/obj/item/book/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(target_zone == BP_EYES)
|
||||
user.visible_message(SPAN_NOTICE("You open up the book and show it to [M]. "), \
|
||||
SPAN_NOTICE(" [user] opens up a book and shows it to [M]. "))
|
||||
M << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
|
||||
user.visible_message(SPAN_NOTICE("You open up the book and show it to [target_mob]. "), \
|
||||
SPAN_NOTICE(" [user] opens up a book and shows it to [target_mob]. "))
|
||||
target_mob << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //to prevent spam
|
||||
|
||||
|
||||
|
||||
@@ -137,10 +137,13 @@
|
||||
filling.color = COLOR_PINK
|
||||
AddOverlays(filling)
|
||||
|
||||
/obj/item/docility_serum/attack(mob/living/carbon/slime/M as mob, mob/user as mob)
|
||||
if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
|
||||
/obj/item/docility_serum/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/slime/M = target_mob
|
||||
|
||||
if(!istype(M))//If target is not a slime.
|
||||
to_chat(user, SPAN_WARNING("The docility serum only works on slimes!"))
|
||||
return ..()
|
||||
|
||||
if(M.stat)
|
||||
to_chat(user, SPAN_WARNING("The slime is dead!"))
|
||||
return ..()
|
||||
@@ -180,10 +183,13 @@
|
||||
filling.color = COLOR_PALE_PINK
|
||||
AddOverlays(filling)
|
||||
|
||||
/obj/item/advanced_docility_serum/attack(mob/living/carbon/slime/M as mob, mob/user as mob)
|
||||
if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
|
||||
/obj/item/advanced_docility_serum/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/slime/M = target_mob
|
||||
|
||||
if(!istype(M))//If target is not a slime.
|
||||
to_chat(user, SPAN_WARNING("The docility serum only works on slimes!"))
|
||||
return ..()
|
||||
|
||||
if(M.stat)
|
||||
to_chat(user, SPAN_WARNING("The slime is dead!"))
|
||||
return ..()
|
||||
@@ -230,10 +236,13 @@
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/obj/item/slimesteroid/attack(mob/living/carbon/slime/M as mob, mob/user as mob)
|
||||
if(!istype(M, /mob/living/carbon/slime)) //If target is not a slime.
|
||||
/obj/item/slimesteroid/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/slime/M = target_mob
|
||||
|
||||
if(!istype(M)) //If target is not a slime.
|
||||
to_chat(user, SPAN_WARNING("The steroid only works on baby slimes!"))
|
||||
return ..()
|
||||
|
||||
if(M.is_adult) //Can't tame adults
|
||||
to_chat(user, SPAN_WARNING("Only baby slimes can use the steroid!"))
|
||||
return ..()
|
||||
|
||||
@@ -69,6 +69,6 @@
|
||||
sharp = FALSE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/crowbar/robotic/jawsoflife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
user.visible_message("\The [user] [pick("boops", "squeezes", "pokes", "prods", "strokes", "bonks")] \the [M] with \the [src]")
|
||||
/obj/item/crowbar/robotic/jawsoflife/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
user.visible_message("\The [user] [pick("boops", "squeezes", "pokes", "prods", "strokes", "bonks")] \the [target_mob] with \the [src]")
|
||||
return FALSE
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 1, TECH_ENGINEERING = 2)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, MATERIAL_GLASS = 200)
|
||||
|
||||
/obj/item/device/robotanalyzer/attack(mob/living/M, mob/living/user)
|
||||
robotic_analyze_mob(M, user)
|
||||
/obj/item/device/robotanalyzer/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
robotic_analyze_mob(target_mob, user)
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/datum/matter_synth/wood
|
||||
var/datum/matter_synth/plastic
|
||||
|
||||
/obj/item/matter_decompiler/attack(mob/living/M, mob/living/user)
|
||||
/obj/item/matter_decompiler/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/matter_decompiler/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "paper_bin1"
|
||||
item_state = "sheet-metal"
|
||||
|
||||
/obj/item/form_printer/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
/obj/item/form_printer/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/form_printer/afterattack(atom/target, mob/living/user, flag, params)
|
||||
|
||||
@@ -147,20 +147,20 @@
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/gripper/attack(mob/M, mob/user)
|
||||
/obj/item/gripper/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(wrapped) //The force of the wrapped obj gets set to zero during the attack() and afterattack().
|
||||
force_holder = wrapped.force
|
||||
wrapped.force = 0
|
||||
var/resolved = wrapped.attack(M,user)
|
||||
var/resolved = wrapped.attack(target_mob, user)
|
||||
if(QDELETED(wrapped))
|
||||
drop(get_turf(src), user, FALSE)
|
||||
return resolved
|
||||
else // mob interactions
|
||||
switch(user.a_intent)
|
||||
if(I_HELP)
|
||||
user.visible_message("\The [user] [pick("boops", "squeezes", "pokes", "prods", "strokes", "bonks")] \the [M] with \the [src]")
|
||||
user.visible_message("\The [user] [pick("boops", "squeezes", "pokes", "prods", "strokes", "bonks")] \the [target_mob] with \the [src]")
|
||||
if(I_HURT)
|
||||
M.attack_generic(user, user.mob_size, "crushed")//about 16 dmg for a cyborg
|
||||
target_mob.attack_generic(user, user.mob_size, "crushed")//about 16 dmg for a cyborg
|
||||
//Attack generic does a visible message so we dont need one here
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN * 3)
|
||||
playsound(user, 'sound/effects/attackblob.ogg', 60, 1)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return R.get_cell()
|
||||
return null
|
||||
|
||||
/obj/item/inductive_charger/attack(mob/living/M, mob/living/user, target_zone)
|
||||
/obj/item/inductive_charger/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/inductive_charger/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
|
||||
@@ -15,8 +15,11 @@
|
||||
|
||||
//////////////////////////////Capturing////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/device/soulstone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
/obj/item/device/soulstone/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
user.setClickCooldown(20)
|
||||
|
||||
var/mob/living/carbon/human/M = target_mob
|
||||
|
||||
if(!istype(M, /mob/living/carbon/human))//If target is not a human.
|
||||
return ..()
|
||||
if(istype(M, /mob/living/carbon/human/apparition))
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/grab/attack(mob/M, mob/living/user, var/target_zone)
|
||||
/obj/item/grab/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(!affecting)
|
||||
return
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
last_action = world.time
|
||||
reset_kill_state() //using special grab moves will interrupt choking them
|
||||
|
||||
if(M == affecting) //clicking on the victim while grabbing them
|
||||
if(target_mob == affecting) //clicking on the victim while grabbing them
|
||||
if(ishuman(affecting))
|
||||
var/hit_zone = target_zone
|
||||
flick(hud.icon_state, hud)
|
||||
@@ -385,7 +385,7 @@
|
||||
hair_pull(affecting, assailant)
|
||||
|
||||
//clicking on yourself while grabbing them
|
||||
else if(M == assailant && assailant.a_intent == I_GRAB && state >= GRAB_AGGRESSIVE)
|
||||
else if(target_mob == assailant && assailant.a_intent == I_GRAB && state >= GRAB_AGGRESSIVE)
|
||||
devour(affecting, assailant)
|
||||
|
||||
/obj/item/grab/dropped()
|
||||
|
||||
@@ -146,13 +146,13 @@
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("\The [src] does not have a card or item stored in the card slot."))
|
||||
|
||||
/obj/item/modular_computer/attack(mob/living/M, mob/living/user, var/sound_scan)
|
||||
sound_scan = FALSE
|
||||
/obj/item/modular_computer/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/sound_scan = FALSE
|
||||
if(last_scan <= world.time - 20) //Spam limiter.
|
||||
last_scan = world.time
|
||||
sound_scan = TRUE
|
||||
if(scan_mode == SCANNER_MEDICAL)
|
||||
health_scan_mob(M, user, TRUE, sound_scan = sound_scan)
|
||||
health_scan_mob(target_mob, user, TRUE, sound_scan = sound_scan)
|
||||
|
||||
/obj/item/modular_computer/afterattack(atom/A, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
|
||||
@@ -474,9 +474,9 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
|
||||
target.update_eyes()
|
||||
..()
|
||||
|
||||
/obj/item/organ/attack(var/mob/target, var/mob/user)
|
||||
/obj/item/organ/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
|
||||
if(robotic || !istype(target) || !istype(user) || (user != target && user.a_intent == I_HELP))
|
||||
if(robotic || !istype(target_mob) || !istype(user) || (user != target_mob && user.a_intent == I_HELP))
|
||||
return ..()
|
||||
|
||||
if(alert("Do you really want to use this organ as food? It will be useless for anything else afterwards.",,"No.","Yes.") == "No.")
|
||||
@@ -496,7 +496,7 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
|
||||
O.fingerprintslast = fingerprintslast
|
||||
user.put_in_active_hand(O)
|
||||
qdel(src)
|
||||
target.attackby(O, user)
|
||||
target_mob.attackby(O, user)
|
||||
|
||||
//used by stethoscope
|
||||
/obj/item/organ/proc/listen()
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
PH.linked_helm = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/ship/helm/attackby(obj/item/attacking_item, user)
|
||||
/obj/machinery/computer/ship/helm/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(istype(attacking_item, /obj/item/clothing/head/helmet/pilot))
|
||||
if(!connected)
|
||||
to_chat(user, SPAN_WARNING("\The [src] isn't linked to any vessels!"))
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
var/mode = 0 //off or on.
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 120, MATERIAL_GLASS = 80)
|
||||
|
||||
/obj/item/device/hand_labeler/attack()
|
||||
/obj/item/device/hand_labeler/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/device/hand_labeler/afterattack(atom/A, mob/user as mob, proximity)
|
||||
|
||||
@@ -234,7 +234,11 @@
|
||||
/obj/item/paper/attack_ai(var/mob/living/silicon/ai/user)
|
||||
show_content(user)
|
||||
|
||||
/obj/item/paper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone)
|
||||
/obj/item/paper/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
var/mob/living/carbon/M = target_mob
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(target_zone == BP_EYES)
|
||||
user.visible_message(SPAN_NOTICE("You show \the [src] to [M]."), \
|
||||
SPAN_NOTICE("[user] holds up \the [src] and shows it to [M]."))
|
||||
|
||||
@@ -176,21 +176,21 @@
|
||||
. = ..()
|
||||
create_reagents(30)
|
||||
|
||||
/obj/item/pen/reagent/attack(mob/living/M, mob/user)
|
||||
/obj/item/pen/reagent/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
. = ..()
|
||||
if(!ismob(M))
|
||||
if(!ismob(target_mob))
|
||||
return
|
||||
if(M.can_inject(user, 1))
|
||||
if(target_mob.can_inject(user, 1))
|
||||
if(reagents.total_volume)
|
||||
if(M.reagents)
|
||||
if(target_mob.reagents)
|
||||
var/contained_reagents = reagents.get_reagents()
|
||||
var/trans = reagents.trans_to_mob(M, 30, CHEM_BLOOD)
|
||||
to_chat(user, SPAN_ALERT("You stab \the [M] with \the [src], injecting all of its contents.")) // To the stabber.
|
||||
to_chat(M, SPAN_WARNING("You feel a small <b>pinch</b>!")) // To the stabbed.
|
||||
M.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [name] to stab [M.name] ([M.ckey])</span>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
|
||||
admin_inject_log(user, M, src, contained_reagents, reagents.get_temperature(), trans) // Admin log.
|
||||
var/trans = reagents.trans_to_mob(target_mob, 30, CHEM_BLOOD)
|
||||
to_chat(user, SPAN_ALERT("You stab \the [target_mob] with \the [src], injecting all of its contents.")) // To the stabber.
|
||||
to_chat(target_mob, SPAN_WARNING("You feel a small <b>pinch</b>!")) // To the stabbed.
|
||||
target_mob.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [name] to stab [target_mob.name] ([target_mob.ckey])</span>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) Used the [name] to stab [target_mob.name] ([target_mob.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(target_mob))
|
||||
admin_inject_log(user, target_mob, src, contained_reagents, reagents.get_temperature(), trans) // Admin log.
|
||||
|
||||
/*
|
||||
* Sleepy Pens
|
||||
|
||||
@@ -169,7 +169,7 @@ var/global/photo_count = 0
|
||||
size = nsize
|
||||
to_chat(usr, SPAN_NOTICE("Camera will now take [size]x[size] photos."))
|
||||
|
||||
/obj/item/device/camera/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
/obj/item/device/camera/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/device/camera/attack_self(mob/user as mob)
|
||||
|
||||
@@ -100,8 +100,14 @@
|
||||
to_chat(user, SPAN_ALERT("\The [src] already has a paper in it."))
|
||||
. = ..()
|
||||
|
||||
/obj/item/portable_typewriter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
/obj/item/portable_typewriter/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
..()
|
||||
|
||||
var/mob/living/carbon/M = target_mob
|
||||
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
user.visible_message(SPAN_ALERT("\The [src] shatters into metal pieces!"))
|
||||
M.Weaken(2)
|
||||
playsound(loc, 'sound/effects/metalhit.ogg', 50, 1)
|
||||
|
||||
+11
-11
@@ -546,9 +546,9 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
else
|
||||
. += "You have enough charge to produce <b>[get_amount()]</b>."
|
||||
|
||||
/obj/item/stack/cable_coil/attack(mob/living/carbon/M, mob/user)
|
||||
if(ishuman(M) && user.a_intent == I_HELP)
|
||||
var/mob/living/carbon/human/H = M
|
||||
/obj/item/stack/cable_coil/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(ishuman(target_mob) && user.a_intent == I_HELP)
|
||||
var/mob/living/carbon/human/H = target_mob
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open != 0)
|
||||
@@ -558,7 +558,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
else
|
||||
if(!BP_IS_ROBOTIC(affecting))
|
||||
if(affecting.is_bandaged())
|
||||
to_chat(user, SPAN_WARNING("The wounds on [M]'s [affecting.name] have already been closed."))
|
||||
to_chat(user, SPAN_WARNING("The wounds on [H]'s [affecting.name] have already been closed."))
|
||||
return
|
||||
else
|
||||
if(!can_use(10, user))
|
||||
@@ -569,15 +569,15 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
if(W.bandaged)
|
||||
continue
|
||||
if(W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts carefully suturing the open wound on [M]'s [affecting.name]..."), \
|
||||
SPAN_NOTICE("You start carefully suturing the open wound on [M]'s [affecting.name]... This will take a while."))
|
||||
if(!do_mob(user, M, 200))
|
||||
user.visible_message(SPAN_DANGER("[user]'s hand slips and tears open the wound on [M]'s [affecting.name]!"), \
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts carefully suturing the open wound on [target_mob]'s [affecting.name]..."), \
|
||||
SPAN_NOTICE("You start carefully suturing the open wound on [target_mob]'s [affecting.name]... This will take a while."))
|
||||
if(!do_mob(user, target_mob, 200))
|
||||
user.visible_message(SPAN_DANGER("[user]'s hand slips and tears open the wound on [target_mob]'s [affecting.name]!"), \
|
||||
SPAN_DANGER("<font size=2>The wound on your [affecting.name] is torn open!</font>"))
|
||||
M.apply_damage(rand(1,10), DAMAGE_BRUTE)
|
||||
target_mob.apply_damage(rand(1,10), DAMAGE_BRUTE)
|
||||
break
|
||||
user.visible_message(SPAN_NOTICE("\The [user] barely manages to stitch \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You barely manage to stitch \a [W.desc] on [M]'s [affecting.name].") )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] barely manages to stitch \a [W.desc] on [target_mob]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You barely manage to stitch \a [W.desc] on [target_mob]'s [affecting.name].") )
|
||||
W.bandage("cable-stitched")
|
||||
use(10)
|
||||
affecting.add_pain(25)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
if(is_adjacent)
|
||||
. += SPAN_NOTICE("It contains [length(ammo)] rounds.")
|
||||
|
||||
/obj/item/ammo_pile/attack()
|
||||
/obj/item/ammo_pile/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
return
|
||||
|
||||
/obj/item/ammo_pile/afterattack(atom/A, mob/living/user, proximity_flag)
|
||||
|
||||
@@ -302,18 +302,18 @@
|
||||
else
|
||||
Fire(A,user,params) //Otherwise, fire normally.
|
||||
|
||||
/obj/item/gun/attack(atom/A, mob/living/user, def_zone)
|
||||
if (A == user && user.zone_sel.selecting == BP_MOUTH && !mouthshoot)
|
||||
/obj/item/gun/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if (target_mob == user && user.zone_sel.selecting == BP_MOUTH && !mouthshoot)
|
||||
handle_suicide(user)
|
||||
else if(user.a_intent != I_HURT && user.aiming && user.aiming.active) //if aim mode, don't pistol whip
|
||||
if (user.aiming.aiming_at != A)
|
||||
PreFire(A, user)
|
||||
if (user.aiming.aiming_at != target_mob)
|
||||
PreFire(target_mob, user)
|
||||
else
|
||||
Fire(A, user, pointblank=1)
|
||||
Fire(target_mob, user, pointblank=1)
|
||||
else if(user.a_intent == I_HURT) //point blank shooting
|
||||
Fire(A, user, pointblank=1)
|
||||
Fire(target_mob, user, pointblank=1)
|
||||
else if(bayonet)
|
||||
bayonet.attack(A, user, def_zone)
|
||||
bayonet.attack(target_mob, user, target_zone)
|
||||
else
|
||||
return ..() //Pistolwhippin'
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user