Does some code standardization/consistency

This commit is contained in:
Firecage
2017-10-05 11:13:47 +02:00
parent 511e357472
commit 2ae0380fef
154 changed files with 935 additions and 475 deletions

View File

@@ -76,7 +76,8 @@
// This is necessary for storage items not on your person.
/obj/item/Adjacent(var/atom/neighbor, var/recurse = 1)
if(neighbor == loc) return 1
if(neighbor == loc)
return 1
if(isitem(loc))
if(recurse > 0)
return loc.Adjacent(neighbor,recurse - 1)

View File

@@ -6,11 +6,12 @@
almost anything into a trash can.
*/
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
if(!usr || !over)
if(!usr || !over)
return
if(over == src)
return usr.client.Click(src, src_location, src_control, params)
if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows
if(!Adjacent(usr) || !over.Adjacent(usr))
return // should stop you from dragging through windows
over.MouseDrop_T(src,usr)
return

View File

@@ -577,8 +577,10 @@ so as to remain in compliance with the most up-to-date laws."
var/atom/target = null
/obj/screen/alert/hackingapc/Click()
if(!usr || !usr.client) return
if(!target) return
if(!usr || !usr.client)
return
if(!target)
return
var/mob/living/silicon/ai/AI = usr
var/turf/T = get_turf(target)
if(T)
@@ -601,7 +603,8 @@ so as to remain in compliance with the most up-to-date laws."
timeout = 300
/obj/screen/alert/notify_cloning/Click()
if(!usr || !usr.client) return
if(!usr || !usr.client)
return
var/mob/dead/observer/G = usr
G.reenter_corpse()
@@ -614,10 +617,13 @@ so as to remain in compliance with the most up-to-date laws."
var/action = NOTIFY_JUMP
/obj/screen/alert/notify_action/Click()
if(!usr || !usr.client) return
if(!target) return
if(!usr || !usr.client)
return
if(!target)
return
var/mob/dead/observer/G = usr
if(!istype(G)) return
if(!istype(G))
return
switch(action)
if(NOTIFY_ATTACK)
target.attack_ghost(G)

View File

@@ -180,7 +180,8 @@
/datum/hud/proc/toggle_show_robot_modules()
if(!iscyborg(mymob)) return
if(!iscyborg(mymob))
return
var/mob/living/silicon/robot/R = mymob
@@ -188,7 +189,8 @@
update_robot_modules_display()
/datum/hud/proc/update_robot_modules_display(mob/viewer)
if(!iscyborg(mymob)) return
if(!iscyborg(mymob))
return
var/mob/living/silicon/robot/R = mymob

View File

@@ -324,7 +324,8 @@
usr.stop_pulling()
/obj/screen/pull/update_icon(mob/mymob)
if(!mymob) return
if(!mymob)
return
if(mymob.pulling)
icon_state = "pull"
else