mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
@@ -202,30 +202,41 @@ Class Procs:
|
||||
..()
|
||||
if(!interact_offline && stat & (NOPOWER|BROKEN))
|
||||
return 1
|
||||
if(usr.restrained() || usr.lying || usr.stat)
|
||||
if(!usr.canUseTopic(src))
|
||||
return 1
|
||||
if(!(ishuman(usr) || issilicon(usr)))
|
||||
usr << "<span class='notice'>You don't have the dexterity to do this!</span>"
|
||||
return 1
|
||||
|
||||
var/norange = 0
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(H.l_hand, /obj/item/tk_grab))
|
||||
norange = 1
|
||||
else if(istype(H.r_hand, /obj/item/tk_grab))
|
||||
norange = 1
|
||||
|
||||
if(!norange)
|
||||
if(!issilicon(usr))
|
||||
if(!in_range(src, usr))
|
||||
return 1
|
||||
if(!isturf(loc))
|
||||
return 1
|
||||
|
||||
add_fingerprint(usr)
|
||||
return 0
|
||||
|
||||
/mob/proc/canUseTopic() //TODO: once finished, place these procs on the respective mob files
|
||||
return
|
||||
|
||||
/mob/dead/observer/canUseTopic()
|
||||
if(check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
/mob/living/canUseTopic()
|
||||
src << "<span class='notice'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/canUseTopic(atom/movable/M)
|
||||
if(restrained() || lying || stat || stunned || weakened)
|
||||
return
|
||||
if(!in_range(M, src))
|
||||
return
|
||||
if(!isturf(M.loc) && M.loc != src)
|
||||
return
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/canUseTopic()
|
||||
if(stat)
|
||||
return
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/canUseTopic()
|
||||
if(stat || lockcharge || stunned || weakened)
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/machinery/attack_ai(mob/user as mob)
|
||||
if(isrobot(user))
|
||||
// For some reason attack_robot doesn't work
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
|
||||
/datum/song/Topic(href, href_list)
|
||||
if(!in_range(instrumentObj, usr) || (issilicon(usr) && instrumentObj.loc != usr) || !isliving(usr) || !usr.canmove || usr.restrained())
|
||||
if(usr.canUseTopic(src))
|
||||
usr << browse(null, "window=instrument")
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user