diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 19e1562b183..9aa28fbabb2 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -76,25 +76,6 @@ proc/age2agedescription(age) if(70 to INFINITY) return "elderly" else return "unknown" -/* -Proc for attack log creation, because really why not -1 argument is the actor -2 argument is the target of action -3 is the description of action(like punched, throwed, or any other verb) -4 is the tool with which the action was made(usually item) -5 is additional information, anything that needs to be added -*/ - -proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=null) - if(ismob(user)) - user.attack_log += text("\[[time_stamp()]\] Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]") - if(ismob(target)) - target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [user.name][ismob(user) ? "([user.ckey])" : ""][object ? " with [object]" : " "][addition]") - log_attack("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]") - if(target.client) - if(what_done != ("shaked" || "CPRed" || "grabbed")) - message_admins("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition](JMP)") - proc/RoundHealth(health) switch(health) if(100 to INFINITY) @@ -117,3 +98,21 @@ proc/RoundHealth(health) return "health-100" return "0" +/* +Proc for attack log creation, because really why not +1 argument is the actor +2 argument is the target of action +3 is the description of action(like punched, throwed, or any other verb) +4 is the tool with which the action was made(usually item) +5 is additional information, anything that needs to be added +*/ + +proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=null) + if(ismob(user)) + user.attack_log += text("\[[time_stamp()]\] Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]") + if(ismob(target)) + target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [user.name][ismob(user) ? "([user.ckey])" : ""][object ? " with [object]" : " "][addition]") + log_attack("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]") + if(target.client) + if(what_done != ("shaked" || "CPRed" || "grabbed")) + message_admins("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition](JMP)") diff --git a/code/global.dm b/code/global.dm index 6b24882e6fd..af7969de32c 100644 --- a/code/global.dm +++ b/code/global.dm @@ -112,6 +112,7 @@ var/href_logfile = null var/station_name = "NSS Cyberiad" var/game_version = "Custom ParaCode" var/changelog_hash = "" +var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544) var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null var/going = 1.0 @@ -302,4 +303,4 @@ var/score_dmgestkey = null // Recall time limit: 2 hours -var/recall_time_limit=72000 +var/recall_time_limit=72000 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 33834afc77c..30b25411034 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -732,10 +732,10 @@ counter++ if(istype(usr,/mob/living/carbon/human)) var/mob/living/carbon/human/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], 2557
[t1]") + R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
[t1]") if(istype(usr,/mob/living/silicon/robot)) var/mob/living/silicon/robot/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], 2557
[t1]") + R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
[t1]") if (href_list["medical"]) if(hasHUD(usr,"medical")) @@ -861,10 +861,18 @@ counter++ if(istype(usr,/mob/living/carbon/human)) var/mob/living/carbon/human/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], 2557
[t1]") + R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
[t1]") if(istype(usr,/mob/living/silicon/robot)) var/mob/living/silicon/robot/U = usr - R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], 2557
[t1]") + R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
[t1]") + + if (href_list["lookitem"]) + var/obj/item/I = locate(href_list["lookitem"]) + I.examine() + + if (href_list["lookmob"]) + var/mob/M = locate(href_list["lookmob"]) + M.examine() ..() return @@ -1133,6 +1141,7 @@ O.status &= ~ORGAN_ATTACHABLE if (!O.amputated) O.status &= ~ORGAN_DESTROYED + O.destspawn = 0 O.wounds.Cut() O.heal_damage(1000,1000,1,1) @@ -1219,10 +1228,11 @@ verbs += /mob/living/carbon/human/proc/bloody_doodle return 1 //we applied blood to the item -/mob/living/carbon/human/clean_blood() +/mob/living/carbon/human/clean_blood(var/clean_feet) .=..() - if(istype(feet_blood_DNA, /list) && feet_blood_DNA.len) + if(clean_feet && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len) del(feet_blood_DNA) + update_inv_shoes(1) return 1 /mob/living/carbon/human/get_visible_implants(var/class = 0) @@ -1290,7 +1300,6 @@ else usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]." - /mob/living/carbon/human/proc/set_species(var/new_species, var/force_organs) if(!dna) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d2c0e011d56..4903375e81e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -132,6 +132,7 @@ if(life_tick > 5 && timeofdeath && (timeofdeath < 5 || world.time - timeofdeath > 6000)) //We are long dead, or we're junk mobs spawned like the clowns on the clown shuttle return //We go ahead and process them 5 times for HUD images and other stuff though. + //Handle temperature/pressure differences between body and environment handle_environment(environment) //Optimized a good bit. @@ -282,7 +283,7 @@ var/rads = radiation/25 radiation -= rads nutrition += rads - heal_overall_damage(rads,rads) + adjustBruteLoss(-(rads)) adjustOxyLoss(-(rads)) adjustToxLoss(-(rads)) updatehealth() @@ -1256,8 +1257,8 @@ if(hud_updateflag) handle_hud_list() - if(!client) return 0 + if(!client) return 0 if(hud_updateflag) handle_hud_list() @@ -1267,7 +1268,7 @@ if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe client.images.Remove(hud) - client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask) + client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask/*, global_hud.nvg*/) update_action_buttons() @@ -1280,25 +1281,25 @@ var/image/I switch(health) if(-20 to -10) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "passage1") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage1") if(-30 to -20) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "passage2") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage2") if(-40 to -30) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "passage3") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage3") if(-50 to -40) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "passage4") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage4") if(-60 to -50) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "passage5") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage5") if(-70 to -60) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "passage6") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage6") if(-80 to -70) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "passage7") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage7") if(-90 to -80) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "passage8") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage8") if(-95 to -90) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "passage9") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage9") if(-INFINITY to -95) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "passage10") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage10") damageoverlay.overlays += I else //Oxygen damage overlay @@ -1306,19 +1307,19 @@ var/image/I switch(oxyloss) if(10 to 20) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay1") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay1") if(20 to 25) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay2") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay2") if(25 to 30) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay3") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay3") if(30 to 35) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay4") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay4") if(35 to 40) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay5") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay5") if(40 to 45) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay6") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay6") if(45 to INFINITY) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay7") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay7") damageoverlay.overlays += I //Fire and Brute damage overlay (BSSR) @@ -1328,17 +1329,17 @@ var/image/I switch(hurtdamage) if(10 to 25) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay1") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay1") if(25 to 40) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay2") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay2") if(40 to 55) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay3") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay3") if(55 to 70) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay4") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay4") if(70 to 85) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay5") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay5") if(85 to INFINITY) - I = image('icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay6") + I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay6") damageoverlay.overlays += I if( stat == DEAD ) @@ -1399,22 +1400,13 @@ if(!druggy) see_invisible = SEE_INVISIBLE_LIVING if(glasses) - if(istype(glasses, /obj/item/clothing/glasses/meson)) - sight |= SEE_TURFS - if(!druggy) - see_invisible = SEE_INVISIBLE_MINIMUM - else if(istype(glasses, /obj/item/clothing/glasses/night)) - see_in_dark = 5 - if(!druggy) - see_invisible = SEE_INVISIBLE_MINIMUM - else if(istype(glasses, /obj/item/clothing/glasses/thermal)) - sight |= SEE_MOBS - if(!druggy) - see_invisible = SEE_INVISIBLE_MINIMUM - else if(istype(glasses, /obj/item/clothing/glasses/material)) - sight |= SEE_OBJS - if(!druggy) - see_invisible = SEE_INVISIBLE_MINIMUM + var/obj/item/clothing/glasses/G = glasses + if(istype(G)) + see_in_dark += G.darkness_view + if(G.vision_flags) // MESONS + sight |= G.vision_flags + if(!druggy) + see_invisible = SEE_INVISIBLE_MINIMUM /* HUD shit goes here, as long as it doesn't modify sight flags */ // The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl @@ -1868,29 +1860,33 @@ if(hud_updateflag & 1 << SPECIALROLE_HUD) var/image/holder = hud_list[SPECIALROLE_HUD] holder.icon_state = "hudblank" - switch(mind.special_role) - if("traitor","Syndicate") - holder.icon_state = "hudsyndicate" - if("Revolutionary") - holder.icon_state = "hudrevolutionary" - if("Head Revolutionary") - holder.icon_state = "hudheadrevolutionary" - if("Cultist") - holder.icon_state = "hudcultist" - if("Changeling") - holder.icon_state = "hudchangeling" - if("Wizard","Fake Wizard") - holder.icon_state = "hudwizard" - if("Death Commando") - holder.icon_state = "huddeathsquad" - if("Ninja") - holder.icon_state = "hudninja" - if("Vampire") - holder.icon_state = "hudvampire" - if("VampThrall") - holder.icon_state = "hudvampthrall" - hud_list[SPECIALROLE_HUD] = holder + if(mind) + + switch(mind.special_role) + if("traitor","Syndicate") + holder.icon_state = "hudsyndicate" + if("Revolutionary") + holder.icon_state = "hudrevolutionary" + if("Head Revolutionary") + holder.icon_state = "hudheadrevolutionary" + if("Cultist") + holder.icon_state = "hudcultist" + if("Changeling") + holder.icon_state = "hudchangeling" + if("Wizard","Fake Wizard") + holder.icon_state = "hudwizard" + if("Death Commando") + holder.icon_state = "huddeathsquad" + if("Ninja") + holder.icon_state = "hudninja" + if("Vampire") // TODO: Check this + holder.icon_state = "hudvampire" + if("VampThrall") + holder.icon_state = "hudvampthrall" + + + hud_list[SPECIALROLE_HUD] = holder hud_updateflag = 0 diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index b0f55889d78..510311122c2 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -357,13 +357,12 @@ proc/get_damage_icon_part(damage_state, body_part) if(f_style) var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style] - if(facial_hair_style) - if(src.species.name in facial_hair_style.species_allowed) - var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") - if(facial_hair_style.do_colouration) - facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) + if(facial_hair_style && src.species.name in facial_hair_style.species_allowed) + var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") + if(facial_hair_style.do_colouration) + facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) - face_standing.Blend(facial_s, ICON_OVERLAY) + face_standing.Blend(facial_s, ICON_OVERLAY) if(h_style && !(head && (head.flags & BLOCKHEADHAIR))) var/datum/sprite_accessory/hair_style = hair_styles_list[h_style] @@ -387,6 +386,7 @@ proc/get_damage_icon_part(damage_state, body_part) var/add_image = 0 var/g = "m" if(gender == FEMALE) g = "f" + // DNA2 - Drawing underlays. for(var/datum/dna/gene/gene in dna_genes) if(!gene.block) continue diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm index 725776a6394..c9a0cfedeaa 100644 --- a/code/modules/mob/living/carbon/species.dm +++ b/code/modules/mob/living/carbon/species.dm @@ -83,6 +83,7 @@ for(var/datum/organ/internal/I in H.internal_organs) I.mechanize() + return /datum/species/proc/handle_post_spawn(var/mob/living/carbon/human/H) //Handles anything not already covered by basic species assignment. @@ -91,6 +92,12 @@ /datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns). return + +/datum/species/proc/say_filter(mob/M, message, datum/language/speaking) + return message + +/datum/species/proc/equip(var/mob/living/carbon/human/H) + /datum/species/human name = "Human" icobase = 'icons/mob/human_races/r_human.dmi' diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index e48b0f7371b..a51d99b8cb8 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -37,7 +37,6 @@ /mob/living/carbon/human/var/list/organs_by_name = list() // map organ names to organs /mob/living/carbon/human/var/list/internal_organs_by_name = list() // so internal organs have less ickiness too - // Takes care of organ related updates, such as broken and missing limbs /mob/living/carbon/human/proc/handle_organs() number_wounds = 0 @@ -53,7 +52,6 @@ bad_external_organs.Cut() for(var/datum/organ/external/Ex in organs) bad_external_organs += Ex - for(var/datum/organ/external/E in bad_external_organs) if(!E) continue diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index dae55670eb0..77a6972beb9 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -279,7 +279,7 @@ This function completely restores a damaged organ to perfect condition. //Determines if we even need to process this organ. /datum/organ/external/proc/need_process() - if(status && status != ORGAN_ROBOT) // If it's robotic, that's fine it will have a status. + if(status && status & ORGAN_ROBOT) // If it's robotic, that's fine it will have a status. return 1 if(brute_dam || burn_dam) return 1 diff --git a/code/modules/organs/pain.dm b/code/modules/organs/pain.dm index eb4c8e0e54f..250e9b984de 100644 --- a/code/modules/organs/pain.dm +++ b/code/modules/organs/pain.dm @@ -9,6 +9,8 @@ mob/var/next_pain_time = 0 // amount is a num from 1 to 100 mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0) if(stat >= 2) return + if(reagents.has_reagent("paracetamol")) + return if(reagents.has_reagent("tramadol")) return if(reagents.has_reagent("oxycodone")) diff --git a/code/setup.dm b/code/setup.dm index efed8a48d8c..3567b5c2d3c 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -733,12 +733,12 @@ var/list/be_special_flags = list( #define RIGHT 2 // for secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list of humans. -#define HEALTH_HUD 1 // a simple line rounding the mob's number health -#define STATUS_HUD 2 // alive, dead, diseased, etc. -#define ID_HUD 3 // the job asigned to your ID -#define WANTED_HUD 4 // wanted, released, parroled, security status +#define HEALTH_HUD 1 // a simple line rounding the mob's number health +#define STATUS_HUD 2 // alive, dead, diseased, etc. +#define ID_HUD 3 // the job asigned to your ID +#define WANTED_HUD 4 // wanted, released, parroled, security status #define IMPLOYAL_HUD 5 // loyality implant -#define IMPCHEM_HUD 6 // chemical implant +#define IMPCHEM_HUD 6 // chemical implant #define IMPTRACK_HUD 7 // tracking implant #define SPECIALROLE_HUD 8 // AntagHUD image #define STATUS_HUD_OOC 9 // STATUS_HUD without virus db check for someone being ill.