diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi index 5cb5c4b5c03..6e69669647f 100644 Binary files a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi and b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi differ diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm index fd0bdb9d05a..e2a03978603 100644 --- a/code/datums/configuration.dm +++ b/code/datums/configuration.dm @@ -47,6 +47,7 @@ var/usewhitelist = 0 var/kick_inactive = 0 //force disconnect for inactive players var/load_jobs_from_txt = 0 + var/usealienwhitelist = 0 var/server var/banappeals @@ -233,6 +234,9 @@ if ("usewhitelist") config.usewhitelist = 1 + if ("usealienwhitelist") + config.usealienwhitelist = 1 + if ("feature_object_spell_system") config.feature_object_spell_system = 1 diff --git a/code/defines/global.dm b/code/defines/global.dm index 963e7b058b5..eea4addf107 100644 --- a/code/defines/global.dm +++ b/code/defines/global.dm @@ -94,6 +94,7 @@ var list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]" list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was list/admins = list( ) + list/alien_whitelist = list( ) list/shuttles = list( ) list/reg_dna = list( ) // list/traitobj = list( ) diff --git a/code/game/cellautomata.dm b/code/game/cellautomata.dm index a862f4cc681..71b46fe5bf5 100644 --- a/code/game/cellautomata.dm +++ b/code/game/cellautomata.dm @@ -85,6 +85,8 @@ src.load_motd() src.load_rules() src.load_admins() + if (config.usealienwhitelist) + load_alienwhitelist() if (config.usewhitelist) load_whitelist() LoadBansjob() diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index e81d925bb0c..69fc1b833c9 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -13,4 +13,20 @@ var/list/whitelist return 0 return ("[M.ckey]" in whitelist) -#undef WHITELISTFILE \ No newline at end of file +#undef WHITELISTFILE + +proc/load_alienwhitelist() + var/text = file2text("config/alienwhitelist.txt") + if (!text) + diary << "Failed to load config/alienwhitelist.txt\n" + else + alien_whitelist = dd_text2list(text, "\n") + +/proc/is_alien_whitelisted(mob/M, var/species) + if(!alien_whitelist) + return + if(M && species) + for (var/s in alien_whitelist) + if(findtext(s,"[M.ckey] - [species]")) + return 1 + return 0 diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index 09f51e302bc..7e269078e85 100755 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -78,21 +78,24 @@ obj/item/verb/pick_up() if(!(usr)) return - if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain))) + if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain usr << "\red You can't pick things up!" return - if(!istype(src.loc, /turf) || usr.stat || usr.restrained() ) + if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained usr << "\red You can't pick things up!" return - if(src.anchored) + if(src.anchored) //Object isn't anchored usr << "\red You can't pick that up!" return - if(!usr.hand && usr.r_hand) + if(!usr.hand && usr.r_hand) //Right hand is not full usr << "\red Your right hand is full." return - if(usr.hand && usr.l_hand) + if(usr.hand && usr.l_hand) //Left hand is not full usr << "\red Your left hand is full." return + if(!istype(src.loc, /turf)) //Object is on a turf + usr << "\red You can't pick that up!" + return //All checks are done, time to pick it up! if(istype(usr, /mob/living/carbon/human)) src.attack_hand(usr) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0c0cf53e91a..b73ded273d0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -20,6 +20,7 @@ var/g_eyes = 0.0 var/b_eyes = 0.0 var/s_tone = 0.0 + var/species = "Human" age = 30.0 var/used_skillpoints = 0 var/skill_specialization = null diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index dc3f193c4de..193dc7729ad 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -392,7 +392,11 @@ proc/create_character() spawning = 1 - var/mob/living/carbon/human/new_character = new(loc) + var/mob/living/carbon/human/new_character // var/path/to/object/varname + if(preferences.species == "Tajaran") + new_character = new /mob/living/carbon/human/tajaran(loc) // varname = new /path/to/object(location_to_spawn_at) + else + new_character = new /mob/living/carbon/human(loc) new_character.lastarea = get_area(loc) close_spawn_windows() @@ -403,8 +407,9 @@ preferences.randomize_appearance_for(new_character) else preferences.copy_to(new_character) - - src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo + if(preferences.species == "Soghun") //This probably shouldn't be here, but I can't think of any other way + new_character.mutantrace = "lizard" + src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) new_character.dna.ready_dna(new_character) preferences.copydisabilities(new_character) diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 548c7817b86..0e26e085157 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -90,6 +90,9 @@ datum/preferences g_facial = 0 b_facial = 0 + //Species + species = "Human" + //Skin color s_tone = 0 @@ -281,6 +284,7 @@ datum/preferences dat += "
Body " dat += "(®)" // Random look dat += "
" + dat += "Species: [species]
" dat += "Blood Type: [b_type]
" dat += "Skin Tone: [-s_tone + 35]/220
" @@ -696,6 +700,23 @@ datum/preferences if("random") b_type = pickweight ( list ("A+" = 31, "A-" = 7, "B+" = 8, "B-" = 2, "AB+" = 2, "AB-" = 1, "O+" = 40, "O-" = 9)) + if(link_tags["species"]) + switch(link_tags["species"]) + if("input") + var/list/new_species = list("Human") + if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it! + if((is_alien_whitelisted(user, "Soghun")) || ((user.client) && (user.client.holder) && (user.client.holder.level) && (user.client.holder.level >= 5))) //Check for Soghun and admins + new_species += "Soghun" + if((is_alien_whitelisted(user, "Tajaran")) || ((user.client) && (user.client.holder) && (user.client.holder.level) && (user.client.holder.level >= 5))) //Check for Tajaran + new_species += "Tajaran" + else //Not using the whitelist? Aliens for everyone! + new_species += "Tajaran" + new_species += "Soghun" + species = input("Please select a species", "Character Generation", null) in new_species + h_style = "Bald" //Try not to carry face/head hair over. + f_style = "Shaved" + hair_style = new/datum/sprite_accessory/hair/bald + facial_hair_style = new/datum/sprite_accessory/facial_hair/shaved if(link_tags["hair"]) switch(link_tags["hair"]) @@ -735,14 +756,18 @@ datum/preferences if("random") randomize_skin_tone() if("input") - var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text + var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black) or 20-70 for Tajarans", "Character Generation") as text if(new_tone) - s_tone = max(min(round(text2num(new_tone)), 220), 1) + if(species == "Tajaran") + s_tone = max(min(round(text2num(new_tone)), 70), 20) + else + s_tone = max(min(round(text2num(new_tone)), 220), 1) s_tone = -s_tone + 35 if(link_tags["h_style"]) + if(species != "Human") + return switch(link_tags["h_style"]) - // New and improved hair selection code, by Doohl if("random") // random hair selection @@ -785,6 +810,8 @@ datum/preferences src.ooccolor = ooccolor if(link_tags["f_style"]) + if(species != "Human") //Tajarans and Soghuns don't have hair stuff yet. + return switch(link_tags["f_style"]) // see above for commentation. This is just a slight modification of the hair code for facial hairs diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 1fc8921a9f8..49be3db4503 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -209,7 +209,15 @@ datum/preferences else if (gender == FEMALE) g = "f" - preview_icon = new /icon('human.dmi', "body_[g]_s", "dir" = preview_dir) + if(species == "Tajaran") + preview_icon = new /icon('tajaran.dmi', "body_[g]_s", "dir" = preview_dir) + else if(species == "Soghun") + if(g == "m") + preview_icon = new /icon('genetics.dmi', "lizard_male_s", "dir" = preview_dir) + else if(g == "f") + preview_icon = new /icon('genetics.dmi', "lizard_female_s", "dir" = preview_dir) + else + preview_icon = new /icon('human.dmi', "body_[g]_s", "dir" = preview_dir) // Skin tone if (s_tone >= 0) diff --git a/code/modules/mob/new_player/savefile.dm b/code/modules/mob/new_player/savefile.dm index 48f44415f76..177248d4ab8 100644 --- a/code/modules/mob/new_player/savefile.dm +++ b/code/modules/mob/new_player/savefile.dm @@ -131,6 +131,7 @@ datum/preferences/proc/savefile_save(mob/user, slot) F["eyes_green"] << src.g_eyes F["eyes_blue"] << src.b_eyes F["blood_type"] << src.b_type + F["species"] << src.species F["underwear"] << src.underwear F["backbag"] << src.backbag F["backbag"] << src.backbag @@ -206,6 +207,8 @@ datum/preferences/proc/savefile_load(mob/user, slot) F["eyes_green"] >> src.g_eyes F["eyes_blue"] >> src.b_eyes F["blood_type"] >> src.b_type + F["species"] >> src.species + if(isnull(species)) species = "Human" F["underwear"] >> src.underwear if(underwear == 0) underwear = 6 //For old players who have 0 in their savefile F["backbag"] >> src.backbag diff --git a/config/alienwhitelist.txt b/config/alienwhitelist.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/config/config.txt b/config/config.txt index 41d3ceba1ba..b0446745487 100644 --- a/config/config.txt +++ b/config/config.txt @@ -164,4 +164,5 @@ TICKLAG 0.9 ## Defines if Tick Compensation is used. It results in a minor slowdown of movement of all mobs, but attempts to result in a level movement speed across all ticks. Recommended if tickrate is lowered. TICKCOMP 0 - +## Uncomment to restrict non-admins using humanoid alien races +USEALIENWHITELIST