diff --git a/code/modules/examine/descriptions/armor.dm b/code/modules/examine/descriptions/armor.dm new file mode 100644 index 00000000000..17b2fd1fed2 --- /dev/null +++ b/code/modules/examine/descriptions/armor.dm @@ -0,0 +1,58 @@ +/obj/item/clothing/proc/describe_armor(var/armor_type, var/descriptive_attack_type) + if(armor[armor_type]) + switch(armor[armor_type]) + if(1 to 20) + return "It barely protects against [descriptive_attack_type]." + if(21 to 30) + return "It provides a very small defense against [descriptive_attack_type]." + if(31 to 40) + return "It offers a small amount of protection against [descriptive_attack_type]." + if(41 to 50) + return "It offers a moderate defense against [descriptive_attack_type]." + if(51 to 60) + return "It provides a strong defense against [descriptive_attack_type]." + if(61 to 70) + return "It is very strong against [descriptive_attack_type]." + if(71 to 80) + return "This gives a very robust defense against [descriptive_attack_type]." + if(81 to 99) + return "Wearing this would make you nigh-invulerable against [descriptive_attack_type]." + if(100) + return "You would be immune to [descriptive_attack_type] if you wore this." + + + +/obj/item/clothing/get_description_info() + var/armor_stats = description_info + "\ +
" + + if(armor["melee"]) + armor_stats += "[describe_armor("melee","blunt force")] \n" + if(armor["bullet"]) + armor_stats += "[describe_armor("bullet","ballistics")] \n" + if(armor["laser"]) + armor_stats += "[describe_armor("laser","lasers")] \n" + if(armor["energy"]) + armor_stats += "[describe_armor("energy","energy")] \n" + if(armor["bomb"]) + armor_stats += "[describe_armor("bomb","explosions")] \n" + if(armor["bio"]) + armor_stats += "[describe_armor("bio","biohazards")] \n" + if(armor["rad"]) + armor_stats += "[describe_armor("rad","radiation")] \n" + + armor_stats += "\n" + + if(flags & AIRTIGHT) + armor_stats += "It is airtight. \n" + + if(flags & STOPPRESSUREDAMAGE) + armor_stats += "Wearing this will protect you from the vacuum of space. \n" + + if(max_heat_protection_temperature == FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE) + armor_stats += "It provides very good protection against fire and heat. \n" + + if(min_cold_protection_temperature == SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE) + armor_stats += "It provides very good protection against very cold temperatures. \n" + + return armor_stats \ No newline at end of file diff --git a/code/modules/examine/stat_icons.dm b/code/modules/examine/stat_icons.dm new file mode 100644 index 00000000000..77d97fe0a17 --- /dev/null +++ b/code/modules/examine/stat_icons.dm @@ -0,0 +1,10 @@ +//Some global icons for the examine tab to use to display some item properties. +var/global/list/description_icons = list( + "melee_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="melee_protection"), + "bullet_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="bullet_protection"), + "laser_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="laser_protection"), + "energy_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="energy_protection"), + "bomb_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="bomb_protection"), + "radiation_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="radiation_protection"), + "biohazard_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="biohazard_protection") + ) \ No newline at end of file diff --git a/icons/mob/screen1_stats.dmi b/icons/mob/screen1_stats.dmi new file mode 100644 index 00000000000..381f6a36602 Binary files /dev/null and b/icons/mob/screen1_stats.dmi differ diff --git a/polaris.dme b/polaris.dme index 4653cf1d9df..862d336957b 100644 --- a/polaris.dme +++ b/polaris.dme @@ -1059,6 +1059,8 @@ #include "code\modules\events\viral_infection.dm" #include "code\modules\events\wallrot.dm" #include "code\modules\examine\examine.dm" +#include "code\modules\examine\stat_icons.dm" +#include "code\modules\examine\descriptions\armor.dm" #include "code\modules\examine\descriptions\atmospherics.dm" #include "code\modules\examine\descriptions\engineering.dm" #include "code\modules\examine\descriptions\medical.dm"