diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm index 3d55bf87adf..90a77c878b8 100644 --- a/code/__defines/damage_organs.dm +++ b/code/__defines/damage_organs.dm @@ -45,6 +45,7 @@ #define DROPLIMB_EDGE 0 #define DROPLIMB_BLUNT 1 #define DROPLIMB_BURN 2 +#define DROPLIMB_ACID 3 // Damage above this value must be repaired with surgery. #define ROBOLIMB_REPAIR_CAP 30 diff --git a/code/__defines/dna.dm b/code/__defines/dna.dm index bcf5f15e3c0..6140bf37bfb 100644 --- a/code/__defines/dna.dm +++ b/code/__defines/dna.dm @@ -13,6 +13,7 @@ #define NOCLONE 8 #define LASER 9 // Harm intent - click anywhere to shoot lasers from eyes. #define HEAL 10 // Healing people with hands. +#define FLASHPROOF 11 // Flashproof eyes. #define SKELETON 29 #define PLANT 30 @@ -36,14 +37,22 @@ #define COUGHING 0x4 #define TOURETTES 0x8 #define NERVOUS 0x10 - +/* +#define DEPRESSION 0x20 // Roleplay drugs +#define SCHIZOPHRENIA 0x40 // Roleplay drugs +*/ +#define WINGDINGS 0x80 // Better handling as disability +#define DETERIORATE 0x100 // Body melts slowly, medical loves you! +#define GIBBING 0x200 // Landmine for genetics to find +#define CENSORED 0x400 // Cannot swear // sdisabilities #define BLIND 0x1 #define MUTE 0x2 #define DEAF 0x4 +/* Traitgenes (Blocks have finally been retired, huzzah! // The way blocks are handled badly needs a rewrite, this is horrible. -// Too much of a project to handle at the moment, TODO for later. +// Too much of a project to handle at the moment, TODO for later.) var/BLINDBLOCK = 0 var/DEAFBLOCK = 0 var/HULKBLOCK = 0 @@ -74,6 +83,7 @@ var/HALLUCINATIONBLOCK = 0 var/NOPRINTSBLOCK = 0 var/SHOCKIMMUNITYBLOCK = 0 var/SMALLSIZEBLOCK = 0 +*/ // Define block bounds (off-low,off-high,on-low,on-high) // Used in setupgame.dm @@ -147,7 +157,9 @@ var/SMALLSIZEBLOCK = 0 #define DNA_UI_WING3_B 57 // VOREStation snippet end. #define DNA_UI_LENGTH 57 // VOREStation Edit - Needs to match the highest number above. -#define DNA_SE_LENGTH 49 // VOREStation Edit (original was UI+11) +#define DNA_SE_LENGTH 90 // Traitgenes (Expanded from 49 to 84, there have been a considerable expansion of genes. +// This leaves room for future expansion. This can be arbitrarily raised without worry if genes start to get crowded. +// Should have more than 10 empty genes after setup. - Willbird) //DNA modifiers // Buffer datatype flags. @@ -160,4 +172,4 @@ var/SMALLSIZEBLOCK = 0 // Gene flags #define GENE_ALWAYS_ACTIVATE 1 -#define MUTCHK_HIDEMSG 2 +#define MUTCHK_HIDEMSG 2 // Traitgenes (Hide gene activation/deactivation messages, mostly for resleeving so you don't get spammed) diff --git a/code/__defines/gamemode.dm b/code/__defines/gamemode.dm index 74121881ce1..cc6b81eb8a2 100644 --- a/code/__defines/gamemode.dm +++ b/code/__defines/gamemode.dm @@ -55,7 +55,7 @@ var/list/be_special_flags = list( "Wizard" = BE_WIZARD, "Malf AI" = BE_MALF, "Revolutionary" = BE_REV, - "Xenomorph" = BE_ALIEN, + "Genaprawn" = BE_ALIEN, "Positronic Brain" = BE_AI, "Cultist" = BE_CULTIST, "Renegade" = BE_RENEGADE, diff --git a/code/__defines/is_helpers.dm b/code/__defines/is_helpers.dm index 7a59144f8e9..0cb84adfac9 100644 --- a/code/__defines/is_helpers.dm +++ b/code/__defines/is_helpers.dm @@ -44,6 +44,7 @@ #define isslime(A) istype(A, /mob/living/simple_mob/slime) #define isxeno(A) istype(A, /mob/living/simple_mob/animal/space/alien) #define issimplekin(A) istype(A, /mob/living/simple_mob/shadekin) +#define isprotblob(A) istype(A, /mob/living/simple_mob/protean_blob) #define iscarbon(A) istype(A, /mob/living/carbon) #define isalien(A) istype(A, /mob/living/carbon/alien) diff --git a/code/__defines/life.dm b/code/__defines/life.dm index 1f022dec9a5..dec65d9e780 100644 --- a/code/__defines/life.dm +++ b/code/__defines/life.dm @@ -18,3 +18,5 @@ #define ENVIRONMENT_COMFORT_MARKER_HOT 2 #define TECHNOMANCER_INSTABILITY_MIN_GLOW 10 // When above this number, the entity starts glowing, affecting others. + +#define RADIATION_SPEED_COEFFICIENT 0.1 diff --git a/code/__defines/span_vr.dm b/code/__defines/span.dm similarity index 96% rename from code/__defines/span_vr.dm rename to code/__defines/span.dm index 727f04ad5c9..fe949e69b05 100644 --- a/code/__defines/span_vr.dm +++ b/code/__defines/span.dm @@ -239,7 +239,11 @@ // Links! #define span_linkify(str) ("" + str + "") -// Just used downstream #define span_wingdings(str) ("" + str + "") #define span_maptext(str) ("" + str + "") + +#define span_major_announcement_text(str) ("" + str + "") +#define span_major_announcement_title(str) ("" + str + "") +#define span_ooc_announcement_text(str) ("" + str + "") +#define span_subheader_announcement_text(str) ("" + str + "") diff --git a/code/_helpers/announcements.dm b/code/_helpers/announcements.dm new file mode 100644 index 00000000000..5ab52144ff9 --- /dev/null +++ b/code/_helpers/announcements.dm @@ -0,0 +1,86 @@ +/** + * Sends a div formatted chat box announcement + * + * Formatted like: + * + * " Server Announcement " (or sender_override) + * + * " Title " + * + * " Text " + * + * Arguments + * * text - required, the text to announce + * * title - optional, the title of the announcement. + * * players - optional, a list of all players to send the message to. defaults to the entire world + * * play_sound - if TRUE, play a sound with the announcement (based on player option) + * * sound_override - optional, override the default announcement sound + * * sender_override - optional, modifies the sender of the announcement + * * encode_title - if TRUE, the title will be HTML encoded (escaped) + * * encode_text - if TRUE, the text will be HTML encoded (escaped) + */ + +/proc/send_ooc_announcement( + text, + title = "", + players, + play_sound = TRUE, + sound_override = 'sound/misc/bloop.ogg', + sender_override = "Server Admin Announcement", + encode_title = TRUE, + encode_text = FALSE, +) + if(isnull(text)) + return + + var/list/announcement_strings = list() + + if(encode_title && title && length(title) > 0) + title = html_encode(title) + if(encode_text) + text = html_encode(text) + if(!length(text)) + return + + announcement_strings += span_major_announcement_title(sender_override) + announcement_strings += span_subheader_announcement_text(title) + announcement_strings += span_ooc_announcement_text(text) + var/finalized_announcement = create_ooc_announcement_div(jointext(announcement_strings, "")) + + if(islist(players)) + for(var/mob/target in players) + to_chat(target, finalized_announcement) + //if(play_sound && target.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements)) + if(play_sound && target.client?.prefs.read_preference(/datum/preference/toggle/holder/play_adminhelp_ping)) + SEND_SOUND(target, sound(sound_override)) + else + to_chat(world, finalized_announcement) + + if(!play_sound) + return + + for(var/mob/player in player_list) + //if(player.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements)) + if(player.client?.prefs.read_preference(/datum/preference/toggle/holder/play_adminhelp_ping)) + SEND_SOUND(player, sound(sound_override)) + +/** + * Inserts a span styled message into an alert box div + * + * + * Arguments + * * message - required, the message contents + * * color - optional, set a div color other than default + */ +/proc/create_announcement_div(message, color = "default") + return "
| 1 | 2 | 3 | 4 | 5 | " var/bname - for(var/block=1;block<=DNA_SE_LENGTH;block++) + var/list/output_list = list() + // Traitgenes more reliable way to check gene states + for(var/setup_block=1;setup_block<=DNA_SE_LENGTH;setup_block++) + output_list["[setup_block]"] = null + for(var/datum/gene/gene in GLOB.dna_genes) // Traitgenes Genes accessible by global VV. Removed /dna/ from path + output_list["[gene.block]"] = gene + for(var/block=1;block<=DNA_SE_LENGTH;block++) // Traitgenes more reliable way to check gene states + var/datum/gene/gene = output_list["[block]"] // Traitgenes Removed /dna/ from path if(((block-1)%5)==0) body += "|
|---|---|---|---|---|---|
| [block-1] | " - bname = assigned_blocks[block] + // Traitgenes more reliable way to check gene states + if(gene) + bname = gene.name + else + bname = "" body += "" if(bname) - var/bstate=M.dna.GetSEState(block) + var/bstate=(bname in M.active_genes) // Traitgenes more reliable way to check gene states + // Traitgenes show trait linked names on mouseover + var/tname = bname + if(istype(gene,/datum/gene/trait)) + var/datum/gene/trait/T = gene + tname = T.get_name() var/bcolor="[(bstate)?"#006600":"#ff0000"]" - body += "[bname][block]" + if(!bstate && M.dna.GetSEState(block)) // Gene isn't active, but the dna says it is... Was blocked by another gene! + bcolor="#d88d00" + body += "[bname][block]" // Traitgenes edit - show trait linked names on mouseover else body += "[block]" body+=" | " @@ -627,7 +645,7 @@ var/global/floorIsLava = 0 if(!check_rights(R_SERVER,0)) message = sanitize(message, 500, extra = 0) message = replacetext(message, "\n", "
| Body "
- . += "(®)"
+ . += "(®)"
. += " " . += "Species: [pref.species] " . += "Blood Type: [pref.b_type] " if(has_flag(mob_species, HAS_SKIN_TONE)) . += "Skin Tone: [-pref.s_tone + 35]/220 " - . += "Needs Glasses: [pref.disabilities & NEARSIGHTED ? "Yes" : "No"] " . += "Limbs: Adjust Reset " . += "Internal Organs: Adjust " - //display limbs below var/ind = 0 for(var/name in pref.organ_data) @@ -545,7 +539,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O else return TOPIC_NOACTION - if(((!(setting_species.spawn_flags & SPECIES_CAN_JOIN)) || (!is_alien_whitelisted(preference_mob(),setting_species))) && !check_rights(R_ADMIN|R_EVENT, 0) && !(setting_species.spawn_flags & SPECIES_WHITELIST_SELECTABLE)) //VOREStation Edit: selectability + if(((!(setting_species.spawn_flags & SPECIES_CAN_JOIN)) || (!is_alien_whitelisted(preference_mob(),setting_species))) && !check_rights(R_ADMIN|R_EVENT, 0) && !(setting_species.spawn_flags & SPECIES_WHITELIST_SELECTABLE)) return TOPIC_NOACTION var/prev_species = pref.species @@ -553,7 +547,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O if(prev_species != pref.species) if(!(pref.biological_gender in mob_species.genders)) pref.set_biological_gender(mob_species.genders[1]) - pref.custom_species = null //VOREStation Edit - This is cleared on species changes + pref.custom_species = null //grab one of the valid hair styles for the newly chosen species var/list/valid_hairstyles = pref.get_valid_hairstyles(user) @@ -586,7 +580,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O var/min_age = get_min_age() var/max_age = get_max_age() pref.update_preference_by_type(/datum/preference/numeric/human/age, max(min(pref.read_preference(/datum/preference/numeric/human/age), max_age), min_age)) - pref.blood_color = setting_species.blood_color // VOREstation edit + pref.blood_color = setting_species.blood_color return TOPIC_REFRESH_UPDATE_PREVIEW @@ -713,15 +707,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O else if(href_list["marking_style"]) var/list/usable_markings = pref.body_markings.Copy() ^ body_marking_styles_list.Copy() - /* VOREStation Removal - No markings whitelist, let people mix/match - for(var/M in usable_markings) - var/datum/sprite_accessory/S = usable_markings[M] - var/datum/species/spec = GLOB.all_species[pref.species] - if(!S.species_allowed.len) - continue - else if(!(pref.species in S.species_allowed) && !(pref.custom_base in S.species_allowed) && !(spec.base_species in S.species_allowed)) - usable_markings -= M - */ //VOREStation Removal End var/new_marking = tgui_input_list(user, "Choose a body marking:", "Character Preference", usable_markings) if(new_marking && CanUseTopic(user)) pref.body_markings[new_marking] = pref.mass_edit_marking_list(new_marking) //New markings start black @@ -919,10 +904,8 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O continue if(tmp_species in M.species_cannot_use) continue - //VOREStation Add - Cyberlimb whitelisting. if(M.whitelisted_to && !(user.ckey in M.whitelisted_to)) continue - //VOREStation Add End usable_manufacturers[company] = M if(!usable_manufacturers.len) return @@ -1019,11 +1002,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O return TOPIC_REFRESH - else if(href_list["disabilities"]) - var/disability_flag = text2num(href_list["disabilities"]) - pref.disabilities ^= disability_flag - return TOPIC_REFRESH_UPDATE_PREVIEW - else if(href_list["toggle_preview_value"]) pref.equip_preview_mob ^= text2num(href_list["toggle_preview_value"]) return TOPIC_REFRESH_UPDATE_PREVIEW @@ -1158,7 +1136,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O if(new_wingc) pref.update_preference_by_type(/datum/preference/color/human/wing_color3, new_wingc) return TOPIC_REFRESH_UPDATE_PREVIEW - return ..() /datum/category_item/player_setup_item/general/body/proc/reset_limbs() @@ -1186,12 +1163,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O dat += " [current_species.name] \[change\]" dat += "
|