From 5029a6b61195067eaf3d9f72554f4467a9b9d130 Mon Sep 17 00:00:00 2001 From: Atermonera Date: Thu, 26 Jan 2023 19:40:24 -0800 Subject: [PATCH 1/4] Simple animal flavour text will now show instead of desc, if set. --- code/game/atoms.dm | 26 +++ .../subtypes/animal/_animal_harness.dm | 178 ++++++++++++++++++ .../simple_mob/subtypes/animal/animal.dm | 105 ++++++++++- 3 files changed, 308 insertions(+), 1 deletion(-) create mode 100644 code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm diff --git a/code/game/atoms.dm b/code/game/atoms.dm index d3207d02935..f54372630b1 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -211,9 +211,16 @@ found += A.search_contents_for(path,filter_path) return found +<<<<<<< HEAD //All atoms /atom/proc/examine(mob/user, var/infix = "", var/suffix = "") //This reformat names to get a/an properly working on item descriptions when they are bloody +======= +/atom/proc/get_examine_desc() + return desc + +/atom/proc/examine(mob/user, infix = "", suffix = "") +>>>>>>> 5ce4801b708... Merge pull request #8894 from MistakeNot4892/flavour var/f_name = "\a [src][infix]." if(src.blood_DNA && !istype(src, /obj/effect/decal)) if(gender == PLURAL) @@ -224,6 +231,7 @@ f_name += "blood-stained [name][infix]!" else f_name += "oil-stained [name][infix]." +<<<<<<< HEAD var/list/output = list("\icon[src.examine_icon()][bicon(src)] That's [f_name] [suffix]", desc) @@ -233,6 +241,24 @@ if(user.client?.prefs.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL) user.client.statpanel = "Examine" // Switch to stat panel +======= + var/list/output = list("[bicon(src)] That's [f_name] [suffix]", get_examine_desc()) + if (user.client?.prefs.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL) + user.client.statpanel = "Examine" + else if (user.client) + var/list/extras = list() + if (user.client.prefs.examine_text_mode == EXAMINE_MODE_INCLUDE_USAGE) + if (description_info) + output += description_info + else if (description_info) + extras += SPAN_NOTICE("usage") + if (description_fluff) + extras += SPAN_GOOD("lore") + if (description_antag && (isobserver(user) || player_is_antag(user.mind))) + extras += SPAN_WARNING("antag") + if (length(extras)) + output += "Extra [english_list(extras)] information is available: [CreateAtomTopic(@"[Show Examine]", user, ATOM_TOPIC_EXAMINE)]" +>>>>>>> 5ce4801b708... Merge pull request #8894 from MistakeNot4892/flavour SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, output) return output diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm b/code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm new file mode 100644 index 00000000000..856055b7f79 --- /dev/null +++ b/code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm @@ -0,0 +1,178 @@ +/obj/item/storage/internal/animal_harness + abstract_type = /obj/item/storage/internal/animal_harness + name = "animal harness" + color = COLOR_BEASTY_BROWN + max_w_class = ITEMSIZE_LARGE + max_storage_space = INVENTORY_STANDARD_SPACE + + /// Null, or a list of (/obj/item/foo = "item key"), or (/path = ("item key", proc/handler)). + var/list/attachable_types + + /// Null, or a list of ("item key" = null|Instance) + var/list/attached_items + + /// The time it takes for the wearer to adjust this harness' attachments. + var/self_attach_delay = 5 SECONDS + + /// The time it takes for someone else to adjust this harness' attachments. + var/other_attach_delay = 3 SECONDS + + +/obj/item/storage/internal/animal_harness/Destroy() + var/mob/living/simple_mob/animal/wearer = loc + if (istype(wearer) && wearer.harness == src) + wearer.harness = null + for (var/key in attached_items) + var/obj/item/item = attached_items[key] + qdel(item) + LAZYCLEARLIST(attached_items) + attachable_types = null + return ..() + + +/obj/item/storage/internal/animal_harness/Initialize() + . = ..() + if (!attachable_types) + return + attached_items = list() + for (var/path in attachable_types) + var/key = attachable_types[path] + attached_items[key] = null + CreateAttachments() + + +/obj/item/storage/internal/animal_harness/LateInitializeName() + return + + +/obj/item/storage/internal/animal_harness/attackby(obj/item/item, mob/living/user, silent) + . = TRUE + if (user == loc) // Animals can only shove stuff in their storage. + return ..() + for (var/path in attachable_types) + if (!istype(item, path)) + continue + var/key = attachable_types[path] + var/handler + if (islist(key)) + handler = key[2] + key = key[1] + if (attached_items[key]) + if (!silent) + var/datum/gender/gender + if (ismob(loc)) + var/mob/living/simple_mob/animal/owner = loc + gender = gender_datums[owner.get_visible_gender()] + to_chat(user, SPAN_WARNING("\The [loc] already has \a [key] attached to [gender ? gender.his : "its"] harness.")) + return + if (!user.unEquip(item, target = loc)) + return + if (!silent) + user.visible_message(SPAN_NOTICE("\The [user] attaches \the [item] to \the [loc]'s harness.")) + attached_items[key] = item + if (handler) + call(src, handler)(item) + return + return ..() + + +/obj/item/storage/internal/animal_harness/proc/GetAttachedKeys() + var/list/obj/item/result = list() + for (var/key in attached_items) + if (attached_items[key]) + result += key + return result + + +/obj/item/storage/internal/animal_harness/proc/GetAttachedItems() + var/list/obj/item/result = list() + for (var/key in attached_items) + var/obj/item/item = attached_items[key] + if (item) + result += item + return result + + +/obj/item/storage/internal/animal_harness/proc/RemoveAttachment(obj/item/attachment) + if (istext(attachment)) + var/obj/item/item = attached_items[attachment] + if (!item) + return + item.dropInto(get_turf(src)) + attached_items[attachment] = null + return item + for (var/key in attached_items) + if (attached_items[key] == attachment) + attachment.dropInto(get_turf(src)) + attached_items[key] = null + return attachment + + +/obj/item/storage/internal/animal_harness/proc/CreateAttachments() + return + + +/mob/living/simple_mob/animal + var/obj/item/storage/internal/animal_harness/harness + + +/mob/living/simple_mob/animal/Destroy() + if (istype(harness)) + QDEL_NULL(harness) + return ..() + + +/mob/living/simple_mob/animal/Initialize() + . = ..() + if (ispath(harness)) + harness = new harness (src) + verbs += /mob/living/simple_mob/animal/proc/RemoveAttachmentVerb + + +/mob/living/simple_mob/animal/examine(mob/living/user) + . = ..() + if (harness) + . += "\The [src] is wearing \a [harness]." + for (var/obj/item/item in harness.GetAttachedItems()) + . += "There is \a [item] attached." + +/mob/living/simple_mob/animal/proc/RemoveAttachmentVerb() + set name = "Remove Harness Attachment" + set category = "IC" + set src in view(1) + var/mob/living/user = usr + if (!istype(user)) + return + if (!Adjacent(user) || user.incapacitated()) + to_chat(user, SPAN_WARNING("You are in no condition to do that.")) + return + if (!user.check_dexterity(MOB_DEXTERITY_SIMPLE_MACHINES)) + return + var/list/attached = harness.GetAttachedKeys() + var/datum/gender/gender = gender_datums[get_visible_gender()] + if (!length(attached)) + to_chat(user, SPAN_WARNING("\The [src] has nothing attached to [gender.his] [harness.name].")) + return + var/obj/item/response = input(user, "Select attachment to remove:") as null | anything in attached + if (!response) + return + if (!(response in harness.GetAttachedKeys())) + to_chat(user, SPAN_WARNING("\The [response] is already missing from \the [harness].")) + return + if (!Adjacent(user) || user.incapacitated()) + to_chat(user, SPAN_WARNING("You are in no condition to do that.")) + return + user.visible_message( + SPAN_ITALIC("\The [user] begins to remove \a [response] from [(user == src) ? "[gender.his]" : "\the [src]'s"] harness."), + SPAN_ITALIC("You begin to remove \the [response] from [(user == src) ? "your" : "\the [src]'s"] harness."), + range = 5 + ) + if (!do_after(user, (user == src) ? harness.self_attach_delay : harness.other_attach_delay, loc)) + return + if (QDELETED(harness)) + return + if (!(response in harness.GetAttachedKeys())) + to_chat(user, SPAN_WARNING("\The [response] is already missing from \the [src].")) + return + var/obj/item/removed = harness.RemoveAttachment(response) + user.put_in_hands(removed) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm b/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm index 563b2925291..9da9ae3a0d8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm @@ -24,4 +24,107 @@ ) /decl/mob_organ_names/quadruped //Most subtypes have this basic body layout. - hit_zones = list("head", "torso", "left foreleg", "right foreleg", "left hind leg", "right hind leg", "tail") \ No newline at end of file +<<<<<<< HEAD + hit_zones = list("head", "torso", "left foreleg", "right foreleg", "left hind leg", "right hind leg", "tail") +======= + hit_zones = list("head", "torso", "left foreleg", "right foreleg", "left hind leg", "right hind leg", "tail") + +/mob/living/simple_mob/animal/get_examine_desc() + return flavor_text || desc + +/mob/living/simple_mob/animal/verb/set_flavour_text() + set name = "Set Flavour Text" + set category = "IC" + set desc = "Set your flavour text." + set src = usr + var/new_flavour_text = sanitize((input("Please describe yourself.", "Flavour Text", flavor_text) as message|null), MAX_MESSAGE_LEN) + if(length(new_flavour_text) && !QDELETED(src)) + flavor_text = new_flavour_text + to_chat(src, SPAN_NOTICE("Your flavour text has been updated.")) + +/mob/living/simple_mob/animal/leaves_tracks_type() + return tracks_type + +/mob/living/simple_mob/animal/proc/has_appetite() + return TRUE + +/mob/living/simple_mob/animal/proc/add_nutrition(var/amt) + nutrition = clamp(nutrition + amt, 0, max_nutrition) + +/mob/living/simple_mob/animal/proc/remove_nutrition(var/amt) + nutrition = clamp(nutrition - amt, 0, max_nutrition) + +/mob/living/simple_mob/animal/get_snow_footprint_state() + if(!hovering) + return "snow_animalprints" + +/mob/living/simple_mob/animal/do_interaction(var/atom/A) + + // Can we do some critter interaction? + var/static/list/atom_types_with_animal_interactions = list( + /obj/structure/animal_den, + /obj/structure/flora, + /turf/simulated/floor/outdoors, + /obj/item/organ, + /obj/item/reagent_containers/food, + /obj/machinery/door + ) + for(var/checktype in atom_types_with_animal_interactions) + if(istype(A, checktype)) + A.attack_generic(src, 0, "investigates") + return TRUE + + // Can we eat a dead guy? + if(scavenger && isliving(A) && a_intent == I_HURT) + var/mob/living/M = A + if(M.stat == DEAD && length(M.internal_organs)) + + if(!has_appetite()) + to_chat(src, SPAN_WARNING("You don't have much of an appetite at the moment.")) + return TRUE + + to_chat(src, SPAN_NOTICE("You dig into the guts of \the [M], hunting for the sweetest meat.")) + set_AI_busy(TRUE) + if(do_after(src, 2 SECONDS, M) && !QDELETED(M) && length(M.internal_organs)) + var/obj/item/organ = M.rip_out_internal_organ(check_zone(zone_sel?.selecting), damage_descriptor = "animal teeth") + if(organ) + visible_message(SPAN_DANGER("\The [src] rips \the [organ] out of \the [M] and devours [organ.gender == PLURAL ? "them" : "it"]!")) + eat_food_item(organ) + if(!length(M.internal_organs) && M.gib_on_butchery) + M.gib() + set_AI_busy(FALSE) + return TRUE + return ..() + +/mob/living/simple_mob/animal/proc/eat_food_item(var/obj/item/snack, var/override_bitesize, var/silent) + + if(istype(snack, /obj/item/organ)) + var/obj/item/organ/organ = snack + if(organ.meat_type) + snack = new organ.meat_type(src) + qdel(organ) + else if(!istype(snack) || !snack.reagents?.total_volume) + to_chat(src, SPAN_WARNING("\The [snack] doesn't seem edible.")) + return + + if(!silent) + visible_message("\The [src] nibbles away at \the [snack].") + playsound(src, 'sound/items/eatfood.ogg', rand(10,50), 1) + + if(snack.reagents?.total_volume) + var/use_bitesize = max(override_bitesize, bitesize) + var/removing_reagents = clamp(use_bitesize, 0, min(max(0, reagents?.maximum_volume - reagents?.total_volume), snack.reagents.total_volume)) + if(reagents && removing_reagents) + snack.reagents.trans_to_holder(reagents, removing_reagents) + else + snack.reagents.trans_to_mob(src, use_bitesize, CHEM_INGEST) + + // If there's some left, drop it onto the ground. + if(snack.reagents?.total_volume > 0) + snack.dropInto(loc) + else + snack.animal_consumed(src) + +/mob/living/simple_mob/animal/proc/get_dietary_food_modifier(var/datum/reagent/nutriment/food) + return 1 +>>>>>>> 5ce4801b708... Merge pull request #8894 from MistakeNot4892/flavour From fa3bee34964a1b097c0b4ba4a8f26007e2c0e2c2 Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Fri, 27 Jan 2023 18:22:01 +1000 Subject: [PATCH 2/4] Delete _animal_harness.dm --- .../subtypes/animal/_animal_harness.dm | 178 ------------------ 1 file changed, 178 deletions(-) delete mode 100644 code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm b/code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm deleted file mode 100644 index 856055b7f79..00000000000 --- a/code/modules/mob/living/simple_mob/subtypes/animal/_animal_harness.dm +++ /dev/null @@ -1,178 +0,0 @@ -/obj/item/storage/internal/animal_harness - abstract_type = /obj/item/storage/internal/animal_harness - name = "animal harness" - color = COLOR_BEASTY_BROWN - max_w_class = ITEMSIZE_LARGE - max_storage_space = INVENTORY_STANDARD_SPACE - - /// Null, or a list of (/obj/item/foo = "item key"), or (/path = ("item key", proc/handler)). - var/list/attachable_types - - /// Null, or a list of ("item key" = null|Instance) - var/list/attached_items - - /// The time it takes for the wearer to adjust this harness' attachments. - var/self_attach_delay = 5 SECONDS - - /// The time it takes for someone else to adjust this harness' attachments. - var/other_attach_delay = 3 SECONDS - - -/obj/item/storage/internal/animal_harness/Destroy() - var/mob/living/simple_mob/animal/wearer = loc - if (istype(wearer) && wearer.harness == src) - wearer.harness = null - for (var/key in attached_items) - var/obj/item/item = attached_items[key] - qdel(item) - LAZYCLEARLIST(attached_items) - attachable_types = null - return ..() - - -/obj/item/storage/internal/animal_harness/Initialize() - . = ..() - if (!attachable_types) - return - attached_items = list() - for (var/path in attachable_types) - var/key = attachable_types[path] - attached_items[key] = null - CreateAttachments() - - -/obj/item/storage/internal/animal_harness/LateInitializeName() - return - - -/obj/item/storage/internal/animal_harness/attackby(obj/item/item, mob/living/user, silent) - . = TRUE - if (user == loc) // Animals can only shove stuff in their storage. - return ..() - for (var/path in attachable_types) - if (!istype(item, path)) - continue - var/key = attachable_types[path] - var/handler - if (islist(key)) - handler = key[2] - key = key[1] - if (attached_items[key]) - if (!silent) - var/datum/gender/gender - if (ismob(loc)) - var/mob/living/simple_mob/animal/owner = loc - gender = gender_datums[owner.get_visible_gender()] - to_chat(user, SPAN_WARNING("\The [loc] already has \a [key] attached to [gender ? gender.his : "its"] harness.")) - return - if (!user.unEquip(item, target = loc)) - return - if (!silent) - user.visible_message(SPAN_NOTICE("\The [user] attaches \the [item] to \the [loc]'s harness.")) - attached_items[key] = item - if (handler) - call(src, handler)(item) - return - return ..() - - -/obj/item/storage/internal/animal_harness/proc/GetAttachedKeys() - var/list/obj/item/result = list() - for (var/key in attached_items) - if (attached_items[key]) - result += key - return result - - -/obj/item/storage/internal/animal_harness/proc/GetAttachedItems() - var/list/obj/item/result = list() - for (var/key in attached_items) - var/obj/item/item = attached_items[key] - if (item) - result += item - return result - - -/obj/item/storage/internal/animal_harness/proc/RemoveAttachment(obj/item/attachment) - if (istext(attachment)) - var/obj/item/item = attached_items[attachment] - if (!item) - return - item.dropInto(get_turf(src)) - attached_items[attachment] = null - return item - for (var/key in attached_items) - if (attached_items[key] == attachment) - attachment.dropInto(get_turf(src)) - attached_items[key] = null - return attachment - - -/obj/item/storage/internal/animal_harness/proc/CreateAttachments() - return - - -/mob/living/simple_mob/animal - var/obj/item/storage/internal/animal_harness/harness - - -/mob/living/simple_mob/animal/Destroy() - if (istype(harness)) - QDEL_NULL(harness) - return ..() - - -/mob/living/simple_mob/animal/Initialize() - . = ..() - if (ispath(harness)) - harness = new harness (src) - verbs += /mob/living/simple_mob/animal/proc/RemoveAttachmentVerb - - -/mob/living/simple_mob/animal/examine(mob/living/user) - . = ..() - if (harness) - . += "\The [src] is wearing \a [harness]." - for (var/obj/item/item in harness.GetAttachedItems()) - . += "There is \a [item] attached." - -/mob/living/simple_mob/animal/proc/RemoveAttachmentVerb() - set name = "Remove Harness Attachment" - set category = "IC" - set src in view(1) - var/mob/living/user = usr - if (!istype(user)) - return - if (!Adjacent(user) || user.incapacitated()) - to_chat(user, SPAN_WARNING("You are in no condition to do that.")) - return - if (!user.check_dexterity(MOB_DEXTERITY_SIMPLE_MACHINES)) - return - var/list/attached = harness.GetAttachedKeys() - var/datum/gender/gender = gender_datums[get_visible_gender()] - if (!length(attached)) - to_chat(user, SPAN_WARNING("\The [src] has nothing attached to [gender.his] [harness.name].")) - return - var/obj/item/response = input(user, "Select attachment to remove:") as null | anything in attached - if (!response) - return - if (!(response in harness.GetAttachedKeys())) - to_chat(user, SPAN_WARNING("\The [response] is already missing from \the [harness].")) - return - if (!Adjacent(user) || user.incapacitated()) - to_chat(user, SPAN_WARNING("You are in no condition to do that.")) - return - user.visible_message( - SPAN_ITALIC("\The [user] begins to remove \a [response] from [(user == src) ? "[gender.his]" : "\the [src]'s"] harness."), - SPAN_ITALIC("You begin to remove \the [response] from [(user == src) ? "your" : "\the [src]'s"] harness."), - range = 5 - ) - if (!do_after(user, (user == src) ? harness.self_attach_delay : harness.other_attach_delay, loc)) - return - if (QDELETED(harness)) - return - if (!(response in harness.GetAttachedKeys())) - to_chat(user, SPAN_WARNING("\The [response] is already missing from \the [src].")) - return - var/obj/item/removed = harness.RemoveAttachment(response) - user.put_in_hands(removed) From a19362108e71abbf5d3e33b7812ac4d4e046ca04 Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Fri, 27 Jan 2023 18:23:13 +1000 Subject: [PATCH 3/4] Update animal.dm --- .../simple_mob/subtypes/animal/animal.dm | 90 ------------------- 1 file changed, 90 deletions(-) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm b/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm index 9da9ae3a0d8..6ef2c176f57 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm @@ -24,9 +24,6 @@ ) /decl/mob_organ_names/quadruped //Most subtypes have this basic body layout. -<<<<<<< HEAD - hit_zones = list("head", "torso", "left foreleg", "right foreleg", "left hind leg", "right hind leg", "tail") -======= hit_zones = list("head", "torso", "left foreleg", "right foreleg", "left hind leg", "right hind leg", "tail") /mob/living/simple_mob/animal/get_examine_desc() @@ -41,90 +38,3 @@ if(length(new_flavour_text) && !QDELETED(src)) flavor_text = new_flavour_text to_chat(src, SPAN_NOTICE("Your flavour text has been updated.")) - -/mob/living/simple_mob/animal/leaves_tracks_type() - return tracks_type - -/mob/living/simple_mob/animal/proc/has_appetite() - return TRUE - -/mob/living/simple_mob/animal/proc/add_nutrition(var/amt) - nutrition = clamp(nutrition + amt, 0, max_nutrition) - -/mob/living/simple_mob/animal/proc/remove_nutrition(var/amt) - nutrition = clamp(nutrition - amt, 0, max_nutrition) - -/mob/living/simple_mob/animal/get_snow_footprint_state() - if(!hovering) - return "snow_animalprints" - -/mob/living/simple_mob/animal/do_interaction(var/atom/A) - - // Can we do some critter interaction? - var/static/list/atom_types_with_animal_interactions = list( - /obj/structure/animal_den, - /obj/structure/flora, - /turf/simulated/floor/outdoors, - /obj/item/organ, - /obj/item/reagent_containers/food, - /obj/machinery/door - ) - for(var/checktype in atom_types_with_animal_interactions) - if(istype(A, checktype)) - A.attack_generic(src, 0, "investigates") - return TRUE - - // Can we eat a dead guy? - if(scavenger && isliving(A) && a_intent == I_HURT) - var/mob/living/M = A - if(M.stat == DEAD && length(M.internal_organs)) - - if(!has_appetite()) - to_chat(src, SPAN_WARNING("You don't have much of an appetite at the moment.")) - return TRUE - - to_chat(src, SPAN_NOTICE("You dig into the guts of \the [M], hunting for the sweetest meat.")) - set_AI_busy(TRUE) - if(do_after(src, 2 SECONDS, M) && !QDELETED(M) && length(M.internal_organs)) - var/obj/item/organ = M.rip_out_internal_organ(check_zone(zone_sel?.selecting), damage_descriptor = "animal teeth") - if(organ) - visible_message(SPAN_DANGER("\The [src] rips \the [organ] out of \the [M] and devours [organ.gender == PLURAL ? "them" : "it"]!")) - eat_food_item(organ) - if(!length(M.internal_organs) && M.gib_on_butchery) - M.gib() - set_AI_busy(FALSE) - return TRUE - return ..() - -/mob/living/simple_mob/animal/proc/eat_food_item(var/obj/item/snack, var/override_bitesize, var/silent) - - if(istype(snack, /obj/item/organ)) - var/obj/item/organ/organ = snack - if(organ.meat_type) - snack = new organ.meat_type(src) - qdel(organ) - else if(!istype(snack) || !snack.reagents?.total_volume) - to_chat(src, SPAN_WARNING("\The [snack] doesn't seem edible.")) - return - - if(!silent) - visible_message("\The [src] nibbles away at \the [snack].") - playsound(src, 'sound/items/eatfood.ogg', rand(10,50), 1) - - if(snack.reagents?.total_volume) - var/use_bitesize = max(override_bitesize, bitesize) - var/removing_reagents = clamp(use_bitesize, 0, min(max(0, reagents?.maximum_volume - reagents?.total_volume), snack.reagents.total_volume)) - if(reagents && removing_reagents) - snack.reagents.trans_to_holder(reagents, removing_reagents) - else - snack.reagents.trans_to_mob(src, use_bitesize, CHEM_INGEST) - - // If there's some left, drop it onto the ground. - if(snack.reagents?.total_volume > 0) - snack.dropInto(loc) - else - snack.animal_consumed(src) - -/mob/living/simple_mob/animal/proc/get_dietary_food_modifier(var/datum/reagent/nutriment/food) - return 1 ->>>>>>> 5ce4801b708... Merge pull request #8894 from MistakeNot4892/flavour From f8e75bfab284be637636231ba54348e411131816 Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Fri, 27 Jan 2023 18:27:18 +1000 Subject: [PATCH 4/4] Update atoms.dm --- code/game/atoms.dm | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index f54372630b1..e2993681208 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -211,16 +211,12 @@ found += A.search_contents_for(path,filter_path) return found -<<<<<<< HEAD -//All atoms -/atom/proc/examine(mob/user, var/infix = "", var/suffix = "") - //This reformat names to get a/an properly working on item descriptions when they are bloody -======= /atom/proc/get_examine_desc() return desc -/atom/proc/examine(mob/user, infix = "", suffix = "") ->>>>>>> 5ce4801b708... Merge pull request #8894 from MistakeNot4892/flavour +//All atoms +/atom/proc/examine(mob/user, var/infix = "", var/suffix = "") + //This reformat names to get a/an properly working on item descriptions when they are bloody var/f_name = "\a [src][infix]." if(src.blood_DNA && !istype(src, /obj/effect/decal)) if(gender == PLURAL) @@ -231,34 +227,14 @@ f_name += "blood-stained [name][infix]!" else f_name += "oil-stained [name][infix]." -<<<<<<< HEAD - var/list/output = list("\icon[src.examine_icon()][bicon(src)] That's [f_name] [suffix]", desc) + var/list/output = list("\icon[src.examine_icon()][bicon(src)] That's [f_name] [suffix]", get_examine_desc()) if(user.client?.prefs.examine_text_mode == EXAMINE_MODE_INCLUDE_USAGE) output += description_info if(user.client?.prefs.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL) user.client.statpanel = "Examine" // Switch to stat panel - -======= - var/list/output = list("[bicon(src)] That's [f_name] [suffix]", get_examine_desc()) - if (user.client?.prefs.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL) - user.client.statpanel = "Examine" - else if (user.client) - var/list/extras = list() - if (user.client.prefs.examine_text_mode == EXAMINE_MODE_INCLUDE_USAGE) - if (description_info) - output += description_info - else if (description_info) - extras += SPAN_NOTICE("usage") - if (description_fluff) - extras += SPAN_GOOD("lore") - if (description_antag && (isobserver(user) || player_is_antag(user.mind))) - extras += SPAN_WARNING("antag") - if (length(extras)) - output += "Extra [english_list(extras)] information is available: [CreateAtomTopic(@"[Show Examine]", user, ATOM_TOPIC_EXAMINE)]" ->>>>>>> 5ce4801b708... Merge pull request #8894 from MistakeNot4892/flavour SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, output) return output