mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 22:54:32 +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:
@@ -76,7 +76,7 @@
|
||||
completed = /obj/machinery/computer3/laptop
|
||||
max_components = 3
|
||||
|
||||
/obj/structure/computer3frame/attackby(obj/item/P as obj, mob/user as mob)
|
||||
/obj/structure/computer3frame/attackby(obj/item/P as obj, mob/user as mob, params)
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
// If the computer is attacked by an item it will reference this to decide which peripheral(s) are affected.
|
||||
var/list/attackby_types = list()
|
||||
proc/allow_attackby(var/obj/item/I as obj,var/mob/user as mob)
|
||||
proc/allow_attackby(var/obj/item/I as obj,var/mob/user as mob, params)
|
||||
|
||||
for(var/typekey in attackby_types)
|
||||
if(istype(I,typekey))
|
||||
@@ -60,7 +60,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
attackby(obj/I as obj,mob/user as mob)
|
||||
attackby(obj/I as obj,mob/user as mob, params)
|
||||
if(computer && !computer.stat)
|
||||
if(istype(I, /obj/item/device/aicard))
|
||||
I:transfer_ai("AIFIXER","AICARD",src,user)
|
||||
@@ -94,7 +94,7 @@
|
||||
usr << "You are unable to insert \the card, as the reader slot is occupied"
|
||||
return 0
|
||||
|
||||
attackby(var/obj/item/I as obj, var/mob/user as mob)
|
||||
attackby(var/obj/item/I as obj, var/mob/user as mob, params)
|
||||
if(istype(I,/obj/item/weapon/card))
|
||||
insert(I)
|
||||
return
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
if(os)
|
||||
os.error = BUSTED_ASS_COMPUTER
|
||||
|
||||
attackby(I as obj, mob/user as mob)
|
||||
attackby(I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && allow_disassemble)
|
||||
disassemble(user)
|
||||
return
|
||||
@@ -341,7 +341,7 @@
|
||||
P = input(user,"Which component?") as null|anything in p_list
|
||||
|
||||
if(P)
|
||||
P.attackby(I,user)
|
||||
P.attackby(I,user, params)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
return
|
||||
|
||||
|
||||
attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob)
|
||||
attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob, params)
|
||||
if (user.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
@@ -60,7 +60,7 @@
|
||||
var/mob/living/silicon/robot/current = null
|
||||
|
||||
|
||||
attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob)
|
||||
attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob, params)
|
||||
if(istype(module, /obj/item/weapon/aiModule))
|
||||
module.install(src)
|
||||
else
|
||||
|
||||
@@ -22,7 +22,7 @@ var/prison_shuttle_timeleft = 0
|
||||
var/prison_break = 0
|
||||
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
attackby(I as obj, user as mob, params)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ var/prison_shuttle_timeleft = 0
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
attackby(I as obj, user as mob, params)
|
||||
if(istype(I, /obj/item/tool/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/list/authorized = list( )
|
||||
|
||||
|
||||
attackby(var/obj/item/card/W as obj, var/mob/user as mob)
|
||||
attackby(var/obj/item/card/W as obj, var/mob/user as mob, params)
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
if ((!( istype(W, /obj/item/card) ) || !( ticker ) || emergency_shuttle.location != 1 || !( user ))) return
|
||||
if (istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
|
||||
|
||||
@@ -159,7 +159,7 @@ var/specops_shuttle_timeleft = 0
|
||||
if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0
|
||||
else return 1
|
||||
|
||||
/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob)
|
||||
/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob, params)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer3/specops_shuttle/attack_ai(var/mob/user as mob)
|
||||
@@ -168,7 +168,7 @@ var/specops_shuttle_timeleft = 0
|
||||
/obj/machinery/computer3/specops_shuttle/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob)
|
||||
/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob, params)
|
||||
if(istype(I,/obj/item/card/emag))
|
||||
user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
|
||||
else
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/computer3/syndicate_station/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/machinery/computer3/syndicate_station/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer3/syndicate_station/attack_ai(mob/user as mob)
|
||||
|
||||
@@ -172,7 +172,7 @@ var/syndicate_elite_shuttle_timeleft = 0
|
||||
if(syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return 0
|
||||
else return 1
|
||||
|
||||
/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob)
|
||||
/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob, params)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer3/syndicate_elite_shuttle/attack_ai(var/mob/user as mob)
|
||||
@@ -181,7 +181,7 @@ var/syndicate_elite_shuttle_timeleft = 0
|
||||
/obj/machinery/computer3/syndicate_elite_shuttle/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob)
|
||||
/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob, params)
|
||||
if(istype(I,/obj/item/card/emag))
|
||||
user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
|
||||
else
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(vendmode == 1)
|
||||
if(istype(W, /obj/item/weapon/card))
|
||||
var/obj/item/weapon/card/I = W
|
||||
|
||||
@@ -85,7 +85,7 @@ Programs are a file that can be executed
|
||||
*/
|
||||
|
||||
|
||||
/datum/file/program/proc/attackby(O as obj, user as mob)
|
||||
/datum/file/program/proc/attackby(O as obj, user as mob, params)
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
inserted = null
|
||||
|
||||
|
||||
attackby(obj/O as obj, mob/user as mob)
|
||||
attackby(obj/O as obj, mob/user as mob, params)
|
||||
if(inserted && istype(O,/obj/item/weapon/pen))
|
||||
usr << "You use [O] to carefully pry [inserted] out of [src]."
|
||||
eject_disk(forced = 1)
|
||||
|
||||
Reference in New Issue
Block a user