Saycode refactor/improvements

- Refactored multiple bits of saycode to be less eyeburning code
 - Radios now properly report special channel messages (binary, hivemind)
 - Animals with no speak list no longer show unfiltered messages to
   everyone.

 - Fun part:
   - Improves handling of headsets for the two ear system.
     - The right headset will now be talked into if the left headset
       reports that it is unable to send the message on the chosen
       channel/mode.
     - This means that instead of having to swap headsets around, wearing
       a headset on either ear will grant you access to all of it's
       channels.
     - The left headset will take priority, which really only affects when
       it's set to a non-standard frequency.
This commit is contained in:
Tigercat2000
2016-07-18 19:17:11 -07:00
parent a28ae804b9
commit 9f8ba253c9
12 changed files with 174 additions and 160 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
#define isatom(A) istype(A, /atom)
#define ismovableatom(A) istype(A, /atom/movable)
#define isclient(A) istype(A, /client)
#define isclient(A) istype(A, /client)
#define isradio(A) istype(A, /obj/item/device/radio)
+4
View File
@@ -269,3 +269,7 @@
// Macro to get the current elapsed round time, rather than total world runtime
#define ROUND_TIME (round_start_time ? (world.time - round_start_time) : 0)
// Used by radios to indicate that they have sent a message via something other than subspace
#define RADIO_CONNECTION_FAIL 0
#define RADIO_CONNECTION_NON_SUBSPACE 1
+6 -3
View File
@@ -103,10 +103,7 @@
#define CHEM_MOB_SPAWN_HOSTILE 1
#define CHEM_MOB_SPAWN_FRIENDLY 2
#define isobserver(A) (istype((A), /mob/dead/observer))
#define isliving(A) (istype((A), /mob/living))
#define isAutoAnnouncer(A) (istype((A), /mob/living/automatedannouncer))
#define iscarbon(A) (istype((A), /mob/living/carbon))
#define ishuman(A) (istype((A), /mob/living/carbon/human))
#define isbrain(A) (istype((A), /mob/living/carbon/brain))
@@ -127,12 +124,18 @@
#define isrobot(A) (istype((A), /mob/living/silicon/robot))
#define ispAI(A) (istype((A), /mob/living/silicon/pai))
#define isAutoAnnouncer(A) (istype((A), /mob/living/automatedannouncer))
#define isAIEye(A) (istype((A), /mob/camera/aiEye))
#define isovermind(A) (istype((A), /mob/camera/blob))
#define isSpirit(A) (istype((A), /mob/spirit))
#define ismask(A) (istype((A), /mob/spirit/mask))
#define isobserver(A) (istype((A), /mob/dead/observer))
#define isnewplayer(A) (istype((A), /mob/new_player))
#define isorgan(A) (istype((A), /obj/item/organ/external))
#define hasorgans(A) (ishuman(A))