Skip to content

Commit

Permalink
TGS Test Merge (#6815)
Browse files Browse the repository at this point in the history
  • Loading branch information
blubelle authored and blubelle committed Oct 24, 2024
2 parents a0e4147 + 9321867 commit 6814b44
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/modules/asset_cache/packs/spritesheet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@
* neither prefixes nor states may have spaces!
*/
/datum/asset_pack/spritesheet/proc/do_insert(sprite_name, icon/I, icon_state="", dir=SOUTH, frame=1, moving=FALSE)
#ifdef UNIT_TESTS
if (I && icon_state && !(icon_state in icon_states(I))) // check the base icon prior to extracting the state we want
stack_trace("Tried to insert nonexistent icon_state '[icon_state]' from [I] into spritesheet [name] ([type])")
return
#endif
I = icon(I, icon_state=icon_state, dir=dir, frame=frame, moving=moving)
if (!I || !length(icon_states(I))) // That direction or state doesn't exist!
return
Expand Down

0 comments on commit 6814b44

Please sign in to comment.