mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
Merge pull request #188 from Neerti/9/6/2015_description_armor
Adds system to describe how protective a piece of clothing is.
This commit is contained in:
@@ -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 + "\
|
||||
<br>"
|
||||
|
||||
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
|
||||
@@ -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")
|
||||
)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user