Defining Part 4 - Code cleanup toward defines (... and the rest) (#19388)

* I wasn't done

* nits
This commit is contained in:
Vi3trice
2022-10-28 19:28:23 +02:00
committed by GitHub
parent 9400729a28
commit 03ce2920e1
127 changed files with 268 additions and 257 deletions
+3 -3
View File
@@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(PDAs)
var/mob/M = loc
if(M.incapacitated())
return 0
if((src in M.contents) || ( istype(loc, /turf) && in_range(src, M) ))
if((src in M.contents) || ( isturf(loc) && in_range(src, M) ))
return 1
else
return 0
@@ -218,7 +218,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if(O)
to_chat(user, "<span class='notice'>You remove [O] from [src].</span>")
playsound(src, 'sound/machines/pda_button2.ogg', 50, TRUE)
if(istype(loc, /mob))
if(ismob(loc))
var/mob/M = loc
if(M.get_active_hand() == null)
M.put_in_hands(O)
@@ -280,7 +280,7 @@ GLOBAL_LIST_EMPTY(PDAs)
playsound(src, 'sound/machines/terminal_success.ogg', 50, TRUE)
else
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
if(((src in user.contents) && (C in user.contents)) || (isturf(loc) && in_range(src, user) && (C in user.contents)) )
if( can_use(user) )//If they can still act.
id_check(user, 2)
to_chat(user, "<span class='notice'>You put the ID into \the [src]'s slot.<br>You can remove it with ALT click.</span>")