From 556196420414b7b790b6458f2bbe2d7d79ccaeab Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 4 Dec 2015 16:49:21 +1030 Subject: [PATCH] Tweaks to previous commits. --- code/__defines/damage_organs.dm | 24 +++++++++---------- code/game/machinery/rechargestation.dm | 3 ++- code/modules/client/preferences.dm | 5 ++-- code/modules/mob/language/station.dm | 6 ++--- .../living/carbon/human/species/species.dm | 3 +++ .../carbon/human/species/station/station.dm | 5 +++- 6 files changed, 26 insertions(+), 20 deletions(-) diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm index 4e3270b3324..ca9cd285106 100644 --- a/code/__defines/damage_organs.dm +++ b/code/__defines/damage_organs.dm @@ -29,18 +29,18 @@ #define FIRE_DAMAGE_MODIFIER 0.0215 // Higher values result in more external fire damage to the skin. (default 0.0215) #define AIR_DAMAGE_MODIFIER 2.025 // More means less damage from hot air scalding lungs, less = more damage. (default 2.025) -/*// Organ defines. -#define ORGAN_CUT_AWAY 1<<0 -#define ORGAN_BLEEDING 1<<1 -#define ORGAN_BROKEN 1<<2 -#define ORGAN_DESTROYED 1<<3 -#define ORGAN_ROBOT 1<<4 -#define ORGAN_SPLINTED 1<<5 -#define ORGAN_DEAD 1<<6 -#define ORGAN_MUTATED 1<<7 -#define ORGAN_ASSISTED 1<<8*/ - // Organ defines. +#define ORGAN_CUT_AWAY (1<<0) +#define ORGAN_BLEEDING (1<<1) +#define ORGAN_BROKEN (1<<2) +#define ORGAN_DESTROYED (1<<3) +#define ORGAN_ROBOT (1<<4) +#define ORGAN_SPLINTED (1<<5) +#define ORGAN_DEAD (1<<6) +#define ORGAN_MUTATED (1<<7) +#define ORGAN_ASSISTED (1<<8) + +/*// Organ defines. #define ORGAN_CUT_AWAY 1 #define ORGAN_BLEEDING 2 #define ORGAN_BROKEN 4 @@ -49,7 +49,7 @@ #define ORGAN_SPLINTED 32 #define ORGAN_DEAD 64 #define ORGAN_MUTATED 128 -#define ORGAN_ASSISTED 256 +#define ORGAN_ASSISTED 256*/ #define DROPLIMB_EDGE 0 #define DROPLIMB_BLUNT 1 diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 01d3d72dac5..c35c419a42b 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -105,8 +105,9 @@ R.adjustFireLoss(-wire_rate) else if(istype(occupant, /mob/living/carbon/human)) var/mob/living/carbon/human/H = occupant - if(!isnull(H.internal_organs_by_name["cell"] && H.nutrition < 450)) + if(!isnull(H.internal_organs_by_name["cell"]) && H.nutrition < 450) H.nutrition = min(H.nutrition+10, 450) + cell.use(7000/450*10) /obj/machinery/recharge_station/examine(mob/user) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 1cbdc095949..08f991dacd2 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1184,8 +1184,9 @@ datum/preferences var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null if (!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.) var/new_name - if(species == "Machine") - new_name = sanitizeName(raw_name,,1) + var/datum/species/S = all_species[species] + if(istype(S)) + new_name = S.sanitize_name(raw_name) else new_name = sanitizeName(raw_name) if(new_name) diff --git a/code/modules/mob/language/station.dm b/code/modules/mob/language/station.dm index a0b686a3144..e391dd2d0f0 100644 --- a/code/modules/mob/language/station.dm +++ b/code/modules/mob/language/station.dm @@ -107,12 +107,10 @@ space_chance = 10 /datum/language/machine/get_random_name() - var/new_name if(prob(70)) - new_name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]" + return "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]" else - new_name = pick(ai_names) - return new_name + return pick(ai_names) //Syllable Lists /* diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index feb0725d5c8..f31d396fde1 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -154,6 +154,9 @@ for(var/u_type in unarmed_types) unarmed_attacks += new u_type() +/datum/species/proc/sanitize_name(var/new_name) + return sanitizeName(new_name) + /datum/species/proc/get_station_variant() return name diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index 403f0861599..20695578ff2 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -266,7 +266,7 @@ cold_level_2 = -1 cold_level_3 = -1 - heat_level_1 = 398.15 // Start taking damage above ~125 Degrees C + heat_level_1 = 500 // Gives them about 25 seconds in space before taking damage heat_level_2 = 1000 heat_level_3 = 2000 @@ -312,3 +312,6 @@ H.h_style = "" spawn(100) if(H) H.update_hair() + +/datum/species/machine/sanitize_name(var/new_name) + return sanitizeName(new_name,allow_numbers=1)