mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Adds a "params" parameter to attackby(), so it keeps track of pixel_x and pixel_y among other things
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/holder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/holder/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
for(var/mob/M in src.contents)
|
||||
M.attackby(W,user)
|
||||
M.attackby(W,user, params)
|
||||
|
||||
/obj/item/weapon/holder/proc/show_message(var/message, var/m_type)
|
||||
for(var/mob/living/M in contents)
|
||||
|
||||
@@ -55,7 +55,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
if (sterile)
|
||||
user << "<span class='userdanger'>It looks like the proboscis has been removed.</span>"
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attackby(var/obj/item/O,var/mob/m)
|
||||
/obj/item/clothing/mask/facehugger/attackby(var/obj/item/O,var/mob/m, params)
|
||||
if(O.force)
|
||||
Die()
|
||||
return
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/mob/living/silicon/robot = null//Appears unused.
|
||||
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O,/obj/item/brain) && !brainmob) //Time to stick a brain in it --NEO
|
||||
if(!O:brainmob)
|
||||
user << "\red You aren't sure where this brain came from, but you're pretty sure it's a useless brain."
|
||||
|
||||
@@ -556,7 +556,7 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/attackby(obj/item/W, mob/user)
|
||||
/mob/living/carbon/slime/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W,/obj/item/stack/sheet/mineral/plasma)) //Lets you feed slimes plasma.
|
||||
if (user in Friends)
|
||||
++Friends[user]
|
||||
@@ -666,7 +666,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
var/Uses = 1 // uses before it goes inert
|
||||
var/enhanced = 0 //has it been enhanced before?
|
||||
|
||||
attackby(obj/item/O as obj, mob/user as mob)
|
||||
attackby(obj/item/O as obj, mob/user as mob, params)
|
||||
if(istype(O, /obj/item/weapon/slimesteroid2))
|
||||
if(enhanced == 1)
|
||||
user << "<span class='warning'> This extract has already been enhanced!</span>"
|
||||
@@ -1141,7 +1141,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
if (environment.toxins > MOLES_PLASMA_VISIBLE)//plasma exposure causes the egg to hatch
|
||||
src.Hatch()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype( W, /obj/item/toy/crayon ))
|
||||
return
|
||||
else
|
||||
|
||||
@@ -946,7 +946,7 @@ var/list/ai_list = list()
|
||||
camera_light_on = world.timeofday + 1 * 20 // Update the light every 2 seconds.
|
||||
|
||||
|
||||
/mob/living/silicon/ai/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/mob/living/silicon/ai/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(anchored)
|
||||
user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...")
|
||||
|
||||
@@ -148,7 +148,7 @@ They can only use one tool at a time, they can't choose modules, and they have 1
|
||||
real_name = changed_name
|
||||
name = real_name
|
||||
|
||||
/mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if (istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
|
||||
return
|
||||
|
||||
|
||||
@@ -426,7 +426,7 @@
|
||||
canmove = !resting
|
||||
|
||||
//Overriding this will stop a number of headaches down the track.
|
||||
/mob/living/silicon/pai/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/mob/living/silicon/pai/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(W.force)
|
||||
visible_message("<span class='danger'>[user.name] attacks [src] with [W]!</span>")
|
||||
src.adjustBruteLoss(W.force)
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
S.show_message(rendered2, 2)
|
||||
|
||||
//Drones cannot be upgraded with borg modules so we need to catch some items before they get used in ..().
|
||||
/mob/living/silicon/robot/drone/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/mob/living/silicon/robot/drone/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
|
||||
if(istype(W, /obj/item/borg/upgrade/))
|
||||
user << "\red The maintenance drone chassis not compatible with \the [W]."
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
wrapped.loc = user
|
||||
|
||||
//Pass the attack on to the target. This might delete/relocate wrapped.
|
||||
target.attackby(wrapped,user)
|
||||
target.attackby(wrapped,user, params)
|
||||
|
||||
//If wrapped did neither get deleted nor put into target, put it back into the gripper.
|
||||
if(wrapped && user && (wrapped.loc == user))
|
||||
|
||||
@@ -642,7 +642,7 @@
|
||||
return !cleared
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if (istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
|
||||
return
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
/mob/living/simple_animal/construct/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/construct/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(O.force)
|
||||
var/damage = O.force
|
||||
if (O.damtype == STAMINA)
|
||||
@@ -151,7 +151,7 @@
|
||||
status_flags = 0
|
||||
construct_spells = list(/obj/effect/proc_holder/spell/wizard/aoe_turf/conjure/lesserforcewall)
|
||||
|
||||
/mob/living/simple_animal/construct/armoured/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/construct/armoured/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(O.force)
|
||||
if(O.force >= 11)
|
||||
var/damage = O.force
|
||||
@@ -280,7 +280,7 @@
|
||||
var/energy = 0
|
||||
var/max_energy = 1000
|
||||
|
||||
/mob/living/simple_animal/construct/behemoth/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/construct/behemoth/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(O.force)
|
||||
if(O.force >= 11)
|
||||
var/damage = O.force
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
onclose(user, "mob[real_name]")
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(inventory_head && inventory_back)
|
||||
//helmet and armor = 100% protection
|
||||
if( istype(inventory_head,/obj/item/clothing/head/helmet) && istype(inventory_back,/obj/item/clothing/suit/armor) )
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
response_harm = "stomps"
|
||||
|
||||
//LOOK AT THIS - ..()??
|
||||
/*/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/*/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/weapon/wirecutters))
|
||||
if(prob(50))
|
||||
user << "\red \b This kills the crab."
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(prob(10))
|
||||
say("Nom")
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='notice'>[user] milks [src] using \the [O].</span>")
|
||||
@@ -113,7 +113,7 @@
|
||||
udder.my_atom = src
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/cow/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/cow/attackby(var/obj/item/O as obj, var/mob/user as mob, params, params)
|
||||
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
user.visible_message("<span class='notice'>[user] milks [src] using \the [O].</span>")
|
||||
var/obj/item/weapon/reagent_containers/glass/G = O
|
||||
@@ -230,7 +230,7 @@ var/global/chicken_count = 0
|
||||
..()
|
||||
chicken_count -= 1
|
||||
|
||||
/mob/living/simple_animal/chicken/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/chicken/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/wheat)) //feedin' dem chickens
|
||||
if(!stat && eggsleft < 8)
|
||||
user.visible_message("\blue [user] feeds [O] to [name]! It clucks happily.","\blue You feed [O] to [name]! It clucks happily.")
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
speak_emote = list("beeps","clicks","chirps")
|
||||
can_hide = 1
|
||||
|
||||
/mob/living/simple_animal/spiderbot/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/spiderbot/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
|
||||
if(istype(O, /obj/item/device/mmi) || istype(O, /obj/item/device/mmi/posibrain))
|
||||
var/obj/item/device/mmi/B = O
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/hostile/bear/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(stance != HOSTILE_STANCE_ATTACK && stance != HOSTILE_STANCE_ATTACKING)
|
||||
stance = HOSTILE_STANCE_ALERT
|
||||
stance_step = 6
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
src.visible_message("<span class='notice'>The [src.name] was bruised!</span>")
|
||||
bruised = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/mob/living/simple_animal/hostile/mushroom/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom))
|
||||
if(stat == DEAD && !recovery_cooldown)
|
||||
Recover()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
attacktext = "slashes"
|
||||
status_flags = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(O.force)
|
||||
if(prob(80))
|
||||
var/damage = O.force
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
return
|
||||
|
||||
//Mobs with objects
|
||||
/mob/living/simple_animal/parrot/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/parrot/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
..()
|
||||
if(!stat && !client && !istype(O, /obj/item/stack/medical))
|
||||
if(O.force)
|
||||
|
||||
@@ -51,7 +51,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
|
||||
del(src)
|
||||
|
||||
|
||||
/mob/living/simple_animal/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/weapon/scalpel))
|
||||
user << "<span class='notice'>You try to neuter the tribble, but it's moving too much and you fail!</span>"
|
||||
else if(istype(O, /obj/item/weapon/cautery))
|
||||
@@ -190,7 +190,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/tribble_cage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/tribble_cage/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
src.gib()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/vox/armalis/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/vox/armalis/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(O.force)
|
||||
if(O.force >= 25)
|
||||
var/damage = O.force
|
||||
@@ -110,7 +110,7 @@
|
||||
set name = "Shriek"
|
||||
set desc = "Give voice to a psychic shriek."
|
||||
|
||||
/mob/living/simple_animal/vox/armalis/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/mob/living/simple_animal/vox/armalis/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O,/obj/item/vox/armalis_armour))
|
||||
user.drop_item()
|
||||
armour = O
|
||||
|
||||
Reference in New Issue
Block a user