Attempting to limit object checks.

This commit is contained in:
Zuhayr
2016-01-01 11:57:09 +10:30
parent b65649faad
commit 3044496ae9
10 changed files with 26 additions and 9 deletions

View File

@@ -175,6 +175,8 @@
L |= I L |= I
else if(istype(I,/obj/)) else if(istype(I,/obj/))
var/obj/check_obj = I
if(check_obj.show_messages)
if(!sight_check || isInSight(I, O)) if(!sight_check || isInSight(I, O))
L |= recursive_content_check(I, L, recursion_limit - 1, client_check, sight_check, include_mobs, include_objects) L |= recursive_content_check(I, L, recursion_limit - 1, client_check, sight_check, include_mobs, include_objects)
if(include_objects) if(include_objects)
@@ -203,7 +205,8 @@
hear += M hear += M
else if(istype(I,/obj/)) else if(istype(I,/obj/))
hear |= recursive_content_check(I, hear, 3, 1, 0, include_mobs, include_objects) hear |= recursive_content_check(I, hear, 3, 1, 0, include_mobs, include_objects)
if(include_objects) var/obj/O = I
if(O.show_messages && include_objects)
hear += I hear += I
return hear return hear

View File

@@ -5,6 +5,8 @@
item_state = "electronic" item_state = "electronic"
w_class = 2.0 w_class = 2.0
slot_flags = SLOT_BELT slot_flags = SLOT_BELT
show_messages = 1
var/flush = null var/flush = null
origin_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4) origin_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4)

View File

@@ -12,6 +12,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
icon_state = "communicator" icon_state = "communicator"
w_class = 2.0 w_class = 2.0
slot_flags = SLOT_ID | SLOT_BELT slot_flags = SLOT_ID | SLOT_BELT
show_messages = 1
origin_tech = list(TECH_ENGINEERING = 2, TECH_MAGNET = 2, TECH_BLUESPACE = 2, TECH_DATA = 2) origin_tech = list(TECH_ENGINEERING = 2, TECH_MAGNET = 2, TECH_BLUESPACE = 2, TECH_DATA = 2)
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10) matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10)

View File

@@ -6,6 +6,8 @@
w_class = 2.0 w_class = 2.0
slot_flags = SLOT_BELT slot_flags = SLOT_BELT
origin_tech = list(TECH_DATA = 2) origin_tech = list(TECH_DATA = 2)
show_messages = 1
var/obj/item/device/radio/radio var/obj/item/device/radio/radio
var/looking_for_personality = 0 var/looking_for_personality = 0
var/mob/living/silicon/pai/pai var/mob/living/silicon/pai/pai

View File

@@ -15,10 +15,12 @@
var/list/storedinfo = new/list() var/list/storedinfo = new/list()
var/list/timestamp = new/list() var/list/timestamp = new/list()
var/canprint = 1 var/canprint = 1
flags = CONDUCT flags = CONDUCT
throwforce = 2 throwforce = 2
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20
show_messages = 1
/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg, var/verb="says", datum/language/speaking=null) /obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg, var/verb="says", datum/language/speaking=null)
if(recording) if(recording)

View File

@@ -9,6 +9,8 @@
name = "storage" name = "storage"
icon = 'icons/obj/storage.dmi' icon = 'icons/obj/storage.dmi'
w_class = 3 w_class = 3
show_messages = 1
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else) var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set) var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
var/list/is_seeing = new/list() //List of mobs which are currently seeing the contents of this item's storage var/list/is_seeing = new/list() //List of mobs which are currently seeing the contents of this item's storage

View File

@@ -14,6 +14,7 @@
var/damtype = "brute" var/damtype = "brute"
var/force = 0 var/force = 0
var/armor_penetration = 0 var/armor_penetration = 0
var/show_messages
/obj/Destroy() /obj/Destroy()
processing_objects -= src processing_objects -= src

View File

@@ -516,6 +516,8 @@ BLIND // can't see anything
slot_flags = SLOT_ICLOTHING slot_flags = SLOT_ICLOTHING
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
w_class = 3 w_class = 3
show_messages = 1
var/has_sensor = 1 //For the crew computer 2 = unable to change mode var/has_sensor = 1 //For the crew computer 2 = unable to change mode
var/sensor_mode = 0 var/sensor_mode = 0
/* /*

View File

@@ -3,6 +3,8 @@
desc = "Used to hold things when you don't have enough hands." desc = "Used to hold things when you don't have enough hands."
icon_state = "webbing" icon_state = "webbing"
slot = "utility" slot = "utility"
show_messages = 1
var/slots = 3 var/slots = 3
var/obj/item/weapon/storage/internal/hold var/obj/item/weapon/storage/internal/hold
w_class = 3.0 w_class = 3.0

View File

@@ -88,8 +88,8 @@
for(var/I in see) for(var/I in see)
if(isobj(I)) if(isobj(I))
spawn(0) //spawn(0)
if(I) //It's possible that it could be deleted in the meantime. //if(I) //It's possible that it could be deleted in the meantime.
var/obj/O = I var/obj/O = I
O.show_message( message, 1, blind_message, 2) O.show_message( message, 1, blind_message, 2)
else if(ismob(I)) else if(ismob(I))