attackby() now has an argument containing the parameters of the click that called it. Items placed on tables now center their icon where the user clicked. this is NOT true for racks, since racks look organised in their sprite.

Items reset their pixel_x and pixel_y values on pickup.
This commit is contained in:
Remie Richards
2015-02-19 13:02:43 +00:00
parent 0cd74ff882
commit 5fc7af7fbf
330 changed files with 513 additions and 504 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/update_icon()
return null
/obj/machinery/atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(can_unwrench && istype(W, /obj/item/weapon/wrench))
var/turf/T = src.loc
if (level==1 && isturf(T) && T.intact)
@@ -167,7 +167,7 @@ Passive gate is similar to the regular pump except:
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (on)
@@ -172,7 +172,7 @@ Thus, the two variables affect pump operation are set in New():
..()
update_icon()
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
@@ -171,7 +171,7 @@ Thus, the two variables affect pump operation are set in New():
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
@@ -34,7 +34,7 @@
connected_device.disconnect()
..()
/obj/machinery/atmospherics/unary/portables_connector/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/atmospherics/unary/portables_connector/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
if(connected_device)
user << "<span class='danger'>You cannot unwrench this [src], dettach [connected_device] first.</span>"
@@ -265,7 +265,7 @@
update_icon()
return
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user)
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weapon/wrench)&& !(stat & NOPOWER) && on)
user << "<span class='danger'>You cannot unwrench this [src], turn it off first.</span>"
return 1
@@ -237,7 +237,7 @@
stat |= NOPOWER
update_icon_nopipes()
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
+1 -1
View File
@@ -35,7 +35,7 @@
parent = new /datum/pipeline()
parent.build_pipeline(src)
/obj/machinery/atmospherics/pipe/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/atmospherics/pipe/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/device/analyzer))
atmosanalyzer_scan(parent.air, user)
return
+1 -1
View File
@@ -113,7 +113,7 @@
if(A.Adjacent(src)) // see adjacent.dm
if(W)
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
var/resolved = A.attackby(W,src)
var/resolved = A.attackby(W,src,params)
if(!resolved && A && W)
W.afterattack(A,src,1,params) // 1: clicking something Adjacent
else
+2 -2
View File
@@ -69,7 +69,7 @@
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
if(A == loc || (A in loc) || (A in contents))
// No adjacency checks
var/resolved = A.attackby(W,src)
var/resolved = A.attackby(W,src, params)
if(!resolved && A && W)
W.afterattack(A,src,1,params)
return
@@ -80,7 +80,7 @@
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
if(isturf(A) || isturf(A.loc))
if(A.Adjacent(src)) // see adjacent.dm
var/resolved = A.attackby(W, src)
var/resolved = A.attackby(W, src, params)
if(!resolved && A && W)
W.afterattack(A, src, 1, params)
return
+2 -2
View File
@@ -201,7 +201,7 @@
/obj/screen/storage
name = "storage"
/obj/screen/storage/Click()
/obj/screen/storage/Click(location, control, params)
if(world.time <= usr.next_move)
return 1
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened)
@@ -211,7 +211,7 @@
if(master)
var/obj/item/I = usr.get_active_hand()
if(I)
master.attackby(I, usr)
master.attackby(I, usr, params)
return 1
/obj/screen/throw_catch
+4 -3
View File
@@ -4,14 +4,15 @@
return
// No comment
/atom/proc/attackby(obj/item/W, mob/user)
/atom/proc/attackby(obj/item/W, mob/user, params)
return
/atom/movable/attackby(obj/item/W, mob/living/user)
/atom/movable/attackby(obj/item/W, mob/living/user, params)
user.do_attack_animation(src)
if(W && !(W.flags&NOBLUDGEON))
visible_message("<span class='danger'>[user] has hit [src] with [W].</span>")
/mob/living/attackby(obj/item/I, mob/user)
/mob/living/attackby(obj/item/I, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
I.attack(src, user)
+2 -2
View File
@@ -92,7 +92,7 @@ var/const/tk_maxrange = 15
if(focus)
focus.attack_self_tk(user)
/obj/item/tk_grab/afterattack(atom/target, mob/living/carbon/user, proximity)//TODO: go over this
/obj/item/tk_grab/afterattack(atom/target, mob/living/carbon/user, proximity, params)//TODO: go over this
if(!target || !user) return
if(last_throw+3 > world.time) return
if(!host || host != user)
@@ -118,7 +118,7 @@ var/const/tk_maxrange = 15
if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
var/obj/item/I = focus
var/resolved = target.attackby(I, user, user:get_organ_target())
var/resolved = target.attackby(I, user, params)
if(!resolved && target && I)
I.afterattack(target,user,1) // for splashing with beakers
+1 -1
View File
@@ -4,7 +4,7 @@
anchored = 1
density = 1
/obj/structure/signpost/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/signpost/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
return attack_hand(user)
/obj/structure/signpost/attack_hand(mob/user as mob)
+2 -2
View File
@@ -213,9 +213,9 @@
verbs.Cut()
return
/atom/movable/overlay/attackby(a, b)
/atom/movable/overlay/attackby(a, b, c)
if (src.master)
return src.master.attackby(a, b)
return src.master.attackby(a, b, c)
return
/atom/movable/overlay/attack_paw(a, b, c)
+2 -2
View File
@@ -433,7 +433,7 @@
open_machine()
return
/obj/machinery/dna_scannernew/attackby(var/obj/item/I, mob/user)
/obj/machinery/dna_scannernew/attackby(var/obj/item/I, mob/user, params)
if(!occupant && default_deconstruction_screwdriver(user, icon_state, icon_state, I))//sent icon_state is irrelevant...
update_icon()//..since we're updating the icon here, since the scanner can be unpowered when opened/closed
@@ -495,7 +495,7 @@
idle_power_usage = 10
active_power_usage = 400
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I as obj, mob/user as mob, params)
if (istype(I, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES
if (!src.diskette)
user.drop_item()
+1 -1
View File
@@ -155,7 +155,7 @@
L.blob_act()
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/living/user)
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
+2 -2
View File
@@ -153,7 +153,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
/obj/effect/rune/attackby(I as obj, user as mob)
/obj/effect/rune/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/tome) && iscultist(user))
user << "<span class='notice'>You retrace your steps, carefully undoing the lines of the rune.</span>"
qdel(src)
@@ -662,7 +662,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
user << "The book seems full of illegible scribbles. Is this a joke?"
return
/obj/item/weapon/tome/attackby(obj/item/weapon/tome/T as obj, mob/living/user as mob)
/obj/item/weapon/tome/attackby(obj/item/weapon/tome/T as obj, mob/living/user as mob, params)
if(istype(T, /obj/item/weapon/tome)) // sanity check to prevent a runtime error
switch(alert("Copy the runes from your tome?",,"Copy", "Cancel"))
if("cancel")
+1 -1
View File
@@ -156,7 +156,7 @@
/obj/effect/meteor/ex_act()
return
/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/pickaxe))
qdel(src)
return
+1 -1
View File
@@ -41,7 +41,7 @@ var/bomb_set
src.attack_hand(M)
return
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/I as obj, mob/user as mob)
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/I as obj, mob/user as mob, params)
if (istype(I, /obj/item/weapon/disk/nuclear))
usr.drop_item()
I.loc = src
+1 -1
View File
@@ -53,7 +53,7 @@
if(spawn_amt_left <= 0)
qdel(src)
/obj/effect/rend/attackby(obj/item/I as obj, mob/user as mob)
/obj/effect/rend/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/nullrod))
user.visible_message("<span class='danger'>[usr] seals \the [src] with \the [I].</span>")
qdel(src)
+1 -1
View File
@@ -92,7 +92,7 @@
icon_state = "construct"
desc = "A wicked machine used by those skilled in magical arts. It is inactive"
/obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob)
/obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/device/soulstone))
var/obj/item/device/soulstone/SS = O
SS.transfer_soul("CONSTRUCT",src,user)
+1 -1
View File
@@ -14,7 +14,7 @@
var/list/active_challenges = list()
var/mob/living/carbon/human/owner
/obj/item/weapon/spellbook/attackby(obj/item/O as obj, mob/user as mob)
/obj/item/weapon/spellbook/attackby(obj/item/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/weapon/antag_spawner/contract))
var/obj/item/weapon/antag_spawner/contract/contract = O
if(contract.used)
+2 -2
View File
@@ -34,7 +34,7 @@
min_temperature = T0C - (170 + (T*15))
current_heat_capacity = 1000 * ((H - 1) ** 2)
/obj/machinery/atmospherics/unary/cold_sink/freezer/attackby(obj/item/I, mob/user)
/obj/machinery/atmospherics/unary/cold_sink/freezer/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "freezer-o", "freezer", I))
on = 0
update_icon()
@@ -159,7 +159,7 @@
max_temperature = T20C + (140 * T)
current_heat_capacity = 1000 * ((H - 1) ** 2)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attackby(obj/item/I, mob/user)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "heater-o", "heater", I))
on = 0
update_icon()
+1 -1
View File
@@ -40,7 +40,7 @@
src.colorlist += D
/obj/machinery/pdapainter/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/pdapainter/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/device/pda))
if(storedpda)
user << "There is already a PDA inside."
+1 -1
View File
@@ -69,7 +69,7 @@
qdel(src)
return
/obj/machinery/sleeper/attackby(obj/item/I, mob/user)
/obj/machinery/sleeper/attackby(obj/item/I, mob/user, params)
if(!state_open && !occupant)
if(default_deconstruction_screwdriver(user, "sleeper-o", "sleeper", I))
return
+1 -1
View File
@@ -28,7 +28,7 @@
src.uses = uses
src.power_change()
/obj/machinery/ai_slipper/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/ai_slipper/attackby(obj/item/weapon/W, mob/user, params)
if(stat & (NOPOWER|BROKEN))
return
if (istype(user, /mob/living/silicon))
+4 -4
View File
@@ -767,7 +767,7 @@ table tr:first-child th:first-child { border: none;}
post_alert(new_area_danger_level)
update_icon()
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob, params)
switch(buildstage)
if(2)
if(istype(W, /obj/item/weapon/wirecutters) && panel_open && (wires.wires_status == 27 || wires.wires_status == 31)) //this checks for all wires to be cut, except the syphon wire which is optional.
@@ -886,7 +886,7 @@ Code shamelessly copied from apc_frame
icon_state = "alarm_bitem"
flags = CONDUCT
/obj/item/alarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/alarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
qdel(src)
@@ -1000,7 +1000,7 @@ FIRE ALARM
if(prob(50/severity)) alarm()
..()
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob, params)
src.add_fingerprint(user)
if (istype(W, /obj/item/weapon/screwdriver) && buildstage == 2)
@@ -1234,7 +1234,7 @@ Code shamelessly copied from apc_frame
flags = CONDUCT
/obj/item/firealarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/firealarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
qdel(src)
+1 -1
View File
@@ -227,7 +227,7 @@ update_flag
return
return
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(!istype(W, /obj/item/weapon/wrench) && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
visible_message("<span class='danger'>[user] hits \the [src] with a [W]!</span>")
investigate_log("was smacked with \a [W] by [key_name(user)]", "atmos")
+1 -1
View File
@@ -85,7 +85,7 @@
user << status()
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
@@ -62,7 +62,7 @@
/obj/machinery/portable_atmospherics/portableConnectorReturnAir()
return air_contents
/obj/machinery/portable_atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/portable_atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if ((istype(W, /obj/item/weapon/tank) && !( src.destroyed )))
if (src.holding)
return
+1 -1
View File
@@ -89,7 +89,7 @@
return
/obj/machinery/autolathe/attackby(obj/item/O, mob/user)
/obj/machinery/autolathe/attackby(obj/item/O, mob/user, params)
if (busy)
user << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
return 1
+1 -1
View File
@@ -238,7 +238,7 @@
return 1 //Successful completion. Used to prevent child process() continuing if this one is ended early.
/obj/machinery/bot/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/bot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/screwdriver))
if(!locked)
open = !open
+2 -2
View File
@@ -115,7 +115,7 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
beacon_freq = freq
updateUsrDialog()
/obj/machinery/bot/cleanbot/attackby(obj/item/weapon/W, mob/user as mob)
/obj/machinery/bot/cleanbot/attackby(obj/item/weapon/W, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(allowed(user) && !open && !emagged)
locked = !locked
@@ -256,7 +256,7 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
qdel(src)
return
/obj/item/weapon/bucket_sensor/attackby(var/obj/item/W, mob/user as mob)
/obj/item/weapon/bucket_sensor/attackby(var/obj/item/W, mob/user as mob, params)
..()
if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm))
user.drop_item()
+2 -2
View File
@@ -169,7 +169,7 @@ Auto Patrol[]"},
declare_arrests = !declare_arrests
updateUsrDialog()
/obj/machinery/bot/ed209/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/bot/ed209/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (allowed(user) && !open && !emagged)
locked = !locked
@@ -541,7 +541,7 @@ Auto Patrol[]"},
/obj/item/weapon/ed209_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/ed209_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/pen))
+4 -4
View File
@@ -132,7 +132,7 @@
return
/obj/machinery/bot/floorbot/attackby(var/obj/item/W , mob/user as mob)
/obj/machinery/bot/floorbot/attackby(var/obj/item/W , mob/user as mob, params)
if(istype(W, /obj/item/stack/tile/plasteel))
var/obj/item/stack/tile/plasteel/T = W
if(amount >= 50)
@@ -474,7 +474,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
return
/obj/item/weapon/storage/toolbox/mechanical/attackby(var/obj/item/stack/tile/plasteel/T, mob/user as mob)
/obj/item/weapon/storage/toolbox/mechanical/attackby(var/obj/item/stack/tile/plasteel/T, mob/user as mob, params)
if(!istype(T, /obj/item/stack/tile/plasteel))
..()
return
@@ -493,7 +493,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
user << "<span class='alert'>You need 10 floor tiles to start building a floorbot.</span>"
return
/obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob)
/obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob, params)
..()
if(isprox(W))
qdel(W)
@@ -513,7 +513,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
created_name = t
/obj/item/weapon/toolbox_tiles_sensor/attackby(var/obj/item/W, mob/user as mob)
/obj/item/weapon/toolbox_tiles_sensor/attackby(var/obj/item/W, mob/user as mob, params)
..()
if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm))
qdel(W)
+3 -3
View File
@@ -209,7 +209,7 @@
updateUsrDialog()
return
/obj/machinery/bot/medbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/bot/medbot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (allowed(user) && !open && !emagged)
locked = !locked
@@ -535,7 +535,7 @@
* Medbot Assembly -- Can be made out of all three medkits.
*/
/obj/item/weapon/storage/firstaid/attackby(var/obj/item/robot_parts/S, mob/user as mob)
/obj/item/weapon/storage/firstaid/attackby(var/obj/item/robot_parts/S, mob/user as mob, params)
if ((!istype(S, /obj/item/robot_parts/l_arm)) && (!istype(S, /obj/item/robot_parts/r_arm)))
..()
@@ -563,7 +563,7 @@
qdel(src)
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
+1 -1
View File
@@ -87,7 +87,7 @@ obj/machinery/bot/mulebot/bot_reset()
// screwdriver: open/close hatch
// cell: insert it
// other: chance to knock rider off bot
/obj/machinery/bot/mulebot/attackby(var/obj/item/I, var/mob/user)
/obj/machinery/bot/mulebot/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda))
if(toggle_lock(user))
user << "<span class='notice'>Controls [(locked ? "locked" : "unlocked")].</span>"
+3 -3
View File
@@ -155,7 +155,7 @@ Auto Patrol: []"},
updateUsrDialog()
/obj/machinery/bot/secbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/bot/secbot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(allowed(user) && !open && !emagged)
locked = !locked
@@ -386,7 +386,7 @@ Auto Patrol: []"},
//Secbot Construction
/obj/item/clothing/head/helmet/attackby(var/obj/item/device/assembly/signaler/S, mob/user as mob)
/obj/item/clothing/head/helmet/attackby(var/obj/item/device/assembly/signaler/S, mob/user as mob, params)
..()
if(!issignaler(S))
..()
@@ -405,7 +405,7 @@ Auto Patrol: []"},
else
return
/obj/item/weapon/secbot_assembly/attackby(obj/item/I, mob/user)
/obj/item/weapon/secbot_assembly/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/weapon/weldingtool))
if(!build_step)
+1 -1
View File
@@ -124,7 +124,7 @@
add_hiddenprint(user)
deactivate(user,0)
/obj/machinery/camera/attackby(W as obj, mob/living/user as mob)
/obj/machinery/camera/attackby(W as obj, mob/living/user as mob, params)
var/msg = "<span class='notice'>You attach [W] into the assembly inner circuits.</span>"
var/msg2 = "<span class='notice'>The camera already has that upgrade!</span>"
@@ -22,7 +22,7 @@
4 = Screwdriver panel closed and is fully built (you cannot attach upgrades)
*/
/obj/item/weapon/camera_assembly/attackby(obj/item/W as obj, mob/living/user as mob)
/obj/item/weapon/camera_assembly/attackby(obj/item/W as obj, mob/living/user as mob, params)
switch(state)
+1 -1
View File
@@ -32,7 +32,7 @@
if(charging)
user << "Current charge: [round(charging.percent(), 1)]%"
/obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user, params)
if(stat & BROKEN)
return
+1 -1
View File
@@ -242,7 +242,7 @@
return
//Let's unlock this early I guess. Might be too early, needs tweaking.
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(!(occupant || mess || locked))
if(default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]",W))
return
@@ -275,7 +275,7 @@
icon_state = "floor"
thermal_conductivity = 0
/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob)
/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
return
// HOLOFLOOR DOES NOT GIVE A FUCK
@@ -284,7 +284,7 @@
gender = PLURAL
name = "lush grass"
/turf/simulated/floor/fancy/grass/holo/attackby(obj/item/weapon/W as obj, mob/user as mob)
/turf/simulated/floor/fancy/grass/holo/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
return
// HOLOGRASS DOES NOT GIVE A FUCK
@@ -304,7 +304,7 @@
return // HOLOTABLE DOES NOT GIVE A FUCK
/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state < GRAB_AGGRESSIVE)
@@ -423,7 +423,7 @@
density = 1
throwpass = 1
/obj/structure/holohoop/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/holohoop/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state < GRAB_AGGRESSIVE)
@@ -481,7 +481,7 @@
..()
/obj/machinery/readybutton/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/readybutton/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
user << "The device is a solid button, there's nothing you can do with it!"
/obj/machinery/readybutton/attack_hand(mob/user as mob)
+2 -2
View File
@@ -10,7 +10,7 @@
var/obj/item/device/mmi/brain = null
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob)
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob, params)
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
@@ -188,7 +188,7 @@
anchored = 1
state = 20//So it doesn't interact based on the above. Not really necessary.
/obj/structure/AIcore/deactivated/attackby(var/obj/item/A as obj, var/mob/user as mob)
/obj/structure/AIcore/deactivated/attackby(var/obj/item/A as obj, var/mob/user as mob, params)
if(istype(A, /obj/item/device/aicard))//Is it?
A.transfer_ai("INACTIVE","AICARD",src,user)
if(istype(A, /obj/item/weapon/wrench))
+1 -1
View File
@@ -13,7 +13,7 @@
..()
/obj/machinery/computer/aifixer/attackby(I as obj, user as mob)
/obj/machinery/computer/aifixer/attackby(I as obj, user as mob, params)
if(occupier && istype(I, /obj/item/weapon/screwdriver))
if(stat & (NOPOWER|BROKEN))
user << "<span class='warning'>The screws on [name]'s screen won't budge.</span>"
@@ -242,7 +242,7 @@
origin_tech = "programming=1"
/obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I,/obj/item/device/multitool))
var/catastasis = src.contraband_enabled
var/opposite_catastasis
@@ -264,7 +264,7 @@
user << "DERP! BUG! Report this (And what you were doing to cause it) to Agouri"
return
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I,/obj/item/weapon/screwdriver))
if(build_path == /obj/machinery/computer/rdconsole/core)
name = "circuit board (RD Console - Robotics)"
@@ -276,7 +276,7 @@
user << "<span class='notice'>Defaulting access protocols.</span>"
return
/obj/item/weapon/circuitboard/libraryconsole/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/weapon/circuitboard/libraryconsole/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I,/obj/item/weapon/screwdriver))
if(build_path == /obj/machinery/computer/libraryconsole/bookmanagement)
name = "circuit board (Library Visitor Console)"
@@ -288,7 +288,7 @@
user << "<span class='notice'>Access protocols successfully updated.</span>"
return
/obj/item/weapon/circuitboard/shuttle/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/weapon/circuitboard/shuttle/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/device/multitool))
var/chosen_id = round(input(usr, "Choose an ID number (-1 for reset):", "Input an Integer", null) as num|null)
if(chosen_id >= 0)
@@ -297,7 +297,7 @@
shuttleId = initial(shuttleId)
return
/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob)
/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob, params)
add_fingerprint(user)
switch(state)
if(0)
+1 -1
View File
@@ -42,7 +42,7 @@ var/time_last_changed_position = 0
//Assoc array: "JobName" = (int)<Opened Positions>
var/list/opened_positions = list();
/obj/machinery/computer/card/attackby(O as obj, user as mob)//TODO:SANITY
/obj/machinery/computer/card/attackby(O as obj, user as mob, params)//TODO:SANITY
if(istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = O
if(check_access(idcard))
+1 -1
View File
@@ -73,7 +73,7 @@
return null
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob)
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES
if (!src.diskette)
user.drop_item()
@@ -321,7 +321,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
src.updateUsrDialog()
/obj/machinery/computer/communications/attackby(var/obj/I as obj, var/mob/user as mob)
/obj/machinery/computer/communications/attackby(var/obj/I as obj, var/mob/user as mob, params)
if(istype(I, /obj/item/weapon/card/id))
attack_hand(user)
else
+1 -1
View File
@@ -91,7 +91,7 @@
update_icon()
return
/obj/machinery/computer/attackby(I as obj, user as mob)
/obj/machinery/computer/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'> You start to disconnect the monitor.</span>"
+1 -1
View File
@@ -4,7 +4,7 @@
var/mob/living/silicon/current = null //The target of future law uploads
icon_state = null //To make sure mappers understand THIS ISN'T A VALID TYPE
/obj/machinery/computer/upload/attackby(obj/item/O as obj, mob/user as mob)
/obj/machinery/computer/upload/attackby(obj/item/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/weapon/aiModule))
var/obj/item/weapon/aiModule/M = O
if(src.stat & (NOPOWER|BROKEN|MAINT))
+1 -1
View File
@@ -19,7 +19,7 @@
var/sortBy = "name"
var/order = 1 // -1 = Descending - 1 = Ascending
/obj/machinery/computer/med_data/attackby(obj/item/O as obj, user as mob)
/obj/machinery/computer/med_data/attackby(obj/item/O as obj, user as mob, params)
if(istype(O, /obj/item/weapon/card/id) && !scan)
usr.drop_item()
O.loc = src
+1 -1
View File
@@ -34,7 +34,7 @@
var/custommessage = "This is a test, please ignore."
/obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/living/user as mob)
/obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/living/user as mob, params)
if(stat & (NOPOWER|BROKEN))
return
if(!istype(user))
+1 -1
View File
@@ -71,7 +71,7 @@
popup.open()
return
/obj/machinery/computer/prisoner/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/computer/prisoner/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/card/id))
return attack_hand(user)
..()
+1 -1
View File
@@ -23,7 +23,7 @@
var/order = 1 // -1 = Descending - 1 = Ascending
/obj/machinery/computer/secure_data/attackby(obj/item/O as obj, user as mob)
/obj/machinery/computer/secure_data/attackby(obj/item/O as obj, user as mob, params)
if(istype(O, /obj/item/weapon/card/id) && !scan)
usr.drop_item()
O.loc = src
+1 -1
View File
@@ -6,7 +6,7 @@
var/list/authorized = list()
/obj/machinery/computer/emergency_shuttle/attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob)
/obj/machinery/computer/emergency_shuttle/attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob, params)
if(stat & (BROKEN|NOPOWER)) return
if(!istype(W, /obj/item/weapon/card))
return
@@ -29,7 +29,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F
name = "[name] [rand(1,999)]"
/obj/machinery/computer/telecrystals/uplinker/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/computer/telecrystals/uplinker/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item))
if(uplinkholder)
+3 -3
View File
@@ -53,7 +53,7 @@
else
desc += "."
/obj/machinery/constructable_frame/machine_frame/attackby(obj/item/P as obj, mob/user as mob)
/obj/machinery/constructable_frame/machine_frame/attackby(obj/item/P as obj, mob/user as mob, params)
if(P.crit_fail)
user << "<span class='danger'>This part is faulty, you cannot add this to the machine!</span>"
return
@@ -218,7 +218,7 @@ to destroy them and players will be able to make replacements.
/obj/machinery/vending/cigarette = "ShadyCigs Deluxe",
/obj/machinery/vending/autodrobe = "AutoDrobe")
/obj/item/weapon/circuitboard/vendor/attackby(obj/item/I, mob/user)
/obj/item/weapon/circuitboard/vendor/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
set_type(pick(names_paths), user)
@@ -329,7 +329,7 @@ to destroy them and players will be able to make replacements.
/obj/item/stack/cable_coil = 1,
/obj/item/weapon/stock_parts/console_screen = 1)
/obj/item/weapon/circuitboard/thermomachine/attackby(obj/item/I, mob/user)
/obj/item/weapon/circuitboard/thermomachine/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
if(build_path == /obj/machinery/atmospherics/unary/cold_sink/freezer)
build_path = /obj/machinery/atmospherics/unary/heat_reservoir/heater
+1 -1
View File
@@ -227,7 +227,7 @@
add_fingerprint(usr)
return 1 // update UIs attached to this object
/obj/machinery/atmospherics/unary/cryo_cell/attackby(obj/item/I, mob/user)
/obj/machinery/atmospherics/unary/cryo_cell/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/reagent_containers/glass))
if(beaker)
user << "<span class='notice'>A beaker is already loaded into [src].</span>"
+2 -2
View File
@@ -63,7 +63,7 @@ for reference:
var/health = 100.0
var/maxhealth = 100.0
/obj/structure/barricade/wooden/attackby(obj/item/W as obj, mob/user as mob)
/obj/structure/barricade/wooden/attackby(obj/item/W as obj, mob/user as mob, params)
user.changeNext_move(CLICK_CD_MELEE)
if (istype(W, /obj/item/stack/sheet/mineral/wood))
if (src.health < src.maxhealth)
@@ -148,7 +148,7 @@ for reference:
src.icon_state = "barrier[src.locked]"
/obj/machinery/deployable/barrier/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/deployable/barrier/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (W.GetID())
if (src.allowed(user))
if (src.emagged < 2.0)
+2 -2
View File
@@ -38,7 +38,7 @@
/obj/machinery/door_control/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/door_control/attackby(obj/item/weapon/W, mob/user as mob)
/obj/machinery/door_control/attackby(obj/item/weapon/W, mob/user as mob, params)
/* For later implementation
if (istype(W, /obj/item/weapon/screwdriver))
{
@@ -124,7 +124,7 @@
/obj/machinery/driver_button/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/driver_button/attackby(obj/item/weapon/W, mob/user as mob)
/obj/machinery/driver_button/attackby(obj/item/weapon/W, mob/user as mob, params)
if(istype(W, /obj/item/device/detective_scanner))
return
+2 -2
View File
@@ -877,7 +877,7 @@ About the new airlock wires panel:
updateUsrDialog()
return
/obj/machinery/door/airlock/attackby(C as obj, mob/user as mob)
/obj/machinery/door/airlock/attackby(C as obj, mob/user as mob, params)
if(!istype(usr, /mob/living/silicon))
if(src.isElectrified())
if(src.shock(user, 75))
@@ -982,7 +982,7 @@ About the new airlock wires panel:
..()
return
/obj/machinery/door/airlock/plasma/attackby(C as obj, mob/user as mob)
/obj/machinery/door/airlock/plasma/attackby(C as obj, mob/user as mob, params)
if(is_hot(C) > 300)//If the temperature of the object is over 300, then ignite
message_admins("Plasma wall ignited by [key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
log_game("Plasma wall ignited by [user.ckey]([user]) in ([x],[y],[z])")
+1 -1
View File
@@ -118,7 +118,7 @@
return
..()
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/device/detective_scanner))
return
if(isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
+1 -1
View File
@@ -30,7 +30,7 @@
return
/obj/machinery/door/firedoor/attackby(obj/item/weapon/C as obj, mob/user as mob)
/obj/machinery/door/firedoor/attackby(obj/item/weapon/C as obj, mob/user as mob, params)
add_fingerprint(user)
if(operating) return//Already doing something.
if(istype(C, /obj/item/weapon/weldingtool))
+1 -1
View File
@@ -20,7 +20,7 @@
return ..()
/obj/machinery/door/poddoor/attackby(obj/item/I, mob/user)
/obj/machinery/door/poddoor/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
if(istype(I, /obj/item/weapon/twohanded/fireaxe))
+1 -1
View File
@@ -8,7 +8,7 @@
return
/obj/machinery/door/unpowered/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/door/unpowered/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/melee/energy/blade)) return
if(src.locked) return
..()
+1 -1
View File
@@ -254,7 +254,7 @@
open()
emagged = 1
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/living/user as mob)
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/living/user as mob, params)
//If it's in the process of opening/closing, ignore the click
if (src.operating)
+1 -1
View File
@@ -19,7 +19,7 @@ var/list/doppler_arrays = list()
/obj/machinery/doppler_array/process()
return PROCESS_KILL
/obj/machinery/doppler_array/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/doppler_array/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/wrench))
if(!anchored && !isinspace())
anchored = 1
+3 -3
View File
@@ -37,7 +37,7 @@
icon_state = "[base_state]1-p"
//Don't want to render prison breaks impossible
/obj/machinery/flasher/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/flasher/attackby(obj/item/weapon/W, mob/user, params)
if (istype(W, /obj/item/weapon/wirecutters))
if (bulb)
user.visible_message("<span class='warning'>[user] begins to disconnect [src]'s flashbulb.</span>", "<span class='warning'>You begin to disconnect [src]'s flashbulb.</span>")
@@ -127,7 +127,7 @@
bulb.burn_out()
power_change()
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W, mob/user, params)
if (istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
@@ -151,7 +151,7 @@
/obj/machinery/flasher_button/attack_paw(mob/user)
return attack_hand(user)
/obj/machinery/flasher_button/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/flasher_button/attackby(obj/item/weapon/W, mob/user, params)
return attack_hand(user)
/obj/machinery/flasher_button/attack_hand(mob/user)
+2 -2
View File
@@ -69,7 +69,7 @@
icon_state = "[base_state]-p"
// src.sd_SetLuminosity(0)
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/device/detective_scanner))
return
if (istype(W, /obj/item/weapon/screwdriver))
@@ -123,7 +123,7 @@
/obj/machinery/ignition_switch/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/ignition_switch/attackby(obj/item/weapon/W, mob/user as mob)
/obj/machinery/ignition_switch/attackby(obj/item/weapon/W, mob/user as mob, params)
return src.attack_hand(user)
/obj/machinery/ignition_switch/attack_hand(mob/user as mob)
+1 -1
View File
@@ -72,7 +72,7 @@
usr << "There's nothing attached to the IV drip!"
/obj/machinery/iv_drip/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/iv_drip/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/reagent_containers))
if(!isnull(beaker))
user << "There is already a reagent container loaded!"
+1 -1
View File
@@ -104,7 +104,7 @@
frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS)
/obj/machinery/navbeacon/attackby(var/obj/item/I, var/mob/user)
/obj/machinery/navbeacon/attackby(var/obj/item/I, var/mob/user, params)
var/turf/T = loc
if(T.intact)
return // prevent intraction when T-scanner revealed
+2 -2
View File
@@ -787,7 +787,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.updateUsrDialog()
/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/living/user as mob)
/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/living/user as mob, params)
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>Now [anchored ? "un" : ""]securing [name]</span>"
@@ -1011,7 +1011,7 @@ obj/item/weapon/newspaper/Topic(href, href_list)
src.attack_self(src.loc)
obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/pen))
if(src.scribble_page == src.curr_page)
user << "<span class='notice'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</span>"
+2 -2
View File
@@ -296,7 +296,7 @@ var/global/list/pipeID2State = list(
/obj/item/pipe/attack_self(mob/user as mob)
return rotate()
/obj/item/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/item/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
//*
if (!istype(W, /obj/item/weapon/wrench))
@@ -425,7 +425,7 @@ var/global/list/pipeID2State = list(
item_state = "buildpipe"
w_class = 4
/obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
..()
if (!istype(W, /obj/item/weapon/wrench))
+1 -1
View File
@@ -71,7 +71,7 @@
wait = 0
return
/obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
add_fingerprint(user)
if (istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter))
usr << "<span class='notice'>You put [W] back into [src].</span>"
+4 -4
View File
@@ -246,7 +246,7 @@
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user)
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user, params)
if(stat & BROKEN)
if(istype(I, /obj/item/weapon/crowbar))
//If the turret is destroyed, you can remove it with a crowbar to
@@ -634,7 +634,7 @@
var/gun_charge = 0 //the gun charge of the gun type installed
/obj/machinery/porta_turret_construct/attackby(obj/item/I, mob/user)
/obj/machinery/porta_turret_construct/attackby(obj/item/I, mob/user, params)
//this is a bit unwieldy but self-explanatory
switch(build_step)
if(0) //first step
@@ -953,7 +953,7 @@ Status: []<BR>"},
updateUsrDialog()
/obj/machinery/porta_turret_cover/attackby(obj/item/I, mob/user)
/obj/machinery/porta_turret_cover/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wrench) && !Parent_Turret.on)
if(Parent_Turret.raised) return
@@ -1041,7 +1041,7 @@ Status: []<BR>"},
//don't have to check if control_area is path, since get_area_all_atoms can take path.
return
/obj/machinery/turretid/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/turretid/attackby(obj/item/weapon/W, mob/user, params)
if(stat & BROKEN) return
if (istype(user, /mob/living/silicon))
return src.attack_hand(user)
+1 -1
View File
@@ -9,7 +9,7 @@
var/obj/item/weapon/charging = null
/obj/machinery/recharger/attackby(obj/item/weapon/G, mob/user)
/obj/machinery/recharger/attackby(obj/item/weapon/G, mob/user, params)
if(istype(user,/mob/living/silicon))
return
if(istype(G, /obj/item/weapon/gun/energy) || istype(G, /obj/item/weapon/melee/baton))
+1 -1
View File
@@ -72,7 +72,7 @@
/obj/machinery/recharge_station/attack_ai(user as mob)
return attack_hand(user)
/obj/machinery/recharge_station/attackby(obj/item/P as obj, mob/user as mob)
/obj/machinery/recharge_station/attackby(obj/item/P as obj, mob/user as mob, params)
if(state_open)
if(default_deconstruction_screwdriver(user, "borgdecon2", "borgcharger0", P))
return
+1 -1
View File
@@ -30,7 +30,7 @@ var/const/SAFETY_COOLDOWN = 100
update_icon()
/obj/machinery/recycler/attackby(var/obj/item/I, var/mob/user)
/obj/machinery/recycler/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
if(emagged)
emagged = 0
+1 -1
View File
@@ -433,7 +433,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
slip.name = "Message - [unlinkedsender]"
src.luminosity = 2
/obj/machinery/requests_console/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
/obj/machinery/requests_console/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob, params)
if (istype(O, /obj/item/weapon/crowbar))
if(open)
user << "You close the maintenance panel."
+1 -1
View File
@@ -11,7 +11,7 @@
idle_power_usage = 20
active_power_usage = 5000
/obj/machinery/robotic_fabricator/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/robotic_fabricator/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if (istype(O, /obj/item/stack/sheet/metal))
if (src.metal_amount < 150000.0)
var/count = 0
+3 -3
View File
@@ -33,7 +33,7 @@
/obj/machinery/shield/CanAtmosPass(var/turf/T)
return !density
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(!istype(W)) return
//Calculate damage
@@ -231,7 +231,7 @@
user << "The device must first be secured to the floor."
return
/obj/machinery/shieldgen/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/shieldgen/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
if(is_open)
@@ -449,7 +449,7 @@
CF.dir = field_dir
/obj/machinery/shieldwallgen/attackby(obj/item/W, mob/user)
/obj/machinery/shieldwallgen/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
if(active)
user << "Turn off the field generator first."
+1 -1
View File
@@ -73,7 +73,7 @@
..()
update_icon()
/obj/machinery/computer/slot_machine/attackby(obj/item/I, mob/living/user)
/obj/machinery/computer/slot_machine/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/weapon/coin))
var/obj/item/weapon/coin/C = I
if(prob(2))
+1 -1
View File
@@ -44,7 +44,7 @@
cell.emp_act(severity)
..(severity)
/obj/machinery/space_heater/attackby(obj/item/I, mob/user)
/obj/machinery/space_heater/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/stock_parts/cell))
if(open)
if(cell)
+1 -1
View File
@@ -504,7 +504,7 @@
return
/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob, params)
if(!src.ispowered)
if(istype(I, /obj/item/weapon/crowbar) && !isopen)
if(toggle_open(user))
+1 -1
View File
@@ -154,7 +154,7 @@
return
/obj/machinery/power/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/power/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/screwdriver))
if(active)
user << "<span class='danger'>You need to deactivate the beacon first!</span>"
+1 -1
View File
@@ -48,7 +48,7 @@
/obj/machinery/syndicatebomb/update_icon()
icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]"
/obj/machinery/syndicatebomb/attackby(var/obj/item/I, var/mob/user)
/obj/machinery/syndicatebomb/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/weapon/wrench))
if(!anchored)
if(!isturf(src.loc) || istype(src.loc, /turf/space))
@@ -15,7 +15,7 @@
var/construct_op = 0
/obj/machinery/telecomms/attackby(obj/item/P as obj, mob/user as mob)
/obj/machinery/telecomms/attackby(obj/item/P as obj, mob/user as mob, params)
// Using a multitool lets you access the receiver's interface
if(istype(P, /obj/item/device/multitool))
+3 -3
View File
@@ -29,7 +29,7 @@
break
return power_station
/obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob)
/obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob, params)
if(istype(I, /obj/item/device/gps))
var/obj/item/device/gps/L = I
if(L.locked_location && !(stat & (NOPOWER|BROKEN)))
@@ -279,7 +279,7 @@
use_power(5000)
return
/obj/machinery/teleport/hub/attackby(obj/item/W, mob/user)
/obj/machinery/teleport/hub/attackby(obj/item/W, mob/user, params)
if(default_deconstruction_screwdriver(user, "tele-o", "tele0", W))
return
@@ -375,7 +375,7 @@
teleporter_hub.update_icon()
..()
/obj/machinery/teleport/station/attackby(var/obj/item/weapon/W, mob/user)
/obj/machinery/teleport/station/attackby(var/obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/device/multitool) && !panel_open)
var/obj/item/device/multitool/M = W
if(M.buffer && istype(M.buffer, /obj/machinery/teleport/station) && M.buffer != src)
+2 -2
View File
@@ -273,7 +273,7 @@
src.die()
return
/obj/machinery/turret/attackby(obj/item/weapon/W, mob/user)//I can't believe no one added this before/N
/obj/machinery/turret/attackby(obj/item/weapon/W, mob/user, params)//I can't believe no one added this before/N
..()
user.changeNext_move(CLICK_CD_MELEE)
playsound(src.loc, 'sound/weapons/smash.ogg', 60, 1)
@@ -527,7 +527,7 @@
//don't have to check if control_area is path, since get_area_all_atoms can take path.
return
/obj/machinery/areaturretid/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/areaturretid/attackby(obj/item/weapon/W, mob/user, params)
if(stat & BROKEN) return
if (istype(user, /mob/living/silicon))
return src.attack_hand(user)
+2 -2
View File
@@ -147,7 +147,7 @@
total += restock
return total
/obj/machinery/vending/snack/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/vending/snack/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/reagent_containers/food/snacks))
if(!compartment_access_check(user))
return
@@ -212,7 +212,7 @@
dish_quants[S.name] = 1
sortList(dish_quants)
/obj/machinery/vending/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/vending/attackby(obj/item/weapon/W, mob/user, params)
if(panel_open)
if(default_unfasten_wrench(user, W, time = 60))
return
+1 -1
View File
@@ -178,7 +178,7 @@
/obj/machinery/washing_machine/update_icon()
icon_state = "wm_[state][panel]"
/obj/machinery/washing_machine/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/washing_machine/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/*if(istype(W,/obj/item/weapon/screwdriver))
panel = !panel
user << "\blue you [panel ? "open" : "close"] the [src]'s maintenance panel"*/
+1 -1
View File
@@ -1050,7 +1050,7 @@
return 0
return
/obj/item/mecha_parts/mecha_equipment/generator/attackby(weapon,mob/user)
/obj/item/mecha_parts/mecha_equipment/generator/attackby(weapon,mob/user, params)
var/result = load_fuel(weapon)
if(isnull(result))
user.visible_message("[user] tries to shove [weapon] into [src]. What a dumb-ass.","<span class='danger'>[fuel] traces minimal. [weapon] cannot be used as fuel.</span>")
+1 -1
View File
@@ -65,7 +65,7 @@
recharge_console.update_icon()
/obj/machinery/mech_bay_recharge_port/attackby(obj/item/I, mob/user)
/obj/machinery/mech_bay_recharge_port/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "recharge_port-o", "recharge_port", I))
return
+1 -1
View File
@@ -486,7 +486,7 @@
return result
/obj/machinery/mecha_part_fabricator/attackby(obj/W as obj, mob/user as mob)
/obj/machinery/mecha_part_fabricator/attackby(obj/W as obj, mob/user as mob, params)
if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W))
return
+1 -1
View File
@@ -660,7 +660,7 @@ obj/mecha/proc/can_use(mob/user)
////// AttackBy //////
//////////////////////
/obj/mecha/attackby(obj/item/W as obj, mob/user as mob)
/obj/mecha/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/device/mmi))
if(mmi_move_inside(W,user))
+1 -1
View File
@@ -15,7 +15,7 @@
icon_state = "backbone"
var/datum/construction/construct
/obj/item/mecha_parts/chassis/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/mecha_parts/chassis/attackby(obj/item/W as obj, mob/user as mob, params)
if(!construct || !construct.action(W, user))
..()
return
+1 -1
View File
@@ -15,7 +15,7 @@
var/list/crowbar_salvage = list()
var/salvage_num = 5
/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user)
/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/weldingtool))
if(salvage_num <= 0)
user << "<span class='notice'>You don't see anything that can be cut with [I].</span>"
+3 -3
View File
@@ -132,7 +132,7 @@
healthcheck()
/obj/structure/alien/resin/attackby(obj/item/I, mob/living/user)
/obj/structure/alien/resin/attackby(obj/item/I, mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
health -= I.force
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
@@ -213,7 +213,7 @@
qdel(src)
/obj/structure/alien/weeds/attackby(obj/item/I, mob/user)
/obj/structure/alien/weeds/attackby(obj/item/I, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
if(I.attack_verb.len)
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
@@ -369,7 +369,7 @@
healthcheck()
/obj/structure/alien/egg/attackby(obj/item/I, mob/user)
/obj/structure/alien/egg/attackby(obj/item/I, mob/user, params)
if(I.attack_verb.len)
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
else

Some files were not shown because too many files have changed in this diff Show More