From 34c6ba460451bac8c944baa431fe7389448bc285 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Tue, 5 Jul 2016 02:38:27 -0400 Subject: [PATCH 1/5] Modernizes [Re]Spawn Character --- code/modules/admin/verbs/randomverbs.dm | 168 ++++++++++++------------ 1 file changed, 87 insertions(+), 81 deletions(-) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 170f9302f9a..f7dcdbce112 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -349,111 +349,117 @@ Traitors and the like can also be revived with the previous role mostly intact. /N */ /client/proc/respawn_character() set category = "Special Verbs" - set name = "Respawn Character" - set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into." + set name = "Spawn Character" + set desc = "(Re)Spawn a client's loaded character." if(!holder) src << "Only administrators may use this command." return - var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", "")) - if(!input) + + //I frontload all the questions so we don't have a half-done process while you're reading. + var/client/picked_client = input(src, "Please specify which client's character to spawn.", "Client", "") in clients + if(!picked_client) return - var/mob/observer/dead/G_found - for(var/mob/observer/dead/G in player_list) - if(G.ckey == input) - G_found = G - break - - if(!G_found)//If a ghost was not found. - usr << "There is no active key like that in the game or the person is not currently a ghost." + var/location = input(src,"Please specify where to spawn them.", "Location", "Right Here") in list("Right Here","Arrivals","Cancel") + if(!location || location == "Cancel") return - var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned. - - var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character. - if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something - /*Try and locate a record for the person being respawned through data_core. - This isn't an exact science but it does the trick more often than not.*/ - var/id = md5("[G_found.real_name][G_found.mind.assigned_role]") - for(var/datum/data/record/t in data_core.locked) - if(t.fields["id"]==id) - record_found = t//We shall now reference the record. - break - - if(record_found)//If they have a record we can determine a few things. - new_character.real_name = record_found.fields["name"] - new_character.gender = record_found.fields["sex"] - new_character.age = record_found.fields["age"] - new_character.b_type = record_found.fields["b_type"] + var/announce = alert(src,"Do an announcement as if they had just arrived?", "Announce", "Yes", "No", "Cancel") + if(announce == "Cancel") + return + else if(announce == "Yes") //Too bad buttons can't just have 1/0 values and different display strings + announce = 1 else - new_character.gender = pick(MALE,FEMALE) - var/datum/preferences/A = new() - A.randomize_appearance_and_body_for(new_character) - new_character.real_name = G_found.real_name + announce = 0 - if(!new_character.real_name) - if(new_character.gender == MALE) - new_character.real_name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) - else - new_character.real_name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) - new_character.name = new_character.real_name - - if(G_found.mind && !G_found.mind.active) - G_found.mind.transfer_to(new_character) //be careful when doing stuff like this! I've already checked the mind isn't in use - new_character.mind.special_verbs = list() + var/inhabit = alert(src,"Put the person into the spawned mob?", "Inhabit", "Yes", "No", "Cancel") + if(inhabit == "Cancel") + return + else if(inhabit == "Yes") + inhabit = 1 else - new_character.mind_initialize() - if(!new_character.mind.assigned_role) new_character.mind.assigned_role = "Assistant"//If they somehow got a null assigned role. + inhabit = 0 - //DNA - if(record_found)//Pull up their name from database records if they did have a mind. - new_character.dna = new()//Let's first give them a new DNA. - new_character.dna.unique_enzymes = record_found.fields["b_dna"]//Enzymes are based on real name but we'll use the record for conformity. + var/equipment = alert(src,"Give equipment? Last job's equipment, or assistant if none.", "Equipment", "Yes", "No", "Cancel") + if(equipment == "Cancel") + return + else if(equipment == "Yes") + equipment = 1 + else + equipment = 0 - // I HATE BYOND. HATE. HATE. - N3X - var/list/newSE= record_found.fields["enzymes"] - var/list/newUI = record_found.fields["identity"] - new_character.dna.SE = newSE.Copy() //This is the default of enzymes so I think it's safe to go with. - new_character.dna.UpdateSE() - new_character.UpdateAppearance(newUI.Copy())//Now we configure their appearance based on their unique identity, same as with a DNA machine or somesuch. - else//If they have no records, we just do a random DNA for them, based on their random appearance/savefile. - new_character.dna.ready_dna(new_character) - - new_character.key = G_found.key - - /* - The code below functions with the assumption that the mob is already a traitor if they have a special role. - So all it does is re-equip the mob with powers and/or items. Or not, if they have no special role. - If they don't have a mind, they obviously don't have a special role. - */ - - //Two variables to properly announce later on. + //For logging later var/admin = key_name_admin(src) - var/player_key = G_found.key + var/player_key = picked_client.key - //Now for special roles and equipment. + var/mob/living/carbon/human/new_character + + if(location == "Right Here") //Spawn them on your turf + if(!src.mob) + src << "You can't use 'Right Here' when you are not 'Right Anywhere'!" + return + + var/turf/srcturf = get_turf(src.mob) + if(!srcturf) + src << "Unsure where to spawn the mob. Try using Arrivals?" + return + + new_character = new(srcturf) + + else if(location == "Arrivals") //Spawn them at a latejoin spawnpoint + new_character = new(pick(latejoin)) + + else //I have no idea how you're here + return + + if(!new_character) + src << "Something went wrong and spawning failed." + return + + //Write the appearance and whatnot out to the character + picked_client.prefs.copy_to(new_character) + if(inhabit) + new_character.key = player_key + + //Were they any particular special role? If so, copy. var/datum/antagonist/antag_data = get_antag_data(new_character.mind.special_role) if(antag_data) antag_data.add_antagonist(new_character.mind) antag_data.place_mob(new_character) - else - job_master.EquipRank(new_character, new_character.mind.assigned_role, 1) + + //Referenced to later to apply previous settings (role, antag) if any + var/datum/data/record/record_found + var/formerjob = "Assistant" + if(new_character.mind) + /*Try and locate a record for the person being respawned through data_core. + This isn't an exact science but it does the trick more often than not.*/ + record_found = find_general_record("name",new_character.real_name) + if(record_found) + formerjob = record_found.fields["real_rank"] + new_character.mind.assigned_role = formerjob + + //If they had a job before, re-equip them for their job. + if(equipment) + job_master.EquipRank(new_character, formerjob, 1) + + //A redraw for good measure + new_character.update_icons() + + //If we're announcing their arrival + if(announce) + AnnounceArrival(new_character, new_character.mind.assigned_role) //Announces the character on all the systems, based on the record. - if(!issilicon(new_character))//If they are not a cyborg/AI. - if(!record_found && !player_is_antag(new_character.mind, only_offstation_roles = 1)) //If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway. - //Power to the user! - if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes") - data_core.manifest_inject(new_character) + if(!record_found) + if(alert(new_character,"Warning: No data core entry detected. Would you like add them to various databases, such as medical records?","Records","Yes","No")=="Yes") + data_core.manifest_inject(new_character) - if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes") - call(/proc/AnnounceArrival)(new_character, new_character.mind.assigned_role) + message_admins("\blue [admin] has spawned [player_key]'s character [new_character.real_name].", 1) - message_admins("\blue [admin] has respawned [player_key] as [new_character.real_name].", 1) - - new_character << "You have been fully respawned. Enjoy the game." + new_character << "You have been fully spawned. Enjoy the game." feedback_add_details("admin_verb","RSPCH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + return new_character /client/proc/cmd_admin_add_freeform_ai_law() From dcf3f334502e421f2d34c464e0b74e0eba695840 Mon Sep 17 00:00:00 2001 From: Neerti Date: Tue, 5 Jul 2016 07:10:16 -0400 Subject: [PATCH 2/5] Planetary Walls Adds a new type of wall, which makes atmospherics pretend there is actually something beyond the wall that has gas to merge with. I added some presets for normal air, as well as all of the terrestrial planets of the Vir system. --- code/game/turfs/unsimulated/planetary.dm | 47 ++++++++++++++++++++++++ polaris.dme | 1 + 2 files changed, 48 insertions(+) create mode 100644 code/game/turfs/unsimulated/planetary.dm diff --git a/code/game/turfs/unsimulated/planetary.dm b/code/game/turfs/unsimulated/planetary.dm new file mode 100644 index 00000000000..17cd62ffbbd --- /dev/null +++ b/code/game/turfs/unsimulated/planetary.dm @@ -0,0 +1,47 @@ +// This is a wall you surround the area of your "planet" with, that makes the atmosphere inside stay within bounds, even if canisters +// are opened or other strange things occur. +/turf/unsimulated/wall/planetary + name = "railroading" + desc = "Choo choo!" + icon = 'icons/turf/walls.dmi' + icon_state = "riveted" + opacity = 1 + density = 1 + alpha = 0 + blocks_air = 0 + + // Set these to get your desired planetary atmosphere. + oxygen = 0 + nitrogen = 0 + carbon_dioxide = 0 + phoron = 0 + temperature = T20C + +// Normal station/earth air. +/turf/unsimulated/wall/planetary/normal + oxygen = MOLES_O2STANDARD + nitrogen = MOLES_N2STANDARD + +/turf/unsimulated/wall/planetary/firnir + temperature = 570 + carbon_dioxide = 0.04863 + +/turf/unsimulated/wall/planetary/tyr + temperature = 405 + carbon_dioxide = 0.15848 + +// Wiki says it's 92.6 kPa, composition 18.1% O2 80.8% N2 1.1% trace. We're gonna pretend trace is actually nitrogen. +/turf/unsimulated/wall/planetary/sif + oxygen = 114.50978 * 0.181 + nitrogen = 114.50978 * 0.819 + temperature = 243.15 // Roughly -30C / -22F + +// Fairly close to Mars in terms of temperature and pressure. +/turf/unsimulated/wall/planetary/magni + carbon_dioxide = 0.90998361 + temperature = 202 + +/turf/unsimulated/wall/planetary/desert + oxygen = MOLES_O2STANDARD + nitrogen = MOLES_N2STANDARD + temperature = 310.92 // About 37.7C / 100F \ No newline at end of file diff --git a/polaris.dme b/polaris.dme index 7e4d5ec9f73..aee17799612 100644 --- a/polaris.dme +++ b/polaris.dme @@ -904,6 +904,7 @@ #include "code\game\turfs\space\transit.dm" #include "code\game\turfs\unsimulated\beach.dm" #include "code\game\turfs\unsimulated\floor.dm" +#include "code\game\turfs\unsimulated\planetary.dm" #include "code\game\turfs\unsimulated\walls.dm" #include "code\game\verbs\ignore.dm" #include "code\game\verbs\ooc.dm" From 5660b8b0a6724af991f25d7f8c1687dd34d49826 Mon Sep 17 00:00:00 2001 From: Yoshax Date: Tue, 5 Jul 2016 13:53:50 +0100 Subject: [PATCH 3/5] Adds missing robotics shutters --- maps/polaris-1.dmm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maps/polaris-1.dmm b/maps/polaris-1.dmm index bf56bd47d20..7d9c11b43cb 100644 --- a/maps/polaris-1.dmm +++ b/maps/polaris-1.dmm @@ -3475,6 +3475,7 @@ "boQ" = (/obj/machinery/atmospherics/unary/vent_pump/on{dir = 1},/turf/simulated/floor/tiled/white,/area/medical/virology) "boR" = (/obj/effect/floor_decal/corner/lime{dir = 6},/turf/simulated/floor/tiled/white,/area/medical/virology) "boS" = (/obj/effect/floor_decal/corner/lime{dir = 8},/turf/simulated/floor/tiled/white,/area/medical/virology) +"boT" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/firedoor/border_only,/obj/structure/window/reinforced{dir = 8},/obj/machinery/door/blast/regular{density = 0; icon_state = "pdoor0"; id = "Biohazard"; name = "Biohazard Shutter"; opacity = 0},/turf/simulated/floor/plating,/area/assembly/robotics) "boU" = (/obj/structure/table/glass,/obj/machinery/computer/med_data/laptop,/obj/effect/floor_decal/corner/lime{dir = 10},/obj/machinery/light,/turf/simulated/floor/tiled/white,/area/medical/virology) "boV" = (/obj/machinery/disease2/diseaseanalyser,/obj/effect/floor_decal/corner/lime{dir = 8},/turf/simulated/floor/tiled/white,/area/medical/virology) "boW" = (/obj/machinery/atmospherics/pipe/simple/hidden/black,/turf/simulated/floor/tiled/white,/area/medical/virology) @@ -4635,7 +4636,6 @@ "bLx" = (/obj/effect/floor_decal/corner/purple{dir = 6},/turf/simulated/floor/tiled/white,/area/rnd/rdoffice) "bLy" = (/obj/structure/table/standard,/obj/item/weapon/cartridge/signal/science,/obj/item/weapon/cartridge/signal/science{pixel_x = -4; pixel_y = 2},/obj/item/weapon/cartridge/signal/science{pixel_x = 4; pixel_y = 6},/obj/item/clothing/glasses/welding/superior,/obj/machinery/requests_console{announcementConsole = 1; department = "Research Director's Desk"; departmentType = 5; name = "Research Director RC"; pixel_x = 30; pixel_y = -2},/turf/simulated/floor/tiled/dark,/area/rnd/rdoffice) "bLz" = (/obj/structure/closet{name = "robotics parts"},/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000; pixel_x = 5; pixel_y = -5},/obj/item/device/assembly/prox_sensor{pixel_x = -8; pixel_y = 4},/obj/item/device/assembly/prox_sensor{pixel_x = -8; pixel_y = 4},/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000; pixel_x = 5; pixel_y = -5},/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000; pixel_x = 5; pixel_y = -5},/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000; pixel_x = 5; pixel_y = -5},/obj/item/weapon/storage/firstaid/regular{empty = 1; name = "First-Aid (empty)"},/obj/item/weapon/storage/firstaid/regular{empty = 1; name = "First-Aid (empty)"},/obj/item/weapon/storage/firstaid/regular{empty = 1; name = "First-Aid (empty)"},/obj/item/device/healthanalyzer,/obj/item/device/healthanalyzer,/obj/item/device/healthanalyzer,/obj/effect/floor_decal/corner/pink{dir = 6},/obj/item/device/flash/synthetic,/obj/item/device/flash/synthetic,/obj/item/device/flash/synthetic,/obj/item/device/flash/synthetic,/obj/item/device/flash/synthetic,/obj/item/device/flash/synthetic,/obj/item/stack/cable_coil,/obj/item/stack/cable_coil,/turf/simulated/floor/tiled/white,/area/assembly/robotics) -"bLA" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/firedoor/border_only,/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/assembly/robotics) "bLB" = (/obj/structure/disposalpipe/segment,/obj/item/weapon/stool/padded,/turf/simulated/floor/tiled/white,/area/assembly/robotics) "bLC" = (/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/table/standard,/obj/item/weapon/paper_bin{pixel_x = -3; pixel_y = 7},/obj/item/weapon/pen,/obj/item/weapon/pen/red,/obj/item/weapon/pen/blue,/turf/simulated/floor/tiled/white,/area/assembly/robotics) "bLD" = (/obj/machinery/door/airlock/medical{autoclose = 0; frequency = 1379; icon_state = "door_locked"; id_tag = "virology_airlock_exterior"; locked = 1; name = "Virology Exterior Airlock"; req_access = list(39)},/obj/machinery/access_button{command = "cycle_exterior"; frequency = 1379; master_tag = "virology_airlock_control"; name = "Virology Access Button"; pixel_x = -24; pixel_y = 0; req_access = list(39)},/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/black,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment,/turf/simulated/floor/tiled,/area/medical/virology) @@ -9820,8 +9820,8 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacAaaaaadaaaaaaaadaivaadaaaaadaivaadaaaaadaivaadaaaaadaivaadaaaaadaaaaaaaaabAZbBabENbEObEPbEQbznbERbESbETbEUbEUbEVbEWbtHbEXbtHaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahbwMbEYbEZbFabFbbFcbFdbFebFfbwMbFgbfubFhbFibFjbFkbFlbFmbFibFnbFobFnbyhbyhbyhbyhbyhbrDbFqbFrbyhbfzbeebFsbecbcnbFtbboaZdbFubFubFubFubFubFubFvbFwaZdbFxbFybFxaZdbFzbFAbFBbFCaZdaahaahaZdaZdaZGaZHaZGbFDbFEbFFbFGbEgbFHaylbFJaLTaLSbFLbFMbFObFNbFPbFNbHvbHubEjbFQbEjaZdaZdaTobFRbgJaUvbFSaTobypbyqbFTbAlbFUbFVbFWbFXbEqbFYbFZbGabGbbGcbGdbGebGfbGgbGhbGibGjbGjbGkbGlbtbbGmbGnbGobGpbySbGqbGrbGsbGtbGubGvbGwbyWbAJbySaZWaZmaZmaahaahaahaahaahaahbgmbxzbGybGzbgmaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaadaaaaaaaaaaahaahaahaahaahaahaahaahbtHbtHbtHbtHbtHbIgbIhbIibtHaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahbwMbIjbGJbGIbGJbGJbGJbGJbIkbwMbIlbfubImbInbIobIpbIqbIrbFibItbIAbIybIubIubIwbIubJXbJWbIzbJYbKcahyahybIBbecbRQbecbICbHcbIDbIEbIFbIFbIGbIHbIIbIJbFuaxjaxibIMbHjbINbIObIPbHjaahaahaahaahaZdaZGaZHbEgbIQbIRbISbITbEgaMWbIVbIWbFJbFJbIXbIYbIZbJabJabJabJabJabJbbJcbJdahyahybJeaYGbRSaUvbpPahyahybuobosbvSbvSbJfbJgbvSbvSbJhbJibJjbJkbxqbJlbJmbJnbthbJobJpbJqbKLbJsbJtbJubJvbJwbJxbJybJzbJAbJBbJCbJDbJEbJFbJGbJHbJIbySbglbfpaZmaahaahaahaahaahaahbgmbgmbLDbJKbgmaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaabtEbGAbtGaaabtEbGAbtGaaabtEbGAbtGaaabtEbGAbtGaaaacAaaaaaaaahaahahyahyahyahyahyahyahyahyaahaahaahbtHbtHbJLbIibtHaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahbwMbJMbGJbJNbJObGJbGJbGJbIkbwMbJPbtUbJQbJRbJSbIdbJUbJVbFibGYbKabJZbIubIubIubIubKbbIubIubLzbLAahyahybKdbecbcnbecbKebHcbKfbKgbKhbKibKjbKhbKhbKkbFubKlbILbKmbHjbKnbKobKpbHjaahaahaahaahaZdbKqaZHbEgbIQbKrbKsbKtbEgbKubKvbKwbFJbKxbKycuybKAbJabJabJabJabJabKBbKCbKDahyahybrGbKEbynbKFbrGahyahybvObsDbKHbKHbKIbKKbMHaGMbKNbKNbKObKPbKQbKRbKNbKSbKTbKUbKVbKSbKWbKWbKWbKWbKWbKXbKYbKZbLabySbySbySbySbySbySbySbySbySbySbLbbLcaZmbLdbLebLebLebLdbLdbLfbLgbLhbLibLfbLdaahaahaahaahaahaahaahaahaahaahaahaahaahaahaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacAaadbtEbGAbtGaadbtEbGAbtGaadbtEbGAbtGaadbtEbGAbtGaadacAaaabLjaahbLkbLkbLlbkQbkQbkQbLmbLkbLkahyaahaahaahbtHbLnbIibtHaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahbwMbLobLpbLqbGJbLrbGJbLsbwMbwMbLtbfubImbFibLubLvbLwbLxbLybGYbLCbLBbIvbIubIubIubKbbIvbIubLEbLAahyahybKdbLGbhqbecbKebHcbLHbLIbKhbLJbLKbLLbLMbLNbLObLPbLQbLRbLSbLTbLUbLVbHjaahaahaahaahaZdaZdaZHbEgbEgbLWbEgbEgbEgbLXbLYcAgbMabKxbMbcuBbMdbMebMfbMgbMhbKBbKBbMibKDahyahybvNbMjbgJaUvbvNahyahybMkbMlbMmbKJbOcbMkbMkbMkbMkaPubMqbMrbMsbMtbMsbKSbMubMvbMwbMxbKWbMybMzbMAbMBbMCbMDbMEbMFbMGbOdbMIbMJbRXbMLbMMdFecbabUSbMQbMRbMSbMTbMUbMVbMWbMXbMYbMZbNabNbbNabNcbLdaahaahaahaahaahaahaahaahaahaahaahaahaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaabtEbGAbtGaaabtEbGAbtGaaabtEbGAbtGaaabtEbGAbtGaaaacAaaaaaaaahaahahyahyahyahyahyahyahyahyaahaahaahbtHbtHbJLbIibtHaahaahaahaahaahaahaahaahaahaahaahaahaahaahaahbwMbJMbGJbJNbJObGJbGJbGJbIkbwMbJPbtUbJQbJRbJSbIdbJUbJVbFibGYbKabJZbIubIubIubIubKbbIubIubLzboTahyahybKdbecbcnbecbKebHcbKfbKgbKhbKibKjbKhbKhbKkbFubKlbILbKmbHjbKnbKobKpbHjaahaahaahaahaZdbKqaZHbEgbIQbKrbKsbKtbEgbKubKvbKwbFJbKxbKycuybKAbJabJabJabJabJabKBbKCbKDahyahybrGbKEbynbKFbrGahyahybvObsDbKHbKHbKIbKKbMHaGMbKNbKNbKObKPbKQbKRbKNbKSbKTbKUbKVbKSbKWbKWbKWbKWbKWbKXbKYbKZbLabySbySbySbySbySbySbySbySbySbySbLbbLcaZmbLdbLebLebLebLdbLdbLfbLgbLhbLibLfbLdaahaahaahaahaahaahaahaahaahaahaahaahaahaahaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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pbSpbSpbSpbSpbSqbSrbSqbSqbSqbSqbSqbSsbStbSubSvbSwbSwbSwbLdbLdbSxbSycNtbSxbLdbLdaahaahaahaahaahaahaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa From 864d23d475f123e10696ad67696b39dcaa74f353 Mon Sep 17 00:00:00 2001 From: Cameron653 Date: Tue, 5 Jul 2016 11:46:42 -0400 Subject: [PATCH 4/5] Gives heavy & thunderdome armor armor values. Gives the thunderdome armor and the heavy armor the same values as the heavy armor vest, as they had no armor at all previously. --- code/modules/clothing/suits/armor.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index b856f8a8bbf..a6ffc5642b5 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -385,6 +385,7 @@ desc = "A heavily armored suit that protects against moderate damage." icon_state = "heavy" item_state = "swat_suit" + armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) w_class = 4//bulky item gas_transfer_coefficient = 0.90 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS @@ -395,6 +396,7 @@ /obj/item/clothing/suit/armor/tdome body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT + armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) /obj/item/clothing/suit/armor/tdome/red name = "Thunderdome suit (red)" From 71d29b0320affb6e4aefc55eeb1a49f012dcb6fb Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Tue, 5 Jul 2016 12:04:38 -0400 Subject: [PATCH 5/5] Added features, cancel buttons. Added job selection, adding to manifest optionally by early-check if they were on it before. --- .travis.yml | 2 +- code/modules/admin/verbs/randomverbs.dm | 115 +++++++++++++++--------- 2 files changed, 73 insertions(+), 44 deletions(-) diff --git a/.travis.yml b/.travis.yml index bfb37118dd2..432d4093149 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ sudo: false env: BYOND_MAJOR="510" BYOND_MINOR="1346" - MACRO_COUNT=987 + MACRO_COUNT=986 cache: directories: diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index f7dcdbce112..d4b05091471 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -356,15 +356,15 @@ Traitors and the like can also be revived with the previous role mostly intact. return //I frontload all the questions so we don't have a half-done process while you're reading. - var/client/picked_client = input(src, "Please specify which client's character to spawn.", "Client", "") in clients + var/client/picked_client = input(src, "Please specify which client's character to spawn.", "Client", "") as null|anything in clients if(!picked_client) return - var/location = input(src,"Please specify where to spawn them.", "Location", "Right Here") in list("Right Here","Arrivals","Cancel") - if(!location || location == "Cancel") + var/location = alert(src,"Please specify where to spawn them.", "Location", "Right Here", "Arrivals", "Cancel") + if(!location) return - var/announce = alert(src,"Do an announcement as if they had just arrived?", "Announce", "Yes", "No", "Cancel") + var/announce = alert(src,"Announce as if they had just arrived?", "Announce", "Yes", "No", "Cancel") if(announce == "Cancel") return else if(announce == "Yes") //Too bad buttons can't just have 1/0 values and different display strings @@ -380,38 +380,78 @@ Traitors and the like can also be revived with the previous role mostly intact. else inhabit = 0 - var/equipment = alert(src,"Give equipment? Last job's equipment, or assistant if none.", "Equipment", "Yes", "No", "Cancel") - if(equipment == "Cancel") - return - else if(equipment == "Yes") - equipment = 1 + //Name matching is ugly but mind doesn't persist to look at. + var/charjob + var/records + var/datum/data/record/record_found + record_found = find_general_record("name",picked_client.prefs.real_name) + + //Found their record, they were spawned previously + if(record_found) + var/samejob = alert(src,"Found [picked_client.prefs.real_name] in data core. They were [record_found.fields["real_rank"]] this round. Assign same job? They will not be re-added to the manifest/records, either way.","Previously spawned","Yes","Assistant","No") + if(samejob == "Yes") + charjob = record_found.fields["real_rank"] + else if(samejob == "Assistant") + charjob = "Assistant" else - equipment = 0 + records = alert(src,"No data core entry detected. Would you like add them to the manifest, and sec/med/HR records?","Records","Yes","No","Cancel") + if(records == "Cancel") + return + if(records == "Yes") + records = 1 + else + records = 0 + + //Well you're not reloading their job or they never had one. + if(!charjob) + var/pickjob = input(src,"Pick a job to assign them (or none).","Job Select","-No Job-") as null|anything in joblist + "-No Job-" + if(!pickjob) + return + if(pickjob != "-No Job-") + charjob = pickjob + + //If you've picked a job by now, you can equip them. + var/equipment + if(charjob) + equipment = alert(src,"Spawn them with equipment?", "Equipment", "Yes", "No", "Cancel") + if(equipment == "Cancel") + return + else if(equipment == "Yes") + equipment = 1 + else + equipment = 0 //For logging later var/admin = key_name_admin(src) var/player_key = picked_client.key var/mob/living/carbon/human/new_character + var/spawnloc - if(location == "Right Here") //Spawn them on your turf - if(!src.mob) - src << "You can't use 'Right Here' when you are not 'Right Anywhere'!" + //Where did you want to spawn them? + switch(location) + if("Right Here") //Spawn them on your turf + if(!src.mob) + src << "You can't use 'Right Here' when you are not 'Right Anywhere'!" + return + + spawnloc = get_turf(src.mob) + + if("Arrivals") //Spawn them at a latejoin spawnpoint + spawnloc = pick(latejoin) + + else //I have no idea how you're here + src << "Invalid spawn location choice." return - var/turf/srcturf = get_turf(src.mob) - if(!srcturf) - src << "Unsure where to spawn the mob. Try using Arrivals?" - return - - new_character = new(srcturf) - - else if(location == "Arrivals") //Spawn them at a latejoin spawnpoint - new_character = new(pick(latejoin)) - - else //I have no idea how you're here + //Did we actually get a loc to spawn them? + if(!spawnloc) + src << "Couldn't get valid spawn location." return + new_character = new(spawnloc) + + //We were able to spawn them, right? if(!new_character) src << "Something went wrong and spawning failed." return @@ -427,20 +467,13 @@ Traitors and the like can also be revived with the previous role mostly intact. antag_data.add_antagonist(new_character.mind) antag_data.place_mob(new_character) - //Referenced to later to apply previous settings (role, antag) if any - var/datum/data/record/record_found - var/formerjob = "Assistant" - if(new_character.mind) - /*Try and locate a record for the person being respawned through data_core. - This isn't an exact science but it does the trick more often than not.*/ - record_found = find_general_record("name",new_character.real_name) - if(record_found) - formerjob = record_found.fields["real_rank"] - new_character.mind.assigned_role = formerjob + //If desired, apply equipment. + if(equipment && charjob) + job_master.EquipRank(new_character, charjob, 1) - //If they had a job before, re-equip them for their job. - if(equipment) - job_master.EquipRank(new_character, formerjob, 1) + //If desired, add records. + if(records) + data_core.manifest_inject(new_character) //A redraw for good measure new_character.update_icons() @@ -449,12 +482,8 @@ Traitors and the like can also be revived with the previous role mostly intact. if(announce) AnnounceArrival(new_character, new_character.mind.assigned_role) - //Announces the character on all the systems, based on the record. - if(!record_found) - if(alert(new_character,"Warning: No data core entry detected. Would you like add them to various databases, such as medical records?","Records","Yes","No")=="Yes") - data_core.manifest_inject(new_character) - - message_admins("\blue [admin] has spawned [player_key]'s character [new_character.real_name].", 1) + log_admin("[admin] has spawned [player_key]'s character [new_character.real_name].") + message_admins("[admin] has spawned [player_key]'s character [new_character.real_name].", 1) new_character << "You have been fully spawned. Enjoy the game."