mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
[MIRROR] [ready] adds unit test for missing inhand icons. fixes a bunch of missing inhand icons [MDB IGNORE] (#16649)
* [ready] adds unit test for missing inhand icons. fixes a bunch of missing inhand icons * cf Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com> Co-authored-by: Tastyfish <crazychris32@gmail.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
co-authored by
ShizCalev
Tastyfish
Gandalf
parent
5e86c63b7e
commit
2847b2b37e
@@ -1,35 +0,0 @@
|
||||
/proc/getbrokeninhands()
|
||||
var/text
|
||||
for(var/A in typesof(/obj/item))
|
||||
var/obj/item/O = new A( locate(1,1,1) )
|
||||
if(!O)
|
||||
continue
|
||||
var/icon/IL = new(O.lefthand_file)
|
||||
var/list/Lstates = IL.IconStates()
|
||||
var/icon/IR = new(O.righthand_file)
|
||||
var/list/Rstates = IR.IconStates()
|
||||
var/icon/J = new(O.icon)
|
||||
var/list/istates = J.IconStates()
|
||||
if(!Lstates.Find(O.icon_state) && !Lstates.Find(O.inhand_icon_state))
|
||||
if(O.icon_state)
|
||||
text += "[O.type] WANTS IN LEFT HAND CALLED\n\"[O.icon_state]\".\n"
|
||||
if(!Rstates.Find(O.icon_state) && !Rstates.Find(O.inhand_icon_state))
|
||||
if(O.icon_state)
|
||||
text += "[O.type] WANTS IN RIGHT HAND CALLED\n\"[O.icon_state]\".\n"
|
||||
|
||||
|
||||
if(O.icon_state)
|
||||
if(!istates.Find(O.icon_state))
|
||||
text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.icon_state]\" IN \"[O.icon]\"\n"
|
||||
if(O.inhand_icon_state)
|
||||
if(!istates.Find(O.inhand_icon_state))
|
||||
text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.inhand_icon_state]\" IN \"[O.icon]\"\n"
|
||||
text+="\n"
|
||||
qdel(O)
|
||||
if(text)
|
||||
var/F = file("broken_icons.txt")
|
||||
fdel(F)
|
||||
WRITE_FILE(F, text)
|
||||
to_chat(world, "Completely successfully and written to [F]", confidential = TRUE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user