|
73 | 73 | /// Registered owner's blood type.
|
74 | 74 | var/blood_type = "UNSET"
|
75 | 75 | // Images to store in the ID, based on the datacore.
|
76 |
| - var/icon/front_image |
77 |
| - var/icon/side_image |
| 76 | + var/mutable_appearance/front_image |
| 77 | + var/mutable_appearance/side_image |
78 | 78 |
|
79 | 79 | /// The job name registered on the card (for example: Assistant). Set by trim usually.
|
80 | 80 | var/assignment
|
|
473 | 473 | content += "Fingerprint: [fingerprint]<br>"
|
474 | 474 | content += "DNA Hash: [dna_hash]<br>"
|
475 | 475 | if(front_image && side_image)
|
476 |
| - content +="<td style='text-align:center; vertical-align:top'>Photo:<br><img src=front.png height=128 width=128 border=4 style='image-rendering: pixelated;-ms-interpolation-mode: nearest-neighbor'><img src=side.png height=128 width=128 border=4 style='image-rendering: pixelated;-ms-interpolation-mode: nearest-neighbor'></td>" |
| 476 | + content +="<td style='text-align:center; vertical-align:top'>Photo:<br><img src=\ref[front_image.appearance] height=128 width=128 border=4 style='image-rendering: pixelated;-ms-interpolation-mode: nearest-neighbor'><img src=\ref[side_image.appearance] height=128 width=128 border=4 style='image-rendering: pixelated;-ms-interpolation-mode: nearest-neighbor'></td>" |
477 | 477 | content += "</tr></table>"
|
478 | 478 | content = jointext(content, null)
|
479 | 479 |
|
480 |
| - if(front_image && side_image) |
481 |
| - user << browse_rsc(front_image, "front.png") |
482 |
| - user << browse_rsc(side_image, "side.png") |
483 |
| - |
484 | 480 | var/datum/browser/popup = new(user, "idcard", name, 660, 270)
|
485 | 481 | popup.set_content(content)
|
486 | 482 | popup.open()
|
|
534 | 530 |
|
535 | 531 | /// Sets the UI icon of the ID to their datacore entry, or their current appearance if no record is found.
|
536 | 532 | /obj/item/card/id/proc/set_icon(datum/data/record/R, mutable_appearance/mob_appearance)
|
537 |
| - set waitfor = FALSE |
538 | 533 | if(ismob(mob_appearance))
|
539 | 534 | mob_appearance = new(mob_appearance)
|
540 | 535 |
|
541 |
| - CHECK_TICK //Lots of GFI calls happen at once during roundstart, stagger them out a bit |
542 | 536 | if(R)
|
543 |
| - var/obj/item/photo/side = R.get_side_photo() |
544 |
| - CHECK_TICK |
545 |
| - var/obj/item/photo/front = R.get_front_photo() |
| 537 | + side_image = new(R.fields["character_appearance"]) |
| 538 | + side_image.dir = WEST |
| 539 | + front_image = new(side_image) |
| 540 | + front_image.dir = SOUTH |
546 | 541 |
|
547 |
| - side_image = side.picture.picture_image |
548 |
| - front_image = front.picture.picture_image |
549 | 542 | else
|
550 | 543 | if(!mob_appearance)
|
551 | 544 | var/mob/M = src
|
|
554 | 547 | if(!M)
|
555 | 548 | return
|
556 | 549 | mob_appearance = new(M)
|
557 |
| - front_image = getFlatIcon(mob_appearance, WEST) |
558 |
| - CHECK_TICK |
559 |
| - side_image = getFlatIcon(mob_appearance, SOUTH) |
| 550 | + |
| 551 | + remove_non_canon_overlays(mob_appearance) |
| 552 | + |
| 553 | + mob_appearance.dir = SOUTH |
| 554 | + front_image = mob_appearance |
| 555 | + |
| 556 | + side_image = new(front_image) |
| 557 | + side_image.dir = WEST |
560 | 558 |
|
561 | 559 | /// Returns the trim assignment name.
|
562 | 560 | /obj/item/card/id/proc/get_trim_assignment()
|
|
0 commit comments