Merge pull request #6180 from Citadel-Station-13/upstream-merge-36781
[MIRROR] Get_Flat_Human_Icon no longer draws asses that nobody wants
This commit is contained in:
+6
-21
@@ -1041,7 +1041,7 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
//For creating consistent icons for human looking simple animals
|
//For creating consistent icons for human looking simple animals
|
||||||
/proc/get_flat_human_icon(icon_id, datum/job/J, datum/preferences/prefs, dummy_key)
|
/proc/get_flat_human_icon(icon_id, datum/job/J, datum/preferences/prefs, dummy_key, showDirs = GLOB.cardinals)
|
||||||
var/static/list/humanoid_icon_cache = list()
|
var/static/list/humanoid_icon_cache = list()
|
||||||
if(!icon_id || !humanoid_icon_cache[icon_id])
|
if(!icon_id || !humanoid_icon_cache[icon_id])
|
||||||
var/mob/living/carbon/human/dummy/body = generate_or_wait_for_human_dummy(dummy_key)
|
var/mob/living/carbon/human/dummy/body = generate_or_wait_for_human_dummy(dummy_key)
|
||||||
@@ -1053,26 +1053,11 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)
|
|||||||
|
|
||||||
|
|
||||||
var/icon/out_icon = icon('icons/effects/effects.dmi', "nothing")
|
var/icon/out_icon = icon('icons/effects/effects.dmi', "nothing")
|
||||||
|
for(var/D in showDirs)
|
||||||
body.setDir(NORTH)
|
body.setDir(D)
|
||||||
COMPILE_OVERLAYS(body)
|
COMPILE_OVERLAYS(body)
|
||||||
var/icon/partial = getFlatIcon(body)
|
var/icon/partial = getFlatIcon(body)
|
||||||
out_icon.Insert(partial,dir=NORTH)
|
out_icon.Insert(partial,dir=D)
|
||||||
|
|
||||||
body.setDir(SOUTH)
|
|
||||||
COMPILE_OVERLAYS(body)
|
|
||||||
partial = getFlatIcon(body)
|
|
||||||
out_icon.Insert(partial,dir=SOUTH)
|
|
||||||
|
|
||||||
body.setDir(WEST)
|
|
||||||
COMPILE_OVERLAYS(body)
|
|
||||||
partial = getFlatIcon(body)
|
|
||||||
out_icon.Insert(partial,dir=WEST)
|
|
||||||
|
|
||||||
body.setDir(EAST)
|
|
||||||
COMPILE_OVERLAYS(body)
|
|
||||||
partial = getFlatIcon(body)
|
|
||||||
out_icon.Insert(partial,dir=EAST)
|
|
||||||
|
|
||||||
humanoid_icon_cache[icon_id] = out_icon
|
humanoid_icon_cache[icon_id] = out_icon
|
||||||
dummy_key? unset_busy_human_dummy(dummy_key) : qdel(body)
|
dummy_key? unset_busy_human_dummy(dummy_key) : qdel(body)
|
||||||
|
|||||||
@@ -199,6 +199,7 @@
|
|||||||
|
|
||||||
/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H, client/C)
|
/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H, client/C)
|
||||||
set waitfor = FALSE
|
set waitfor = FALSE
|
||||||
|
var/static/list/show_directions = list(SOUTH, WEST)
|
||||||
if(H.mind && (H.mind.assigned_role != H.mind.special_role))
|
if(H.mind && (H.mind.assigned_role != H.mind.special_role))
|
||||||
var/assignment
|
var/assignment
|
||||||
if(H.mind.assigned_role)
|
if(H.mind.assigned_role)
|
||||||
@@ -212,11 +213,14 @@
|
|||||||
var/id = num2hex(record_id_num++,6)
|
var/id = num2hex(record_id_num++,6)
|
||||||
if(!C)
|
if(!C)
|
||||||
C = H.client
|
C = H.client
|
||||||
var/image = get_id_photo(H, C)
|
var/image = get_id_photo(H, C, show_directions)
|
||||||
var/obj/item/photo/photo_front = new()
|
var/obj/item/photo/photo_front = new()
|
||||||
var/obj/item/photo/photo_side = new()
|
var/obj/item/photo/photo_side = new()
|
||||||
photo_front.photocreate(null, icon(image, dir = SOUTH))
|
for(var/D in show_directions)
|
||||||
photo_side.photocreate(null, icon(image, dir = WEST))
|
if(D == SOUTH)
|
||||||
|
photo_front.photocreate(null, icon(image, dir = D))
|
||||||
|
if(D == WEST || D == EAST)
|
||||||
|
photo_side.photocreate(null, icon(image, dir = D))
|
||||||
|
|
||||||
//These records should ~really~ be merged or something
|
//These records should ~really~ be merged or something
|
||||||
//General Record
|
//General Record
|
||||||
@@ -279,11 +283,11 @@
|
|||||||
locked += L
|
locked += L
|
||||||
return
|
return
|
||||||
|
|
||||||
/datum/datacore/proc/get_id_photo(mob/living/carbon/human/H, client/C)
|
/datum/datacore/proc/get_id_photo(mob/living/carbon/human/H, client/C, show_directions = list(SOUTH))
|
||||||
var/datum/job/J = SSjob.GetJob(H.mind.assigned_role)
|
var/datum/job/J = SSjob.GetJob(H.mind.assigned_role)
|
||||||
var/datum/preferences/P
|
var/datum/preferences/P
|
||||||
if(!C)
|
if(!C)
|
||||||
C = H.client
|
C = H.client
|
||||||
if(C)
|
if(C)
|
||||||
P = C.prefs
|
P = C.prefs
|
||||||
return get_flat_human_icon(null, J, P, DUMMY_HUMAN_SLOT_MANIFEST)
|
return get_flat_human_icon(null, J, P, DUMMY_HUMAN_SLOT_MANIFEST, show_directions)
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
|
|
||||||
var/datum/job/sacjob = SSjob.GetJob(sac_objective.target.assigned_role)
|
var/datum/job/sacjob = SSjob.GetJob(sac_objective.target.assigned_role)
|
||||||
var/datum/preferences/sacface = sac_objective.target.current.client.prefs
|
var/datum/preferences/sacface = sac_objective.target.current.client.prefs
|
||||||
var/icon/reshape = get_flat_human_icon(null, sacjob, sacface)
|
var/icon/reshape = get_flat_human_icon(null, sacjob, sacface, list(SOUTH))
|
||||||
reshape.Shift(SOUTH, 4)
|
reshape.Shift(SOUTH, 4)
|
||||||
reshape.Shift(EAST, 1)
|
reshape.Shift(EAST, 1)
|
||||||
reshape.Crop(7,4,26,31)
|
reshape.Crop(7,4,26,31)
|
||||||
|
|||||||
Reference in New Issue
Block a user