diff --git a/code/game/dna.dm b/code/game/dna.dm
index 9579aa87d25..eafe23a6369 100644
--- a/code/game/dna.dm
+++ b/code/game/dna.dm
@@ -675,16 +675,16 @@
set category = "Object"
set name = "Enter DNA Scanner"
- if (usr.stat != 0)
+ if(usr.stat != 0)
return
- if (!ishuman(usr) && !ismonkey(usr)) //Make sure they're a mob that has dna
- usr << "\blue Try as you might, you can not climb up into the scanner."
+ if(!ishuman(usr) && !ismonkey(usr)) //Make sure they're a mob that has dna
+ usr << "Try as you might, you can not climb up into the scanner."
return
- if (src.occupant)
- usr << "\blue The scanner is already occupied!"
+ if(occupant)
+ usr << "The scanner is already occupied!"
return
- if (usr.abiotic())
- usr << "\blue Subject cannot have abiotic items on."
+ if(usr.abiotic())
+ usr << "Subject cannot have abiotic items on."
return
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
@@ -701,24 +701,25 @@
src.add_fingerprint(usr)
return
-/obj/machinery/dna_scannernew/attackby(obj/item/weapon/grab/G as obj, user as mob)
- if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
+/obj/machinery/dna_scannernew/attackby(obj/item/weapon/grab/G, mob/user)
+ if(!istype(G, /obj/item/weapon/grab) || !ismob(G.affecting))
return
- if (src.occupant)
- user << "\blue The scanner is already occupied!"
+ if(occupant)
+ user << "The scanner is already occupied!"
return
- if (G.affecting.abiotic())
- user << "\blue Subject cannot have abiotic items on."
+ if(G.affecting.abiotic())
+ user << "Subject cannot have abiotic items on."
return
var/mob/M = G.affecting
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
- src.occupant = M
- src.icon_state = "scanner_1"
+ occupant = M
+ user.stop_pulling()
+ icon_state = "scanner_1"
- src.add_fingerprint(user)
+ add_fingerprint(user)
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner
if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index c0945a79f4c..50f34a66b6f 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -14,9 +14,9 @@
var/broken = 0 //Is the flash burnt out?
var/last_used = 0 //last world.time it was used.
-/obj/item/device/flash/proc/clown_check(var/mob/user)
+/obj/item/device/flash/proc/clown_check(mob/user)
if(user && (CLUMSY in user.mutations) && prob(50))
- user << "\red \The [src] slips out of your hand."
+ user << "\red [src] slips out of your hand."
user.drop_item()
return 0
return 1
@@ -32,7 +32,7 @@
times_used = max(0,round(times_used)) //sanity
-/obj/item/device/flash/attack(mob/living/M as mob, mob/user as mob)
+/obj/item/device/flash/attack(mob/living/M, mob/user)
if(!user || !M) return //sanity
M.attack_log += text("\[[time_stamp()]\] Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to flash [M.name] ([M.ckey])")
@@ -42,7 +42,7 @@
if(!clown_check(user)) return
if(broken)
- user << "\The [src] is broken."
+ user << "[src] is broken."
return
flash_recharge()
@@ -70,24 +70,29 @@
M.Weaken(10)
flick("e_flash", M.flash)
- if(ishuman(M) && ishuman(user) && M.stat!=DEAD)
+ if(ishuman(M) && ishuman(user) && M.stat != DEAD)
if(user.mind && user.mind in ticker.mode.head_revolutionaries)
- var/revsafe = 0
- for(var/obj/item/weapon/implant/loyalty/L in M)
- if(L && L.implanted)
- revsafe = 1
- break
- M.mind_initialize() //give them a mind datum if they don't have one.
- if(M.mind.has_been_rev)
- revsafe = 2
- if(!revsafe)
- M.mind.has_been_rev = 1
- ticker.mode.add_revolutionary(M.mind)
- else if(revsafe == 1)
- user << "Something seems to be blocking the flash!"
+ if(M.client)
+ if(M.stat == CONSCIOUS)
+ var/revsafe = 0
+ for(var/obj/item/weapon/implant/loyalty/L in M)
+ if(L && L.implanted)
+ revsafe = 1
+ break
+ M.mind_initialize() //give them a mind datum if they don't have one.
+ if(M.mind.has_been_rev)
+ revsafe = 2
+ if(!revsafe)
+ M.mind.has_been_rev = 1
+ ticker.mode.add_revolutionary(M.mind)
+ else if(revsafe == 1)
+ user << "Something seems to be blocking the flash!"
+ else
+ user << "This mind seems resistant to the flash!"
+ else
+ user << "They must be conscious before you can convert them!"
else
- user << "This mind seems resistant to the flash!"
- user << "This mind is so vacant that it is not susceptible to influence!"
+ user << "This mind is so vacant that it is not susceptible to influence!"
else
flashfail = 1
@@ -119,15 +124,13 @@
user.visible_message("[user] fails to blind [M] with the flash!")
- return
-
-/obj/item/device/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
+/obj/item/device/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
if(!user || !clown_check(user)) return
if(broken)
- user.show_message("The [src.name] is broken", 2)
+ user.show_message("[src] is broken!", 2)
return
flash_recharge()
@@ -196,19 +199,19 @@
desc = "When a problem arises, SCIENCE is the solution."
icon_state = "sflash"
origin_tech = "magnets=2;combat=1"
- var/construction_cost = list("metal"=750,"glass"=750)
+ var/construction_cost = list("metal"=750, "glass"=750)
var/construction_time=100
-/obj/item/device/flash/synthetic/attack(mob/living/M as mob, mob/user as mob)
+/obj/item/device/flash/synthetic/attack(mob/living/M, mob/user)
..()
if(!broken)
broken = 1
- user << "\red The bulb has burnt out!"
+ user << "The bulb has burnt out!"
icon_state = "flashburnt"
-/obj/item/device/flash/synthetic/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
+/obj/item/device/flash/synthetic/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
..()
if(!broken)
broken = 1
- user << "\red The bulb has burnt out!"
+ user << "The bulb has burnt out!"
icon_state = "flashburnt"
diff --git a/code/modules/awaymissions/loot.dm b/code/modules/awaymissions/loot.dm
index 70ec7ddc36c..43c4084384b 100644
--- a/code/modules/awaymissions/loot.dm
+++ b/code/modules/awaymissions/loot.dm
@@ -3,16 +3,15 @@
icon_state = "x2"
var/lootcount = 1 //how many items will be spawned
var/lootdoubles = 0 //if the same item can be spawned twice
- var/loot = "" //a list of possible items to spawn- a string of paths
+ var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
/obj/effect/spawner/lootdrop/initialize()
- var/list/things = params2list(loot)
- if(things && things.len)
+ if(loot && loot.len)
for(var/i = lootcount, i > 0, i--)
- if(!things.len) return
- var/lootspawn = text2path(pick(things))
+ if(!loot.len) return
+ var/lootspawn = pick(loot)
if(!lootdoubles)
- things.Remove(lootspawn)
+ loot.Remove(lootspawn)
new lootspawn(get_turf(src))
del(src)
\ No newline at end of file
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 34319c0d91f..4579c6c51ce 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -142,7 +142,11 @@
else
user << "The pages of [title] have been cut out!"
return
- if(src.dat)
+
+ if(is_blind(user))
+ return
+
+ if(dat)
user << browse("Penned by [author].
" + "[dat]", "window=book")
user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.")
onclose(user, "book")
@@ -165,6 +169,8 @@
user << "There's already something in [title]!"
return
if(istype(W, /obj/item/weapon/pen))
+ if(is_blind(user))
+ return
if(unique)
user << "These pages don't seem to take the ink well. Looks like you can't modify it."
return
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 5c0825b20dd..cd2163355ee 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -379,4 +379,11 @@ var/list/intents = list("help","disarm","grab","hurt")
if(a_intent == "hurt")
hud_used.action_intent.icon_state = "harm"
else
- hud_used.action_intent.icon_state = "help"
\ No newline at end of file
+ hud_used.action_intent.icon_state = "help"
+
+proc/is_blind(A)
+ if(istype(A, /mob/living/carbon))
+ var/mob/living/carbon/C = A
+ if(C.blinded != null)
+ return 1
+ return 0
\ No newline at end of file
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index c88c52c4957..77f97bf356f 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -436,6 +436,9 @@
if(restrained())
return 0
+ if(!isturf(loc)) //if they're in a disposal unit, for example
+ return 1
+
/*
if(istype(src,/mob/living/carbon))
if(src.l_hand && src.r_hand)
diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm
index ff0e2fc7483..a594d2cecaf 100644
--- a/code/modules/paperwork/clipboard.dm
+++ b/code/modules/paperwork/clipboard.dm
@@ -120,12 +120,7 @@
if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if(P)
- if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
- usr << browse("