|
528 | 528 | /mob/living/proc/on_lying_down(new_lying_angle)
|
529 | 529 | if(layer == initial(layer)) //to avoid things like hiding larvas.
|
530 | 530 | layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
|
| 531 | + |
531 | 532 | ADD_TRAIT(src, TRAIT_UI_BLOCKED, LYING_DOWN_TRAIT)
|
532 | 533 | ADD_TRAIT(src, TRAIT_PULL_BLOCKED, LYING_DOWN_TRAIT)
|
| 534 | + |
533 | 535 | set_density(FALSE) // We lose density and stop bumping passable dense things.
|
| 536 | + |
534 | 537 | if(HAS_TRAIT(src, TRAIT_FLOORED) && !(dir & (NORTH|SOUTH)))
|
535 | 538 | setDir(pick(NORTH, SOUTH)) // We are and look helpless.
|
| 539 | + |
536 | 540 | body_position_pixel_y_offset = PIXEL_Y_OFFSET_LYING
|
537 |
| - playsound(loc, 'goon/sounds/body_thud.ogg', ishuman(src) ? 40 : 15, 1, 0.3) |
538 | 541 |
|
| 542 | + playsound(loc, 'goon/sounds/body_thud.ogg', ishuman(src) ? 40 : 15, 1, 0.3) |
| 543 | + throw_alert("lying_down", /atom/movable/screen/alert/lying_down) |
539 | 544 |
|
540 | 545 | /// Proc to append behavior related to lying down.
|
541 | 546 | /mob/living/proc/on_standing_up()
|
542 | 547 | if(layer == LYING_MOB_LAYER)
|
543 | 548 | layer = initial(layer)
|
| 549 | + |
544 | 550 | set_density(initial(density)) // We were prone before, so we become dense and things can bump into us again.
|
| 551 | + |
545 | 552 | REMOVE_TRAIT(src, TRAIT_UI_BLOCKED, LYING_DOWN_TRAIT)
|
546 | 553 | REMOVE_TRAIT(src, TRAIT_PULL_BLOCKED, LYING_DOWN_TRAIT)
|
547 |
| - body_position_pixel_y_offset = 0 |
548 | 554 |
|
| 555 | + body_position_pixel_y_offset = 0 |
549 | 556 |
|
| 557 | + clear_alert("lying_down") |
550 | 558 |
|
551 | 559 | //Recursive function to find everything a mob is holding. Really shitty proc tbh.
|
552 | 560 | /mob/living/get_contents()
|
|
0 commit comments