From ec3be464f3dba319793371eb9dfc1827cc5ef084 Mon Sep 17 00:00:00 2001 From: Remie Richards Date: Sun, 18 Oct 2015 17:17:27 +0100 Subject: [PATCH] Allows Species to set custom say spans. --- code/__DEFINES/say.dm | 1 + code/game/dna.dm | 7 +++++++ code/modules/mob/living/carbon/human/say.dm | 2 +- code/modules/mob/living/carbon/human/species.dm | 4 ++++ .../modules/mob/living/carbon/human/species_types.dm | 12 ++++++++++++ interface/stylesheet.dm | 1 + 6 files changed, 26 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/say.dm b/code/__DEFINES/say.dm index 00a18d9876e..8eae01b4869 100644 --- a/code/__DEFINES/say.dm +++ b/code/__DEFINES/say.dm @@ -22,6 +22,7 @@ #define SPAN_YELL "yell" #define SPAN_ITALICS "italics" #define SPAN_SANS "sans" +#define SPAN_PAPYRUS "papyrus" #define SPAN_REALLYBIG "reallybig" //bitflag #defines for return value of the radio() proc. diff --git a/code/game/dna.dm b/code/game/dna.dm index 33615f83cfb..098f89c9dd2 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -133,6 +133,13 @@ spans |= M.get_spans() return spans +/datum/dna/proc/species_get_spans() + var/list/spans = list() + if(species) + spans |= species.get_spans() + return spans + + /datum/dna/proc/is_same_as(datum/dna/D) if(uni_identity == D.uni_identity && struc_enzymes == D.struc_enzymes && real_name == D.real_name) if(species.type == D.species.type && features == D.features && blood_type == D.blood_type) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 4720ac6a5cf..4e6ecfd507d 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -28,7 +28,7 @@ return message /mob/living/carbon/human/get_spans() - return ..() | dna.mutations_get_spans() + return ..() | dna.mutations_get_spans() | dna.species_get_spans() /mob/living/carbon/human/GetVoice() if(istype(wear_mask, /obj/item/clothing/mask/gas/voice)) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 23a29789fea..a66a685f645 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -588,6 +588,10 @@ /datum/species/proc/handle_speech(message, mob/living/carbon/human/H) return message +//return a list of spans or an empty list +/datum/species/proc/get_spans() + return list() + //////// //LIFE// //////// diff --git a/code/modules/mob/living/carbon/human/species_types.dm b/code/modules/mob/living/carbon/human/species_types.dm index 653231a999e..ba1c06d5145 100644 --- a/code/modules/mob/living/carbon/human/species_types.dm +++ b/code/modules/mob/living/carbon/human/species_types.dm @@ -325,6 +325,18 @@ datum/species/human/spec_death(gibbed, mob/living/carbon/human/H) sexes = 0 meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/skeleton specflags = list(NOBREATH,HEATRES,COLDRES,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE) + var/list/myspan = null + + +/datum/species/skeleton/New() + ..() + myspan = list(pick(SPAN_SANS,SPAN_PAPYRUS)) //pick a span and stick with it for the round + + +/datum/species/skeleton/get_spans() + return myspan + + /* ZOMBIES */ diff --git a/interface/stylesheet.dm b/interface/stylesheet.dm index c6e664acdcc..f8ac44a7c49 100644 --- a/interface/stylesheet.dm +++ b/interface/stylesheet.dm @@ -78,6 +78,7 @@ h1.alert, h2.alert {color: #000000;} .interface {color: #330033;} .sans {font-family: "Comic Sans MS", cursive, sans-serif;} +.papyrus {font-family: "Papyrus", cursive, sans-serif;} .robot {font-family: "Courier New", cursive, sans-serif;} .big {font-size: 3;}