mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +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:
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/ammo_casing/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/item/ammo_casing/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(BB)
|
||||
if(initial(BB.name) == "bullet")
|
||||
@@ -95,7 +95,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/ammo_box/attackby(var/obj/item/A as obj, mob/user as mob, var/silent = 0)
|
||||
/obj/item/ammo_box/attackby(var/obj/item/A as obj, mob/user as mob, var/silent = 0, params)
|
||||
var/num_loaded = 0
|
||||
if(istype(A, /obj/item/ammo_box))
|
||||
var/obj/item/ammo_box/AM = A
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
return ..() //Pistolwhippin'
|
||||
|
||||
|
||||
/obj/item/weapon/gun/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
if(istype(A, /obj/item/device/flashlight/seclite))
|
||||
var/obj/item/device/flashlight/seclite/S = A
|
||||
if(can_flashlight)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
return
|
||||
|
||||
/*
|
||||
attackby(obj/item/weapon/W, mob/user)
|
||||
attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
if(!power_supply)
|
||||
user.drop_item()
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
..()
|
||||
if (istype(A, /obj/item/ammo_box/magazine))
|
||||
var/obj/item/ammo_box/magazine/AM = A
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][silenced ? "-suppressed" : ""]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
if(..() && chambered)
|
||||
alarmed = 0
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
user << "<span class='notice'>You remove the magazine from [src].</span>"
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
if(!cover_open && istype(A, mag_type))
|
||||
user << "<span class='notice'>[src]'s cover is closed! You can't insert a new mag!</span>"
|
||||
return
|
||||
@@ -174,11 +174,11 @@
|
||||
else
|
||||
underbarrel.afterattack(target, user, flag, params)
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl/attackby(var/obj/item/A, mob/user)
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl/attackby(var/obj/item/A, mob/user, params)
|
||||
if(select)
|
||||
..()
|
||||
else
|
||||
underbarrel.attackby(A, user)
|
||||
underbarrel.attackby(A, user, params)
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c90gl/attack_self(var/mob/living/user)
|
||||
if(select)
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
user.visible_message("[usr] draws back the string of [src]!","You continue drawing back the string of [src]!")
|
||||
spawn(25) increase_tension(user)
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/launcher/crossbow/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(!in_chamber)
|
||||
if (istype(W,/obj/item/weapon/arrow))
|
||||
user.drop_item()
|
||||
@@ -195,7 +195,7 @@
|
||||
/obj/item/weapon/gun/launcher/crossbow/french
|
||||
name = "french powered crossbow"
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow/french/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/launcher/crossbow/french/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(!in_chamber)
|
||||
if (istype(W,/obj/item/weapon/reagent_containers/food/snacks/baguette))
|
||||
user.drop_item()
|
||||
@@ -255,7 +255,7 @@
|
||||
if(4) usr << "It has a steel backbone, plastic lath and a cell mount installed."
|
||||
if(5) usr << "It has a steel cable loosely strung across the lath."
|
||||
|
||||
/obj/item/weapon/crossbowframe/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/crossbowframe/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W,/obj/item/stack/rods))
|
||||
if(buildstate == 0)
|
||||
var/obj/item/stack/rods/R = W
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher"
|
||||
w_class = 3
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/grenadelauncher/attackby(var/obj/item/A, mob/user)
|
||||
/obj/item/weapon/gun/projectile/revolver/grenadelauncher/attackby(var/obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
|
||||
chamber_round()
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
else
|
||||
usr << "There's no tank in [src]."
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(!tank && istype(W,/obj/item/weapon/tank))
|
||||
user.drop_item()
|
||||
tank = W
|
||||
@@ -154,7 +154,7 @@
|
||||
if(4) usr << "It has an outer chassis welded in place."
|
||||
if(5) usr << "It has a transfer valve installed."
|
||||
|
||||
/obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W,/obj/item/pipe))
|
||||
if(buildstate == 0)
|
||||
user.drop_item()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/obj/item/weapon/gun/projectile/revolver/process_chambered()
|
||||
return ..(0, 1)
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/projectile/revolver/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
var/num_loaded = 0
|
||||
if(istype(A, /obj/item/ammo_box))
|
||||
var/obj/item/ammo_box/AM = A
|
||||
@@ -115,7 +115,7 @@
|
||||
M << "Your gun is now skinned as [choice]. Say hello to your new friend."
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/detective/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/projectile/revolver/detective/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/weapon/screwdriver) || istype(A, /obj/item/weapon/conversion_kit))
|
||||
if(magazine.caliber == "38")
|
||||
@@ -181,7 +181,7 @@
|
||||
chamber_round()
|
||||
spun = 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
..()
|
||||
user.visible_message("<span class='warning'>[user] spins the chamber of the revolver.</span>", "<span class='warning'>You spin the revolver's chamber.</span>")
|
||||
if(get_ammo() > 0)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if (!(usr in view(2)) && usr!=src.loc) return
|
||||
usr << "\blue [rockets.len] / [max_rockets] rockets."
|
||||
|
||||
/obj/item/weapon/gun/rocketlauncher/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/rocketlauncher/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/ammo_casing/rocket))
|
||||
if(rockets.len < max_rockets)
|
||||
user.drop_item()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/pumped = 0
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/shot"
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/projectile/shotgun/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
var/num_loaded = 0
|
||||
if(istype(A, /obj/item/ammo_box))
|
||||
var/obj/item/ammo_box/AM = A
|
||||
@@ -85,7 +85,7 @@
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/shotriot"
|
||||
sawn_desc = "Come with me if you want to live."
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/riot/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/projectile/shotgun/riot/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
sawoff(user)
|
||||
@@ -103,7 +103,7 @@
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/dualshot"
|
||||
sawn_desc = "Omar's coming!"
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
|
||||
chamber_round()
|
||||
@@ -156,7 +156,7 @@
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/improvised"
|
||||
sawn_desc = "I'm just here for the gasoline."
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = A
|
||||
|
||||
Reference in New Issue
Block a user