|
320 | 320 | var/list/additional = render_additional(M, icon_used, state_used, layer_used, dim_x, dim_y, align_y, bodytype, inhands, slot_meta) |
321 | 321 | // todo: signal with (args, add) |
322 | 322 | // todo: args' indices should be defines |
323 | | - var/no_render = inhands? (worn_render_flags & WORN_RENDER_INHAND_NO_RENDER) : ((worn_render_flags & WORN_RENDER_SLOT_NO_RENDER) || CHECK_BODYTYPE(worn_bodytypes_invisible, bodytype)) |
| 323 | + var/no_render = inhands? (worn_render_flags & WORN_RENDER_INHAND_NO_RENDER) : ((worn_render_flags & WORN_RENDER_SLOT_NO_RENDER) || worn_bodytypes_invisible?.contains(bodytype)) |
324 | 324 | var/mutable_appearance/MA |
325 | 325 | // worn_state_guard makes us not render if we'd render the same as in-inventory icon. |
326 | 326 | if(no_render) // don't bother |
|
423 | 423 | //* inventory slot defaults |
424 | 424 | else if(inhands? (worn_render_flags & WORN_RENDER_INHAND_ALLOW_DEFAULT) : (worn_render_flags & WORN_RENDER_SLOT_ALLOW_DEFAULT)) |
425 | 425 | var/list/resolved = slot_meta.resolve_default_assets(bodytype, data[WORN_DATA_STATE], M, src, inhand_default_type) |
426 | | - if(!resolved && (bodytype != BODYTYPE_DEFAULT) && CHECK_BODYTYPE(worn_bodytypes_fallback, bodytype)) |
| 426 | + if(!resolved && (bodytype != BODYTYPE_DEFAULT) && worn_bodytypes_fallback?.contains(bodytype)) |
427 | 427 | // attempt 2 - use fallback if available |
428 | 428 | if(!(slot_meta.handle_worn_fallback(bodytype, data))) |
429 | 429 | // attempt 3 - convert to default if specified to convert |
|
436 | 436 | //* Now, the actual intended render system. |
437 | 437 | if(!data[WORN_DATA_ICON]) |
438 | 438 | // grab icon based on priority |
439 | | - if(!inhands && !CHECK_BODYTYPE(worn_bodytypes, bodytype) && CHECK_BODYTYPE(worn_bodytypes_fallback, bodytype) && slot_meta.handle_worn_fallback(bodytype, data)) |
| 439 | + if(!inhands && !worn_bodytypes?.contains(bodytype) && worn_bodytypes_fallback?.contains(bodytype) && slot_meta.handle_worn_fallback(bodytype, data)) |
440 | 440 | // special: if bodytypes isn't in, and species has fallback |
441 | 441 | // .. well don't do anything as handle_sprite_fallback will write to the data list. |
442 | 442 | else if(inhands && inhand_icon) |
|
494 | 494 | // PRIVATE_PROC(TRUE) |
495 | 495 | if(inhands) |
496 | 496 | return "[base_worn_state(inhands, slot_key, bodytype)][(worn_render_flags & WORN_RENDER_INHAND_ONE_FOR_ALL)? "_all" : "_[slot_key]"]" |
497 | | - return "[base_worn_state(inhands, slot_key, bodytype)][(worn_render_flags & WORN_RENDER_SLOT_ONE_FOR_ALL)? "_all" : "_[slot_key]"][((bodytype != BODYTYPE_DEFAULT) && CHECK_BODYTYPE(worn_bodytypes, bodytype))? "_[bodytype_to_string(bodytype)]" : ""]" |
| 497 | + return "[base_worn_state(inhands, slot_key, bodytype)][(worn_render_flags & WORN_RENDER_SLOT_ONE_FOR_ALL)? "_all" : "_[slot_key]"][((bodytype != BODYTYPE_DEFAULT) && worn_bodytypes?.contains(bodytype))? "_[bodytype_to_string(bodytype)]" : ""]" |
498 | 498 |
|
499 | 499 | /obj/item/proc/base_worn_state(inhands, slot_key, bodytype) |
500 | 500 | if(inhands) |
|
0 commit comments