|
267 | 267 | drop_limb(FALSE, TRUE)
|
268 | 268 | stack_trace("Bodypart moved while it still had an owner")
|
269 | 269 |
|
270 |
| -/obj/item/bodypart/examine(mob/user) |
271 |
| - SHOULD_CALL_PARENT(TRUE) |
272 |
| - . = ..() |
273 |
| - . += mob_examine() |
274 |
| - |
275 |
| -/obj/item/bodypart/proc/mob_examine(hallucinating, covered, just_wounds_please) |
276 |
| - . = list() |
277 |
| - |
278 |
| - if(covered) |
279 |
| - for(var/obj/item/I in embedded_objects) |
280 |
| - if(I.isEmbedHarmless()) |
281 |
| - . += "<a href='?src=[REF(src)];embedded_object=[REF(I)]' class='danger'>There is \a [I] stuck to [owner.p_their()] [plaintext_zone]!</a>" |
282 |
| - else |
283 |
| - . += "<a href='?src=[REF(src)];embedded_object=[REF(I)]' class='danger'>There is \a [I] embedded in [owner.p_their()] [plaintext_zone]!</a>" |
284 |
| - |
285 |
| - if(splint && istype(splint, /obj/item/stack)) |
286 |
| - . += span_notice("\t <a href='?src=[REF(src)];splint_remove=1' class='notice'>[owner.p_their(TRUE)] [plaintext_zone] is splinted with [splint].</a>") |
287 |
| - |
288 |
| - if(bandage) |
289 |
| - . += span_notice("\t <a href='?src=[REF(src)];bandage_remove=1' class='[bandage.absorption_capacity ? "notice" : "warning"]'>[owner.p_their(TRUE)] [plaintext_zone] is bandaged with [bandage][bandage.absorption_capacity ? "." : ", blood is trickling out."]</a>") |
290 |
| - return |
291 |
| - |
292 |
| - if(hallucinating == SCREWYHUD_HEALTHY) |
293 |
| - return |
294 |
| - |
295 |
| - if(hallucinating == SCREWYHUD_CRIT) |
296 |
| - var/list/flavor_text = list("a") |
297 |
| - flavor_text += pick(" pair of ", " ton of ", " several ") |
298 |
| - flavor_text += pick("large cuts", "severe burns") |
299 |
| - . += "[owner.p_they(TRUE)] [owner.p_have()] [english_list(flavor_text)] on [owner.p_their()] [plaintext_zone]." |
300 |
| - return |
301 |
| - |
302 |
| - var/list/flavor_text = list() |
303 |
| - if((bodypart_flags & BP_CUT_AWAY) && !is_stump) |
304 |
| - flavor_text += "a tear at the [amputation_point] so severe that it hangs by a scrap of flesh" |
305 |
| - |
306 |
| - if(!IS_ORGANIC_LIMB(src)) |
307 |
| - if(brute_dam) |
308 |
| - switch(brute_dam) |
309 |
| - if(0 to 20) |
310 |
| - flavor_text += "some dents" |
311 |
| - if(21 to INFINITY) |
312 |
| - flavor_text += pick("a lot of dents","severe denting") |
313 |
| - if(burn_dam) |
314 |
| - switch(burn_dam) |
315 |
| - if(0 to 20) |
316 |
| - flavor_text += "some burns" |
317 |
| - if(21 to INFINITY) |
318 |
| - flavor_text += pick("a lot of burns","severe melting") |
319 |
| - else |
320 |
| - var/list/wound_descriptors = list() |
321 |
| - for(var/datum/wound/W as anything in wounds) |
322 |
| - var/descriptor = W.get_examine_desc() |
323 |
| - if(descriptor) |
324 |
| - wound_descriptors[descriptor] += W.amount |
325 |
| - |
326 |
| - if(how_open() >= SURGERY_RETRACTED) |
327 |
| - var/bone = encased ? encased : "bone" |
328 |
| - if(bodypart_flags & BP_BROKEN_BONES) |
329 |
| - bone = "broken [bone]" |
330 |
| - wound_descriptors["[bone] exposed"] = 1 |
331 |
| - |
332 |
| - if(!encased || how_open() >= SURGERY_DEENCASED) |
333 |
| - var/list/bits = list() |
334 |
| - for(var/obj/item/organ/organ in contained_organs) |
335 |
| - if(organ.cosmetic_only) |
336 |
| - continue |
337 |
| - bits += organ.get_visible_state() |
338 |
| - |
339 |
| - for(var/obj/item/implant in cavity_items) |
340 |
| - bits += implant.name |
341 |
| - if(length(bits)) |
342 |
| - wound_descriptors["[english_list(bits)] visible in the wounds"] = 1 |
343 |
| - |
344 |
| - for(var/wound in wound_descriptors) |
345 |
| - switch(wound_descriptors[wound]) |
346 |
| - if(1) |
347 |
| - flavor_text += "a [wound]" |
348 |
| - if(2) |
349 |
| - flavor_text += "a pair of [wound]s" |
350 |
| - if(3 to 5) |
351 |
| - flavor_text += "several [wound]s" |
352 |
| - if(6 to INFINITY) |
353 |
| - flavor_text += "a ton of [wound]\s" |
354 |
| - |
355 |
| - if(just_wounds_please) |
356 |
| - return english_list(flavor_text) |
357 |
| - |
358 |
| - if(owner) |
359 |
| - if(current_damage) |
360 |
| - . += "[owner.p_they(TRUE)] [owner.p_have()] [english_list(flavor_text)] on [owner.p_their()] [plaintext_zone]." |
361 |
| - |
362 |
| - for(var/obj/item/I in embedded_objects) |
363 |
| - if(I.isEmbedHarmless()) |
364 |
| - . += "\t <a href='?src=[REF(src)];embedded_object=[REF(I)]' class='warning'>There is \a [I] stuck to [owner.p_their()] [plaintext_zone]!</a>" |
365 |
| - else |
366 |
| - . += "\t <a href='?src=[REF(src)];embedded_object=[REF(I)]' class='warning'>There is \a [I] embedded in [owner.p_their()] [plaintext_zone]!</a>" |
367 |
| - |
368 |
| - if(splint && istype(splint, /obj/item/stack)) |
369 |
| - . += span_notice("\t <a href='?src=[REF(src)];splint_remove=1' class='warning'>[owner.p_their(TRUE)] [plaintext_zone] is splinted with [splint].</a>") |
370 |
| - if(bandage) |
371 |
| - . += span_notice("\n\t <a href='?src=[REF(src)];bandage_remove=1' class='notice'>[owner.p_their(TRUE)] [plaintext_zone] is bandaged with [bandage][bandage.absorption_capacity ? "." : ", <span class='warning'>it is no longer absorbing blood</span>."]</a>") |
372 |
| - return |
373 |
| - |
374 |
| - else |
375 |
| - if(current_damage) |
376 |
| - . += "It has [english_list(flavor_text)]." |
377 |
| - if(bodypart_flags & BP_BROKEN_BONES) |
378 |
| - . += span_warning("It is dented and swollen.") |
379 |
| - return |
380 |
| - |
381 | 270 | /obj/item/bodypart/blob_act()
|
382 | 271 | receive_damage(max_damage)
|
383 | 272 |
|
|
491 | 380 |
|
492 | 381 | if(!IS_ORGANIC_LIMB(src)) //Robotic limbs don't heal or get worse.
|
493 | 382 | for(var/datum/wound/W as anything in wounds) //Repaired wounds disappear though
|
494 |
| - if(W.damage <= 0) //and they disappear right away |
| 383 | + if(W.damage <= 0) |
495 | 384 | qdel(W)
|
496 | 385 | return
|
497 | 386 |
|
498 | 387 | for(var/datum/wound/W as anything in wounds)
|
499 | 388 | // wounds can disappear after 10 minutes at the earliest
|
500 |
| - if(W.damage <= 0 && W.created + (10 MINUTES) <= world.time) |
| 389 | + if(W.damage <= 0 && (W.scar_expiration <= world.time)) |
501 | 390 | qdel(W)
|
502 |
| - stack_trace("Wound with zero health collected") |
503 | 391 | continue
|
504 |
| - // let the GC handle the deletion of the wound |
505 | 392 |
|
506 | 393 | // slow healing
|
507 | 394 | var/heal_amt = 0
|
|
608 | 495 | /*
|
609 | 496 | // START WOUND HANDLING
|
610 | 497 | */
|
| 498 | + |
611 | 499 | // If the limbs can break, make sure we don't exceed the maximum damage a limb can take before breaking
|
612 |
| - var/block_cut = (pure_brute < 10) || !IS_ORGANIC_LIMB(src) |
| 500 | + var/block_cut = (pure_brute < 6) || !IS_ORGANIC_LIMB(src) |
613 | 501 | var/can_cut = !block_cut && ((sharpness) || prob(brute))
|
614 | 502 | if(brute)
|
615 | 503 | var/to_create = WOUND_BRUISE
|
|
779 | 667 |
|
780 | 668 | //update damage counts
|
781 | 669 | for(var/datum/wound/W as anything in wounds)
|
782 |
| - if(W.damage <= 0) |
| 670 | + if(W.damage <= 0 && (W.scar_expiration <= world.time)) |
783 | 671 | qdel(W)
|
784 | 672 | continue
|
785 | 673 |
|
|
1453 | 1341 |
|
1454 | 1342 | user.visible_message(span_notice("[user] starts inspecting [owner]'s [plaintext_zone] carefully."))
|
1455 | 1343 | if(LAZYLEN(wounds))
|
1456 |
| - to_chat(user, span_warning("You find [mob_examine(just_wounds_please = TRUE)].")) |
| 1344 | + to_chat(user, span_warning("You find the following:")) |
| 1345 | + for(var/wound_desc in get_wound_descriptions()) |
| 1346 | + to_chat(user, wound_desc) |
| 1347 | + |
1457 | 1348 | var/list/stuff = list()
|
1458 | 1349 | for(var/datum/wound/wound as anything in wounds)
|
1459 | 1350 | if(LAZYLEN(wound.embedded_objects))
|
|
0 commit comments