Merge pull request #8415 from mwerezak/runtimes

More runtime fixes
This commit is contained in:
PsiOmegaDelta
2015-03-09 17:51:59 +01:00
8 changed files with 23 additions and 26 deletions

View File

@@ -75,8 +75,9 @@
for(var/camera in cameras)
var/obj/machinery/camera/c = camera
if(!c)
if(!istype(c))
cameras -= c
continue
if(!c.can_use())
continue

View File

@@ -23,9 +23,9 @@
var/stamps //The (text for the) stamps on the paper.
var/fields //Amount of user created fields
var/list/stamped
var/ico[0] //Icons and
var/offset_x[0] //offsets stored for later
var/offset_y[0] //usage by the photocopier
var/list/ico[0] //Icons and
var/list/offset_x[0] //offsets stored for later
var/list/offset_y[0] //usage by the photocopier
var/rigged = 0
var/spam_flag = 0

View File

@@ -175,7 +175,7 @@
c.offset_y = copy.offset_y
var/list/temp_overlays = copy.overlays //Iterates through stamps
var/image/img //and puts a matching
for (var/j = 1, j <= temp_overlays.len, j++) //gray overlay onto the copy
for (var/j = 1, j <= min(temp_overlays.len, copy.ico.len), j++) //gray overlay onto the copy
if (findtext(copy.ico[j], "cap") || findtext(copy.ico[j], "cent"))
img = image('icons/obj/bureaucracy.dmi', "paper_stamp-circle")
else if (findtext(copy.ico[j], "deny"))

View File

@@ -545,13 +545,9 @@
new_item.desc = src.desc
if(talkative)
new_item.talking_atom = new()
talking_atom.holder_atom = new_item
talking_atom.init()
new_item.talking_atom = new(new_item)
del(src)
else if(talkative)
src.talking_atom = new()
talking_atom.holder_atom = src
talking_atom.init()
src.talking_atom = new(src)

View File

@@ -14,6 +14,10 @@
var/talk_interval = 50
var/talk_chance = 10
/datum/talking_atom/New(atom/holder)
holder_atom = holder
init()
/datum/talking_atom/proc/init()
if(holder_atom)
processing_objects.Add(src)
@@ -55,7 +59,7 @@
if(prob(30))
var/list/options = list("[holder_atom] seems to be listening intently to [source]...",\
"[holder_atom] seems to be focussing on [source]...",\
"[holder_atom] seems to be focusing on [source]...",\
"[holder_atom] seems to turn it's attention to [source]...")
holder_atom.loc.visible_message("\blue \icon[holder_atom] [pick(options)]")