diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/examine.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/examine.dm index af80f42cef..2334d6d0f8 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/examine.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/examine.dm @@ -241,7 +241,7 @@ var/datum/organ/external/temp = organs[named] if(temp) if(temp.destroyed) - wound_flavor_text["[temp.display_name]"] = "[src.name] is missing [t_his] [temp.display_name].\n" + wound_flavor_text["[temp.display_name]"] = "[t_He] is missing [t_his] [temp.display_name].\n" continue if(temp.wounds) var/list/wounds = list(list(),list(),list(),list(),list(),list()) @@ -401,22 +401,22 @@ switch(tally[tallied]) if(1) if(!flavor_text.len) - flavor_text += "[src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" + flavor_text += "\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" else flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" if(2) if(!flavor_text.len) - flavor_text += "[src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" + flavor_text += "\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" else flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" if(3 to 5) if(!flavor_text.len) - flavor_text += "[src] has several [tallied_rename[tallied]]s" + flavor_text += "\The [src] has several [tallied_rename[tallied]]s" else flavor_text += " several [tallied_rename[tallied]]s" if(6 to INFINITY) if(!flavor_text.len) - flavor_text += "[src] has a bunch of [tallied_rename[tallied]]s" + flavor_text += "\The [src] has a bunch of [tallied_rename[tallied]]s" else flavor_text += " a ton of [tallied_rename[tallied]]s" if(flavor_text.len) diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm index 15426fda49..2f6f5696cf 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm @@ -2,12 +2,14 @@ name = "tajaran" real_name = "tajaran" voice_name = "tajaran" - icon = 'tajaran.dmi' + icon = 'mob.dmi' + icon_state = "m-none" var/list/tajspeak_letters // universal_speak = 1 //hacky fix until someone can figure out how to make them only understand humans taj_talk_understand = 1 voice_message = "mrowls" + examine_text = "one of the cat-like Tajarans." /mob/living/carbon/human/tajaran/New() tajspeak_letters = new/list("~","*","-") @@ -460,8 +462,6 @@ last_b_state = stat /mob/living/carbon/human/tajaran/update_body() - return - if(stand_icon) del(stand_icon) if(lying_icon) @@ -606,4 +606,4 @@ del(eyes_s) /mob/living/carbon/human/tajaran/co2overloadtime = null -/mob/living/carbon/human/tajaran/temperature_resistance = T0C+70 +/mob/living/carbon/human/tajaran/temperature_resistance = T0C+70 \ No newline at end of file diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi index 05b198970d..e818779c20 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/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index a429fd6082..6a2c39a59c 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -108,8 +108,8 @@ var/list/old_list = shufflelist.Copy() while(old_list.len) var/item = pick(old_list) - new_list += item - old_list -= item + new_list.Add(item) + old_list.Remove(item) return new_list /proc/uniquelist(var/list/L) @@ -198,9 +198,18 @@ var/list/result = new() while(Li <= L.len && Ri <= R.len) if(sorttext(L[Li], R[Ri]) < 1) - result += R[Ri++] + var/item = R[Ri++] + if(R[item]) + result[item] = R[item] + else + result += item + else - result += L[Li++] + var/item = L[Li++] + if(L[item]) + result[item] = L[item] + else + result += item if(Li <= L.len) return (result + L.Copy(Li, 0)) @@ -772,6 +781,14 @@ Turf and target are seperate in case you want to teleport some distance from a t select = input("AI signals detected:", "AI selection") in ais return ais[select] +/proc/get_sorted_mobs() + var/new_list = list() + var/old_list = getmobs() + for(var/named in old_list) + new_list += old_list[named] + return new_list + + /proc/getmobs() var/list/mobs = sortmobs() @@ -795,38 +812,38 @@ Turf and target are seperate in case you want to teleport some distance from a t name += " \[dead\]" creatures[name] = M - return creatures + return sortList(creatures) /proc/sortmobs() - var/list/mob_list = list() + var/list/temp_list = list() for(var/mob/living/silicon/ai/M in world) - mob_list.Add(M) + temp_list.Add(M) for(var/mob/living/silicon/pai/M in world) - mob_list.Add(M) + temp_list.Add(M) for(var/mob/living/silicon/robot/M in world) - mob_list.Add(M) + temp_list.Add(M) for(var/mob/living/carbon/human/M in world) - mob_list.Add(M) + temp_list.Add(M) for(var/mob/living/carbon/brain/M in world) - mob_list.Add(M) + temp_list.Add(M) for(var/mob/living/carbon/alien/M in world) - mob_list.Add(M) + temp_list.Add(M) for(var/mob/dead/observer/M in world) - mob_list.Add(M) + temp_list.Add(M) for(var/mob/new_player/M in world) - mob_list.Add(M) + temp_list.Add(M) for(var/mob/living/carbon/monkey/M in world) - mob_list.Add(M) + temp_list.Add(M) for(var/mob/living/carbon/metroid/M in world) - mob_list.Add(M) + temp_list.Add(M) for(var/mob/living/simple_animal/M in world) - mob_list.Add(M) + temp_list.Add(M) // for(var/mob/living/silicon/hivebot/M in world) // mob_list.Add(M) // for(var/mob/living/silicon/hive_mainframe/M in world) // mob_list.Add(M) - return mob_list + return temp_list /proc/convert2energy(var/M) var/E = M*(SPEED_OF_LIGHT_SQ) diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index d8ee6b9264..e6d05dceec 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -4,6 +4,17 @@ return /atom/proc/attack_hand(mob/user as mob) + if(ishuman(user) || ismonkey(user)) + if (user.hand) + var/datum/organ/external/temp = user:organs["l_hand"] + if(temp.destroyed) + user << "\red Yo- wait a minute." + return + else + var/datum/organ/external/temp = user:organs["r_hand"] + if(temp.destroyed) + user << "\red Yo- wait a minute." + return return /atom/proc/attack_paw(mob/user as mob) diff --git a/code/game/dna.dm b/code/game/dna.dm index ff75b54a26..e0e2eb4838 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -9,28 +9,29 @@ var/original_name = "Unknown" var/b_type = "A+" -/datum/dna/proc/check_integrity(var/mob/living/carbon/human/character) - if(character) +/datum/dna/proc/check_integrity(var/mob/living/carbon/character) + if(character && ishuman(character)) if(length(uni_identity) != 39) //Lazy. + var/mob/living/carbon/human/character2 = character var/temp var/hair = 0 var/beard // determine DNA fragment from hairstyle // :wtc: - // If the character doesn't have initialized hairstyles / beardstyles, initialize it for them! - if(!character.hair_style) - character.hair_style = new/datum/sprite_accessory/hair/short + // If the character2 doesn't have initialized hairstyles / beardstyles, initialize it for them! + if(!character2.hair_style) + character2.hair_style = new/datum/sprite_accessory/hair/short - if(!character.facial_hair_style) - character.facial_hair_style = new/datum/sprite_accessory/facial_hair/shaved + if(!character2.facial_hair_style) + character2.facial_hair_style = new/datum/sprite_accessory/facial_hair/shaved var/list/styles = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair var/hrange = round(4095 / styles.len) - if(character.hair_style) - var/style = styles.Find(character.hair_style.type) + if(character2.hair_style) + var/style = styles.Find(character2.hair_style.type) if(style) hair = style * hrange - rand(1,hrange-1) @@ -38,26 +39,26 @@ var/list/face_styles = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair var/f_hrange = round(4095 / face_styles.len) - var/f_style = face_styles.Find(character.facial_hair_style.type) + var/f_style = face_styles.Find(character2.facial_hair_style.type) if(f_style) beard = f_style * f_hrange - rand(1,f_hrange-1) else beard = 0 - 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) + temp = add_zero2(num2hex((character2.r_hair),1), 3) + temp += add_zero2(num2hex((character2.b_hair),1), 3) + temp += add_zero2(num2hex((character2.g_hair),1), 3) + temp += add_zero2(num2hex((character2.r_facial),1), 3) + temp += add_zero2(num2hex((character2.b_facial),1), 3) + temp += add_zero2(num2hex((character2.g_facial),1), 3) + temp += add_zero2(num2hex(((character2.s_tone + 220) * 16),1), 3) + temp += add_zero2(num2hex((character2.r_eyes),1), 3) + temp += add_zero2(num2hex((character2.g_eyes),1), 3) + temp += add_zero2(num2hex((character2.b_eyes),1), 3) var/gender - if (character.gender == MALE) + if (character2.gender == MALE) gender = add_zero2(num2hex((rand(1,(2050+BLOCKADD))),1), 3) else gender = add_zero2(num2hex((rand((2051+BLOCKADD),4094)),1), 3) @@ -77,6 +78,21 @@ unique_enzymes = md5(character.real_name) if(original_name == "Unknown") original_name = character.real_name + else if(character && ismonkey(character)) + uni_identity = "00600200A00E0110148FC01300B009" + struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6" + unique_enzymes = md5(character.name) + //////////blah + var/gendervar + if (character.gender == "male") + gendervar = add_zero2(num2hex((rand(1,2049)),1), 3) + else + gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3) + uni_identity += gendervar + uni_identity += "12C" + uni_identity += "4E2" + b_type = "A+" + original_name = character.real_name else if(length(uni_identity) != 39) uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4" if(length(struc_enzymes)!= 81) struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B02D6" diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index d9fa91617b..253d725409 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -247,7 +247,7 @@ var/infected = "" var/imp = "" var/bled = "" - if(e.wounds.len >= 1) + if(e.bleeding) bled = "Bleeding:" if(e.broken) AN = "[e.wound]:" @@ -264,7 +264,7 @@ dat += "" dat += "" else - dat += "The sleeper is empty." + dat += "\The [src] is empty." else dat = " Error: No Body Scanner connected." dat += text("

Close", user) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 22bac2a593..dbd6c61745 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -83,7 +83,7 @@ areaindex[tmpname] = 1 L[tmpname] = I - var/desc = input("Please select a location to lock in.", "Locking Computer") in L|null + var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in L if(desc) src.locked = L[desc] for(var/mob/O in hearers(src, null)) diff --git a/code/game/magic/library.dm b/code/game/magic/library.dm index 7b5e7adefd..b99bf92575 100644 --- a/code/game/magic/library.dm +++ b/code/game/magic/library.dm @@ -140,7 +140,7 @@ for(var/obj/item/weapon/book/b in src.contents) books.Add(b) if(books.len) - var/obj/item/weapon/book/choice = input("Which book would you like to remove from the shelf?") in books|null as obj|null + var/obj/item/weapon/book/choice = input("Which book would you like to remove from the shelf?") as null|anything in books if(choice) choice.loc = src.loc else diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index 9cb9f2b2d4..70d1782ddd 100755 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -108,6 +108,17 @@ /obj/item/attack_hand(mob/user as mob) if (!user) return + if (user.hand) + if(ishuman(user)) + var/datum/organ/external/temp = user:organs["l_hand"] + if(temp.destroyed) + user << "\blue Yo- wait a minute." + return + else + if(ishuman(user)) + var/datum/organ/external/temp = user:organs["r_hand"] + if(temp.destroyed) + user << "\blue Yo- wait a minute." if (istype(src.loc, /obj/item/weapon/storage)) for(var/mob/M in range(1, src.loc)) if (M.s_active == src.loc) @@ -175,6 +186,18 @@ user << "Your claws aren't capable of such fine manipulation." return + if (user.hand) + if(ismonkey(user)) + var/datum/organ/external/temp = user:organs["l_hand"] + if(temp.destroyed) + user << "\blue Yo- wait a minute." + return + else + if(ismonkey(user)) + var/datum/organ/external/temp = user:organs["r_hand"] + if(temp.destroyed) + user << "\blue Yo- wait a minute." + if (istype(src.loc, /obj/item/weapon/storage)) for(var/mob/M in range(1, src.loc)) if (M.s_active == src.loc) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index e2dd58be85..f859590eae 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -51,13 +51,24 @@ FINGERPRINT CARD usr << text("\icon[] []: The current assignment on the card is [].", src, src.name, src.assignment) return - +/obj/item/weapon/card/id/syndicate/var/mob/registered_user = null /obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob) - if(!src.registered_name) - src.registered_name = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name) - src.assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant") - src.name = "[src.registered_name]'s ID Card ([src.assignment])" + if(!registered_user) + registered_name = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name) + assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant") + name = "[src.registered_name]'s ID Card ([src.assignment])" user << "\blue You successfully forge the ID card." + registered_user = user + else if(registered_user == user) + switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show")) + if("Rename") + registered_name = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name) + assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant") + name = "[src.registered_name]'s ID Card ([src.assignment])" + user << "\blue You successfully forge the ID card." + return + if("Show") + ..() else ..() diff --git a/code/game/objects/items/weapons/medical.dm b/code/game/objects/items/weapons/medical.dm index 544cefea35..2d66e9bc24 100644 --- a/code/game/objects/items/weapons/medical.dm +++ b/code/game/objects/items/weapons/medical.dm @@ -65,9 +65,9 @@ MEDICAL if (user && stoppedblood) if (M != user) - user.visible_message("\red [user] bandages [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts with [src]", "\red You bandage up [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts", "\red You hear something like gauze being ripped.") + user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] [H]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") else - user.visible_message("\red [user] bandages [stoppedblood - 1 ? "some of" : "the last of"] [user.gender == MALE? "his" : "her"] own cuts with [src]", "\red You bandage up [stoppedblood - 1 ? "some of" : "the last of"] your cuts", "\red You hear something like gauze being ripped.") + user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.gender == MALE? "his" : "her"] own cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") else if(user) user << "\red Nothing to patch up!" return @@ -172,9 +172,9 @@ MEDICAL if (user && stoppedblood) if (M != user) - H.visible_message("\red You bandage up [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts", "\red [user] bandages [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts with [src]", "\red You hear something like gauze being ripped.") + user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] [H]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") else - H.visible_message("\red You bandage up [stoppedblood - 1 ? "some of" : "the last of"] your cuts", "\red [user] bandages [stoppedblood - 1 ? "some of" : "the last of"] their own cuts with [src]", "\red You hear something like gauze being ripped.") + user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.gender == MALE? "his" : "her"] own cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") else if(user) user << "\red Nothing to patch up!" return diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 98869b3914..2cfa9f87c8 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -1286,22 +1286,22 @@ CIRCULAR SAW switch(M:brain_op_stage) if(0) - if(!istype(H)) + if(!hasorgans(M)) return ..() - var/datum/organ/external/S = H.organs["head"] + var/datum/organ/external/S = M:organs["head"] if(S.destroyed) return - for(var/mob/O in viewers(H, null)) - O.show_message(text("\red [H] gets \his [S.display_name] sawed at with [src] by [user].... It looks like [user] is trying to cut it off!"), 1) + for(var/mob/O in viewers(M, null)) + O.show_message(text("\red [M] gets \his [S.display_name] sawed at with [src] by [user].... It looks like [user] is trying to cut it off!"), 1) if(!do_after(user,rand(50,70))) - for(var/mob/O in viewers(H, null)) - O.show_message(text("\red [user] tried to cut [H]'s [S.display_name] off with [src], but failed."), 1) + for(var/mob/O in viewers(M, null)) + O.show_message(text("\red [user] tried to cut [M]'s [S.display_name] off with [src], but failed."), 1) return - for(var/mob/O in viewers(H, null)) - O.show_message(text("\red [H] gets \his [S.display_name] sawed off with [src] by [user]."), 1) + for(var/mob/O in viewers(M, null)) + O.show_message(text("\red [M] gets \his [S.display_name] sawed off with [src] by [user]."), 1) S.destroyed = 1 S.droplimb() - H.update_body() + M:update_body() if(1.0) if(istype(M, /mob/living/carbon/metroid)) return @@ -1379,9 +1379,9 @@ CIRCULAR SAW ..() return - else if(user.zone_sel.selecting != "chest" && istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - var/datum/organ/external/S = H.organs[user.zone_sel.selecting] + else if(user.zone_sel.selecting != "chest" && hasorgans(M)) + var/mob/living/carbon/H = M + var/datum/organ/external/S = H:organs[user.zone_sel.selecting] if(S.destroyed) return for(var/mob/O in viewers(H, null)) @@ -1392,9 +1392,8 @@ CIRCULAR SAW return for(var/mob/O in viewers(H, null)) O.show_message(text("\red [H] gets \his [S.display_name] sawed off with [src] by [user]."), 1) - S.destroyed = 1 - S.droplimb() - H.update_body() + S.droplimb(1) + H:update_body() else return ..() /* @@ -2962,4 +2961,4 @@ CIRCULAR SAW z="[usr] pops [m]'s [organ.display_name] bone into the wrong place" if(5) z="[usr] performs chiropractice on [m]'s [organ.display_name]" - return z*/ + return z*/ diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 5a4b1c1172..677253b376 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -78,6 +78,20 @@ var/datum/player_info/P = new P.author = usr.key P.content = add + var/modifyer = "th" + switch(time2text(world.timeofday, "DD")) + if("01","21","31") + modifyer = "st" + if("02","22",) + modifyer = "nd" + if("03","23") + modifyer = "rd" + var/day_string = "[time2text(world.timeofday, "DD")][modifyer]" + if(copytext(day_string,1,2) == "0") + day_string = copytext(day_string,2) + var/full_date = time2text(world.timeofday, "DDD, MMM DD of YYYY") + var/day_loc = findtext(full_date, time2text(world.timeofday, "DD")) + P.timestamp = "[copytext(full_date,1,day_loc)][day_string][copytext(full_date,day_loc+2)]" infos += P @@ -1871,6 +1885,7 @@ /datum/player_info/var author // admin who authored the information content // text content of the information + timestamp // Because this is bloody annoying /obj/admins/proc/player_has_info(var/key as text) var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav") @@ -1896,13 +1911,18 @@ if(!infos) dat += "No information found on the given key.
" else + var/update_file = 0 var/i = 0 for(var/datum/player_info/I in infos) i += 1 - dat += "[I.content] by [I.author] " + if(!I.timestamp) + I.timestamp = "Pre-4/3/2012" + update_file = 1 + dat += "[I.content] by [I.author] on [I.timestamp] " if(I.author == usr.key) dat += "Remove" dat += "

" + if(update_file) info << infos dat += "
" dat += "Add Comment
" @@ -1941,6 +1961,7 @@ if(!note_keys) dat += "No notes found." else + sortList(note_keys) for(var/t in note_keys) dat += text("[t]") dat += "" diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 879502d8d3..a2a04b36ee 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -5,7 +5,7 @@ dat += "" //add to this if wanting to add back in IP checking //add if you want to know their ip to the lists below - var/list/mobs = sortmobs() + var/list/mobs = get_sorted_mobs() var/i = 1 for(var/mob/M in mobs) @@ -45,7 +45,7 @@ else if(istype(M,/mob/new_player)) dat += "" else - dat += "" + dat += "\black" if(M.mind && M.mind.assigned_role && istype(M, /mob/living/carbon/human)) // Adds a column to Player Panel that shows their current job. var/mob/living/carbon/human/H = M @@ -117,7 +117,7 @@ dat += "
Name/Real NameTypeAssigned JobInfoOptionsTraitor?
IP:(IP: [M.lastKnownIP])New PlayerERROR\red ERROR
" //add to this if wanting to add back in IP checking //add if you want to know their ip to the lists below - var/list/mobs = sortmobs() + var/list/mobs = get_sorted_mobs() for(var/mob/M in mobs) if(!M.ckey) continue diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index e9c3497c49..50a8188941 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -28,7 +28,7 @@ alert("Admin jumping disabled") return -/client/proc/jumptomob(var/mob/M in world) +/client/proc/jumptomob() set category = "Admin" set name = "Jump to Mob" @@ -37,15 +37,18 @@ return if(config.allow_admin_jump) - log_admin("[key_name(usr)] jumped to [key_name(M)]") - message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) - if(src.mob) - var/mob/A = src.mob - var/turf/T = get_turf(M) - if(T && isturf(T)) - A.loc = T - else - A << "This mob is not located in the game world." + var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in getmobs() + var/mob/M = selection + if(!istype(M)) + return + var/mob/A = src.mob + var/turf/T = get_turf(M) + if(T && isturf(T)) + A.loc = T + log_admin("[key_name(usr)] jumped to [key_name(M)]") + message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) + else + A << "This mob is not located in the game world." else alert("Admin jumping disabled") @@ -71,7 +74,7 @@ else alert("Admin jumping disabled") -/client/proc/Getmob(var/mob/M in world) +/client/proc/Getmob() set category = "Admin" set name = "Get Mob" set desc = "Mob to teleport" @@ -79,9 +82,18 @@ src << "Only administrators may use this command." return if(config.allow_admin_jump) - log_admin("[key_name(usr)] teleported [key_name(M)]") - message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1) - M.loc = get_turf(usr) + var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in getmobs() + var/mob/M = selection + if(!istype(M)) + return + var/mob/A = src.mob + var/turf/T = get_turf(A) + if(T && isturf(T)) + M.loc = T + log_admin("[key_name(usr)] teleported [key_name(M)]") + message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1) + else + A << "You are not located in the game world." else alert("Admin jumping disabled") diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 00dbc514ae..9b49845c31 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -50,7 +50,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if("Obj") target = input("Enter target:","Target",usr) as obj in world if("Mob") - target = input("Enter target:","Target",usr) as mob in world + target = input("Enter target:","Target",usr) as mob in getmobs() if("Area or Turf") target = input("Enter target:","Target",usr.loc) as area|turf in world if("Client") @@ -105,7 +105,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that lst[i] = input("Select reference:","Reference") as null|mob|obj|turf|area in world if("mob reference") - lst[i] = input("Select reference:","Reference",usr) as mob in world + lst[i] = input("Select reference:","Reference",usr) as mob in getmobs() if("file") lst[i] = input("Pick file:","File") as file @@ -117,10 +117,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/list/keys = list() for(var/mob/M in world) keys += M.client + sortList(keys) lst[i] = input("Please, select a player!", "Selection", null, null) as null|anything in keys if("mob's area") - var/mob/temp = input("Select mob", "Selection", usr) as mob in world + var/mob/temp = input("Select mob", "Selection", usr) as mob in getmobs() lst[i] = temp.loc diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index 15871fcf71..e4e2a144df 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -62,7 +62,7 @@ var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world if("mob reference") - var_value = input("Select reference:","Reference") as null|mob in world + var_value = input("Select reference:","Reference") as null|mob in get_sorted_mobs() if("file") var_value = input("Pick file:","File") as null|file @@ -99,10 +99,10 @@ switch(class) if("text") - var_value = input("Enter new text:","Text") as text + var_value = input("Enter new text:","Text") as null|text if("num") - var_value = input("Enter new number:","Num") as num + var_value = input("Enter new number:","Num") as null|num if("type") var_value = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf) @@ -127,13 +127,13 @@ var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world if("mob reference") - var_value = input("Select reference:","Reference") as mob in world + var_value = input("Select reference:","Reference") as null|mob in get_sorted_mobs() if("file") - var_value = input("Pick file:","File") as file + var_value = input("Pick file:","File") as null|file if("icon") - var_value = input("Pick icon:","Icon") as icon + var_value = input("Pick icon:","Icon") as null|icon if("marked datum") var_value = holder.marked_datum @@ -263,11 +263,11 @@ if("text") variable = input("Enter new text:","Text",\ - variable) as text + variable) as null|text if("num") variable = input("Enter new number:","Num",\ - variable) as num + variable) as null|num if("type") variable = input("Enter type:","Type",variable) \ @@ -276,7 +276,7 @@ if("reference") switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search")) if("Specifc UID (Hexadecimal number)") - var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null + var/UID = input("Type in UID, without the leading 0x","Type in UID") as null|text if(!UID) return if(length(UID) != 7) usr << "ERROR. UID must be 7 digits" @@ -294,15 +294,15 @@ if("mob reference") variable = input("Select reference:","Reference",\ - variable) as mob in world + variable) as null|mob in get_sorted_mobs() if("file") variable = input("Pick file:","File",variable) \ - as file + as null|file if("icon") variable = input("Pick icon:","Icon",variable) \ - as icon + as null|icon if("marked datum") variable = holder.marked_datum @@ -533,7 +533,7 @@ O.vars[variable] = var_new if("mob reference") - var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in world + var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in get_sorted_mobs() if(var_new==null) return O.vars[variable] = var_new diff --git a/code/modules/chemical/Chemistry-Holder.dm b/code/modules/chemical/Chemistry-Holder.dm index d429802cb5..459f298a96 100644 --- a/code/modules/chemical/Chemistry-Holder.dm +++ b/code/modules/chemical/Chemistry-Holder.dm @@ -397,12 +397,12 @@ datum return 0 get_reagent_amount(var/reagent) + var/total = 0 for(var/A in reagent_list) var/datum/reagent/R = A if (R.id == reagent) - return R.volume - - return 0 + total += R.volume + return total get_reagents() var/res = "" diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index dc4757fdff..19bb2ec460 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -96,7 +96,7 @@ datum blood - data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=null,"antibodies"=0) + data = new/list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=null,"antibodies"=0) name = "Blood" id = "blood" reagent_state = LIQUID @@ -1338,8 +1338,9 @@ datum if(M:getBruteLoss() && prob(40)) M:heal_organ_damage(1,0) if(M:getFireLoss() && prob(40)) M:heal_organ_damage(0,1) if(M:getToxLoss() && prob(40)) M:adjustToxLoss(-1) - if(volume > REAGENTS_OVERDOSE) - M:adjustToxLoss(1) +// if(volume > REAGENTS_OVERDOSE) +// M:adjustToxLoss(1) +//As hilarious as it was watching Asanadas projectile vomit everywhere from some overzealous medibots, and some antitoxin making 170 units, it was waaay bad. ..() return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 066810c6de..5cd546109e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -35,7 +35,7 @@ if(prob(src.getBruteLoss() - 50)) src.gib() -/mob/living/carbon/gib(give_medal) +/mob/living/carbon/gib(give_medal,ex_act) for(var/mob/M in src) if(M in src.stomach_contents) src.stomach_contents.Remove(M) @@ -43,9 +43,22 @@ for(var/mob/N in viewers(src, null)) if(N.client) N.show_message(text("\red [M] bursts out of [src]!"), 2) - . = ..(give_medal) + . = ..(ex_act) /mob/living/carbon/attack_hand(mob/M as mob) + if (M.hand) + if(ishuman(M) || ismonkey(M)) + var/datum/organ/external/temp = M:organs["l_hand"] + if(temp.destroyed) + M << "\red Yo- wait a minute." + return + else + if(ishuman(M) || ismonkey(M)) + var/datum/organ/external/temp = M:organs["r_hand"] + if(temp.destroyed) + M << "\red Yo- wait a minute." + return + if(!istype(M, /mob/living/carbon)) return for(var/datum/disease/D in viruses) @@ -84,6 +97,18 @@ /mob/living/carbon/attack_paw(mob/M as mob) if(!istype(M, /mob/living/carbon)) return + if (M.hand) + if(ishuman(M) || ismonkey(M)) + var/datum/organ/external/temp = M:organs["l_hand"] + if(temp.destroyed) + M << "\red Yo- wait a minute." + return + else + if(ishuman(M) || ismonkey(M)) + var/datum/organ/external/temp = M:organs["r_hand"] + if(temp.destroyed) + M << "\red Yo- wait a minute." + return for(var/datum/disease/D in viruses) @@ -216,4 +241,16 @@ for(var/datum/organ/external/O in L) bruteloss += O.get_damage_brute() fireloss += O.get_damage_fire() - return \ No newline at end of file + return + +/mob/living/carbon/proc/check_dna() + dna.check_integrity(src) + return + +/mob/living/carbon/proc/get_organ(var/zone) + if(!zone) zone = "chest" + for(var/name in organs) + var/datum/organ/external/O = organs[name] + if(O.name == zone) + return O + return null \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 7aac84a9b5..b74b9fea7b 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -4,6 +4,7 @@ halloss = 0 // And the suffocation was a hallucination (lazy) //oxyloss = 0 + updatehealth() return if(src.stat == 2) return diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 51787711a7..1b57726d94 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -54,7 +54,7 @@ t_his = "her" t_him = "her" - msg += "\a [src]!\n" + msg += "\a [src][examine_text ? ", [examine_text]":""]!\n" //uniform if (src.w_uniform && !skipjumpsuit) @@ -237,11 +237,13 @@ var/list/wound_descriptions = list() var/list/wound_flavor_text = list() + var/list/is_destroyed = list() for(var/named in organs) var/datum/organ/external/temp = organs[named] if(temp) if(temp.destroyed) - wound_flavor_text["[temp.display_name]"] = "[src.name] is missing [t_his] [temp.display_name].\n" + is_destroyed["[temp.display_name]"] = 1 + wound_flavor_text["[temp.display_name]"] = "[t_He] is missing [t_his] [temp.display_name].\n" continue if(temp.wounds) var/list/wounds = list(list(),list(),list(),list(),list(),list()) @@ -401,22 +403,22 @@ switch(tally[tallied]) if(1) if(!flavor_text.len) - flavor_text += "[src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" + flavor_text += "\The [src] has[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" else - flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" + flavor_text += "[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" if(2) if(!flavor_text.len) - flavor_text += "[src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" + flavor_text += "\The [src] has[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" else - flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" + flavor_text += "[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" if(3 to 5) if(!flavor_text.len) - flavor_text += "[src] has several [tallied_rename[tallied]]s" + flavor_text += "\The [src] has several [tallied_rename[tallied]]s" else flavor_text += " several [tallied_rename[tallied]]s" if(6 to INFINITY) if(!flavor_text.len) - flavor_text += "[src] has a bunch of [tallied_rename[tallied]]s" + flavor_text += "\The [src] has a bunch of [tallied_rename[tallied]]s" else flavor_text += " a ton of [tallied_rename[tallied]]s" if(flavor_text.len) @@ -429,47 +431,50 @@ flavor_text_string += flavor_text[text] flavor_text_string += " on [t_his] [named].
" wound_flavor_text["[named]"] = flavor_text_string - if(wound_flavor_text["head"] && !skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas))) + + //Handles the text strings being added to the actual description. + //If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext. + if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas))))) msg += wound_flavor_text["head"] else if(is_bleeding["head"]) msg += "[src] has blood running down [t_his] face!\n" - if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) + if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you. msg += wound_flavor_text["chest"] else if(is_bleeding["chest"]) msg += "[src] has blood soaking through from under [t_his] clothing!\n" - if(wound_flavor_text["left arm"] && !w_uniform && !skipjumpsuit) + if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["left arm"] else if(is_bleeding["left arm"]) msg += "[src] has blood soaking through from under [t_his] clothing!\n" - if(wound_flavor_text["left hand"] && !gloves && !skipgloves) + if(wound_flavor_text["left hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves))) msg += wound_flavor_text["left hand"] else if(is_bleeding["left hand"]) msg += "[src] has blood running from under [t_his] gloves!\n" - if(wound_flavor_text["right arm"] && !w_uniform && !skipjumpsuit) + if(wound_flavor_text["right arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["right arm"] else if(is_bleeding["right arm"]) msg += "[src] has blood soaking through from under [t_his] clothing!\n" - if(wound_flavor_text["right hand"] && !gloves && !skipgloves) + if(wound_flavor_text["right hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves))) msg += wound_flavor_text["right hand"] else if(is_bleeding["right hand"]) msg += "[src] has blood running from under [t_his] gloves!\n" - if(wound_flavor_text["groin"] && !w_uniform && !skipjumpsuit) + if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["groin"] else if(is_bleeding["groin"]) msg += "[src] has blood soaking through from under [t_his] clothing!\n" - if(wound_flavor_text["left leg"] && !w_uniform && !skipjumpsuit) + if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["left leg"] else if(is_bleeding["left leg"]) msg += "[src] has blood soaking through from under [t_his] clothing!\n" - if(wound_flavor_text["left foot"]&& !shoes && !skipshoes) + if(wound_flavor_text["left foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes))) msg += wound_flavor_text["left foot"] else if(is_bleeding["left foot"]) msg += "[src] has blood running from [t_his] shoes!\n" - if(wound_flavor_text["right leg"] && !w_uniform && !skipjumpsuit) + if(wound_flavor_text["right leg"] && (is_destroyed["right leg"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["right leg"] else if(is_bleeding["right leg"]) msg += "[src] has blood soaking through from under [t_his] clothing!\n" - if(wound_flavor_text["right foot"]&& !shoes && !skipshoes) + if(wound_flavor_text["right foot"]&& (is_destroyed["right foot"] || (!shoes && !skipshoes))) msg += wound_flavor_text["right foot"] else if(is_bleeding["right foot"]) msg += "[src] has blood running from [t_his] shoes!\n" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b9935eb3bd..eb9cdd72bd 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -60,6 +60,7 @@ var/bloodloss = 0 var/datum/reagents/vessel var/pale = 0 + var/examine_text = "" /mob/living/carbon/human/dummy real_name = "Test Dummy" @@ -75,26 +76,22 @@ if(!dna) dna = new /datum/dna(null) - organs2 += new /datum/organ/external/chest(src) - organs2 += new /datum/organ/external/groin(src) - organs2 += new /datum/organ/external/head(src) - organs2 += new /datum/organ/external/l_arm(src) - organs2 += new /datum/organ/external/r_arm(src) - organs2 += new /datum/organ/external/r_leg(src) - organs2 += new /datum/organ/external/l_leg(src) + new /datum/organ/external/chest(src) + new /datum/organ/external/groin(src) + new /datum/organ/external/head(src) + new /datum/organ/external/l_arm(src) + new /datum/organ/external/r_arm(src) + new /datum/organ/external/r_leg(src) + new /datum/organ/external/l_leg(src) var/datum/organ/external/part = new /datum/organ/external/l_hand(src) part.parent = organs["l_arm"] - organs2 += part part = new /datum/organ/external/l_foot(src) part.parent = organs["l_leg"] - organs2 += part part = new /datum/organ/external/r_hand(src) part.parent = organs["r_arm"] - organs2 += part part = new /datum/organ/external/r_foot(src) part.parent = organs["r_leg"] - organs2 += part var/g = "m" if (gender == MALE) @@ -325,7 +322,7 @@ if (1.0) b_loss += 500 if (!prob(getarmor(null, "bomb"))) - gib(1) + gib(1,1) return else var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src))) @@ -981,7 +978,7 @@ var/icon/gloves_icon = new /icon("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2"))) if(lo.destroyed) gloves_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) - else if(ro.destroyed) + if(ro.destroyed) gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) overlays += image(gloves_icon, "layer" = MOB_LAYER) if (gloves.blood_DNA) @@ -2742,7 +2739,3 @@ It can still be worn/put on as normal. else reset_view(0) remoteobserve = null - -/mob/living/carbon/human/proc/check_dna() - dna.check_integrity(src) - return diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 175847ef98..b674bc2b99 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -30,15 +30,6 @@ body_lying += DI -/mob/living/carbon/human/proc/get_organ(var/zone) - if(!zone) zone = "chest" - for(var/name in organs) - var/datum/organ/external/O = organs[name] - if(O.name == zone) - return O - return null - - /mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null) if((damagetype != BRUTE) && (damagetype != BURN)) ..(damage, damagetype, def_zone, blocked) diff --git a/code/modules/mob/living/carbon/metroid/examine.dm b/code/modules/mob/living/carbon/metroid/examine.dm index 28f2026b03..1b3146d6da 100644 --- a/code/modules/mob/living/carbon/metroid/examine.dm +++ b/code/modules/mob/living/carbon/metroid/examine.dm @@ -26,6 +26,6 @@ if(10) usr << text("\blue [] seems to have extreme electrical activity inside it!", src.name) - print_flavor_text() + usr << print_flavor_text() return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/examine.dm b/code/modules/mob/living/carbon/monkey/examine.dm index edf60c8ed5..1945b9c0a3 100644 --- a/code/modules/mob/living/carbon/monkey/examine.dm +++ b/code/modules/mob/living/carbon/monkey/examine.dm @@ -1,34 +1,247 @@ /mob/living/carbon/monkey/examine() set src in oview() - usr << "\blue *---------*" - usr << text("\blue This is \icon[] []!", src, src.name) + if(!usr || !src) return + if(((usr.sdisabilities & 1) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/))) + usr << "Something is there but you can't see it." + return + + var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" + if (src.handcuffed) - usr << text("\blue [] is handcuffed! \icon[]", src.name, src.handcuffed) + msg += "It is \icon[src.handcuffed] handcuffed!\n" if (src.wear_mask) - usr << text("\blue [] has a \icon[] [] on \his[] head!", src.name, src.wear_mask, src.wear_mask.name, src) + msg += "It has \icon[src.wear_mask] \a [src.wear_mask] on its head.\n" if (src.l_hand) - usr << text("\blue [] has a \icon[] [] in \his[] left hand!", src.name, src.l_hand, src.l_hand.name, src) + msg += "It has \icon[src.l_hand] \a [src.l_hand] in its left hand.\n" if (src.r_hand) - usr << text("\blue [] has a \icon[] [] in \his[] right hand!", src.name, src.r_hand, src.r_hand.name, src) + msg += "It has \icon[src.r_hand] \a [src.r_hand] in its right hand.\n" if (src.back) - usr << text("\blue [] has a \icon[] [] on \his[] back!", src.name, src.back, src.back.name, src) - if (src.stat == 2) - usr << text("\red [] is limp and unresponsive, a dull lifeless look in their eyes.", src.name) - else - if (src.getBruteLoss()) - if (src.getBruteLoss() < 30) - usr << text("\red [] looks slightly bruised!", src.name) - else - usr << text("\red [] looks severely bruised!", src.name) - if (src.getFireLoss()) - if (src.getFireLoss() < 30) - usr << text("\red [] looks slightly burnt!", src.name) - else - usr << text("\red [] looks severely burnt!", src.name) - if (src.stat == 1) - usr << text("\red [] doesn't seem to be responding to anything around them, their eyes closed as though asleep.", src.name) + msg += "It has \icon[src.back] \a [src.back] on its back.\n" + if (src.stat == DEAD) + msg += "It is limp and unresponsive, with no signs of life.\n" - print_flavor_text() + var/list/wound_descriptions = list() + var/list/wound_flavor_text = list() + for(var/named in organs) + var/datum/organ/external/temp = organs[named] + if(temp) + if(temp.destroyed) + wound_flavor_text["[temp.display_name]"] = "It is missing its [temp.display_name].\n" + continue + if(temp.wounds) + var/list/wounds = list(list(),list(),list(),list(),list(),list()) + for(var/datum/organ/wound/w in temp.wounds) + switch(w.healing_state) + if(0) + var/list/cut = wounds[1] + cut += w + wounds[1] = cut + if(1) + var/list/cut = wounds[2] + cut += w + wounds[2] = cut + if(2) + var/list/cut = wounds[3] + cut += w + wounds[3] = cut + if(3) + var/list/cut = wounds[4] + cut += w + wounds[4] = cut + if(4) + var/list/cut = wounds[5] + cut += w + wounds[5] = cut + if(5) + var/list/cut = wounds[6] + cut += w + wounds[6] = cut + wound_descriptions["[temp.display_name]"] = wounds + else + wound_flavor_text["[temp.display_name]"] = "" + //Now that we have a big list of all the wounds, on all the limbs. + var/list/is_bleeding = list() + for(var/named in wound_descriptions) + var/list/wound_states = wound_descriptions[named] + var/list/flavor_text = list() + for(var/i = 1, i <= 6, i++) + var/list/wound_state = wound_states[i] //All wounds at this level of healing. + var/list/tally = list("cut" = 0, "deep cut" = 0, "flesh wound" = 0, "gaping wound" = 0, "big gaping wound" = 0, "massive wound" = 0,\ + "tiny bruise" = 0, "small bruise" = 0, "moderate bruise" = 0, "large bruise" = 0, "huge bruise" = 0, "monumental bruise" = 0,\ + "small burn" = 0, "moderate burn" = 0, "large burn" = 0, "severe burn" = 0, "deep burn" = 0, "carbonised area" = 0) //How many wounds of what size. + for(var/datum/organ/wound/w in wound_state) + if(w.bleeding && !is_bleeding[named]) is_bleeding[named] = 1 + switch(w.wound_size) + if(1) + switch(w.wound_type) + if(0) + tally["cut"] += 1 + if(1) + tally["tiny bruise"] += 1 + if(2) + tally["small burn"] += 1 + if(2) + switch(w.wound_type) + if(0) + tally["deep cut"] += 1 + if(1) + tally["small bruise"] += 1 + if(2) + tally["moderate burn"] += 1 + if(3) + switch(w.wound_type) + if(0) + tally["flesh wound"] += 1 + if(1) + tally["moderate bruise"] += 1 + if(2) + tally["large burn"] += 1 + if(4) + switch(w.wound_type) + if(0) + tally["gaping wound"] += 1 + if(1) + tally["large bruise"] += 1 + if(2) + tally["severe burn"] += 1 + if(5) + switch(w.wound_type) + if(0) + tally["big gaping wound"] += 1 + if(1) + tally["huge bruise"] += 1 + if(2) + tally["deep burn"] += 1 + if(6) + switch(w.wound_type) + if(0) + tally["massive wound"] += 1 + if(1) + tally["monumental bruise"] += 1 + if(2) + tally["carbonised area"] += 1 + for(var/tallied in tally) + if(!tally[tallied]) + continue + //if(flavor_text_string && tally[tallied]) + // for( + // flavor_text_string += pick(list(", as well as", ", in addition to")) //add more later. + var/tallied_rename = list("cut" = "cut","deep cut" = "deep cut", "flesh wound" = "flesh wound",\ + "gaping wound" = "gaping wound", "big gaping wound" = "big gaping wound", "massive wound" = "massive wound",\ + "tiny bruise" = "tiny bruise", "small bruise" = "small bruise", "moderate bruise" = "moderate bruise",\ + "large bruise" = "large bruise", "huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\ + "small burn" = "small burn", "moderate burn" = "moderate burn", "large burn" = "large burn",\ + "severe burn" = "severe burn", "deep burn" = "deep burn", "carbonised area" = "carbonised area") + switch(i) + if(2) //Healing wounds. + if(tallied in list("cut","small burn")) + continue + tallied_rename = list("deep cut" = "clotted cut", "flesh wound" = "small bandaged wound",\ + "gaping wound" = "bandaged wound", "big gaping wound" = "gauze wrapped wound",\ + "massive wound" = "massive blood soaked bandage", "tiny bruise" = "tiny bruise", "small bruise" = "small bruise",\ + "moderate bruise" = "moderate bruise", "large bruise" = "large bruise",\ + "huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\ + "moderate burn" = "moderate salved burn", "large burn" = "large salved burn",\ + "severe burn" = "severe salved burn", "deep burn" = "deep salved burn",\ + "carbonised area" = "treated carbonised area") + if(3) + if(tallied in list("cut","tiny bruise","small burn")) + continue + tallied_rename = list("deep cut" = "fading cut", "flesh wound" = "small healing wound",\ + "gaping wound" = "healing wound", "big gaping wound" = "big healing wound",\ + "massive wound" = "massive healing wound", "small bruise" = "tiny bruise",\ + "moderate bruise" = "small bruise", "large bruise" = "moderate bruise",\ + "huge bruise" = "large bruise", "monumental bruise" = "huge bruise",\ + "moderate burn" = "healing moderate burn", "large burn" = "healing large burn",\ + "severe burn" = "healing severe burn", "deep burn" = "healing deep burn",\ + "carbonised area" = "slowly healing carbonised area") + if(4) + if(tallied in list("cut","deep cut","tiny bruise", "small bruise","small burn", "moderate burn")) + continue + tallied_rename = list("flesh wound" = "small red scar", "gaping wound" = "angry straight scar",\ + "big gaping wound" = "jagged angry scar", "massive wound" = "gigantic angry scar",\ + "moderate bruise" = "tiny bruise", "large bruise" = "small bruise",\ + "huge bruise" = "moderate bruise", "monumental bruise" = "large bruise",\ + "large burn" = "large burn scar", "severe burn" = "severe burn scar",\ + "deep burn" = "deep burn scar", "carbonised area" = "healing carbonised area") + if(5) + if(tallied in list("cut","deep cut","tiny bruise", "moderate bruise", "small bruise","small burn", "moderate burn")) + continue + tallied_rename = list("flesh wound" = "small scar", "gaping wound" = "straight scar",\ + "big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\ + "large bruise" = "tiny bruise",\ + "huge bruise" = "small bruise", "monumental bruise" = "moderate bruise",\ + "large burn" = "large burn scar", "severe burn" = "severe burn scar",\ + "deep burn" = "deep burn scar", "carbonised area" = "large scarred area") + if(6) + if(tallied in list("cut","deep cut","flesh wound","tiny bruise", "small bruise", "moderate bruise", "large bruise", "huge bruise","small burn", "moderate burn")) + continue + tallied_rename = list("gaping wound" = "straight scar",\ + "big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\ + "monumental bruise" = "tiny bruise",\ + "large burn" = "large burn scar", "severe burn" = "severe burn scar",\ + "deep burn" = "deep burn scar", "carbonised area" = "large scarred area") + var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\ + "huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area") + switch(tally[tallied]) + if(1) + if(!flavor_text.len) + flavor_text += "\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" + else + flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" + if(2) + if(!flavor_text.len) + flavor_text += "\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" + else + flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" + if(3 to 5) + if(!flavor_text.len) + flavor_text += "\The [src] has several [tallied_rename[tallied]]s" + else + flavor_text += " several [tallied_rename[tallied]]s" + if(6 to INFINITY) + if(!flavor_text.len) + flavor_text += "\The [src] has a bunch of [tallied_rename[tallied]]s" + else + flavor_text += " a ton of [tallied_rename[tallied]]s" + if(flavor_text.len) + var/flavor_text_string = "" + for(var/text = 1, text <= flavor_text.len, text++) + if(text == flavor_text.len && flavor_text.len > 1) + flavor_text_string += ", and" + else if(flavor_text.len > 1 && text > 1) + flavor_text_string += "," + flavor_text_string += flavor_text[text] + flavor_text_string += " on its [named].
" + wound_flavor_text["[named]"] = flavor_text_string + if(wound_flavor_text["head"]) + msg += wound_flavor_text["head"] + if(wound_flavor_text["chest"]) + msg += wound_flavor_text["chest"] + if(wound_flavor_text["left arm"]) + msg += wound_flavor_text["left arm"] + if(wound_flavor_text["left hand"]) + msg += wound_flavor_text["left hand"] + if(wound_flavor_text["right arm"]) + msg += wound_flavor_text["right arm"] + if(wound_flavor_text["right hand"]) + msg += wound_flavor_text["right hand"] + if(wound_flavor_text["groin"]) + msg += wound_flavor_text["groin"] + if(wound_flavor_text["left leg"]) + msg += wound_flavor_text["left leg"] + if(wound_flavor_text["left foot"]) + msg += wound_flavor_text["left foot"] + if(wound_flavor_text["right leg"]) + msg += wound_flavor_text["right leg"] + if(wound_flavor_text["right foot"]) + msg += wound_flavor_text["right foot"] + + msg += print_flavor_text() + + msg += "*---------*
" + + usr << msg return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 397cc762c1..7fc7c7f34d 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -3,8 +3,8 @@ voice_name = "monkey" voice_message = "chimpers" say_message = "chimpers" - icon = 'monkey.dmi' - icon_state = "monkey1" + icon = 'mob.dmi' + icon_state = "m-none" gender = NEUTER pass_flags = PASSTABLE @@ -418,6 +418,28 @@ return //TODO: DEFERRED handle_regular_status_updates() + var/leg_tally = 2 + for(var/name in organs) + var/datum/organ/external/E = organs[name] + E.process() + if(E.broken || E.destroyed) + if(E.name == "l_hand" || E.name == "l_arm") + if(hand && equipped()) + drop_item() + emote("scream") + else if(E.name == "r_hand" || E.name == "r_arm") + if(!hand && equipped()) + drop_item() + emote("scream") + else if(E.name == "l_leg" || E.name == "l_foot" \ + || E.name == "r_leg" || E.name == "r_foot" && !lying) + leg_tally-- // let it fail even if just foot&leg + + // can't stand + if(leg_tally == 0 && !paralysis && !(lying || resting)) + emote("scream") + emote("collapse") + paralysis = 10 health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 735b3af141..2c804e7a38 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -2,6 +2,10 @@ var/datum/reagents/R = new/datum/reagents(1000) reagents = R R.my_atom = src + if(name == "monkey") + name = text("monkey ([rand(1, 1000)])") + real_name = name + if (!(dna)) if(gender == NEUTER) gender = pick(MALE, FEMALE) @@ -18,55 +22,35 @@ dna.uni_identity += gendervar dna.uni_identity += "12C" dna.uni_identity += "4E2" + dna.b_type = "A+" + dna.original_name = real_name - if(name == "monkey") - name = text("monkey ([rand(1, 1000)])") - real_name = name - var/datum/organ/external/chest/chest = new /datum/organ/external/chest( src ) - chest.owner = src - organs2 += chest - var/datum/organ/external/groin/groin = new /datum/organ/external/groin( src ) - groin.owner = src - organs2 += groin - var/datum/organ/external/head/head = new /datum/organ/external/head( src ) - head.owner = src - organs2 += head - var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm( src ) - l_arm.owner = src - organs2 += l_arm - var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm( src ) - r_arm.owner = src - organs2 += r_arm - var/datum/organ/external/l_hand/l_hand = new /datum/organ/external/l_hand( src ) - l_hand.owner = src - organs2 += l_hand - var/datum/organ/external/r_hand/r_hand = new /datum/organ/external/r_hand( src ) - r_hand.owner = src - organs2 += r_hand - var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg( src ) - l_leg.owner = src - organs2 += l_leg - var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg( src ) - r_leg.owner = src - organs2 += r_leg - var/datum/organ/external/l_foot/l_foot = new /datum/organ/external/l_foot( src ) - l_foot.owner = src - organs2 += l_foot - var/datum/organ/external/r_foot/r_foot = new /datum/organ/external/r_foot( src ) - r_foot.owner = src - organs2 += r_foot + new /datum/organ/external/chest(src) + new /datum/organ/external/groin(src) + new /datum/organ/external/head(src) + new /datum/organ/external/l_arm(src) + new /datum/organ/external/r_arm(src) + new /datum/organ/external/r_leg(src) + new /datum/organ/external/l_leg(src) + + var/datum/organ/external/part = new /datum/organ/external/l_hand(src) + part.parent = organs["l_arm"] + part = new /datum/organ/external/l_foot(src) + part.parent = organs["l_leg"] + part = new /datum/organ/external/r_hand(src) + part.parent = organs["r_arm"] + part = new /datum/organ/external/r_foot(src) + part.parent = organs["r_leg"] + + spawn (1) + if(!stand_icon) + stand_icon = new /icon('monkey.dmi', "monkey1") + if(!lying_icon) + lying_icon = new /icon('monkey.dmi', "monkey0") + icon = stand_icon + update_clothing() + src << "\blue Your icons have been generated!" - organs["chest"] = chest - organs["groin"] = groin - organs["head"] = head - organs["l_arm"] = l_arm - organs["r_arm"] = r_arm - organs["l_hand"] = l_hand - organs["r_hand"] = r_hand - organs["l_leg"] = l_leg - organs["r_leg"] = r_leg - organs["l_foot"] = l_foot - organs["r_foot"] = r_foot ..() return @@ -470,6 +454,10 @@ stat("Genetic Damage Time", changeling.geneticdamage) return + + +/mob/living/carbon/monkey/var/icon/stand_icon = null +/mob/living/carbon/monkey/var/icon/lying_icon = null /mob/living/carbon/monkey/update_clothing() if(buckled) if(istype(buckled, /obj/structure/stool/bed/chair)) @@ -477,14 +465,18 @@ else lying = 1 + if(!stand_icon || !lying_icon) + update_body() + if(update_icon) // Skie ..() overlays = null - if (!( lying )) - icon_state = "monkey1" - else - icon_state = "monkey0" + if (lying) + icon = lying_icon + + else + icon = stand_icon if(client && client.admin_invis) invisibility = 100 @@ -558,6 +550,31 @@ return return +/mob/living/carbon/monkey/proc/update_body() + + stand_icon = new /icon('monkey.dmi', "torso_s") + lying_icon = new /icon('monkey.dmi', "torso_l") + + stand_icon.Blend(new /icon('monkey.dmi', "chest_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('monkey.dmi', "chest_l"), ICON_OVERLAY) + + var/datum/organ/external/head = organs["head"] + if(!head.destroyed) + stand_icon.Blend(new /icon('monkey.dmi', "head_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('monkey.dmi', "head_l"), ICON_OVERLAY) + + for(var/name in organs) + var/datum/organ/external/part = organs[name] + if(!istype(part, /datum/organ/external/groin) \ + && !istype(part, /datum/organ/external/chest) \ + && !istype(part, /datum/organ/external/head) \ + && !part.destroyed) + stand_icon.Blend(new /icon('monkey.dmi', "[part.icon_name]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('monkey.dmi', "[part.icon_name]_l"), ICON_OVERLAY) + + stand_icon.Blend(new /icon('monkey.dmi', "groin_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('monkey.dmi', "groin_l"), ICON_OVERLAY) + /mob/living/carbon/monkey/Move() if ((!( buckled ) || buckled.loc != loc)) buckled = null @@ -847,3 +864,135 @@ if(!ticker.mode.name == "monkey") return 0 return 1 +/mob/living/carbon/monkey/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null) + if((damagetype != BRUTE) && (damagetype != BURN)) + ..(damage, damagetype, def_zone, blocked) + return 1 + + if(blocked >= 2) return 0 + + var/datum/organ/external/organ = null + if(isorgan(def_zone)) + organ = def_zone + else + if(!def_zone) def_zone = ran_zone(def_zone) + organ = get_organ(check_zone(def_zone)) + if(!organ || organ.destroyed) return 0 + if(blocked) + damage = (damage/(blocked+1)) + + switch(damagetype) + if(BRUTE) + organ.take_damage(damage, 0, sharp, used_weapon) + if(BURN) + organ.take_damage(0, damage, sharp, used_weapon) + + if(used_weapon) + organ.add_wound(used_weapon, damage) + + UpdateDamageIcon() + updatehealth() + update_clothing() + return 1 + +/*/mob/living/carbon/monkey/UpdateDamageIcon() + del(body_standing) + body_standing = list() + del(body_lying) + body_lying = list() + + for(var/name in organs) + var/datum/organ/external/O = organs[name] + if(!O.destroyed) + O.update_icon() + var/icon/DI = new /icon('dam_human.dmi', O.damage_state) // the damage icon for whole human + DI.Blend(new /icon('dam_mask.dmi', O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels + // world << "[O.icon_name] [O.damage_state] \icon[DI]" + body_standing += DI + DI = new /icon('dam_human.dmi', "[O.damage_state]-2") // repeat for lying icons + DI.Blend(new /icon('dam_mask.dmi', "[O.icon_name]2"), ICON_MULTIPLY) + // world << "[O.r_name]2 [O.d_i_state]-2 \icon[DI]" + body_lying += DI*/ + +/mob/living/carbon/monkey/proc/HealDamage(zone, brute, burn) + var/datum/organ/external/E = get_organ(zone) + if(istype(E, /datum/organ/external)) + if (E.heal_damage(brute, burn)) + UpdateDamageIcon() + else + return 0 + return + +/mob/living/carbon/monkey/proc/get_damaged_organs(var/brute, var/burn) + var/list/datum/organ/external/parts = list() + for(var/name in organs) + var/datum/organ/external/organ = organs[name] + if((brute && organ.brute_dam) || (burn && organ.burn_dam)) + parts += organ + return parts + +/mob/living/carbon/monkey/proc/get_damageable_organs() + var/list/datum/organ/external/parts = list() + for(var/name in organs) + var/datum/organ/external/organ = organs[name] + if(organ.brute_dam + organ.burn_dam < organ.max_damage) + parts += organ + return parts + +// heal ONE external organ, organ gets randomly selected from damaged ones. +/mob/living/carbon/monkey/heal_organ_damage(var/brute, var/burn) + var/list/datum/organ/external/parts = get_damaged_organs(brute,burn) + if(!parts.len) + return + var/datum/organ/external/picked = pick(parts) + picked.heal_damage(brute,burn) + updatehealth() + UpdateDamageIcon() + +// damage ONE external organ, organ gets randomly selected from damaged ones. +/mob/living/carbon/monkey/take_organ_damage(var/brute, var/burn) + var/list/datum/organ/external/parts = get_damageable_organs() + if(!parts.len) + return + var/datum/organ/external/picked = pick(parts) + picked.take_damage(brute,burn) + updatehealth() + UpdateDamageIcon() + +// heal MANY external organs, in random order +/mob/living/carbon/monkey/heal_overall_damage(var/brute, var/burn) + var/list/datum/organ/external/parts = get_damaged_organs(brute,burn) + + while(parts.len && (brute>0 || burn>0) ) + var/datum/organ/external/picked = pick(parts) + + var/brute_was = picked.brute_dam + var/burn_was = picked.burn_dam + + picked.heal_damage(brute,burn) + + brute -= (brute_was-picked.brute_dam) + burn -= (burn_was-picked.burn_dam) + + parts -= picked + updatehealth() + UpdateDamageIcon() + +// damage MANY external organs, in random order +/mob/living/carbon/monkey/take_overall_damage(var/brute, var/burn, var/used_weapon = null) + var/list/datum/organ/external/parts = get_damageable_organs() + + while(parts.len && (brute>0 || burn>0) ) + var/datum/organ/external/picked = pick(parts) + + var/brute_was = picked.brute_dam + var/burn_was = picked.burn_dam + + picked.take_damage(brute,burn, 0, used_weapon) + + brute -= (picked.brute_dam-brute_was) + burn -= (picked.burn_dam-burn_was) + + parts -= picked + updatehealth() + UpdateDamageIcon() diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index d165af01fc..b1778089a8 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -8,7 +8,7 @@ Returns standard 0 if fail */ -/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/slash = 0, var/used_weapon = null) +/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null) if(!damage || (blocked >= 2)) return 0 switch(damagetype) if(BRUTE) @@ -39,7 +39,7 @@ /mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0) - if(!effect || (blocked >= 2)) return 0 + if(!effect || (blocked)) return 0 switch(effecttype) if(STUN) Stun((effect - (min(effect*getarmor(null, "laser"), effect*(0.75 + (blocked*0.05)))))) diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm index 1f9498a4bb..899fa25eb3 100644 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ b/code/modules/mob/living/silicon/ai/examine.dm @@ -19,6 +19,6 @@ if (src.stat == 1) usr << text("\red [] doesn't seem to be responding.", src.name) - print_flavor_text() + usr << print_flavor_text() return \ No newline at end of file diff --git a/code/modules/mob/living/silicon/pai/examine.dm b/code/modules/mob/living/silicon/pai/examine.dm index 66aecc6c66..26d6bb4bb4 100644 --- a/code/modules/mob/living/silicon/pai/examine.dm +++ b/code/modules/mob/living/silicon/pai/examine.dm @@ -19,6 +19,6 @@ if (src.stat == 1) usr << text("\red [] doesn't seem to be responding.", src.name) - print_flavor_text() + usr << print_flavor_text() return \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index d1b54407d0..e8b3a2fa80 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -22,6 +22,6 @@ else usr << "The cover is closed." - print_flavor_text() + usr << print_flavor_text() return \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c398c38dad..39cab8d3c9 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -290,9 +290,9 @@ //Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob. /mob/proc/remove_from_mob(var/obj/O) - src.u_equip(O) - if (src.client) - src.client.screen -= O + u_equip(O) + if (client) + client.screen -= O O.layer = initial(O.layer) O.screen_loc = null return 1 @@ -398,10 +398,10 @@ msg = copytext(msg, 1, MAX_MESSAGE_LEN) msg = html_encode(msg) - src.flavor_text = msg + flavor_text = msg /mob/proc/warn_flavor_changed() - if(src.flavor_text && src.flavor_text != "") // don't spam people that don't use it! + if(flavor_text && flavor_text != "") // don't spam people that don't use it! src << "

OOC Warning:

" src << "Your flavor text is likely out of date! Change" @@ -409,9 +409,9 @@ if (flavor_text && flavor_text != "") var/msg = dd_replacetext(flavor_text, "\n", " ") if(lentext(msg) <= 40) - usr << "\blue [msg]" + return "\blue [msg]" else - usr << "\blue [copytext(msg, 1, 37)]... More..." + return "\blue [copytext(msg, 1, 37)]... More..." /* @@ -610,7 +610,7 @@ src << browse(null, t1) if(href_list["teleto"]) - src.client.jumptoturf(locate(href_list["teleto"])) + client.jumptoturf(locate(href_list["teleto"])) if(href_list["priv_msg"]) var/mob/M = locate(href_list["priv_msg"]) @@ -648,8 +648,8 @@ if(K.client && K.client.holder && K.key != usr.key && K.key != M.key) K << "PM: [key_name(usr, K)]->[key_name(M, K)]: \blue [t]" if(href_list["flavor_more"]) - usr << browse(text("[][]", src.name, dd_replacetext(src.flavor_text, "\n", "
")), text("window=[];size=500x200", src.name)) - onclose(usr, "[src.name]") + usr << browse(text("[][]", name, dd_replacetext(flavor_text, "\n", "
")), text("window=[];size=500x200", name)) + onclose(usr, "[name]") if(href_list["flavor_change"]) update_flavor_text() ..() @@ -659,9 +659,9 @@ return health /mob/proc/UpdateLuminosity() - if(src.total_luminosity == src.last_luminosity) return 0//nothing to do here - src.last_luminosity = src.total_luminosity - sd_SetLuminosity(min(src.total_luminosity,7))//Current hardcode max at 7, should likely be a const somewhere else + if(total_luminosity == last_luminosity) return 0//nothing to do here + last_luminosity = total_luminosity + sd_SetLuminosity(min(total_luminosity,7))//Current hardcode max at 7, should likely be a const somewhere else return 1 /mob/MouseDrop(mob/M as mob) @@ -722,7 +722,7 @@ del(src) */ - if(IsGuestKey(src.key)) + if(IsGuestKey(key)) alert(src,"Baystation12 doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK") del(src) @@ -778,7 +778,7 @@ //This is the proc for gibbing a mob. Cannot gib ghosts. Removed the medal reference, //added different sort of gibs and animations. N -/mob/proc/gib() +/mob/proc/gib(var/ex_act = 0) if (istype(src, /mob/dead/observer)) gibs(loc, viruses) @@ -837,8 +837,10 @@ Currently doesn't work, but should be useful later or at least as a template else gibs(loc, viruses, dna) sleep(15) - for(var/obj/item/I in src.contents) + for(var/obj/item/I in contents) I.loc = get_turf(src) + if(ex_act) + I.ex_act(ex_act) del(src) /* @@ -874,7 +876,7 @@ Dusting robots does not eject the MMI, so it's a bit more powerful than gib() /N sleep(15) if(isrobot(src)&&src:mmi)//Is a robot and it has an mmi. del(src:mmi)//Delete the MMI first so that it won't go popping out. - for(var/obj/item/I in src.contents) + for(var/obj/item/I in contents) I.loc = get_turf(src) del(src) @@ -1009,17 +1011,17 @@ note dizziness decrements automatically in the mob's Life() proc. boom.icon_state = "loss_general" #elif /client/proc/station_explosion_cinematic(var/derp) - if(!src.mob) + if(!mob) return - var/mob/M = src.mob + var/mob/M = mob M.loc = null // HACK, but whatever, this works if(!M.hud_used) return var/obj/screen/boom = M.hud_used.station_explosion - src.screen += boom + screen += boom if(ticker) switch(ticker.mode.name) if("nuclear emergency") diff --git a/code/modules/mob/mob_cleanup.dm b/code/modules/mob/mob_cleanup.dm index 95fec07c5e..0e167a6c5e 100644 --- a/code/modules/mob/mob_cleanup.dm +++ b/code/modules/mob/mob_cleanup.dm @@ -32,7 +32,7 @@ Put (mob/proc)s here that are in dire need of a code cleanup. //src.virus.cure(0) var/datum/disease/v = new virus.type - src.viruses += v + viruses += v v.affected_mob = src v.strain_data = v.strain_data.Copy() v.holder = src @@ -40,7 +40,7 @@ Put (mob/proc)s here that are in dire need of a code cleanup. v.carrier = 1 return - //if(src.virus) // + //if(virus) // //return // @@ -184,11 +184,11 @@ Put (mob/proc)s here that are in dire need of a code cleanup. return else*/ var/datum/disease/v = new virus.type - src.viruses += v + viruses += v v.affected_mob = src v.strain_data = v.strain_data.Copy() v.holder = src if(prob(5)) v.carrier = 1 return - return + return \ No newline at end of file diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index e08f704801..b7dac4247e 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -29,7 +29,6 @@ var/maxHealth = 100 //Living //Vars that should only be accessed via procs ++END - // var/uses_hud = 0 var/obj/screen/pain = null var/obj/screen/flash = null diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 4f81cb084c..e3d151d2ba 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -110,6 +110,11 @@ proc/isorgan(A) return 1 return 0 +proc/hasorgans(A) + if(ishuman(A) || ismonkey(A)) + return 1 + return 0 + /proc/hsl2rgb(h, s, l) return @@ -315,19 +320,19 @@ It's fairly easy to fix if dealing with single letters but not so much with comp /mob/proc/abiotic(var/full_body = 0) - if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask))) + if(full_body && ((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract )) || (back || wear_mask))) return 1 - if((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract ))) + if((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract ))) return 1 return 0 /mob/proc/abiotic2(var/full_body2 = 0) - if(full_body2 && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask))) + if(full_body2 && ((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract )) || (back || wear_mask))) return 1 - if((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract ))) + if((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract ))) return 1 return 0 diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index bb80c60740..5d9fb6c4f7 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -332,7 +332,7 @@ for(var/turf/turf in oview(1,src)) if(istype(turf,/turf/space)) continue - if(istype(turf,/turf/simulated/floor) && (src.flags & NOGRAV)) + if(istype(turf,/turf/simulated/floor) && (flags & NOGRAV)) continue dense_object++ break diff --git a/code/modules/mob/organ/organ.dm b/code/modules/mob/organ/organ.dm index 4e3acabe4f..a650897928 100644 --- a/code/modules/mob/organ/organ.dm +++ b/code/modules/mob/organ/organ.dm @@ -65,7 +65,7 @@ var/stage = 0 var/wound = 0 - New(mob/living/carbon/human/H) + New(mob/living/carbon/H) ..(H) if(!display_name) display_name = name @@ -95,7 +95,7 @@ droplimb() return else if(prob(nux)) - createwound(max(1,min(6,round(brute/10) + rand(-1,1))),0,brute) + createwound(max(1,min(6,round(brute/10) + rand(0,2))),0,brute) owner << "You feel something wet on your [display_name]" if((brute_dam + burn_dam + brute + burn) < max_damage) @@ -104,10 +104,10 @@ if(prob(brute) && brute > 20 && !sharp) createwound(rand(4,6),0,brute) else if(!sharp) - createwound(max(1,min(6,round(brute/10) + rand(0,2))),1,brute) + createwound(max(1,min(6,round(brute/10) + rand(1,3))),1,brute) if(burn) burn_dam += burn - createwound(max(1,min(6,round(burn/10) + rand(-1,1))),2,burn) + createwound(max(1,min(6,round(burn/10) + rand(0,2))),2,burn) else var/can_inflict = src.max_damage - (src.brute_dam + src.burn_dam) if(can_inflict) @@ -237,7 +237,7 @@ owner.visible_message("\red You hear a loud cracking sound coming from [owner.name].","\red Something feels like it shattered in your [display_name]!","You hear a sickening crack.") owner.emote("scream") broken = 1 - wound = "broken" //Randomise in future + wound = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal perma_injury = brute_dam return return @@ -277,111 +277,133 @@ return 1 return 0 - proc/droplimb() + proc/droplimb(var/override = 0) + if(override) + destroyed = 1 if(destroyed) //owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy") - owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.","\red Your [display_name] goes flying off!","You hear a terrible sound of ripping tendons and flesh.") + var/obj/item/weapon/organ/H switch(body_part) if(UPPER_TORSO) owner.gib() if(LOWER_TORSO) owner << "\red You are now sterile." if(HEAD) - var/obj/item/weapon/organ/head/H = new(owner.loc, owner) - if(owner.gender == FEMALE) - H.icon_state = "head_f_l" - H.overlays += owner.face_lying - H.transfer_identity(owner) + H = new /obj/item/weapon/organ/head(owner.loc, owner) + if(ishuman(owner)) + if(owner.gender == FEMALE) + H.icon_state = "head_f_l" + H.overlays += owner.face_lying + if(ismonkey(owner)) + H.icon_state = "head_l" + //H.overlays += owner.face_lying + H:transfer_identity(owner) H.pixel_x = -10 H.pixel_y = 6 H.name = "[owner.name]'s head" - var/lol = pick(cardinal) - step(H,lol) owner.update_face() owner.update_body() owner.death() if(ARM_RIGHT) - var/obj/item/weapon/organ/r_arm/H = new(owner.loc, owner) + H = new /obj/item/weapon/organ/r_arm(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "r_arm_l" if(owner:organs["r_hand"]) var/datum/organ/external/S = owner:organs["r_hand"] if(!S.destroyed) - S.droplimb() - var/lol = pick(cardinal) - step(H,lol) - destroyed = 1 + S.droplimb(1) if(ARM_LEFT) - var/obj/item/weapon/organ/l_arm/H = new(owner.loc, owner) + H = new /obj/item/weapon/organ/l_arm(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "l_arm_l" if(owner:organs["l_hand"]) var/datum/organ/external/S = owner:organs["l_hand"] if(!S.destroyed) - S.droplimb() - var/lol = pick(cardinal) - step(H,lol) - destroyed = 1 + S.droplimb(1) if(LEG_RIGHT) - var/obj/item/weapon/organ/r_leg/H = new(owner.loc, owner) + H = new /obj/item/weapon/organ/r_leg(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "r_leg_l" if(owner:organs["r_foot"]) var/datum/organ/external/S = owner:organs["r_foot"] if(!S.destroyed) - S.droplimb() - var/lol = pick(cardinal) - step(H,lol) - destroyed = 1 + S.droplimb(1) if(LEG_LEFT) - var/obj/item/weapon/organ/l_leg/H = new(owner.loc, owner) + H = new /obj/item/weapon/organ/l_leg(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "l_leg_l" if(owner:organs["l_foot"]) var/datum/organ/external/S = owner:organs["l_foot"] if(!S.destroyed) - S.droplimb() - var/lol = pick(cardinal) - step(H,lol) - destroyed = 1 + S.droplimb(1) if(HAND_RIGHT) - var/obj/item/weapon/organ/r_hand/X = new(owner.loc, owner) - var/lol2 = pick(cardinal) - step(X,lol2) - destroyed = 1 + H = new /obj/item/weapon/organ/r_hand(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "r_hand_l" if(HAND_LEFT) - var/obj/item/weapon/organ/l_hand/X = new(owner.loc, owner) - var/lol2 = pick(cardinal) - step(X,lol2) - destroyed = 1 + H = new /obj/item/weapon/organ/l_hand(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "l_hand_l" if(FOOT_RIGHT) - var/obj/item/weapon/organ/r_foot/X = new(owner.loc, owner) - var/lol2 = pick(cardinal) - step(X,lol2) - destroyed = 1 + H = new /obj/item/weapon/organ/r_foot/(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "r_foot_l" if(FOOT_LEFT) - var/obj/item/weapon/organ/l_foot/X = new(owner.loc, owner) - var/lol2 = pick(cardinal) - step(X,lol2) - destroyed = 1 + H = new /obj/item/weapon/organ/l_foot(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "l_foot_l" + if(ismonkey(owner)) + H.icon = 'monkey.dmi' + if(istajaran(owner)) + H.icon = 'tajaran.dmi' + var/lol = pick(cardinal) + step(H,lol) destspawn = 1 + owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.","\red Your [display_name] goes flying off!","You hear a terrible sound of ripping tendons and flesh.") for(var/datum/organ/wound/W in wounds) W.update_health() del(W) del(wounds) - src.owner.update_clothing() + owner.update_body() + owner.update_clothing() proc/createwound(var/size = 1, var/type = 0, var/damage) + var/list/datum/organ/wound/possible_wounds = list() + for(var/datum/organ/wound/W in wounds) + if(W.type == type && W.wound_size < 3 && size < 3 && !W.is_healing) + possible_wounds += W if(ishuman(owner)) - var/datum/organ/wound/W = new(src) - bleeding = !type //Sharp objects cause bleeding. - W.bleeding = !type -// owner:bloodloss += 10 * size - W.damage = damage - W.initial_dmg = damage - W.wound_type = type - W.wound_size = size - W.owner = owner - W.parent = src - if(type == 1) - spawn W.become_scar() + if(!possible_wounds.len || prob(25)) + var/datum/organ/wound/W = new(src) + bleeding = !type //Sharp objects cause bleeding. + W.bleeding = !type + // owner:bloodloss += 10 * size + W.damage = damage + W.initial_dmg = damage + W.wound_type = type + W.wound_size = size + W.owner = owner + W.parent = src + if(type == 1) + spawn W.become_scar() + else + spawn W.start_close() //Let small cuts close themselves. + wounds += W else - spawn W.start_close() //Let small cuts close themselves. - wounds += W + var/datum/organ/wound/W = pick(possible_wounds) + bleeding = !type //Sharp objects cause bleeding. + W.bleeding = !type + // owner:bloodloss += 10 * size + W.damage += damage + W.initial_dmg += damage + W.wound_size = round(sqrt(size^2 + W.wound_size^2)) + if(type == 1) + spawn W.become_scar() + else + spawn W.start_close() //Let small cuts close themselves. + wounds += W /datum/organ/wound name = "wound" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index b11348dd6b..8730851d0c 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -392,7 +392,6 @@ mob/proc m_intent = "walk" hud_used.move_intent.icon_state = "walking" while(targeted_by && T.client) - sleep(1) if(last_move_intent > I.lock_time + 10 && !T.client.target_can_move) //If the target moved while targeted I.TargetActed(src) if(I.last_moved_mob == src) //If they were the last ones to move, give them more of a grace period, so that an automatic weapon can hold down a room better. @@ -411,6 +410,7 @@ mob/proc I.lock_time = world.time + 5 I.lock_time = world.time + 5 I.last_moved_mob = src + sleep(1) NotTargeted(var/obj/item/weapon/gun/I) if(!I.silenced) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 940fac041b..ab18767bcc 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -59,13 +59,11 @@ proc/check_fire(var/mob/living/target as mob, var/mob/living/user as mob) //Checks if you can hit them or not. if(!istype(target) || !istype(user)) return 0 - var/obj/item/projectile/test/in_chamber = new /obj/item/projectile/test(get_turf(src)) //Making the test.... - var/turf/curloc = get_turf(user) - var/turf/targloc = get_turf(target) - in_chamber.yo = targloc.y - curloc.y - in_chamber.xo = targloc.x - curloc.x + var/obj/item/projectile/test/in_chamber = new /obj/item/projectile/test(get_step_to(user,target)) //Making the test.... + in_chamber.target = target in_chamber.flags = flags //Set the flags... in_chamber.pass_flags = pass_flags //And the pass flags to that of the real projectile... + in_chamber.firer = user var/output = in_chamber.fired() //Test it! del(in_chamber) //No need for it anymore return output //Send it back to the gun! @@ -151,24 +149,37 @@ yo = null xo = null var - turf/target = null + target = null result = 0 //To pass the message back to the gun. Bump(atom/A as mob|obj|turf|area) + if(A == firer) + loc = A.loc + return //cannot shoot yourself + if(istype(A, /obj/item/projectile)) + return if(istype(A, /mob/living)) result = 2 //We hit someone, return 1! - return ..() + return + result = 1 + return fired() - target = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z) //Finding the target turf at map edge - while(!result) //Loop on through! - if(!step_towards(src,target)) //If we hit something... - if(!result) //And the var is not already set.... - result = 1 //Return 0 - break + var/turf/curloc = get_turf(src) + var/turf/targloc = get_turf(target) + yo = targloc.y - curloc.y + xo = targloc.x - curloc.x + target = targloc + while(src) //Loop on through! + if(result) + return (result - 1) + if((!( target ) || loc == target)) + target = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z) //Finding the target turf at map edge + step_towards(src, target) + var/mob/living/M = locate() in get_turf(src) + if(istype(M)) //If there is someting living... + return 1 //Return 1 else - var/mob/living/M = locate() in get_turf(src) - if(istype(M)) //If there is someting living... - result = 2 //Return 1 - break - return (result-1) \ No newline at end of file + M = locate() in get_step(src,target) + if(istype(M)) + return 1 diff --git a/icons/mob/monkey.dmi b/icons/mob/monkey.dmi index b102390d0d..41a6451fa4 100644 Binary files a/icons/mob/monkey.dmi and b/icons/mob/monkey.dmi differ
NameReal NameAssigned JobKeyOptionsPMTraitor?
IP:(IP: [M.lastKnownIP])