diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index d5ba85e6c91..095b53dd585 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -225,7 +225,7 @@ var/record_id_num = 1001 var/datum/data/record/M = new() M.fields["id"] = id M.fields["name"] = H.real_name - M.fields["blood_type"] = H.blood_type + M.fields["blood_type"] = H.dna.blood_type M.fields["b_dna"] = H.dna.unique_enzymes M.fields["mi_dis"] = "None" M.fields["mi_dis_d"] = "No minor disabilities have been declared." @@ -255,7 +255,7 @@ var/record_id_num = 1001 L.fields["rank"] = H.mind.assigned_role L.fields["age"] = H.age L.fields["sex"] = H.gender - L.fields["blood_type"] = H.blood_type + L.fields["blood_type"] = H.dna.blood_type L.fields["b_dna"] = H.dna.unique_enzymes L.fields["enzymes"] = H.dna.struc_enzymes L.fields["identity"] = H.dna.uni_identity diff --git a/code/datums/mutations.dm b/code/datums/mutations.dm index f2e12cee156..83455d194f7 100644 --- a/code/datums/mutations.dm +++ b/code/datums/mutations.dm @@ -49,21 +49,16 @@ . = on_losing(owner) /datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/owner) - if(!owner || (src in owner.dna.mutations)) + if(!owner || !istype(owner) || (src in owner.dna.mutations)) return 1 owner.dna.mutations.Add(src) - gain_indication(owner) owner << text_gain_indication + if(visual_indicators.len) + owner.update_mutation_overlays() + +/datum/mutation/human/proc/get_visual_indicator(mob/living/carbon/human/owner) + return -/datum/mutation/human/proc/gain_indication(mob/living/carbon/human/owner) - owner.overlays.Add(visual_indicators) -/* - var/list/result_overlays = list() - var/list/limbs = owner_get_limbs(NON_MECHANICAL|NON_AMPUTATED) //I dunno how its done by RR but i assume something like this, proc that returns the list of limbs based on what types of limbs to return in argument - for(var/obj/limb/L in limbs) - result_overlays[L.identificator] = visual_indicators[L.identificator] //visual_indicators is where overlays icons are stored, they are all created on new of each mutation, i assume you will change it to linked list for easyness, but for now its just a list - return owner.redraw_overlays(result_overlays, MUTATION_LAYER) //Currently mutations draw the overlays themselves but i assume if dismemberment will be overriding lots of shit like maybe clothes or something else mutations will just pass the shit to redraw proc -*/ /datum/mutation/human/proc/lose_indication(mob/living/carbon/human/owner) owner.overlays.Remove(visual_indicators) @@ -80,9 +75,10 @@ return /datum/mutation/human/proc/on_losing(mob/living/carbon/human/owner) - if(owner && (owner.dna.mutations.Remove(src))) - lose_indication(owner) + if(owner && istype(owner) && (owner.dna.mutations.Remove(src))) owner << text_lose_indication + if(visual_indicators.len) + owner.update_mutation_overlays() return 0 return 1 @@ -107,16 +103,17 @@ visual_indicators |= image("icon"='icons/effects/genetics.dmi', "icon_state"="hulk_m_s", "layer"=-MUTATIONS_LAYER) /datum/mutation/human/hulk/on_acquiring(mob/living/carbon/human/owner) - if(..()) return + if(..()) + return var/status = CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH owner.status_flags &= ~status /datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner, atom/target) return target.attack_hulk(owner) -/datum/mutation/human/hulk/gain_indication(mob/living/carbon/human/owner) +/datum/mutation/human/hulk/get_visual_indicator(mob/living/carbon/human/owner) var/g = (owner.gender == FEMALE) ? 1 : 2 - owner.overlays += visual_indicators[g] + return visual_indicators[g] /datum/mutation/human/hulk/on_life(mob/living/carbon/human/owner) if(owner.health < 25) @@ -147,6 +144,9 @@ ..() visual_indicators |= image("icon"='icons/effects/genetics.dmi', "icon_state"="telekinesishead_s", "layer"=-MUTATIONS_LAYER) +/datum/mutation/human/telekinesis/get_visual_indicator(mob/living/carbon/human/owner) + return visual_indicators[1] + /datum/mutation/human/telekinesis/on_ranged_attack(mob/living/carbon/human/owner, atom/target) target.attack_tk(owner) @@ -162,6 +162,9 @@ ..() visual_indicators |= image("icon"='icons/effects/genetics.dmi', "icon_state"="fire_s", "layer"=-MUTATIONS_LAYER) +/datum/mutation/human/cold_resistance/get_visual_indicator(mob/living/carbon/human/owner) + return visual_indicators[1] + /datum/mutation/human/cold_resistance/on_life(mob/living/carbon/human/owner) if(owner.getFireLoss()) if(prob(1)) @@ -176,7 +179,8 @@ text_gain_indication = "The walls suddenly disappear!" /datum/mutation/human/x_ray/on_acquiring(mob/living/carbon/human/owner) - if(..()) return + if(..()) + return on_life(owner) /datum/mutation/human/x_ray/on_life(mob/living/carbon/human/owner) @@ -335,19 +339,13 @@ quality = NEGATIVE /datum/mutation/human/race/on_acquiring(mob/living/carbon/human/owner) - if(..()) return - . = owner.monkeyize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE) - -/datum/mutation/human/race/gain_indication(mob/living/carbon/human/owner) - return - -/datum/mutation/human/race/lose_indication(mob/living/carbon/monkey/owner) - return - -/datum/mutation/human/race/on_losing(mob/living/carbon/monkey/owner) if(..()) return - . = owner.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE) + . = owner.monkeyize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE) + +/datum/mutation/human/race/on_losing(mob/living/carbon/monkey/owner) + if(owner && istype(owner) && (owner.dna.mutations.Remove(src))) + . = owner.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE) /datum/mutation/human/stealth @@ -597,3 +595,20 @@ if(owner.a_intent == "harm") owner.LaserEyes(target) + +/mob/living/carbon/human/proc/update_mutation_overlays() + remove_overlay(MUTATIONS_LAYER) + var/image/standing + + for(var/datum/mutation/human/CM in dna.mutations) + if(CM.visual_indicators.len) + var/image/V = CM.get_visual_indicator(src) + if(!standing) + standing = V + else + standing.overlays += V + + if(standing) + overlays_standing[MUTATIONS_LAYER] = standing + apply_overlay(MUTATIONS_LAYER) + diff --git a/code/datums/spells/genetic.dm b/code/datums/spells/genetic.dm index e77e3e69ccf..969372b1203 100644 --- a/code/datums/spells/genetic.dm +++ b/code/datums/spells/genetic.dm @@ -18,6 +18,8 @@ /obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets) playMagSound() for(var/mob/living/carbon/target in targets) + if(!target.dna) + continue for(var/A in mutations) target.dna.add_mutation(A) target.disabilities |= disabilities diff --git a/code/game/dna.dm b/code/game/dna.dm index f3b97e23a7f..b402edbda36 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -560,7 +560,7 @@ if(connected && connected.is_operational()) if(connected.occupant) //set occupant_status message viable_occupant = connected.occupant - if(check_dna_integrity(viable_occupant) && (!(NOCLONE in viable_occupant.mutations) || (connected.scan_level == 3))) //occupent is viable for dna modification + if(check_dna_integrity(viable_occupant) && (!(viable_occupant.disabilities & NOCLONE) || (connected.scan_level == 3))) //occupent is viable for dna modification occupant_status += "[viable_occupant.name] => " switch(viable_occupant.stat) if(CONSCIOUS) occupant_status += "Conscious" @@ -755,7 +755,7 @@ var/mob/living/carbon/viable_occupant if(connected) viable_occupant = connected.occupant - if(!istype(viable_occupant) || !viable_occupant.dna || (NOCLONE in viable_occupant.mutations)) + if(!istype(viable_occupant) || !viable_occupant.dna || (viable_occupant.disabilities & NOCLONE)) viable_occupant = null //Basic Tasks/////////////////////////////////////////// diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index 892052ea48d..51693e6ca51 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -46,13 +46,13 @@ user << "There is already a PDA inside!" return else - var/obj/item/device/pda/P = usr.get_active_hand() + var/obj/item/device/pda/P = user.get_active_hand() if(istype(P)) if(!user.drop_item()) return storedpda = P P.loc = src - P.add_fingerprint(usr) + P.add_fingerprint(user) update_icon() diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 4ec583172e6..a0b79dd7dad 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -49,7 +49,7 @@ /obj/machinery/computer/operating/proc/get_patient_info() var/dat = {"
Patient:
[patient.stat ? "Non-Responsive" : "Stable"]
-
Blood Type:
[patient.blood_type] +
Blood Type:
[patient.dna.blood_type]
Health:
[patient.health]%
diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 213c8d56a89..65f0690047d 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -359,7 +359,7 @@ if (subject.suiciding == 1) scantemp = "Subject's brain is not responding to scanning stimuli." return - if ((NOCLONE in subject.mutations) && (src.scanner.scan_level < 2)) + if ((subject.disabilities & NOCLONE) && (src.scanner.scan_level < 2)) scantemp = "Subject no longer contains the fundamental materials required to create a living clone." return if ((!subject.ckey) || (!subject.client)) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 0ca76f39213..6c073ceb95e 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -127,7 +127,7 @@ if(!istype(T)) return if(!T.dna) return - if(NOCLONE in T.mutations) + if(T.disabilities & NOCLONE) return if(NOBLOOD in T.dna.species.specflags) diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 029926d3316..efba67616bc 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -431,7 +431,7 @@ var/failed = null - if (H.suiciding || (NOCLONE in H.mutations)) + if (H.suiciding || (H.disabilities & NOCLONE)) failed = "[defib] buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile." else if ((tplus > tlimit) || !H.getorgan(/obj/item/organ/internal/heart)) failed = "[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return. Further attempts futile." diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 26a2936a0ac..9276fce55bc 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -17,7 +17,7 @@ /obj/item/weapon/dnainjector/proc/inject(mob/living/carbon/M, mob/user) - if(check_dna_integrity(M) && !(NOCLONE in M.mutations)) + if(check_dna_integrity(M) && !(M.disabilities & NOCLONE)) if(M.stat == DEAD) //prevents dead people from having their DNA changed user << "You can't modify [M]'s DNA while \he's dead." return diff --git a/code/game/objects/structures/ai_core.dm b/code/game/objects/structures/ai_core.dm index f294c90122c..87fb0e9cc42 100644 --- a/code/game/objects/structures/ai_core.dm +++ b/code/game/objects/structures/ai_core.dm @@ -113,12 +113,12 @@ laws.clear_zeroth_law(0) for(var/templaw in M.laws) laws.add_inherent_law(templaw) - usr << "Law module applied." + user << "Law module applied." if(istype(P, /obj/item/weapon/aiModule/reset/purge)) laws.clear_inherent_laws() laws.clear_zeroth_law(0) - usr << "Laws cleared applied." + user << "Laws cleared applied." if(istype(P, /obj/item/weapon/aiModule/supplied/freeform) || istype(P, /obj/item/weapon/aiModule/core/freeformcore)) @@ -126,7 +126,7 @@ if(M.laws[1] == "") return laws.add_inherent_law(M.laws[1]) - usr << "Added a freeform law." + user << "Added a freeform law." if(istype(P, /obj/item/device/mmi)) var/obj/item/device/mmi/M = P @@ -166,7 +166,7 @@ M.loc = src brain = M - usr << "Added a brain." + user << "Added a brain." icon_state = "3b" if(istype(P, /obj/item/weapon/crowbar) && brain) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 4901a0dc34b..b0c939443c1 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -154,7 +154,7 @@ hardset_dna(H, null, null, null, null, newrace) if(H.dna.species.use_skintones) - var/new_s_tone = input(user, "What are we again?", "Race change") as null|anything in skin_tones + var/new_s_tone = input(user, "Choose your skin tone:", "Race change") as null|anything in skin_tones if(new_s_tone) H.skin_tone = new_s_tone diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index 2e41995ce05..0f7fdd5c6e0 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -12,7 +12,6 @@ H.gender = pick(MALE, FEMALE) H.real_name = random_unique_name(H.gender) H.name = H.real_name - H.dna.generate_uni_identity(H) H.underwear = random_underwear(H.gender) H.skin_tone = random_skin_tone() H.hair_style = random_hair_style(H.gender) diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 737f1110cb8..2861e298a53 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -221,7 +221,7 @@ dat += "" for(var/mob/living/carbon/human/H in mob_list) if(H.dna && H.ckey) - dat += "" + dat += "" dat += "
NameDNABlood Type
[H][H.dna.unique_enzymes][H.blood_type]
[H][H.dna.unique_enzymes][H.dna.blood_type]
" usr << browse(dat, "window=DNA;size=440x410") if("fingerprints") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 6b1a1d37eb2..7cb4c9f4994 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -300,7 +300,7 @@ Traitors and the like can also be revived with the previous role mostly intact. new_character.real_name = record_found.fields["name"] new_character.gender = record_found.fields["sex"] new_character.age = record_found.fields["age"] - new_character.blood_type = record_found.fields["blood_type"] + new_character.dna.blood_type = record_found.fields["blood_type"] else new_character.gender = pick(MALE,FEMALE) var/datum/preferences/A = new() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 5f04c0f69b9..24fe636eeff 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -117,984 +117,983 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set save_character() //let's save this new random character so it doesn't keep generating new ones. return -/datum/preferences - proc/ShowChoices(mob/user) - if(!user || !user.client) return - update_preview_icon() - user << browse_rsc(preview_icon_front, "previewicon.png") - user << browse_rsc(preview_icon_side, "previewicon2.png") - var/dat = "
" - dat += "Character Settings " - dat += "Game Preferences" +/datum/preferences/proc/ShowChoices(mob/user) + if(!user || !user.client) return + update_preview_icon() + user << browse_rsc(preview_icon_front, "previewicon.png") + user << browse_rsc(preview_icon_side, "previewicon2.png") + var/dat = "
" - if(!path) - dat += "
Please create an account to save your preferences
" + dat += "Character Settings " + dat += "Game Preferences" - dat += "
" + if(!path) + dat += "
Please create an account to save your preferences
" - dat += "
" + dat += "
" - switch(current_tab) - if (0) // Character Settings# - if(path) - var/savefile/S = new /savefile(path) - if(S) - dat += "
" - var/name - for(var/i=1, i<=max_save_slots, i++) - S.cd = "/character[i]" - S["real_name"] >> name - if(!name) name = "Character[i]" - //if(i!=1) dat += " | " - dat += "[name] " - dat += "
" + dat += "
" - dat += "

Occupation Choices

" - dat += "Set Occupation Preferences
" - dat += "

Identity

" - dat += "
" - if(appearance_isbanned(user)) - dat += "You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.
" - dat += "Random Name " - dat += "Always Random Name: [be_random_name ? "Yes" : "No"]
" + switch(current_tab) + if (0) // Character Settings# + if(path) + var/savefile/S = new /savefile(path) + if(S) + dat += "
" + var/name + for(var/i=1, i<=max_save_slots, i++) + S.cd = "/character[i]" + S["real_name"] >> name + if(!name) name = "Character[i]" + //if(i!=1) dat += " | " + dat += "[name] " + dat += "
" - dat += "Name: " - dat += "[real_name]
" + dat += "

Occupation Choices

" + dat += "Set Occupation Preferences
" + dat += "

Identity

" + dat += "" + dat += "Gender:[gender == MALE ? "Male" : "Female"]
" + dat += "Age:[age]
" + + dat += "Special Names:
" + dat += "Clown: [custom_names["clown"]] " + dat += "Mime:[custom_names["mime"]]
" + dat += "AI: [custom_names["ai"]] " + dat += "Cyborg: [custom_names["cyborg"]]
" + dat += "Chaplain religion: [custom_names["religion"]] " + dat += "Chaplain deity: [custom_names["deity"]]
" - dat += "
" + if(appearance_isbanned(user)) + dat += "You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.
" + dat += "Random Name " + dat += "Always Random Name: [be_random_name ? "Yes" : "No"]
" - dat += "Gender: [gender == MALE ? "Male" : "Female"]
" - dat += "Age: [age]
" + dat += "Name: " + dat += "[real_name]
" - dat += "Special Names:
" - dat += "Clown: [custom_names["clown"]] " - dat += "Mime:[custom_names["mime"]]
" - dat += "AI: [custom_names["ai"]] " - dat += "Cyborg: [custom_names["cyborg"]]
" - dat += "Chaplain religion: [custom_names["religion"]] " - dat += "Chaplain deity: [custom_names["deity"]]
" + dat += "" - dat += "
" + dat += "
" - dat += "
" + dat += "
" - dat += "

Body

" - dat += "Random Body " - dat += "Always Random Body: [be_random_body ? "Yes" : "No"]
" + dat += "

Body

" + dat += "Random Body " + dat += "Always Random Body: [be_random_body ? "Yes" : "No"]
" - dat += "
" + dat += "" + + if(pref_species.use_skintones) + + dat += "" + + if(HAIR in pref_species.specflags) + + dat += "" + + if(EYECOLOR in pref_species.specflags) + + dat += "" + + if(config.mutant_races) //We don't allow mutant bodyparts for humans either unless this is true. + + if((MUTCOLORS in pref_species.specflags) || (MUTCOLORS_PARTSONLY in pref_species.specflags)) + + dat += "" + + if("tail_lizard" in pref_species.mutant_bodyparts) + dat += "" + + if("snout" in pref_species.mutant_bodyparts) + dat += "" + + if("horns" in pref_species.mutant_bodyparts) + dat += "" + + if("frills" in pref_species.mutant_bodyparts) + dat += "" + + if("spines" in pref_species.mutant_bodyparts) + dat += "" + + if("body_markings" in pref_species.mutant_bodyparts) + dat += "" + + if(config.mutant_humans) + + if("tail_human" in pref_species.mutant_bodyparts) + dat += "" + + if("ears" in pref_species.mutant_bodyparts) + dat += "" + + dat += "
" - if(config.mutant_races) - dat += "Species:
[pref_species.name]
" + if(config.mutant_races) + dat += "Species:
[pref_species.name]
" + else + dat += "Species: Human
" + + dat += "Blood Type: [blood_type]
" + dat += "Underwear:
[underwear]
" + dat += "Undershirt:
[undershirt]
" + dat += "Socks:
[socks]
" + dat += "Backpack:
[backbaglist[backbag]]
" + + dat += "

Skin Tone

" + + dat += "[skin_tone]
" + + dat += "
" + + dat += "

Hair Style

" + + dat += "[hair_style]
" + dat += "< >
" + dat += "    Change
" + + + dat += "
" + + dat += "

Facial Hair Style

" + + dat += "[facial_hair_style]
" + dat += "< >
" + dat += "    Change
" + + dat += "
" + + dat += "

Eye Color

" + + dat += "    Change
" + + dat += "
" + + dat += "

Alien/Mutant Color

" + + dat += "    Change
" + + dat += "
" + + dat += "

Tail

" + + dat += "[features["tail_lizard"]]
" + + dat += "
" + + dat += "

Snout

" + + dat += "[features["snout"]]
" + + dat += "
" + + dat += "

Horns

" + + dat += "[features["horns"]]
" + + dat += "
" + + dat += "

Frills

" + + dat += "[features["frills"]]
" + + dat += "
" + + dat += "

Spines

" + + dat += "[features["spines"]]
" + + dat += "
" + + dat += "

Body Markings

" + + dat += "[features["body_markings"]]
" + + dat += "
" + + dat += "

Tail

" + + dat += "[features["tail_human"]]
" + + dat += "
" + + dat += "

Ears

" + + dat += "[features["ears"]]
" + + dat += "
" + + + if (1) // Game Preferences + dat += "" - - if(pref_species.use_skintones) - - dat += "" - - if(HAIR in pref_species.specflags) - - dat += "" - - if(EYECOLOR in pref_species.specflags) - - dat += "" - - if(config.mutant_races) //We don't allow mutant bodyparts for humans either unless this is true. - - if((MUTCOLORS in pref_species.specflags) || (MUTCOLORS_PARTSONLY in pref_species.specflags)) - - dat += "" - - if("tail_lizard" in pref_species.mutant_bodyparts) - dat += "" - - if("snout" in pref_species.mutant_bodyparts) - dat += "" - - if("horns" in pref_species.mutant_bodyparts) - dat += "" - - if("frills" in pref_species.mutant_bodyparts) - dat += "" - - if("spines" in pref_species.mutant_bodyparts) - dat += "" - - if("body_markings" in pref_species.mutant_bodyparts) - dat += "" - - if(config.mutant_humans) - - if("tail_human" in pref_species.mutant_bodyparts) - dat += "" - - if("ears" in pref_species.mutant_bodyparts) - dat += "" - - dat += "
" + dat += "

General Settings

" + dat += "UI Style: [UI_style]
" + dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
" + dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
" + dat += "Ghost ears: [(chat_toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]
" + dat += "Ghost sight: [(chat_toggles & CHAT_GHOSTSIGHT) ? "Nearest Creatures" : "All Emotes"]
" + dat += "Ghost whispers: [(chat_toggles & CHAT_GHOSTWHISPER) ? "Nearest Creatures" : "All Speech"]
" + dat += "Ghost radio: [(chat_toggles & CHAT_GHOSTRADIO) ? "Yes" : "No"]
" + dat += "Ghost pda: [(chat_toggles & CHAT_GHOSTPDA) ? "Nearest Creatures" : "All Messages"]
" + dat += "Pull requests: [(chat_toggles & CHAT_PULLR) ? "Yes" : "No"]
" + dat += "Midround Antagonist: [(toggles & MIDROUND_ANTAG) ? "Yes" : "No"]
" + if(config.allow_Metadata) + dat += "OOC Notes: Edit
" + + if(user.client) + if(user.client.holder) + dat += "Adminhelp Sound: [(toggles & SOUND_ADMINHELP)?"On":"Off"]
" + dat += "Announce Login: [(toggles & ANNOUNCE_LOGIN)?"On":"Off"]
" + + if(unlock_content || check_rights_for(user.client, R_ADMIN)) + dat += "OOC:     Change
" + + if(unlock_content) + dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
" + dat += "Ghost Form: [ghost_form]
" + + + dat += "
" + + dat += "

Antagonist Settings

" + + if(jobban_isbanned(user, "Syndicate")) + dat += "You are banned from antagonist roles." + src.be_special = 0 + var/n = 0 + for (var/i in special_roles) + if(jobban_isbanned(user, i)) + dat += "Be [i]: BANNED
" else - dat += "Species: Human
" - - dat += "Blood Type: [blood_type]
" - dat += "Underwear:
[underwear]
" - dat += "Undershirt:
[undershirt]
" - dat += "Socks:
[socks]
" - dat += "Backpack:
[backbaglist[backbag]]
" - - dat += "

Skin Tone

" - - dat += "[skin_tone]
" - - dat += "
" - - dat += "

Hair Style

" - - dat += "[hair_style]
" - dat += "< >
" - dat += "    Change
" - - - dat += "
" - - dat += "

Facial Hair Style

" - - dat += "[facial_hair_style]
" - dat += "< >
" - dat += "    Change
" - - dat += "
" - - dat += "

Eye Color

" - - dat += "    Change
" - - dat += "
" - - dat += "

Alien/Mutant Color

" - - dat += "    Change
" - - dat += "
" - - dat += "

Tail

" - - dat += "[features["tail_lizard"]]
" - - dat += "
" - - dat += "

Snout

" - - dat += "[features["snout"]]
" - - dat += "
" - - dat += "

Horns

" - - dat += "[features["horns"]]
" - - dat += "
" - - dat += "

Frills

" - - dat += "[features["frills"]]
" - - dat += "
" - - dat += "

Spines

" - - dat += "[features["spines"]]
" - - dat += "
" - - dat += "

Body Markings

" - - dat += "[features["body_markings"]]
" - - dat += "
" - - dat += "

Tail

" - - dat += "[features["tail_human"]]
" - - dat += "
" - - dat += "

Ears

" - - dat += "[features["ears"]]
" - - dat += "
" - - - if (1) // Game Preferences - dat += "
" - dat += "

General Settings

" - dat += "UI Style: [UI_style]
" - dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
" - dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
" - dat += "Ghost ears: [(chat_toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]
" - dat += "Ghost sight: [(chat_toggles & CHAT_GHOSTSIGHT) ? "Nearest Creatures" : "All Emotes"]
" - dat += "Ghost whispers: [(chat_toggles & CHAT_GHOSTWHISPER) ? "Nearest Creatures" : "All Speech"]
" - dat += "Ghost radio: [(chat_toggles & CHAT_GHOSTRADIO) ? "Yes" : "No"]
" - dat += "Ghost pda: [(chat_toggles & CHAT_GHOSTPDA) ? "Nearest Creatures" : "All Messages"]
" - dat += "Pull requests: [(chat_toggles & CHAT_PULLR) ? "Yes" : "No"]
" - dat += "Midround Antagonist: [(toggles & MIDROUND_ANTAG) ? "Yes" : "No"]
" - if(config.allow_Metadata) - dat += "OOC Notes: Edit
" - - if(user.client) - if(user.client.holder) - dat += "Adminhelp Sound: [(toggles & SOUND_ADMINHELP)?"On":"Off"]
" - dat += "Announce Login: [(toggles & ANNOUNCE_LOGIN)?"On":"Off"]
" - - if(unlock_content || check_rights_for(user.client, R_ADMIN)) - dat += "OOC:     Change
" - - if(unlock_content) - dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
" - dat += "Ghost Form: [ghost_form]
" - - - dat += "
" - - dat += "

Antagonist Settings

" - - if(jobban_isbanned(user, "Syndicate")) - dat += "You are banned from antagonist roles." - src.be_special = 0 - var/n = 0 - for (var/i in special_roles) - if(jobban_isbanned(user, i)) - dat += "Be [i]: BANNED
" + var/days_remaining = null + if(config.use_age_restriction_for_jobs && ispath(special_roles[i])) //If it's a game mode antag, check if the player meets the minimum age + var/mode_path = special_roles[i] + var/datum/game_mode/temp_mode = new mode_path + days_remaining = temp_mode.get_remaining_days(user.client) + + if(days_remaining) + dat += "Be [i]: \[IN [days_remaining] DAYS]
" else - var/days_remaining = null - if(config.use_age_restriction_for_jobs && ispath(special_roles[i])) //If it's a game mode antag, check if the player meets the minimum age - var/mode_path = special_roles[i] - var/datum/game_mode/temp_mode = new mode_path - days_remaining = temp_mode.get_remaining_days(user.client) + dat += "Be [i]: [src.be_special&(1<
" + n++ + dat += "
" - if(days_remaining) - dat += "Be [i]: \[IN [days_remaining] DAYS]
" - else - dat += "Be [i]: [src.be_special&(1<
" - n++ - dat += "
" + dat += "
" - dat += "
" + if(!IsGuestKey(user.key)) + dat += "Undo " + dat += "Save Setup " - if(!IsGuestKey(user.key)) - dat += "Undo " - dat += "Save Setup " + dat += "Reset Setup" + dat += "
" - dat += "Reset Setup" - dat += "
" + //user << browse(dat, "window=preferences;size=560x560") + var/datum/browser/popup = new(user, "preferences", "
Character Setup
", 640, 750) + popup.set_content(dat) + popup.open(0) - //user << browse(dat, "window=preferences;size=560x560") - var/datum/browser/popup = new(user, "preferences", "
Character Setup
", 640, 750) - popup.set_content(dat) - popup.open(0) +/datum/preferences/proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), widthPerColumn = 295, height = 620) + if(!SSjob) return - proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), widthPerColumn = 295, height = 620) - if(!SSjob) return + //limit - The amount of jobs allowed per column. Defaults to 17 to make it look nice. + //splitJobs - Allows you split the table by job. You can make different tables for each department by including their heads. Defaults to CE to make it look nice. + //widthPerColumn - Screen's width for every column. + //height - Screen's height. - //limit - The amount of jobs allowed per column. Defaults to 17 to make it look nice. - //splitJobs - Allows you split the table by job. You can make different tables for each department by including their heads. Defaults to CE to make it look nice. - //widthPerColumn - Screen's width for every column. - //height - Screen's height. + var/width = widthPerColumn - var/width = widthPerColumn + var/HTML = "
" + HTML += "Choose occupation chances
" + HTML += "
Left-click to raise an occupation preference, right-click to lower it.
" + HTML += "
Done

" // Easier to press up here. + HTML += "" + HTML += "
" // Table within a table for alignment, also allows you to easily add more colomns. + HTML += "" + var/index = -1 - var/HTML = "
" - HTML += "Choose occupation chances
" - HTML += "
Left-click to raise an occupation preference, right-click to lower it.
" - HTML += "
Done

" // Easier to press up here. - HTML += "" - HTML += "
" - HTML += "
" // Table within a table for alignment, also allows you to easily add more colomns. - HTML += "" - var/index = -1 + //The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows. + var/datum/job/lastJob - //The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows. - var/datum/job/lastJob + for(var/datum/job/job in SSjob.occupations) - for(var/datum/job/job in SSjob.occupations) + index += 1 + if((index >= limit) || (job.title in splitJobs)) + width += widthPerColumn + if((index < limit) && (lastJob != null)) + //If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with + //the last job's selection color. Creating a rather nice effect. + for(var/i = 0, i < (limit - index), i += 1) + HTML += "" + HTML += "
  
" + index = 0 - index += 1 - if((index >= limit) || (job.title in splitJobs)) - width += widthPerColumn - if((index < limit) && (lastJob != null)) - //If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with - //the last job's selection color. Creating a rather nice effect. - for(var/i = 0, i < (limit - index), i += 1) - HTML += "" - HTML += "
  
" - index = 0 - - HTML += "" - continue - if(!job.player_old_enough(user.client)) - var/available_in_days = job.available_in_days(user.client) - HTML += "[rank]" - continue - if((job_civilian_low & ASSISTANT) && (rank != "Assistant") && !jobban_isbanned(user, "Assistant")) - HTML += "[rank]" - continue - if(config.enforce_human_authority && !user.client.prefs.pref_species.qualifies_for_rank(rank, user.client.prefs.features)) - if(user.client.prefs.pref_species.id == "human") - HTML += "[rank]" - else - HTML += "[rank]" - continue - if((rank in command_positions) || (rank == "AI"))//Bold head jobs - HTML += "[rank]" + HTML += "" + continue + if(!job.player_old_enough(user.client)) + var/available_in_days = job.available_in_days(user.client) + HTML += "[rank]" + continue + if((job_civilian_low & ASSISTANT) && (rank != "Assistant") && !jobban_isbanned(user, "Assistant")) + HTML += "[rank]" + continue + if(config.enforce_human_authority && !user.client.prefs.pref_species.qualifies_for_rank(rank, user.client.prefs.features)) + if(user.client.prefs.pref_species.id == "human") + HTML += "[rank]" else - HTML += "[rank]" + HTML += "[rank]" + continue + if((rank in command_positions) || (rank == "AI"))//Bold head jobs + HTML += "[rank]" + else + HTML += "[rank]" - HTML += "" - continue - - HTML += "[prefLevelLabel]" + HTML += "No" HTML += "" + continue - for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even - HTML += "" + HTML += "[prefLevelLabel]" + HTML += "" - HTML += "
" - var/rank = job.title - lastJob = job - if(jobban_isbanned(user, rank)) - HTML += "[rank] BANNED
\[IN [(available_in_days)] DAYS\]
\[MUTANT\]
\[NON-HUMAN\]
" + var/rank = job.title + lastJob = job + if(jobban_isbanned(user, rank)) + HTML += "[rank] BANNED
\[IN [(available_in_days)] DAYS\]
\[MUTANT\]
\[NON-HUMAN\]
" + HTML += "" - var/prefLevelLabel = "ERROR" - var/prefLevelColor = "pink" - var/prefUpperLevel = -1 // level to assign on left click - var/prefLowerLevel = -1 // level to assign on right click + var/prefLevelLabel = "ERROR" + var/prefLevelColor = "pink" + var/prefUpperLevel = -1 // level to assign on left click + var/prefLowerLevel = -1 // level to assign on right click - if(GetJobDepartment(job, 1) & job.flag) - prefLevelLabel = "High" - prefLevelColor = "slateblue" - prefUpperLevel = 4 - prefLowerLevel = 2 - else if(GetJobDepartment(job, 2) & job.flag) - prefLevelLabel = "Medium" - prefLevelColor = "green" - prefUpperLevel = 1 - prefLowerLevel = 3 - else if(GetJobDepartment(job, 3) & job.flag) - prefLevelLabel = "Low" - prefLevelColor = "orange" - prefUpperLevel = 2 - prefLowerLevel = 4 + if(GetJobDepartment(job, 1) & job.flag) + prefLevelLabel = "High" + prefLevelColor = "slateblue" + prefUpperLevel = 4 + prefLowerLevel = 2 + else if(GetJobDepartment(job, 2) & job.flag) + prefLevelLabel = "Medium" + prefLevelColor = "green" + prefUpperLevel = 1 + prefLowerLevel = 3 + else if(GetJobDepartment(job, 3) & job.flag) + prefLevelLabel = "Low" + prefLevelColor = "orange" + prefUpperLevel = 2 + prefLowerLevel = 4 + else + prefLevelLabel = "NEVER" + prefLevelColor = "red" + prefUpperLevel = 3 + prefLowerLevel = 1 + + + HTML += "" + + if(rank == "Assistant")//Assistant is special + if(job_civilian_low & ASSISTANT) + HTML += "Yes" else - prefLevelLabel = "NEVER" - prefLevelColor = "red" - prefUpperLevel = 3 - prefLowerLevel = 1 - - - HTML += "" - - if(rank == "Assistant")//Assistant is special - if(job_civilian_low & ASSISTANT) - HTML += "Yes" - else - HTML += "No" - HTML += "
  
" + for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even + HTML += "
  
" + HTML += "
" - HTML += "

[userandomjob ? "Get random job if preferences unavailable" : "Be an Assistant if preference unavailable"]
" - HTML += "
Reset Preferences
" + HTML += "
" - user << browse(null, "window=preferences") - //user << browse(HTML, "window=mob_occupation;size=[width]x[height]") - var/datum/browser/popup = new(user, "mob_occupation", "
Occupation Preferences
", width, height) - popup.set_window_options("can_close=0") - popup.set_content(HTML) - popup.open(0) + HTML += "

[userandomjob ? "Get random job if preferences unavailable" : "Be an Assistant if preference unavailable"]
" + HTML += "
Reset Preferences
" + + user << browse(null, "window=preferences") + //user << browse(HTML, "window=mob_occupation;size=[width]x[height]") + var/datum/browser/popup = new(user, "mob_occupation", "
Occupation Preferences
", width, height) + popup.set_window_options("can_close=0") + popup.set_content(HTML) + popup.open(0) + return + +/datum/preferences/proc/SetJobPreferenceLevel(datum/job/job, level) + if (!job) + return 0 + + if (level == 1) // to high + // remove any other job(s) set to high + job_civilian_med |= job_civilian_high + job_engsec_med |= job_engsec_high + job_medsci_med |= job_medsci_high + job_civilian_high = 0 + job_engsec_high = 0 + job_medsci_high = 0 + + if (job.department_flag == CIVILIAN) + job_civilian_low &= ~job.flag + job_civilian_med &= ~job.flag + job_civilian_high &= ~job.flag + + switch(level) + if (1) + job_civilian_high |= job.flag + if (2) + job_civilian_med |= job.flag + if (3) + job_civilian_low |= job.flag + + return 1 + else if (job.department_flag == ENGSEC) + job_engsec_low &= ~job.flag + job_engsec_med &= ~job.flag + job_engsec_high &= ~job.flag + + switch(level) + if (1) + job_engsec_high |= job.flag + if (2) + job_engsec_med |= job.flag + if (3) + job_engsec_low |= job.flag + + return 1 + else if (job.department_flag == MEDSCI) + job_medsci_low &= ~job.flag + job_medsci_med &= ~job.flag + job_medsci_high &= ~job.flag + + switch(level) + if (1) + job_medsci_high |= job.flag + if (2) + job_medsci_med |= job.flag + if (3) + job_medsci_low |= job.flag + + return 1 + + return 0 + +/datum/preferences/proc/UpdateJobPreference(mob/user, role, desiredLvl) + if(!SSjob) + return + var/datum/job/job = SSjob.GetJob(role) + + if(!job) + user << browse(null, "window=mob_occupation") + ShowChoices(user) return - proc/SetJobPreferenceLevel(datum/job/job, level) - if (!job) - return 0 + if (!isnum(desiredLvl)) + user << "UpdateJobPreference - desired level was not a number. Please notify coders!" + ShowChoices(user) + return - if (level == 1) // to high - // remove any other job(s) set to high - job_civilian_med |= job_civilian_high - job_engsec_med |= job_engsec_high - job_medsci_med |= job_medsci_high - job_civilian_high = 0 - job_engsec_high = 0 - job_medsci_high = 0 - - if (job.department_flag == CIVILIAN) + if(role == "Assistant") + if(job_civilian_low & job.flag) job_civilian_low &= ~job.flag - job_civilian_med &= ~job.flag - job_civilian_high &= ~job.flag - - switch(level) - if (1) - job_civilian_high |= job.flag - if (2) - job_civilian_med |= job.flag - if (3) - job_civilian_low |= job.flag - - return 1 - else if (job.department_flag == ENGSEC) - job_engsec_low &= ~job.flag - job_engsec_med &= ~job.flag - job_engsec_high &= ~job.flag - - switch(level) - if (1) - job_engsec_high |= job.flag - if (2) - job_engsec_med |= job.flag - if (3) - job_engsec_low |= job.flag - - return 1 - else if (job.department_flag == MEDSCI) - job_medsci_low &= ~job.flag - job_medsci_med &= ~job.flag - job_medsci_high &= ~job.flag - - switch(level) - if (1) - job_medsci_high |= job.flag - if (2) - job_medsci_med |= job.flag - if (3) - job_medsci_low |= job.flag - - return 1 - - return 0 - - proc/UpdateJobPreference(mob/user, role, desiredLvl) - if(!SSjob) - return - var/datum/job/job = SSjob.GetJob(role) - - if(!job) - user << browse(null, "window=mob_occupation") - ShowChoices(user) - return - - if (!isnum(desiredLvl)) - user << "UpdateJobPreference - desired level was not a number. Please notify coders!" - ShowChoices(user) - return - - if(role == "Assistant") - if(job_civilian_low & job.flag) - job_civilian_low &= ~job.flag - else - job_civilian_low |= job.flag - SetChoices(user) - return 1 - - SetJobPreferenceLevel(job, desiredLvl) + else + job_civilian_low |= job.flag SetChoices(user) - return 1 + SetJobPreferenceLevel(job, desiredLvl) + SetChoices(user) - proc/ResetJobs() - - job_civilian_high = 0 - job_civilian_med = 0 - job_civilian_low = 0 - - job_medsci_high = 0 - job_medsci_med = 0 - job_medsci_low = 0 - - job_engsec_high = 0 - job_engsec_med = 0 - job_engsec_low = 0 + return 1 - proc/GetJobDepartment(datum/job/job, level) - if(!job || !level) return 0 - switch(job.department_flag) - if(CIVILIAN) - switch(level) - if(1) - return job_civilian_high - if(2) - return job_civilian_med - if(3) - return job_civilian_low - if(MEDSCI) - switch(level) - if(1) - return job_medsci_high - if(2) - return job_medsci_med - if(3) - return job_medsci_low - if(ENGSEC) - switch(level) - if(1) - return job_engsec_high - if(2) - return job_engsec_med - if(3) - return job_engsec_low - return 0 +/datum/preferences/proc/ResetJobs() - proc/process_link(mob/user, list/href_list) - if(!istype(user, /mob/new_player)) return + job_civilian_high = 0 + job_civilian_med = 0 + job_civilian_low = 0 - if(href_list["jobbancheck"]) - var/job = sanitizeSQL(href_list["jobbancheck"]) - var/sql_ckey = sanitizeSQL(user.ckey) - var/DBQuery/query_get_jobban = dbcon.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND job = '[job]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") - if(!query_get_jobban.Execute()) - var/err = query_get_jobban.ErrorMsg() - log_game("SQL ERROR obtaining reason from ban table. Error : \[[err]\]\n") - return - if(query_get_jobban.NextRow()) - var/reason = query_get_jobban.item[1] - var/bantime = query_get_jobban.item[2] - var/duration = query_get_jobban.item[3] - var/expiration_time = query_get_jobban.item[4] - var/a_ckey = query_get_jobban.item[5] - var/text - text = "You, or another user of this computer, ([user.ckey]) is banned from playing [job]. The ban reason is:
[reason]
This ban was applied by [a_ckey] on [bantime]" - if(text2num(duration) > 0) - text += ". The ban is for [duration] minutes and expires on [expiration_time] (server time)" - text += ".
" - user << text + job_medsci_high = 0 + job_medsci_med = 0 + job_medsci_low = 0 + + job_engsec_high = 0 + job_engsec_med = 0 + job_engsec_low = 0 + + +/datum/preferences/proc/GetJobDepartment(datum/job/job, level) + if(!job || !level) return 0 + switch(job.department_flag) + if(CIVILIAN) + switch(level) + if(1) + return job_civilian_high + if(2) + return job_civilian_med + if(3) + return job_civilian_low + if(MEDSCI) + switch(level) + if(1) + return job_medsci_high + if(2) + return job_medsci_med + if(3) + return job_medsci_low + if(ENGSEC) + switch(level) + if(1) + return job_engsec_high + if(2) + return job_engsec_med + if(3) + return job_engsec_low + return 0 + +/datum/preferences/proc/process_link(mob/user, list/href_list) + if(!istype(user, /mob/new_player)) return + + if(href_list["jobbancheck"]) + var/job = sanitizeSQL(href_list["jobbancheck"]) + var/sql_ckey = sanitizeSQL(user.ckey) + var/DBQuery/query_get_jobban = dbcon.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND job = '[job]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") + if(!query_get_jobban.Execute()) + var/err = query_get_jobban.ErrorMsg() + log_game("SQL ERROR obtaining reason from ban table. Error : \[[err]\]\n") return + if(query_get_jobban.NextRow()) + var/reason = query_get_jobban.item[1] + var/bantime = query_get_jobban.item[2] + var/duration = query_get_jobban.item[3] + var/expiration_time = query_get_jobban.item[4] + var/a_ckey = query_get_jobban.item[5] + var/text + text = "You, or another user of this computer, ([user.ckey]) is banned from playing [job]. The ban reason is:
[reason]
This ban was applied by [a_ckey] on [bantime]" + if(text2num(duration) > 0) + text += ". The ban is for [duration] minutes and expires on [expiration_time] (server time)" + text += ".
" + user << text + return - if(href_list["preference"] == "job") - switch(href_list["task"]) - if("close") - user << browse(null, "window=mob_occupation") - ShowChoices(user) - if("reset") - ResetJobs() - SetChoices(user) - if("random") - if(jobban_isbanned(user, "Assistant")) - userandomjob = 1 - else - userandomjob = !userandomjob - SetChoices(user) - if("setJobLevel") - UpdateJobPreference(user, href_list["text"], text2num(href_list["level"])) - else - SetChoices(user) - return 1 - + if(href_list["preference"] == "job") switch(href_list["task"]) + if("close") + user << browse(null, "window=mob_occupation") + ShowChoices(user) + if("reset") + ResetJobs() + SetChoices(user) if("random") - switch(href_list["preference"]) - if("name") - real_name = pref_species.random_name(gender,1) - if("age") - age = rand(AGE_MIN, AGE_MAX) - if("hair") - hair_color = random_short_color() - if("hair_style") - hair_style = random_hair_style(gender) - if("facial") - facial_hair_color = random_short_color() - if("facial_hair_style") - facial_hair_style = random_facial_hair_style(gender) - if("underwear") - underwear = random_underwear(gender) - if("undershirt") - undershirt = random_undershirt(gender) - if("socks") - socks = random_socks(gender) - if("eyes") - eye_color = random_eye_color() - if("s_tone") - skin_tone = random_skin_tone() - if("bag") - backbag = rand(1,2) - if("all") - random_character() - - if("input") - switch(href_list["preference"]) - if("ghostform") - if(unlock_content) - var/new_form = input(user, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in ghost_forms - if(new_form) - ghost_form = new_form - if("name") - var/new_name = reject_bad_name( input(user, "Choose your character's name:", "Character Preference") as text|null ) - if(new_name) - real_name = new_name - else - user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." - - if("age") - var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null - if(new_age) - age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN) - - if("metadata") - var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null - if(new_metadata) - metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN)) - - if("hair") - var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as null|color - if(new_hair) - hair_color = sanitize_hexcolor(new_hair) - - - if("hair_style") - var/new_hair_style - if(gender == MALE) - new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in hair_styles_male_list - else - new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in hair_styles_female_list - if(new_hair_style) - hair_style = new_hair_style - - if("next_hair_style") - if (gender == MALE) - hair_style = next_list_item(hair_style, hair_styles_male_list) - else - hair_style = next_list_item(hair_style, hair_styles_female_list) - - if("previous_hair_style") - if (gender == MALE) - hair_style = previous_list_item(hair_style, hair_styles_male_list) - else - hair_style = previous_list_item(hair_style, hair_styles_female_list) - - if("facial") - var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference") as null|color - if(new_facial) - facial_hair_color = sanitize_hexcolor(new_facial) - - if("facial_hair_style") - var/new_facial_hair_style - if(gender == MALE) - new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in facial_hair_styles_male_list - else - new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in facial_hair_styles_female_list - if(new_facial_hair_style) - facial_hair_style = new_facial_hair_style - - if("next_facehair_style") - if (gender == MALE) - facial_hair_style = next_list_item(facial_hair_style, facial_hair_styles_male_list) - else - facial_hair_style = next_list_item(facial_hair_style, facial_hair_styles_female_list) - - if("previous_facehair_style") - if (gender == MALE) - facial_hair_style = previous_list_item(facial_hair_style, facial_hair_styles_male_list) - else - facial_hair_style = previous_list_item(facial_hair_style, facial_hair_styles_female_list) - - if("underwear") - var/new_underwear - if(gender == MALE) - new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in underwear_m - else - new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in underwear_f - if(new_underwear) - underwear = new_underwear - - if("undershirt") - var/new_undershirt - if(gender == MALE) - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_m - else - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_f - if(new_undershirt) - undershirt = new_undershirt - - if("socks") - var/new_socks - if(gender == MALE) - new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in socks_m - else - new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in socks_f - if(new_socks) - socks = new_socks - - if("eyes") - var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference") as color|null - if(new_eyes) - eye_color = sanitize_hexcolor(new_eyes) - - if("species") - - var/result = input(user, "Select a species", "Species Selection") as null|anything in roundstart_species - - if(result) - var/newtype = roundstart_species[result] - pref_species = new newtype() - //Now that we changed our species, we must verify that the mutant colour is still allowed. - var/temp_hsv = RGBtoHSV(features["mcolor"]) - if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.specflags) && ReadHSV(temp_hsv)[3] < ReadHSV("#7F7F7F")[3])) - features["mcolor"] = pref_species.default_color - if("mutant_color") - var/new_mutantcolor = input(user, "Choose your character's alien/mutant color:", "Character Preference") as color|null - if(new_mutantcolor) - var/temp_hsv = RGBtoHSV(new_mutantcolor) - if(new_mutantcolor == "#000000") - features["mcolor"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.specflags) || ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright, but only if they affect the skin - features["mcolor"] = sanitize_hexcolor(new_mutantcolor) - else - user << "Invalid color. Your color is not bright enough." - - if("tail_lizard") - var/new_tail - new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in tails_list_lizard - if(new_tail) - features["tail_lizard"] = new_tail - - if("tail_human") - var/new_tail - new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in tails_list_human - if(new_tail) - features["tail_human"] = new_tail - - if("snout") - var/new_snout - new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in snouts_list - if(new_snout) - features["snout"] = new_snout - - if("horns") - var/new_horns - new_horns = input(user, "Choose your character's horns:", "Character Preference") as null|anything in horns_list - if(new_horns) - features["horns"] = new_horns - - if("ears") - var/new_ears - new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in ears_list - if(new_ears) - features["ears"] = new_ears - - if("frills") - var/new_frills - new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in frills_list - if(new_frills) - features["frills"] = new_frills - - if("spines") - var/new_spines - new_spines = input(user, "Choose your character's spines:", "Character Preference") as null|anything in spines_list - if(new_spines) - features["spines"] = new_spines - - if("body_markings") - var/new_body_markings - new_body_markings = input(user, "Choose your character's body markings:", "Character Preference") as null|anything in body_markings_list - if(new_body_markings) - features["body_markings"] = new_body_markings - - if("s_tone") - var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in skin_tones - if(new_s_tone) - skin_tone = new_s_tone - - if("ooccolor") - var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference") as color|null - if(new_ooccolor) - ooccolor = sanitize_ooccolor(new_ooccolor) - - if("bag") - var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in backbaglist - if(new_backbag) - backbag = backbaglist.Find(new_backbag) - - if("clown_name") - var/new_clown_name = reject_bad_name( input(user, "Choose your character's clown name:", "Character Preference") as text|null ) - if(new_clown_name) - custom_names["clown"] = new_clown_name - else - user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." - - if("mime_name") - var/new_mime_name = reject_bad_name( input(user, "Choose your character's mime name:", "Character Preference") as text|null ) - if(new_mime_name) - custom_names["mime"] = new_mime_name - else - user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." - - if("ai_name") - var/new_ai_name = reject_bad_name( input(user, "Choose your character's AI name:", "Character Preference") as text|null, 1 ) - if(new_ai_name) - custom_names["ai"] = new_ai_name - else - user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and ." - - if("cyborg_name") - var/new_cyborg_name = reject_bad_name( input(user, "Choose your character's cyborg name:", "Character Preference") as text|null, 1 ) - if(new_cyborg_name) - custom_names["cyborg"] = new_cyborg_name - else - user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and ." - - if("religion_name") - var/new_religion_name = reject_bad_name( input(user, "Choose your character's religion:", "Character Preference") as text|null ) - if(new_religion_name) - custom_names["religion"] = new_religion_name - else - user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." - - if("deity_name") - var/new_deity_name = reject_bad_name( input(user, "Choose your character's deity:", "Character Preference") as text|null ) - if(new_deity_name) - custom_names["deity"] = new_deity_name - else - user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." - - + if(jobban_isbanned(user, "Assistant")) + userandomjob = 1 + else + userandomjob = !userandomjob + SetChoices(user) + if("setJobLevel") + UpdateJobPreference(user, href_list["text"], text2num(href_list["level"])) else - switch(href_list["preference"]) - if("publicity") - if(unlock_content) - toggles ^= MEMBER_PUBLIC - if("gender") - if(gender == MALE) - gender = FEMALE + SetChoices(user) + return 1 + + switch(href_list["task"]) + if("random") + switch(href_list["preference"]) + if("name") + real_name = pref_species.random_name(gender,1) + if("age") + age = rand(AGE_MIN, AGE_MAX) + if("hair") + hair_color = random_short_color() + if("hair_style") + hair_style = random_hair_style(gender) + if("facial") + facial_hair_color = random_short_color() + if("facial_hair_style") + facial_hair_style = random_facial_hair_style(gender) + if("underwear") + underwear = random_underwear(gender) + if("undershirt") + undershirt = random_undershirt(gender) + if("socks") + socks = random_socks(gender) + if("eyes") + eye_color = random_eye_color() + if("s_tone") + skin_tone = random_skin_tone() + if("bag") + backbag = rand(1,2) + if("all") + random_character() + + if("input") + switch(href_list["preference"]) + if("ghostform") + if(unlock_content) + var/new_form = input(user, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in ghost_forms + if(new_form) + ghost_form = new_form + if("name") + var/new_name = reject_bad_name( input(user, "Choose your character's name:", "Character Preference") as text|null ) + if(new_name) + real_name = new_name + else + user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." + + if("age") + var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null + if(new_age) + age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN) + + if("metadata") + var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null + if(new_metadata) + metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN)) + + if("hair") + var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as null|color + if(new_hair) + hair_color = sanitize_hexcolor(new_hair) + + + if("hair_style") + var/new_hair_style + if(gender == MALE) + new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in hair_styles_male_list + else + new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in hair_styles_female_list + if(new_hair_style) + hair_style = new_hair_style + + if("next_hair_style") + if (gender == MALE) + hair_style = next_list_item(hair_style, hair_styles_male_list) + else + hair_style = next_list_item(hair_style, hair_styles_female_list) + + if("previous_hair_style") + if (gender == MALE) + hair_style = previous_list_item(hair_style, hair_styles_male_list) + else + hair_style = previous_list_item(hair_style, hair_styles_female_list) + + if("facial") + var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference") as null|color + if(new_facial) + facial_hair_color = sanitize_hexcolor(new_facial) + + if("facial_hair_style") + var/new_facial_hair_style + if(gender == MALE) + new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in facial_hair_styles_male_list + else + new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in facial_hair_styles_female_list + if(new_facial_hair_style) + facial_hair_style = new_facial_hair_style + + if("next_facehair_style") + if (gender == MALE) + facial_hair_style = next_list_item(facial_hair_style, facial_hair_styles_male_list) + else + facial_hair_style = next_list_item(facial_hair_style, facial_hair_styles_female_list) + + if("previous_facehair_style") + if (gender == MALE) + facial_hair_style = previous_list_item(facial_hair_style, facial_hair_styles_male_list) + else + facial_hair_style = previous_list_item(facial_hair_style, facial_hair_styles_female_list) + + if("underwear") + var/new_underwear + if(gender == MALE) + new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in underwear_m + else + new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in underwear_f + if(new_underwear) + underwear = new_underwear + + if("undershirt") + var/new_undershirt + if(gender == MALE) + new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_m + else + new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_f + if(new_undershirt) + undershirt = new_undershirt + + if("socks") + var/new_socks + if(gender == MALE) + new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in socks_m + else + new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in socks_f + if(new_socks) + socks = new_socks + + if("eyes") + var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference") as color|null + if(new_eyes) + eye_color = sanitize_hexcolor(new_eyes) + + if("species") + + var/result = input(user, "Select a species", "Species Selection") as null|anything in roundstart_species + + if(result) + var/newtype = roundstart_species[result] + pref_species = new newtype() + //Now that we changed our species, we must verify that the mutant colour is still allowed. + var/temp_hsv = RGBtoHSV(features["mcolor"]) + if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.specflags) && ReadHSV(temp_hsv)[3] < ReadHSV("#7F7F7F")[3])) + features["mcolor"] = pref_species.default_color + if("mutant_color") + var/new_mutantcolor = input(user, "Choose your character's alien/mutant color:", "Character Preference") as color|null + if(new_mutantcolor) + var/temp_hsv = RGBtoHSV(new_mutantcolor) + if(new_mutantcolor == "#000000") + features["mcolor"] = pref_species.default_color + else if((MUTCOLORS_PARTSONLY in pref_species.specflags) || ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright, but only if they affect the skin + features["mcolor"] = sanitize_hexcolor(new_mutantcolor) else - gender = MALE - underwear = random_underwear(gender) - undershirt = random_undershirt(gender) - socks = random_socks(gender) - facial_hair_style = random_facial_hair_style(gender) - hair_style = random_hair_style(gender) + user << "Invalid color. Your color is not bright enough." - if("hear_adminhelps") - toggles ^= SOUND_ADMINHELP - if("announce_login") - toggles ^= ANNOUNCE_LOGIN + if("tail_lizard") + var/new_tail + new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in tails_list_lizard + if(new_tail) + features["tail_lizard"] = new_tail - if("ui") - switch(UI_style) - if("Midnight") - UI_style = "Plasmafire" - if("Plasmafire") - UI_style = "Retro" - else - UI_style = "Midnight" + if("tail_human") + var/new_tail + new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in tails_list_human + if(new_tail) + features["tail_human"] = new_tail - if("be_special") - var/num = text2num(href_list["num"]) - be_special ^= (1<Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." + + if("mime_name") + var/new_mime_name = reject_bad_name( input(user, "Choose your character's mime name:", "Character Preference") as text|null ) + if(new_mime_name) + custom_names["mime"] = new_mime_name + else + user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." + + if("ai_name") + var/new_ai_name = reject_bad_name( input(user, "Choose your character's AI name:", "Character Preference") as text|null, 1 ) + if(new_ai_name) + custom_names["ai"] = new_ai_name + else + user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and ." + + if("cyborg_name") + var/new_cyborg_name = reject_bad_name( input(user, "Choose your character's cyborg name:", "Character Preference") as text|null, 1 ) + if(new_cyborg_name) + custom_names["cyborg"] = new_cyborg_name + else + user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and ." + + if("religion_name") + var/new_religion_name = reject_bad_name( input(user, "Choose your character's religion:", "Character Preference") as text|null ) + if(new_religion_name) + custom_names["religion"] = new_religion_name + else + user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." + + if("deity_name") + var/new_deity_name = reject_bad_name( input(user, "Choose your character's deity:", "Character Preference") as text|null ) + if(new_deity_name) + custom_names["deity"] = new_deity_name + else + user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." + + + else + switch(href_list["preference"]) + if("publicity") + if(unlock_content) + toggles ^= MEMBER_PUBLIC + if("gender") + if(gender == MALE) + gender = FEMALE + else + gender = MALE + underwear = random_underwear(gender) + undershirt = random_undershirt(gender) + socks = random_socks(gender) + facial_hair_style = random_facial_hair_style(gender) + hair_style = random_hair_style(gender) + + if("hear_adminhelps") + toggles ^= SOUND_ADMINHELP + if("announce_login") + toggles ^= ANNOUNCE_LOGIN + + if("ui") + switch(UI_style) + if("Midnight") + UI_style = "Plasmafire" + if("Plasmafire") + UI_style = "Retro" else - user.stopLobbySound() + UI_style = "Midnight" - if("ghost_ears") - chat_toggles ^= CHAT_GHOSTEARS + if("be_special") + var/num = text2num(href_list["num"]) + be_special ^= (1<2 || cloneloss>50 || !real_name ) //disfigured. use id-name if possible + if( !O || (status_flags&DISFIGURED) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name ) //disfigured. use id-name if possible return if_no_face return real_name diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 5655b34bc97..67e827da796 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -372,9 +372,9 @@ /mob/living/silicon/pai/proc/CheckDNA(mob/living/carbon/M, mob/living/silicon/pai/P) var/answer = input(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", "No") in list("Yes", "No") if(answer == "Yes") - var/turf/T = get_turf(P.loc) - for (var/mob/v in viewers(T)) - v.show_message("[M] presses \his thumb against [P].", 3, "[P] makes a sharp clicking sound as it extracts DNA material from [M].", 2) + M.visible_message("[M] presses \his thumb against [P].",\ + "You press your thumb against [P].",\ + "[P] makes a sharp clicking sound as it extracts DNA material from [M].") if(!check_dna_integrity(M)) P << "No DNA detected" return diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index c68c7aff915..54262819d23 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -106,9 +106,6 @@ var/radiation = 0//Carbon - var/list/mutations = list() //Carbon -- Doohl - //see: setup.dm for list of mutations - var/voice_name = "unidentifiable voice" var/list/faction = list("neutral") //A list of factions that this mob is currently in, for hostile mob targetting, amongst other things diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index c53fa9b1d3a..f7cc8017d76 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -453,9 +453,6 @@ It's fairly easy to fix if dealing with single letters but not so much with comp return 1 return 0 -/mob/proc/has_mutation(mutation) - return mutation in src.mutations ? 1 : 0 - /proc/get_both_hands(mob/living/carbon/M) var/list/hands = list(M.l_hand, M.r_hand) return hands diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index 3b9b6021b15..2608561867d 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -40,7 +40,7 @@ M.name = src.name M.real_name = src.real_name - if(check_dna_integrity(src) && istype(M, /mob/living/carbon)) + if(check_dna_integrity(src)) var/mob/living/carbon/C = src var/mob/living/carbon/D = M D.dna = C.dna diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 674b88eacb6..4bbc1b2a8ee 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -59,6 +59,7 @@ viruses = list() for(var/datum/disease/D in O.viruses) D.affected_mob = O + D.holder = O //keep damage? if (tr_flags & TR_KEEPDAMAGE) @@ -169,7 +170,6 @@ else hardset_dna(O, null, null, null, null, dna.species.type) - dna = null if(newname) //if there's a name as an argument, always take that one over the current name O.real_name = newname else @@ -189,6 +189,7 @@ viruses = list() for(var/datum/disease/D in O.viruses) D.affected_mob = O + D.holder = O O.med_hud_set_status() //keep damage? diff --git a/code/modules/ninja/ninja_event.dm b/code/modules/ninja/ninja_event.dm index 37e5ff55bd2..4146165206b 100644 --- a/code/modules/ninja/ninja_event.dm +++ b/code/modules/ninja/ninja_event.dm @@ -167,7 +167,6 @@ Contents: /proc/create_space_ninja(spawn_loc) var/mob/living/carbon/human/new_ninja = new(spawn_loc) - if(prob(50)) new_ninja.gender = "female" var/datum/preferences/A = new()//Randomize appearance for the ninja. A.real_name = "[pick(ninja_titles)] [pick(ninja_names)]" A.copy_to(new_ninja) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 828f9b4e09f..ab40d011b4b 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -333,7 +333,6 @@ "You hit the light, and it smashes!", \ "You hear a tinkle of breaking glass.") if(on && (W.flags & CONDUCT)) - //if(!user.mutations & COLD_RESISTANCE) if (prob(12)) electrocute_mob(user, get_area(src), src, 0.3) broken() @@ -369,7 +368,6 @@ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(3, 1, src) s.start() - //if(!user.mutations & COLD_RESISTANCE) if (prob(75)) electrocute_mob(user, get_area(src), src, rand(0.7,1.0)) diff --git a/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm index 14213840918..5d738957633 100644 --- a/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm @@ -682,7 +682,7 @@ M.visible_message("[M]'s body convulses a bit, and then falls still once more.") return M.visible_message("[M]'s body convulses a bit.") - if(!M.suiciding && !(NOCLONE in M.mutations)) + if(!M.suiciding && !(M.disabilities & NOCLONE)) if(!M) return if(M.notify_ghost_cloning()) diff --git a/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm index 8cf1734dc42..8b5fd49055a 100644 --- a/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm @@ -123,7 +123,7 @@ toxpwr = 0 /datum/reagent/toxin/minttoxin/on_mob_life(mob/living/M) - if (FAT in M.mutations) + if (M.disabilities & FAT) M.gib() ..() return diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 5403b0ea02b..1095e93cbd2 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -79,7 +79,7 @@ if(!check_dna_integrity(T)) user << "You are unable to locate any blood!" return - if(NOCLONE in T.mutations) //target done been eat, no more blood in him + if(T.disabilities & NOCLONE) //target done been eat, no more blood in him user << "You are unable to locate any blood!" return if(target != user)