From 0c991f70920db8ac2bfec4367a12a109f07142ce Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 14 Sep 2015 22:13:18 +0200 Subject: [PATCH 1/3] Nuke code admin check fix --- code/modules/admin/verbs/pray.dm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 2985f05aab8..8d41f49a918 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -16,7 +16,7 @@ msg = "\blue \icon[cross] PRAY: [key_name(src, 1)] (?) (PP) (VV) (SM) ([admin_jump_link(src, "holder")]) (CA) (SC): [msg]" for(var/client/X in admins) - if(R_EVENT & X.holder.rights) + if(check_rights(R_EVENT,0,X.mob)) X << msg usr << "Your prayers have been received by the gods." @@ -37,7 +37,7 @@ msg = "\blue SYNDICATE: [key_name(Sender, 1)] (PP) (VV) (SM) ([admin_jump_link(Sender, "holder")]) (CA) (BSA) (REPLY): [msg]" for(var/client/X in admins) - if(R_EVENT & X.holder.rights) + if(check_rights(R_EVENT,0,X.mob)) X << msg /proc/HONK_announce(var/text , var/mob/Sender) @@ -53,12 +53,16 @@ msg = "\blue ERT REQUEST: [key_name(Sender, 1)] (PP) (VV) (SM) ([admin_jump_link(Sender, "holder")]) (CA) (BSA) (REPLY): [msg]" for(var/client/X in admins) - if(R_EVENT & X.holder.rights) + if(check_rights(R_EVENT,0,X.mob)) X << msg /proc/Nuke_request(text , mob/Sender) var/nuke_code = get_nuke_code() var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN)) msg = "NUKE CODE REQUEST: [key_name(Sender)] (PP) (VV) (SM) ([admin_jump_link(Sender, "holder")]) (CA) (BSA) (RPLY): [msg]" - admins << msg - admins << "The nuke code is [nuke_code]." \ No newline at end of file + + for(var/client/X in admins) + if(check_rights(R_EVENT,0,X.mob)) + X << msg + X << "The nuke code is [nuke_code]." + \ No newline at end of file From 84c60aa5604f7b1f06a38ec82830a130243f3c45 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 14 Sep 2015 22:13:32 +0200 Subject: [PATCH 2/3] Monkey/human transform fixes --- code/__DEFINES/flags.dm | 18 +- code/game/dna/dna.dm | 128 ---- code/game/dna/dna_misc.dm | 575 ------------------ code/game/dna/genes/monkey.dm | 35 +- .../special_shadowling_abilities.dm | 1 + code/modules/admin/admin.dm | 2 +- .../mob/living/carbon/human/species/apollo.dm | 3 +- .../living/carbon/human/species/species.dm | 1 + .../living/carbon/human/species/station.dm | 23 +- .../mob/living/carbon/human/update_icons.dm | 6 +- .../mob/new_player/preferences_setup.dm | 6 +- code/modules/mob/transform_procs.dm | 54 -- 12 files changed, 58 insertions(+), 794 deletions(-) delete mode 100644 code/game/dna/dna.dm delete mode 100644 code/game/dna/dna_misc.dm diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 4ce8554bb4c..b0312b6a475 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -42,13 +42,17 @@ #define NO_PAIN 32 #define REQUIRE_LIGHT 64 #define IS_WHITELISTED 128 -#define HAS_LIPS 512 -#define HAS_UNDERWEAR 1024 -#define IS_PLANT 2048 -#define CAN_BE_FAT 4096 -#define IS_RESTRICTED 8192 -#define NO_INTORGANS 16384 -#define NO_POISON 32768 +#define HAS_LIPS 256 +#define IS_PLANT 512 +#define CAN_BE_FAT 1024 +#define IS_RESTRICTED 2048 +#define NO_INTORGANS 4096 +#define NO_POISON 8192 + +//Species clothing flags +#define HAS_UNDERWEAR 1 +#define HAS_UNDERSHIRT 2 +#define HAS_SOCKS 4 //Species Blood Flags #define BLOOD_SLIME 1 diff --git a/code/game/dna/dna.dm b/code/game/dna/dna.dm deleted file mode 100644 index 716d563a6e7..00000000000 --- a/code/game/dna/dna.dm +++ /dev/null @@ -1,128 +0,0 @@ -/////////////////////////// DNA DATUM -/datum/dna - var/unique_enzymes = null - var/struc_enzymes = null - var/uni_identity = null - var/b_type = "A+" - var/mutantrace = null //The type of mutant race the player is if applicable (i.e. potato-man) - var/real_name //Stores the real name of the person who originally got this dna datum. Used primarely for changelings, - -/datum/dna/proc/check_integrity(var/mob/living/carbon/human/character) - if(character) - if(length(uni_identity) != 39) - //Lazy. - var/temp - - //Hair - var/hair = 0 - if(!character.h_style) - character.h_style = "Skinhead" - - var/hrange = round(4095 / hair_styles_list.len) - var/index = hair_styles_list.Find(character.h_style) - if(index) - hair = index * hrange - rand(1,hrange-1) - - //Facial Hair - var/beard = 0 - if(!character.f_style) - character.f_style = "Shaved" - - var/f_hrange = round(4095 / facial_hair_styles_list.len) - index = facial_hair_styles_list.Find(character.f_style) - if(index) - beard = index * f_hrange - rand(1,f_hrange-1) - - temp = add_zero2(num2hex((character.r_hair),1), 3) - temp += add_zero2(num2hex((character.b_hair),1), 3) - temp += add_zero2(num2hex((character.g_hair),1), 3) - temp += add_zero2(num2hex((character.r_facial),1), 3) - temp += add_zero2(num2hex((character.b_facial),1), 3) - temp += add_zero2(num2hex((character.g_facial),1), 3) - temp += add_zero2(num2hex(((character.s_tone + 220) * 16),1), 3) - temp += add_zero2(num2hex((character.r_eyes),1), 3) - temp += add_zero2(num2hex((character.g_eyes),1), 3) - temp += add_zero2(num2hex((character.b_eyes),1), 3) - - var/gender - - if (character.gender == MALE) - gender = add_zero2(num2hex((rand(1,(2050+BLOCKADD))),1), 3) - else - gender = add_zero2(num2hex((rand((2051+BLOCKADD),4094)),1), 3) - - temp += gender - temp += add_zero2(num2hex((beard),1), 3) - temp += add_zero2(num2hex((hair),1), 3) - - uni_identity = temp - if(length(struc_enzymes)!= 3*STRUCDNASIZE) - var/mutstring = "" - for(var/i = 1, i <= STRUCDNASIZE, i++) - mutstring += add_zero2(num2hex(rand(1,1024)),3) - - struc_enzymes = mutstring - if(length(unique_enzymes) != 32) - unique_enzymes = md5(character.real_name) - else - if(length(uni_identity) != 39) uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4" - if(length(struc_enzymes)!= 3*STRUCDNASIZE) struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6" - -/datum/dna/proc/ready_dna(mob/living/carbon/human/character) - var/temp - - //Hair - var/hair = 0 - if(!character.h_style) - character.h_style = random_hair_style(character.gender) - - var/hrange = round(4095 / hair_styles_list.len) - var/index = hair_styles_list.Find(character.h_style) - if(index) - hair = index * hrange - rand(1,hrange-1) - - //Facial Hair - var/beard = 0 - if(!character.f_style) - character.f_style = random_facial_hair_style(character.gender) - - var/f_hrange = round(4095 / facial_hair_styles_list.len) - index = facial_hair_styles_list.Find(character.f_style) - if(index) - beard = index * f_hrange - rand(1,f_hrange-1) - - temp = add_zero2(num2hex((character.r_hair),1), 3) - temp += add_zero2(num2hex((character.b_hair),1), 3) - temp += add_zero2(num2hex((character.g_hair),1), 3) - temp += add_zero2(num2hex((character.r_facial),1), 3) - temp += add_zero2(num2hex((character.b_facial),1), 3) - temp += add_zero2(num2hex((character.g_facial),1), 3) - temp += add_zero2(num2hex(((character.s_tone + 220) * 16),1), 3) - temp += add_zero2(num2hex((character.r_eyes),1), 3) - temp += add_zero2(num2hex((character.g_eyes),1), 3) - temp += add_zero2(num2hex((character.b_eyes),1), 3) - - var/gender - - if (character.gender == MALE) - gender = add_zero2(num2hex((rand(1,(2050+BLOCKADD))),1), 3) - else - gender = add_zero2(num2hex((rand((2051+BLOCKADD),4094)),1), 3) - - temp += gender - temp += add_zero2(num2hex((beard),1), 3) - temp += add_zero2(num2hex((hair),1), 3) - - uni_identity = temp - - var/mutstring = "" - for(var/i = 1, i <= STRUCDNASIZE, i++) - mutstring += add_zero2(num2hex(rand(1,1024)),3) - - - struc_enzymes = mutstring - - unique_enzymes = md5(character.real_name) - reg_dna[unique_enzymes] = character.real_name - -/////////////////////////// DNA DATUM \ No newline at end of file diff --git a/code/game/dna/dna_misc.dm b/code/game/dna/dna_misc.dm deleted file mode 100644 index b4c8bda8b9f..00000000000 --- a/code/game/dna/dna_misc.dm +++ /dev/null @@ -1,575 +0,0 @@ -/////////////////////////// DNA HELPER-PROCS -/proc/getleftblocks(input,blocknumber,blocksize) - var/string - - if (blocknumber > 1) - string = copytext(input,1,((blocksize*blocknumber)-(blocksize-1))) - return string - else - return null - -/proc/getrightblocks(input,blocknumber,blocksize) - var/string - if (blocknumber < (length(input)/blocksize)) - string = copytext(input,blocksize*blocknumber+1,length(input)+1) - return string - else - return null - -/proc/getblockstring(input,block,subblock,blocksize,src,ui) // src is probably used here just for urls; ui is 1 when requesting for the unique identifier screen, 0 for structural enzymes screen - var/string - var/subpos = 1 // keeps track of the current sub block - var/blockpos = 1 // keeps track of the current block - - - for(var/i = 1, i <= length(input), i++) // loop through each letter - - var/pushstring - - if(subpos == subblock && blockpos == block) // if the current block/subblock is selected, mark it - pushstring = "[copytext(input, i, i+1)]" - else - if(ui) //This is for allowing block clicks to be differentiated - pushstring = "[copytext(input, i, i+1)]" - else - pushstring = "[copytext(input, i, i+1)]" - - string += pushstring // push the string to the return string - - if(subpos >= blocksize) // add a line break for every block - string += " | " - subpos = 0 - blockpos++ - - subpos++ - - return string - - -/proc/getblock(input,blocknumber,blocksize) - var/result - result = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1) - return result - -/proc/getblockbuffer(input,blocknumber,blocksize) - var/result[3] - var/block = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1) - for(var/i = 1, i <= 3, i++) - result[i] = copytext(block, i, i+1) - return result - -/proc/setblock(istring, blocknumber, replacement, blocksize) - if(!blocknumber) - return istring - if(!istring || !replacement || !blocksize) return 0 - var/result = getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize) - return result - -/proc/add_zero2(t, u) - var/temp1 - while (length(t) < u) - t = "0[t]" - temp1 = t - if (length(t) > u) - temp1 = copytext(t,2,u+1) - return temp1 - -/proc/miniscramble(input,rs,rd) - var/output - output = null - if (input == "C" || input == "D" || input == "E" || input == "F") - output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"6",prob((rs*10));"7",prob((rs*5)+(rd));"0",prob((rs*5)+(rd));"1",prob((rs*10)-(rd));"2",prob((rs*10)-(rd));"3") - if (input == "8" || input == "9" || input == "A" || input == "B") - output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"A",prob((rs*10));"B",prob((rs*5)+(rd));"C",prob((rs*5)+(rd));"D",prob((rs*5)+(rd));"2",prob((rs*5)+(rd));"3") - if (input == "4" || input == "5" || input == "6" || input == "7") - output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"A",prob((rs*10));"B",prob((rs*5)+(rd));"C",prob((rs*5)+(rd));"D",prob((rs*5)+(rd));"2",prob((rs*5)+(rd));"3") - if (input == "0" || input == "1" || input == "2" || input == "3") - output = pick(prob((rs*10));"8",prob((rs*10));"9",prob((rs*10));"A",prob((rs*10));"B",prob((rs*10)-(rd));"C",prob((rs*10)-(rd));"D",prob((rs*5)+(rd));"E",prob((rs*5)+(rd));"F") - if (!output) output = "5" - return output - -//Instead of picking a value far from the input, this will pick values closer to it. -//Sorry for the block of code, but it's more efficient then calling text2hex -> loop -> hex2text -/proc/miniscrambletarget(input,rs,rd) - var/output = null - switch(input) - if("0") - output = pick(prob((rs*10)+(rd));"0",prob((rs*10)+(rd));"1",prob((rs*10));"2",prob((rs*10)-(rd));"3") - if("1") - output = pick(prob((rs*10)+(rd));"0",prob((rs*10)+(rd));"1",prob((rs*10)+(rd));"2",prob((rs*10));"3",prob((rs*10)-(rd));"4") - if("2") - output = pick(prob((rs*10));"0",prob((rs*10)+(rd));"1",prob((rs*10)+(rd));"2",prob((rs*10)+(rd));"3",prob((rs*10));"4",prob((rs*10)-(rd));"5") - if("3") - output = pick(prob((rs*10)-(rd));"0",prob((rs*10));"1",prob((rs*10)+(rd));"2",prob((rs*10)+(rd));"3",prob((rs*10)+(rd));"4",prob((rs*10));"5",prob((rs*10)-(rd));"6") - if("4") - output = pick(prob((rs*10)-(rd));"1",prob((rs*10));"2",prob((rs*10)+(rd));"3",prob((rs*10)+(rd));"4",prob((rs*10)+(rd));"5",prob((rs*10));"6",prob((rs*10)-(rd));"7") - if("5") - output = pick(prob((rs*10)-(rd));"2",prob((rs*10));"3",prob((rs*10)+(rd));"4",prob((rs*10)+(rd));"5",prob((rs*10)+(rd));"6",prob((rs*10));"7",prob((rs*10)-(rd));"8") - if("6") - output = pick(prob((rs*10)-(rd));"3",prob((rs*10));"4",prob((rs*10)+(rd));"5",prob((rs*10)+(rd));"6",prob((rs*10)+(rd));"7",prob((rs*10));"8",prob((rs*10)-(rd));"9") - if("7") - output = pick(prob((rs*10)-(rd));"4",prob((rs*10));"5",prob((rs*10)+(rd));"6",prob((rs*10)+(rd));"7",prob((rs*10)+(rd));"8",prob((rs*10));"9",prob((rs*10)-(rd));"A") - if("8") - output = pick(prob((rs*10)-(rd));"5",prob((rs*10));"6",prob((rs*10)+(rd));"7",prob((rs*10)+(rd));"8",prob((rs*10)+(rd));"9",prob((rs*10));"A",prob((rs*10)-(rd));"B") - if("9") - output = pick(prob((rs*10)-(rd));"6",prob((rs*10));"7",prob((rs*10)+(rd));"8",prob((rs*10)+(rd));"9",prob((rs*10)+(rd));"A",prob((rs*10));"B",prob((rs*10)-(rd));"C") - if("10")//A - output = pick(prob((rs*10)-(rd));"7",prob((rs*10));"8",prob((rs*10)+(rd));"9",prob((rs*10)+(rd));"A",prob((rs*10)+(rd));"B",prob((rs*10));"C",prob((rs*10)-(rd));"D") - if("11")//B - output = pick(prob((rs*10)-(rd));"8",prob((rs*10));"9",prob((rs*10)+(rd));"A",prob((rs*10)+(rd));"B",prob((rs*10)+(rd));"C",prob((rs*10));"D",prob((rs*10)-(rd));"E") - if("12")//C - output = pick(prob((rs*10)-(rd));"9",prob((rs*10));"A",prob((rs*10)+(rd));"B",prob((rs*10)+(rd));"C",prob((rs*10)+(rd));"D",prob((rs*10));"E",prob((rs*10)-(rd));"F") - if("13")//D - output = pick(prob((rs*10)-(rd));"A",prob((rs*10));"B",prob((rs*10)+(rd));"C",prob((rs*10)+(rd));"D",prob((rs*10)+(rd));"E",prob((rs*10));"F") - if("14")//E - output = pick(prob((rs*10)-(rd));"B",prob((rs*10));"C",prob((rs*10)+(rd));"D",prob((rs*10)+(rd));"E",prob((rs*10)+(rd));"F") - if("15")//F - output = pick(prob((rs*10)-(rd));"C",prob((rs*10));"D",prob((rs*10)+(rd));"E",prob((rs*10)+(rd));"F") - - if(!input || !output) //How did this happen? - output = "8" - - return output - -/proc/isblockon(hnumber, bnumber , var/UI = 0) - - var/temp2 - temp2 = hex2num(hnumber) - - if(UI) - if(temp2 >= 2050) - return 1 - else - return 0 - - if (bnumber == HULKBLOCK || bnumber == TELEBLOCK || bnumber == NOBREATHBLOCK || bnumber == NOPRINTSBLOCK || bnumber == SMALLSIZEBLOCK || bnumber == SHOCKIMMUNITYBLOCK) - if (temp2 >= 3500 + BLOCKADD) - return 1 - else - return 0 - if (bnumber == XRAYBLOCK || bnumber == FIREBLOCK || bnumber == REMOTEVIEWBLOCK || bnumber == REGENERATEBLOCK || bnumber == INCREASERUNBLOCK || bnumber == REMOTETALKBLOCK || bnumber == MORPHBLOCK) - if (temp2 >= 3050 + BLOCKADD) - return 1 - else - return 0 - - - if (temp2 >= 2050 + BLOCKADD) - return 1 - else - return 0 - -/proc/ismuton(var/block,var/mob/M) - return isblockon(getblock(M.dna.struc_enzymes, block,3),block) - -/proc/randmutb(mob/M as mob) - if(!M) return - var/num - var/newdna - num = pick(GLASSESBLOCK,COUGHBLOCK,FAKEBLOCK,NERVOUSBLOCK,CLUMSYBLOCK,TWITCHBLOCK,HEADACHEBLOCK,BLINDBLOCK,DEAFBLOCK,HALLUCINATIONBLOCK) - M.dna.check_integrity() - newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3) - M.dna.struc_enzymes = newdna - return - -/proc/randmutg(mob/M as mob) - if(!M) return - var/num - var/newdna - num = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,BLENDBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK) - M.dna.check_integrity() - newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3) - M.dna.struc_enzymes = newdna - return - -/proc/scramble(var/type, mob/M as mob, var/p) - if(!M) return - M.dna.check_integrity() - if(type) - for(var/i = 1, i <= STRUCDNASIZE-1, i++) - if(prob(p)) - M.dna.uni_identity = setblock(M.dna.uni_identity, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3) - updateappearance(M, M.dna.uni_identity) - - else - for(var/i = 1, i <= STRUCDNASIZE-1, i++) - if(prob(p)) - M.dna.struc_enzymes = setblock(M.dna.struc_enzymes, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3) - domutcheck(M, null) - return - -/proc/randmuti(mob/M as mob) - if(!M) return - var/num - var/newdna - num = rand(1,UNIDNASIZE) - M.dna.check_integrity() - newdna = setblock(M.dna.uni_identity,num,add_zero2(num2hex(rand(1,4095),1),3),3) - M.dna.uni_identity = newdna - return - -/proc/toggledblock(hnumber) //unused - var/temp3 - var/chtemp - temp3 = hex2num(hnumber) - if (temp3 < 2050) - chtemp = rand(2050,4095) - return add_zero2(num2hex(chtemp,1),3) - else - chtemp = rand(1,2049) - return add_zero2(num2hex(chtemp,1),3) -/////////////////////////// DNA HELPER-PROCS - -/////////////////////////// DNA MISC-PROCS -/proc/updateappearance(mob/M as mob , structure) - if(istype(M, /mob/living/carbon/human)) - M.dna.check_integrity() - var/mob/living/carbon/human/H = M - H.r_hair = hex2num(getblock(structure,1,3)) - H.b_hair = hex2num(getblock(structure,2,3)) - H.g_hair = hex2num(getblock(structure,3,3)) - H.r_facial = hex2num(getblock(structure,4,3)) - H.b_facial = hex2num(getblock(structure,5,3)) - H.g_facial = hex2num(getblock(structure,6,3)) - H.s_tone = round(((hex2num(getblock(structure,7,3)) / 16) - 220)) - H.r_eyes = hex2num(getblock(structure,8,3)) - H.g_eyes = hex2num(getblock(structure,9,3)) - H.b_eyes = hex2num(getblock(structure,10,3)) - if(H.internal_organs_by_name["eyes"]) - H.update_eyes() - - if (isblockon(getblock(structure, 11,3),11 , 1)) - H.gender = FEMALE - else - H.gender = MALE - - //Hair - var/hairnum = hex2num(getblock(structure,13,3)) - var/index = round(1 +(hairnum / 4096)*hair_styles_list.len) - if((0 < index) && (index <= hair_styles_list.len)) - H.h_style = hair_styles_list[index] - - //Facial Hair - var/beardnum = hex2num(getblock(structure,12,3)) - index = round(1 +(beardnum / 4096)*facial_hair_styles_list.len) - if((0 < index) && (index <= facial_hair_styles_list.len)) - H.f_style = facial_hair_styles_list[index] - - H.update_body(0) - H.update_hair() - - return 1 - else - return 0 - -/proc/probinj(var/pr, var/inj) - return prob(pr+inj*pr) - -/proc/domutcheck(mob/living/M as mob, connected, inj) - if (!M) return - - M.dna.check_integrity() - - M.disabilities = 0 - M.sdisabilities = 0 - var/old_mutations = M.mutations - M.mutations = list() - M.pass_flags = 0 -// M.see_in_dark = 2 -// M.see_invisible = 0 - - if(PLANT in old_mutations) - M.mutations.Add(PLANT) - if(SKELETON in old_mutations) - M.mutations.Add(SKELETON) - if(FAT in old_mutations) - M.mutations.Add(FAT) - if(HUSK in old_mutations) - M.mutations.Add(HUSK) - - if(ismuton(NOBREATHBLOCK,M)) - if(probinj(45,inj) || (mNobreath in old_mutations)) - M << "\blue You feel no need to breathe." - M.mutations.Add(mNobreath) - if(ismuton(REMOTEVIEWBLOCK,M)) - if(probinj(45,inj) || (mRemote in old_mutations)) - M << "\blue Your mind expands" - M.mutations.Add(mRemote) - M.verbs += /mob/living/carbon/human/proc/remoteobserve - if(ismuton(REGENERATEBLOCK,M)) - if(probinj(45,inj) || (mRegen in old_mutations)) - M << "\blue Your body pulses with energy" - M.mutations.Add(mRegen) - if(ismuton(INCREASERUNBLOCK,M)) - if(probinj(45,inj) || (mRun in old_mutations)) - M << "\blue You feel quick" - M.mutations.Add(mRun) - if(ismuton(REMOTETALKBLOCK,M)) - if(probinj(45,inj) || (mRemotetalk in old_mutations)) - M << "\blue You expand your mind outwards" - M.mutations.Add(mRemotetalk) - M.verbs += /mob/living/carbon/human/proc/remotesay - if(ismuton(MORPHBLOCK,M)) - if(probinj(45,inj) || (mMorph in old_mutations)) - M.mutations.Add(mMorph) - M << "\blue Your skin feels strange" - M.verbs += /mob/living/carbon/human/proc/morph - if(ismuton(BLENDBLOCK,M)) - if(probinj(45,inj) || (mBlend in old_mutations)) - M.mutations.Add(mBlend) - M << "\blue You feel alone" - if(ismuton(HALLUCINATIONBLOCK,M)) - if(probinj(45,inj) || (mHallucination in old_mutations)) - M.mutations.Add(mHallucination) - M << "\red Your mind says 'Hello'" - if(ismuton(NOPRINTSBLOCK,M)) - if(probinj(45,inj) || (mFingerprints in old_mutations)) - M.mutations.Add(mFingerprints) - M << "\blue Your fingers feel numb" - if(ismuton(SHOCKIMMUNITYBLOCK,M)) - if(probinj(45,inj) || (mShock in old_mutations)) - M.mutations.Add(mShock) - M << "\blue Your skin feels dry" - if(ismuton(SMALLSIZEBLOCK,M)) - if(probinj(45,inj) || (mSmallsize in old_mutations)) - M << "\blue Your skin feels rubbery" - M.mutations.Add(mSmallsize) - M.pass_flags |= 1 - - - - if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),HULKBLOCK)) - if(probinj(5,inj) || (HULK in old_mutations)) - M << "\blue Your muscles hurt." - M.mutations.Add(HULK) - if (isblockon(getblock(M.dna.struc_enzymes, HEADACHEBLOCK,3),HEADACHEBLOCK)) - M.disabilities |= EPILEPSY - M << "\red You get a headache." - if (isblockon(getblock(M.dna.struc_enzymes, FAKEBLOCK,3),FAKEBLOCK)) - M << "\red You feel strange." - if (prob(95)) - if(prob(50)) - randmutb(M) - else - randmuti(M) - else - randmutg(M) - if (isblockon(getblock(M.dna.struc_enzymes, COUGHBLOCK,3),COUGHBLOCK)) - M.disabilities |= COUGHING - M << "\red You start coughing." - if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),CLUMSYBLOCK)) - M << "\red You feel lightheaded." - M.mutations.Add(CLUMSY) - if (isblockon(getblock(M.dna.struc_enzymes, TWITCHBLOCK,3),TWITCHBLOCK)) - M.disabilities |= TOURETTES - M << "\red You twitch." - if (isblockon(getblock(M.dna.struc_enzymes, XRAYBLOCK,3),XRAYBLOCK)) - if(probinj(30,inj) || (XRAY in old_mutations)) - M << "\blue The walls suddenly disappear." -// M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) -// M.see_in_dark = 8 -// M.see_invisible = 2 - M.mutations.Add(XRAY) - if (isblockon(getblock(M.dna.struc_enzymes, NERVOUSBLOCK,3),NERVOUSBLOCK)) - M.disabilities |= NERVOUS - M << "\red You feel nervous." - if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),FIREBLOCK)) - if(probinj(30,inj) || (COLD_RESISTANCE in old_mutations)) - M << "\blue Your body feels warm." - M.mutations.Add(COLD_RESISTANCE) - if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),BLINDBLOCK)) - M.sdisabilities |= BLIND - M << "\red You can't seem to see anything." - if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),TELEBLOCK)) - if(probinj(15,inj) || (TK in old_mutations)) - M << "\blue You feel smarter." - M.mutations.Add(TK) - if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),DEAFBLOCK)) - M.sdisabilities |= DEAF - M.ear_deaf = 1 - M << "\red Its kinda quiet.." - if (isblockon(getblock(M.dna.struc_enzymes, GLASSESBLOCK,3),GLASSESBLOCK)) - M.disabilities |= NEARSIGHTED - M << "Your eyes feel weird..." - - /* If you want the new mutations to work, UNCOMMENT THIS. - if(istype(M, /mob/living/carbon)) - for (var/datum/mutations/mut in global_mutations) - mut.check_mutation(M) - */ - -//////////////////////////////////////////////////////////// Monkey Block - if (isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && istype(M, /mob/living/carbon/human)) - // human > monkey - var/mob/living/carbon/human/H = M - H.notransform = 1 - var/list/implants = list() //Try to preserve implants. - for(var/obj/item/weapon/implant/W in H) - implants += W - W.loc = null - - if(!connected) - for(var/obj/item/W in (H.contents-implants)) - if (W==H.w_uniform) // will be teared - continue - H.unEquip(W) - M.notransform = 1 - M.canmove = 0 - M.icon = null - M.invisibility = 101 - var/atom/movable/overlay/animation = new( M.loc ) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - flick("h2monkey", animation) - sleep(48) - del(animation) - - - var/mob/living/carbon/monkey/O = null - if(H.species.primitive) - O = new H.species.primitive(src) - else - H.gib() //Trying to change the species of a creature with no primitive var set is messy. - return - - if(M) - if (M.dna) - O.dna = M.dna - M.dna = null - - if (M.suiciding) - O.suiciding = M.suiciding - M.suiciding = null - - - for(var/datum/disease/D in M.viruses) - O.viruses += D - D.affected_mob = O - M.viruses -= D - - - for(var/obj/T in (M.contents-implants)) - del(T) - - O.loc = M.loc - - if(M.mind) - M.mind.transfer_to(O) //transfer our mind to the cute little monkey - - if (connected) //inside dna thing - var/obj/machinery/dna_scannernew/C = connected - O.loc = C - C.occupant = O - connected = null - O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6)) - O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss()) - O.adjustToxLoss(M.getToxLoss() + 20) - O.adjustOxyLoss(M.getOxyLoss()) - O.stat = M.stat - O.a_intent = I_HARM - for (var/obj/item/weapon/implant/I in implants) - I.loc = O - I.implanted = O -// O.update_icon = 1 //queue a full icon update at next life() call - del(M) - return - - if (!isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && !istype(M, /mob/living/carbon/human)) - // monkey > human, - var/mob/living/carbon/monkey/Mo = M - Mo.notransform = 1 - var/list/implants = list() //Still preserving implants - for(var/obj/item/weapon/implant/W in Mo) - implants += W - W.loc = null - if(!connected) - for(var/obj/item/W in (Mo.contents-implants)) - Mo.unEquip(W) - M.notransform = 1 - M.canmove = 0 - M.icon = null - M.invisibility = 101 - var/atom/movable/overlay/animation = new( M.loc ) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - flick("monkey2h", animation) - sleep(48) - del(animation) - - var/mob/living/carbon/human/human/O = new( src ) - if(Mo.greaterform) - O.set_species(Mo.greaterform) - - if (isblockon(getblock(M.dna.uni_identity, 11,3),11)) - O.gender = FEMALE - else - O.gender = MALE - - if (M) - if (M.dna) - O.dna = M.dna - M.dna = null - - if (M.suiciding) - O.suiciding = M.suiciding - M.suiciding = null - - for(var/datum/disease/D in M.viruses) - O.viruses += D - D.affected_mob = O - M.viruses -= D - - //for(var/obj/T in M) - // del(T) - - O.loc = M.loc - - if(M.mind) - M.mind.transfer_to(O) //transfer our mind to the human - - if (connected) //inside dna thing - var/obj/machinery/dna_scannernew/C = connected - O.loc = C - C.occupant = O - connected = null - - var/i - while (!i) - var/randomname - if (O.gender == MALE) - randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names))) - else - randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names))) - if (findname(randomname)) - continue - else - O.real_name = randomname - i++ - updateappearance(O,O.dna.uni_identity) - O.take_overall_damage(M.getBruteLoss(), M.getFireLoss()) - O.adjustToxLoss(M.getToxLoss()) - O.adjustOxyLoss(M.getOxyLoss()) - O.stat = M.stat - for (var/obj/item/weapon/implant/I in implants) - I.loc = O - I.implanted = O -// O.update_icon = 1 //queue a full icon update at next life() call - del(M) - return -//////////////////////////////////////////////////////////// Monkey Block - if(M) - M.update_icon = 1 //queue a full icon update at next life() call - return null - - -/proc/togglemut(mob/M as mob, var/block) - if(!M) return - var/newdna - M.dna.check_integrity() - newdna = setblock(M.dna.struc_enzymes,block,toggledblock(getblock(M.dna.struc_enzymes,block,3)),3) - M.dna.struc_enzymes = newdna - return - -/////////////////////////// DNA MISC-PROCS \ No newline at end of file diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index d260575a89b..474c034f21c 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -5,31 +5,34 @@ block=MONKEYBLOCK /datum/dna/gene/monkey/can_activate(var/mob/M,var/flags) - return istype(M, /mob/living/carbon/human) + return ishuman(M) /datum/dna/gene/monkey/activate(var/mob/living/carbon/human/H, var/connected, var/flags) if(!istype(H,/mob/living/carbon/human)) -// testing("Cannot monkey-ify [M], type is [M.type].") return - if(issmall(H)) // Already a monkey + if(issmall(H)) return for(var/obj/item/W in H) if(istype(W,/obj/item/organ)) continue + if(istype(W,/obj/item/weapon/implant)) + continue H.unEquip(W) + H.regenerate_icons() H.canmove = 0 H.stunned = 1 H.icon = null H.invisibility = 101 - var/atom/movable/overlay/animation = new /atom/movable/overlay( H.loc ) + + var/atom/movable/overlay/animation = new /atom/movable/overlay(H.loc) animation.icon_state = "blank" animation.icon = 'icons/mob/mob.dmi' animation.master = H flick("h2monkey", animation) - sleep(48) - //animation = null - + sleep(22) + qdel(animation) + H.stunned = 0 H.update_canmove() H.invisibility = initial(H.invisibility) @@ -43,33 +46,34 @@ if(H.hud_used) H.hud_used.instantiate() - H << "You are now a [H.species.name]. " - qdel(animation) + H << "You are now a [H.species.name]." return H /datum/dna/gene/monkey/deactivate(var/mob/living/carbon/human/H, var/connected, var/flags) if(!istype(H,/mob/living/carbon/human)) -// testing("Cannot monkey-ify [M], type is [M.type].") return for(var/obj/item/W in H) - if (W==H.w_uniform) // will be torn + if (W == H.w_uniform) // will be torn continue if(istype(W,/obj/item/organ)) continue + if(istype(W,/obj/item/weapon/implant)) + continue H.unEquip(W) H.regenerate_icons() H.canmove = 0 H.stunned = 1 H.icon = null H.invisibility = 101 - var/atom/movable/overlay/animation = new /atom/movable/overlay( H.loc ) + + var/atom/movable/overlay/animation = new /atom/movable/overlay(H.loc) animation.icon_state = "blank" animation.icon = 'icons/mob/mob.dmi' animation.master = H flick("monkey2h", animation) - sleep(48) - //animation = null + sleep(22) + qdel(animation) H.stunned = 0 H.update_canmove() @@ -84,7 +88,6 @@ if(H.hud_used) H.hud_used.instantiate() - H << "You are now a [H.species.name]. " - qdel(animation) + H << "You are now a [H.species.name]." return H \ No newline at end of file diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 1566e3b254b..bb4fc80c7d6 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -77,6 +77,7 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N H.underwear = "None" H.undershirt = "None" + H.socks = "None" H.faction |= "faithless" H.equip_to_slot_or_del(new /obj/item/clothing/under/shadowling(usr), slot_w_uniform) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index a4a836db6a6..ca079ba8139 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -606,7 +606,7 @@ var/global/nologevent = 0 return if(confirm == "Yes") var/delay = input("What delay should the restart have (in seconds)?", "Restart Delay", 5) as num - if(!delay) + if(isnull(delay)) delay = 50 else delay = delay * 10 diff --git a/code/modules/mob/living/carbon/human/species/apollo.dm b/code/modules/mob/living/carbon/human/species/apollo.dm index f5445b80543..8d0e64d44af 100644 --- a/code/modules/mob/living/carbon/human/species/apollo.dm +++ b/code/modules/mob/living/carbon/human/species/apollo.dm @@ -35,7 +35,8 @@ "antennae" = /obj/item/organ/wryn/hivenode ) - flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | NO_BREATHE | HAS_SKIN_COLOR | NO_SCAN | NO_SCAN | HIVEMIND + flags = IS_WHITELISTED | HAS_LIPS | NO_BREATHE | HAS_SKIN_COLOR | NO_SCAN | NO_SCAN | HIVEMIND + clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS dietflags = DIET_HERB //bees feed off nectar, so bee people feed off plants too reagent_tag = PROCESS_ORG diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 58b5968ebf8..09bd76f00eb 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -61,6 +61,7 @@ var/has_fine_manipulation = 1 // Can use small items. var/flags = 0 // Various specific features. + var/clothing_flags = 0 // Underwear and socks. var/bloodflags = 0 var/bodyflags = 0 var/dietflags = 0 // Make sure you set this, otherwise it won't be able to digest a lot of foods diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index b59efdda468..1604c5baea4 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -6,7 +6,8 @@ primitive_form = "Monkey" path = /mob/living/carbon/human/human language = "Sol Common" - flags = HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT + flags = HAS_LIPS | CAN_BE_FAT + clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = HAS_SKIN_TONE dietflags = DIET_OMNI unarmed_type = /datum/unarmed_attack/punch @@ -37,7 +38,8 @@ else, frequently even their own lives. They prefer warmer temperatures than most species and \ their native tongue is a heavy hissing laungage called Sinta'Unathi." - flags = HAS_LIPS | HAS_UNDERWEAR + flags = HAS_LIPS + clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = FEET_CLAWS | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING dietflags = DIET_CARN @@ -88,7 +90,8 @@ primitive_form = "Farwa" - flags = HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT + flags = HAS_LIPS | CAN_BE_FAT + clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING dietflags = DIET_OMNI @@ -119,7 +122,8 @@ to the degree it can cause conflict with more rigorous and strict authorities. They speak a guttural language known as 'Canilunzt' \ which has a heavy emphasis on utilizing tail positioning and ear twitches to communicate intent." - flags = HAS_LIPS | HAS_UNDERWEAR + flags = HAS_LIPS + clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING dietflags = DIET_OMNI @@ -148,7 +152,8 @@ herbivores on the whole and tend to be co-operative with the other species of the galaxy, although they rarely reveal \ the secrets of their empire to their allies." - flags = HAS_LIPS | HAS_UNDERWEAR + flags = HAS_LIPS + clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = HAS_SKIN_COLOR dietflags = DIET_HERB @@ -190,6 +195,7 @@ poison_type = "oxygen" flags = NO_SCAN | IS_WHITELISTED + clothing_flags = HAS_SOCKS dietflags = DIET_OMNI blood_color = "#2299FC" @@ -278,6 +284,7 @@ brute_mod = 0.8 flags = IS_WHITELISTED + clothing_flags = HAS_SOCKS bodyflags = FEET_CLAWS dietflags = DIET_HERB @@ -295,6 +302,7 @@ unarmed_type = /datum/unarmed_attack/punch flags = IS_WHITELISTED | NO_BREATHE | HAS_LIPS | NO_INTORGANS | NO_SCAN + clothing_flags = HAS_SOCKS bodyflags = HAS_SKIN_COLOR bloodflags = BLOOD_SLIME dietflags = DIET_CARN @@ -322,7 +330,8 @@ default_genes = list(REMOTE_TALK) - flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT + flags = IS_WHITELISTED | HAS_LIPS | CAN_BE_FAT + clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS dietflags = DIET_HERB reagent_tag = PROCESS_ORG @@ -373,6 +382,7 @@ water and other radiation." flags = NO_BREATHE | REQUIRE_LIGHT | IS_PLANT | RAD_ABSORB | NO_BLOOD | NO_PAIN + clothing_flags = HAS_SOCKS dietflags = 0 //Diona regenerate nutrition in light, no diet necessary body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not @@ -467,6 +477,7 @@ passive_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment. flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_DNA_RAD + clothing_flags = HAS_SOCKS dietflags = 0 //IPCs can't eat, so no diet blood_color = "#1F181F" flesh_color = "#AAAAAA" diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index f7493c272d8..9eee8087697 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -317,18 +317,18 @@ var/global/list/damage_icon_parts = list() stand_icon.Blend(base_icon,ICON_OVERLAY) //Underwear - if(underwear && species.flags & HAS_UNDERWEAR) + if(underwear && species.clothing_flags & HAS_UNDERWEAR) var/datum/sprite_accessory/underwear/U = underwear_list[underwear] if(U) stand_icon.Blend(new /icon(U.icon, "uw_[U.icon_state]_s"), ICON_OVERLAY) - if(undershirt && species.flags & HAS_UNDERWEAR) + if(undershirt && species.clothing_flags & HAS_UNDERSHIRT) var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt] if(U2) stand_icon.Blend(new /icon(U2.icon, "us_[U2.icon_state]_s"), ICON_OVERLAY) - if(socks) + if(socks && species.clothing_flags & HAS_SOCKS) var/datum/sprite_accessory/socks/U3 = socks_list[socks] if(U3) stand_icon.Blend(new /icon(U3.icon, "sk_[U3.icon_state]_s"), ICON_OVERLAY) diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 77f48b976d5..829679ca93e 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -254,19 +254,19 @@ datum/preferences var/icon/underwear_s = null - if(underwear && current_species.flags & HAS_UNDERWEAR) + if(underwear && current_species.clothing_flags & HAS_UNDERWEAR) var/datum/sprite_accessory/underwear/U = underwear_list[underwear] if(U) underwear_s = new/icon(U.icon, "[U.icon_state]_s", ICON_OVERLAY) var/icon/undershirt_s = null - if(undershirt && current_species.flags & HAS_UNDERWEAR) + if(undershirt && current_species.clothing_flags & HAS_UNDERSHIRT) var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt] if(U2) undershirt_s = new/icon(U2.icon, "[U2.icon_state]_s", ICON_OVERLAY) var/icon/socks_s = null - if(socks) + if(socks && current_species.clothing_flags & HAS_SOCKS) var/datum/sprite_accessory/socks/U3 = socks_list[socks] if(U3) socks_s = new/icon(U3.icon, "[U3.icon_state]_s", ICON_OVERLAY) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 73870334d37..4fabdc6510e 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -3,60 +3,6 @@ H.dna.SetSEState(MONKEYBLOCK,1) domutcheck(H, null) -/* -/mob/living/carbon/human/proc/monkeyize() - if (notransform) - return - for(var/obj/item/W in src) - if (W==w_uniform) // will be torn - continue - unEquip(W) - regenerate_icons() - notransform = 1 - canmove = 0 - stunned = 1 - icon = null - invisibility = 101 - for(var/t in organs) - del(t) - var/atom/movable/overlay/animation = new /atom/movable/overlay( loc ) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - flick("h2monkey", animation) - sleep(48) - //animation = null - - if(!species.primitive) //If the creature in question has no primitive set, this is going to be messy. - gib() - return - - var/mob/living/carbon/monkey/O = null - - O = new species.primitive(loc) - - O.dna = dna.Clone() - O.dna.SetSEState(MONKEYBLOCK,1) - O.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF) - O.loc = loc - O.viruses = viruses - O.a_intent = I_HARM - - - if (client) - client.mob = O - if(mind) - mind.transfer_to(O) - - O << "You are now [O]. " - - spawn(0)//To prevent the proc from returning null. - del(src) - del(animation) - - return O -*/ - /mob/new_player/AIize() spawning = 1 return ..() From 7a0c1bae77e75f8b8637af243369bb7446d3f8e6 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 14 Sep 2015 22:26:09 +0200 Subject: [PATCH 3/3] Fix ore redemption deconstruction --- code/game/machinery/machinery.dm | 2 +- code/modules/mining/equipment_locker.dm | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index ca86c4ba839..bca87a8bad8 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -381,7 +381,7 @@ Class Procs: for(var/obj/item/I in component_parts) if(I.reliability != 100 && crit_fail) I.crit_fail = 1 - I.loc = src.loc + I.forceMove(loc) qdel(src) /obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/icon_state_open, var/icon_state_closed, var/obj/item/weapon/screwdriver/S) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 67eb53c2e0d..daf02b7e2a2 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -101,22 +101,23 @@ inserted_id = I interact(user) return + if(exchange_parts(user, W)) return - if(default_deconstruction_crowbar(W)) - return - - if(default_unfasten_wrench(user, W)) - return - if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W)) - updateUsrDialog() - return if(panel_open) if(istype(W, /obj/item/weapon/crowbar)) empty_content() default_deconstruction_crowbar(W) - return 1 + return + + if(default_unfasten_wrench(user, W)) + return + + if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W)) + updateUsrDialog() + return + ..() /obj/machinery/mineral/ore_redemption/proc/SmeltMineral(var/obj/item/weapon/ore/O) @@ -253,7 +254,7 @@ while(s.amount > s.max_amount) new s.type(loc,s.max_amount) s.use(s.max_amount) - s.loc = loc + s.forceMove(loc) s.layer = initial(s.layer) /**********************Mining Equipment Locker**************************/