From b8e3d4567149d7434015562c457b1612e1657f16 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Mon, 30 Jun 2014 22:48:05 +0930 Subject: [PATCH] Cleaned up some reagent stuff, made Skrell alcoholics a legit issue, fixed IPC getting phoron contamination from clothing. Conflicts: code/modules/mob/living/carbon/human/life.dm code/modules/mob/living/carbon/species.dm code/modules/reagents/Chemistry-Reagents.dm code/setup.dm --- code/modules/mob/living/carbon/human/life.dm | 20 +++++++++----------- code/modules/mob/living/carbon/species.dm | 10 ++++++++++ code/modules/reagents/Chemistry-Reagents.dm | 12 +++++------- code/setup.dm | 18 +++++++++++++----- 4 files changed, 37 insertions(+), 23 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 2afb026b905..4e54181b5f3 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1082,20 +1082,18 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc proc/handle_chemicals_in_body() if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents. - var/alien = 0 //Not the best way to handle it, but neater than checking this for every single reagent proc. - if(species && species.name == "Diona") - alien = 1 - else if(species && species.name == "Vox") - alien = 2 + var/alien = 0 + if(species && species.reagent_tag) + alien = species.reagent_tag reagents.metabolize(src,alien) - var/total_plasmaloss = 0 - for(var/obj/item/I in src) - if(I.contaminated) - total_plasmaloss += vsc.plc.CONTAMINATION_LOSS -// total_plasmaloss += zas_settings.Get("CONTAMINATION_LOSS") + var/total_plasmaloss = 0 + for(var/obj/item/I in src) + if(I.contaminated) + total_plasmaloss += vsc.plc.CONTAMINATION_LOSS + if(!(status_flags & GODMODE)) adjustToxLoss(total_plasmaloss) + if(status_flags & GODMODE) return 0 //godmode - adjustToxLoss(total_plasmaloss) if(species.flags & REQUIRE_LIGHT) var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm index 318d85ca542..41560fc4d76 100644 --- a/code/modules/mob/living/carbon/species.dm +++ b/code/modules/mob/living/carbon/species.dm @@ -30,6 +30,7 @@ var/body_temperature = 310.15 //non-IS_SYNTHETIC species will try to stabilize at this temperature. (also affects temperature processing) var/synth_temp_gain = 0 //IS_SYNTHETIC species will gain this much temperature every second + var/reagent_tag //Used for metabolizing reagents. var/darksight = 2 var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure. @@ -155,6 +156,7 @@ flesh_color = "#34AF10" + reagent_tag = IS_UNATHI /datum/species/tajaran name = "Tajaran" @@ -196,6 +198,8 @@ flesh_color = "#8CD7A3" + reagent_tag = IS_SKRELL + /datum/species/vox name = "Vox" icobase = 'icons/mob/human_races/r_vox.dmi' @@ -220,6 +224,8 @@ flesh_color = "#808D11" + reagent_tag = IS_VOX + makeName(var/gender,var/mob/living/carbon/human/H=null) var/sounds = rand(2,8) var/i = 0 @@ -271,6 +277,8 @@ blood_color = "#2299FC" flesh_color = "#808D11" + reagent_tag = IS_VOX + tail = "armalis_tail" icon_template = 'icons/mob/human_races/r_armalis.dmi' @@ -378,6 +386,8 @@ blood_color = "#004400" flesh_color = "#907E4A" + reagent_tag = IS_DIONA + /datum/species/diona/handle_post_spawn(var/mob/living/carbon/human/H) H.gender = NEUTER diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 5c20c65cc1d..f3ecc23f59c 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -5,10 +5,6 @@ #define REAGENTS_OVERDOSE 30 #define REM REAGENTS_EFFECT_MULTIPLIER -//Some on_mob_life() procs check for alien races. -#define IS_DIONA 1 -#define IS_VOX 2 - //The reaction procs must ALWAYS set src = null, this detaches the proc from the object (the reagent) //so that it can continue working when the reagent is deleted while the proc is still active. @@ -3232,11 +3228,10 @@ datum var/blur_start = 260 //amount absorbed after which mob starts getting blurred vision var/pass_out = 325 //amount absorbed after which mob starts passing out - on_mob_life(var/mob/living/M as mob) + on_mob_life(var/mob/living/M as mob, var/alien) // Sobering multiplier. // Sober block makes it more difficult to get drunk var/sober_str=!(M_SOBER in M.mutations)?1:2 - M:nutrition += nutriment_factor holder.remove_reagent(src.id, FOOD_METABOLISM) if(!src.data) data = 1 @@ -3250,7 +3245,10 @@ datum d/=sober_str - M.dizziness +=dizzy_adj. + if(alien && alien == IS_SKRELL) //Skrell get very drunk very quickly. + d*=5 + + M.dizziness += dizzy_adj. if(d >= slur_start && d < pass_out) if (!M:slurring) M:slurring = 1 M:slurring += slurr_adj/sober_str diff --git a/code/setup.dm b/code/setup.dm index a289fb3d6b9..858c3b8cc1e 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -812,6 +812,8 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse //Language flags. #define WHITELISTED 1 // Language is available if the speaker is whitelisted. #define RESTRICTED 2 // Language can only be accquired by spawning or an admin. +#define NONVERBAL 4 // Language has a significant non-verbal component. Speech is garbled without line-of-sight +#define SIGNLANG 8 // Language is completely non-verbal. Speech is displayed through emotes for those who can understand. //Flags for zone sleeping #define ZONE_ACTIVE 1 @@ -874,6 +876,12 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse #define INFECTION_LEVEL_TWO 500 #define INFECTION_LEVEL_THREE 1000 +//Ferry shuttle processing status +#define IDLE_STATE 0 +#define WAIT_LAUNCH 1 +#define WAIT_ARRIVE 2 +#define WAIT_FINISH 3 + //computer3 error codes, move lower in the file when it passes dev -Sayu #define PROG_CRASH 1 // Generic crash #define MISSING_PERIPHERAL 2 // Missing hardware @@ -882,8 +890,8 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse #define FILE_DRM 16 // Some files want to not be copied/moved. This is them complaining that you tried. #define NETWORK_FAILURE 32 -//Ferry shuttle processing status -#define IDLE_STATE 0 -#define WAIT_LAUNCH 1 -#define WAIT_ARRIVE 2 -#define WAIT_FINISH 3 +//Some on_mob_life() procs check for alien races. +#define IS_DIONA 1 +#define IS_VOX 2 +#define IS_SKRELL 3 +#define IS_UNATHI 4