mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-03 14:02:49 +00:00
Massive click code rework by SuperSayu, ported from TG.
Full details at https://github.com/tgstation/-tg-station/pull/1206 Fixes #3648 Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
@@ -165,4 +165,27 @@ LINEN BINS
|
||||
hidden = null
|
||||
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/bedsheetbin/attack_tk(mob/user as mob)
|
||||
if(amount >= 1)
|
||||
amount--
|
||||
|
||||
var/obj/item/weapon/bedsheet/B
|
||||
if(sheets.len > 0)
|
||||
B = sheets[sheets.len]
|
||||
sheets.Remove(B)
|
||||
|
||||
else
|
||||
B = new /obj/item/weapon/bedsheet(loc)
|
||||
|
||||
B.loc = loc
|
||||
user << "<span class='notice'>You telekinetically remove [B] from [src].</span>"
|
||||
update_icon()
|
||||
|
||||
if(hidden)
|
||||
hidden.loc = loc
|
||||
hidden = null
|
||||
|
||||
|
||||
add_fingerprint(user)
|
||||
@@ -181,6 +181,8 @@
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
if(istype(W,/obj/item/tk_grab))
|
||||
return 0
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0,user))
|
||||
@@ -194,8 +196,6 @@
|
||||
if(isrobot(user))
|
||||
return
|
||||
usr.drop_item()
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
@@ -255,6 +255,12 @@
|
||||
src.add_fingerprint(user)
|
||||
src.toggle(user)
|
||||
|
||||
// tk grab then use on self
|
||||
/obj/structure/closet/attack_self_tk(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(!src.toggle())
|
||||
usr << "<span class='notice'>It won't budge!</span>"
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
set src in oview(1)
|
||||
set category = "Object"
|
||||
|
||||
@@ -137,6 +137,15 @@
|
||||
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
|
||||
attack_tk(mob/user as mob)
|
||||
if(localopened && fireaxe)
|
||||
fireaxe.loc = loc
|
||||
user << "\blue You telekinetically remove the fire axe."
|
||||
fireaxe = null
|
||||
update_icon()
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
verb/toggle_openness() //nice name, huh? HUH?! -Erro //YEAH -Agouri
|
||||
set name = "Open/Close"
|
||||
set category = "Object"
|
||||
|
||||
@@ -37,6 +37,15 @@
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_tk(mob/user)
|
||||
if(has_extinguisher)
|
||||
has_extinguisher.loc = loc
|
||||
user << "<span class='notice'>You telekinetically remove [has_extinguisher] from [src].</span>"
|
||||
has_extinguisher = null
|
||||
opened = 1
|
||||
else
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
@@ -134,13 +134,8 @@
|
||||
density = 1
|
||||
layer = 2.0
|
||||
var/obj/structure/morgue/connected = null
|
||||
anchored = 1.0
|
||||
|
||||
/obj/structure/m_tray/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if (istype(mover, /obj/item/weapon/dummy))
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
anchored = 1
|
||||
throwpass = 1
|
||||
|
||||
/obj/structure/m_tray/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -353,13 +348,8 @@
|
||||
density = 1
|
||||
layer = 2.0
|
||||
var/obj/structure/crematorium/connected = null
|
||||
anchored = 1.0
|
||||
|
||||
/obj/structure/c_tray/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if (istype(mover, /obj/item/weapon/dummy))
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
anchored = 1
|
||||
throwpass = 1
|
||||
|
||||
/obj/structure/c_tray/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -30,6 +30,13 @@
|
||||
SK.master = E
|
||||
del(src)
|
||||
|
||||
/obj/structure/stool/bed/chair/attack_tk(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
..()
|
||||
else
|
||||
rotate()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/proc/handle_rotation() //making this into a seperate proc so office chairs can call it on Move()
|
||||
if(src.dir == NORTH)
|
||||
src.layer = FLY_LAYER
|
||||
|
||||
@@ -235,11 +235,6 @@
|
||||
if(prob(75))
|
||||
destroy()
|
||||
|
||||
|
||||
/obj/structure/table/hand_p(mob/user as mob)
|
||||
return src.attack_paw(user)
|
||||
|
||||
|
||||
/obj/structure/table/attack_paw(mob/user)
|
||||
if(HULK in user.mutations)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
@@ -263,6 +258,8 @@
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
destroy()
|
||||
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
@@ -285,7 +282,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if (istype(G.affecting, /mob/living))
|
||||
@@ -478,3 +475,6 @@
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
density = 0
|
||||
del(src)
|
||||
|
||||
/obj/structure/rack/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
/obj/structure/dispenser/Topic(href, href_list)
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if(get_dist(src, usr) <= 1)
|
||||
if(Adjacent(usr))
|
||||
usr.set_machine(src)
|
||||
if(href_list["oxygen"])
|
||||
if(oxygentanks > 0)
|
||||
|
||||
@@ -324,19 +324,20 @@
|
||||
if(isrobot(M) || isAI(M))
|
||||
return
|
||||
|
||||
if(!Adjacent(M))
|
||||
return
|
||||
|
||||
if(busy)
|
||||
M << "\red Someone's already washing here."
|
||||
return
|
||||
|
||||
var/turf/location = M.loc
|
||||
if(!isturf(location)) return
|
||||
usr << "\blue You start washing your hands."
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
busy = 0
|
||||
|
||||
if(M.loc != location) return //Person has moved away from the sink
|
||||
if(!Adjacent(M)) return //Person has moved away from the sink
|
||||
|
||||
M.clean_blood()
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -96,6 +96,9 @@
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
del(src)
|
||||
|
||||
/obj/structure/window/attack_tk(mob/user as mob)
|
||||
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
|
||||
|
||||
/obj/structure/window/attack_hand(mob/user as mob)
|
||||
if(HULK in user.mutations)
|
||||
|
||||
Reference in New Issue
Block a user