mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
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:
@@ -28,7 +28,7 @@
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/optable/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/structure/optable/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(!G.confirm())
|
||||
|
||||
@@ -32,7 +32,7 @@ LINEN BINS
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user)
|
||||
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/weapon/shard))
|
||||
new /obj/item/stack/medical/gauze/improvised(src.loc)
|
||||
qdel(src)
|
||||
@@ -186,7 +186,7 @@ LINEN BINS
|
||||
else icon_state = "linenbin-full"
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/bedsheet))
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
else
|
||||
overlays += orangelight
|
||||
|
||||
/obj/structure/closet/crate/bin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/closet/crate/bin/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/storage/bag/trash))
|
||||
var/obj/item/weapon/storage/bag/trash/T = W
|
||||
user << "<span class='notice'>You fill the bag.</span>"
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
if(src.large)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
locked = 1
|
||||
var/smashed = 0
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/attackby(var/obj/item/O as obj, var/mob/living/user as mob) //Marker -Agouri
|
||||
/obj/structure/closet/fireaxecabinet/attackby(var/obj/item/O as obj, var/mob/living/user as mob, params) //Marker -Agouri
|
||||
//..() //That's very useful, Erro
|
||||
|
||||
var/hasaxe = 0 //gonna come in handy later~
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
new /obj/item/device/radio/headset( src )
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
|
||||
if(istype(W))
|
||||
var/obj/item/weapon/card/id/I = W.GetID()
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
|
||||
if(!src.opened && src.broken)
|
||||
user << "<span class='notice'>The locker appears to be broken.</span>"
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
health -= I.force
|
||||
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
|
||||
if(health <= 0)
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/card) && src.allowed(user) && !locked && !opened && !broken)
|
||||
user << "<span class='notice'>You lock \the [src].</span>"
|
||||
src.locked = 1
|
||||
@@ -336,7 +336,7 @@
|
||||
/obj/structure/closet/crate/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/closet/crate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/closet/crate/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(opened)
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
user << "<span class='notice'>You need a crowbar to pry this open!</span>"
|
||||
return
|
||||
|
||||
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/stack/sheet/mineral/wood(src)
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
|
||||
@@ -333,7 +333,7 @@ obj/structure/door_assembly/New()
|
||||
mineral = "glass"
|
||||
icon_state = "door_as_gviro1"
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter the name for the door.", src.name, src.created_name,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
@@ -466,7 +466,7 @@ obj/structure/door_assembly/New()
|
||||
if(!D.sub_door)
|
||||
door_check = 0
|
||||
break
|
||||
|
||||
|
||||
if(door_check)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] secures the airlock assembly to the floor.</span>", \
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair(loc)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user, params)
|
||||
if(isrobot(user) || isalien(user))
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/extinguisher))
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
qdel(src)
|
||||
return T
|
||||
|
||||
/obj/structure/falsewall/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/structure/falsewall/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(opening)
|
||||
user << "<span class='warning'>You must wait until the door has stopped moving.</span>"
|
||||
return
|
||||
@@ -199,7 +199,7 @@
|
||||
var/active = null
|
||||
var/last_event = 0
|
||||
|
||||
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W, mob/user, params)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
mineral = "plasma"
|
||||
walltype = "plasma"
|
||||
|
||||
/obj/structure/falsewall/plasma/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/structure/falsewall/plasma/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(is_hot(W) > 300)
|
||||
message_admins("Plasma falsewall 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>)",0,1)
|
||||
log_game("Plasma falsewall ignited by [user.ckey]([user]) in ([x],[y],[z])")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/state = 0
|
||||
var/girderpasschance = 20 // percentage chance that a projectile passes through the girder.
|
||||
|
||||
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
if(anchored && !istype(src,/obj/structure/girder/displaced))
|
||||
@@ -255,7 +255,7 @@
|
||||
density = 1
|
||||
layer = 2
|
||||
|
||||
/obj/structure/cultgirder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/cultgirder/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "<span class='notice'>Now disassembling the girder...</span>"
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
var/obj/item/stack/rods/newrods = new(loc)
|
||||
transfer_fingerprints_to(newrods)
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user, params)
|
||||
var/fail_msg = "<span class='notice'>There is already one of those in [src].</span>"
|
||||
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
@@ -194,7 +194,7 @@
|
||||
user << "It has been upgraded with a floor buffer."
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, keytype))
|
||||
user << "Hold [I] in one of your hands while you drive this [callme]."
|
||||
else if(istype(I, /obj/item/weapon/storage/bag/trash))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/structure/kitchenspike/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(usr)
|
||||
|
||||
/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob, params)
|
||||
if(!istype(G, /obj/item/weapon/grab))
|
||||
return
|
||||
if(istype(G.affecting, /mob/living/carbon/monkey))
|
||||
|
||||
@@ -69,5 +69,5 @@
|
||||
/obj/structure/ladder/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user as mob, params)
|
||||
return attack_hand(user)
|
||||
@@ -60,7 +60,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/lamarr/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/lamarr/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
else
|
||||
return
|
||||
|
||||
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
|
||||
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob, params)
|
||||
var/turf/T = get_turf(src)
|
||||
if (istype(C, /obj/item/stack/tile/plasteel))
|
||||
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead (for building plating)
|
||||
@@ -121,7 +121,7 @@
|
||||
C.Deconstruct()
|
||||
..()
|
||||
|
||||
/obj/structure/lattice/catwalk/attackby(obj/item/C as obj, mob/user as mob)
|
||||
/obj/structure/lattice/catwalk/attackby(obj/item/C as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(C, /obj/item/stack/cable_coil))
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
else
|
||||
icon_state = mineralType
|
||||
|
||||
/obj/structure/mineral_door/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/structure/mineral_door/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W,/obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/digTool = W
|
||||
user << "You start digging the [name]."
|
||||
@@ -217,7 +217,7 @@
|
||||
/obj/structure/mineral_door/transparent/plasma
|
||||
mineralType = "plasma"
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(is_hot(W))
|
||||
message_admins("Plasma mineral door 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>)",0,1)
|
||||
log_game("Plasma mineral door ignited by [user.ckey]([user]) in ([x],[y],[z])")
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/mirror/attackby(obj/item/I as obj, mob/living/user as mob)
|
||||
/obj/structure/mirror/attackby(obj/item/I as obj, mob/living/user as mob, params)
|
||||
user.do_attack_animation(src)
|
||||
if(I.damtype == STAMINA)
|
||||
return
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/obj/structure/mopbucket/New()
|
||||
create_reagents(100)
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/mopbucket/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
close()
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/bodycontainer/attackby(P as obj, mob/user as mob)
|
||||
/obj/structure/bodycontainer/attackby(P as obj, mob/user as mob, params)
|
||||
if (istype(P, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "What would you like the label to be?", text("[]", name), null)
|
||||
if (user.get_active_hand() != P)
|
||||
@@ -208,7 +208,7 @@ Crematorium Switch
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
/obj/machinery/crema_switch/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/machinery/crema_switch/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(W.GetID())
|
||||
attack_hand(user)
|
||||
else
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
user.set_machine(src)
|
||||
song.interact(user)
|
||||
|
||||
/obj/structure/piano/attackby(obj/item/O as obj, mob/user as mob)
|
||||
/obj/structure/piano/attackby(obj/item/O as obj, mob/user as mob, params)
|
||||
if (istype(O, /obj/item/weapon/wrench))
|
||||
if (!anchored && !isinspace())
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
icon_state = "nboard0[notices]"
|
||||
|
||||
//attaching papers!!
|
||||
/obj/structure/noticeboard/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
|
||||
/obj/structure/noticeboard/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
if(notices < 5)
|
||||
O.add_fingerprint(user)
|
||||
|
||||
@@ -142,7 +142,7 @@ FLOOR SAFES
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/structure/safe/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(open)
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
density = 0
|
||||
..()
|
||||
|
||||
/obj/structure/statue/attackby(obj/item/weapon/W, mob/living/user as mob)
|
||||
/obj/structure/statue/attackby(obj/item/weapon/W, mob/living/user as mob, params)
|
||||
add_fingerprint(user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
@@ -156,7 +156,7 @@
|
||||
desc = "This statue has a sickening green colour."
|
||||
icon_state = "eng"
|
||||
|
||||
/obj/structure/statue/uranium/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/structure/statue/uranium/attackby(obj/item/weapon/W, mob/user, params)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
PlasmaBurn(500)
|
||||
..()
|
||||
|
||||
/obj/structure/statue/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/statue/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
|
||||
message_admins("Plasma statue 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>)",0,1)
|
||||
log_game("Plasma statue ignited by [user.ckey]([user]) in ([x],[y],[z])")
|
||||
@@ -312,7 +312,7 @@
|
||||
honk()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/bananium/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/structure/statue/bananium/attackby(obj/item/weapon/W, mob/user, params)
|
||||
honk()
|
||||
..()
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/structure/stool/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/stool/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
var/aforce = W.force
|
||||
health = max(0, health - aforce)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
..()
|
||||
handle_rotation()
|
||||
|
||||
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/assembly/shock_kit))
|
||||
var/obj/item/assembly/shock_kit/SK = W
|
||||
@@ -81,7 +81,7 @@
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
|
||||
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/mineral/wood(src.loc)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/framestack = /obj/item/stack/rods
|
||||
var/framestackamount = 2
|
||||
|
||||
/obj/structure/table_frame/attackby(var/obj/item/I, mob/user)
|
||||
/obj/structure/table_frame/attackby(var/obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>Now disassembling [src].</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
@@ -66,7 +66,7 @@
|
||||
framestack = /obj/item/stack/sheet/mineral/wood
|
||||
framestackamount = 2
|
||||
|
||||
/obj/structure/table_frame/wood/attackby(var/obj/item/I, mob/user)
|
||||
/obj/structure/table_frame/wood/attackby(var/obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/wood))
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
return 1
|
||||
qdel(I)
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if (istype(I, /obj/item/weapon/grab))
|
||||
tablepush(I, user)
|
||||
return
|
||||
@@ -322,6 +322,10 @@
|
||||
if(!(I.flags & ABSTRACT)) //rip more parems rip in peace ;_;
|
||||
if(user.drop_item())
|
||||
I.Move(loc)
|
||||
var/list/click_params = params2list(params)
|
||||
//Center the icon where the user clicked.
|
||||
I.pixel_x = (text2num(click_params["icon-x"]) - 16)
|
||||
I.pixel_y = (text2num(click_params["icon-y"]) - 16)
|
||||
|
||||
|
||||
/*
|
||||
@@ -444,7 +448,7 @@
|
||||
var/status = 2
|
||||
buildstack = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
@@ -535,7 +539,7 @@
|
||||
step(O, get_dir(O, src))
|
||||
return
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
rack_destroy()
|
||||
@@ -601,7 +605,7 @@
|
||||
* Rack Parts
|
||||
*/
|
||||
|
||||
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/rack_parts/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( user.loc )
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/dispenser/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/structure/dispenser/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/tank/internals/oxygen) || istype(I, /obj/item/weapon/tank/internals/air) || istype(I, /obj/item/weapon/tank/internals/anesthetic))
|
||||
if(oxygentanks < 10)
|
||||
user.drop_item()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
pinned_target = null
|
||||
density = 1
|
||||
|
||||
/obj/structure/target_stake/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/target_stake/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
// Putting objects on the stake. Most importantly, targets
|
||||
if(pinned_target)
|
||||
return // get rid of that pinned target first!
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
break
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user)
|
||||
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/grab) && icon_state == "open")
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(ismob(G.affecting) && G.state >= GRAB_AGGRESSIVE)
|
||||
|
||||
@@ -38,7 +38,7 @@ obj/structure/transit_tube/ex_act(severity, target)
|
||||
if(tube_dirs == null)
|
||||
init_dirs()
|
||||
|
||||
/obj/structure/transit_tube/attackby(obj/item/W, mob/user)
|
||||
/obj/structure/transit_tube/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(copytext(icon_state, 1, 3) != "D-") //decorative diagonals cannot be unwrenched directly
|
||||
for(var/obj/structure/transit_tube_pod/pod in src.loc)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
R.generate_automatic_corners(R.tube_dirs)
|
||||
return R
|
||||
|
||||
/obj/structure/c_transit_tube/attackby(var/obj/item/I, var/mob/user)
|
||||
/obj/structure/c_transit_tube/attackby(var/obj/item/I, var/mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You start attaching the [name]...</span>"
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/transit_tube_pod/attackby(var/obj/item/I, var/mob/user)
|
||||
/obj/structure/transit_tube_pod/attackby(var/obj/item/I, var/mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(!moving)
|
||||
for(var/obj/structure/transit_tube/station/T in loc)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
icon_state = "toilet[open][cistern]"
|
||||
|
||||
|
||||
/obj/structure/toilet/attackby(obj/item/I, mob/living/user)
|
||||
/obj/structure/toilet/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
user << "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"].</span>"
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
@@ -113,7 +113,7 @@
|
||||
anchored = 1
|
||||
|
||||
|
||||
/obj/structure/urinal/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/urinal/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = I
|
||||
if(!G.confirm())
|
||||
@@ -167,7 +167,7 @@
|
||||
tile.MakeSlippery()
|
||||
|
||||
|
||||
/obj/machinery/shower/attackby(obj/item/I, mob/user)
|
||||
/obj/machinery/shower/attackby(obj/item/I, mob/user, params)
|
||||
if(I.type == /obj/item/device/analyzer)
|
||||
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
@@ -375,7 +375,7 @@
|
||||
user.visible_message("<span class='notice'>[user] washes their hands in [src].</span>")
|
||||
|
||||
|
||||
/obj/structure/sink/attackby(obj/item/O, mob/user)
|
||||
/obj/structure/sink/attackby(obj/item/O, mob/user, params)
|
||||
if(busy)
|
||||
user << "<span class='notice'>Someone's already washing here.</span>"
|
||||
return
|
||||
@@ -445,7 +445,7 @@
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob)
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob, params)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
@@ -68,7 +68,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/windoor_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/windoor_assembly/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
//I really should have spread this out across more states but thin little windoors are hard to sprite.
|
||||
add_fingerprint(user)
|
||||
switch(state)
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
attack_generic(user, rand(10, 15))
|
||||
update_nearby_icons()
|
||||
|
||||
/obj/structure/window/attackby(obj/item/I, mob/living/user)
|
||||
/obj/structure/window/attackby(obj/item/I, mob/living/user, params)
|
||||
if(!can_be_reached(user))
|
||||
return 1 //skip the afterattack
|
||||
|
||||
|
||||
Reference in New Issue
Block a user