Alternate Appearance system (from tgstation/-tg-station#16586)

This adds an "alternate appearance system" using image overrides and a new
handler system.

Usage:
 - Create a new `image()` casted as `var/image`
 - Set image.override = 1
 - Call mob.add_alt_appearance("appearance_ID", image, listOfMobsToDisplayTo).
 - To remove an image, you use mob.remove_alt_appearance("appearance_ID")

Comes with one usage, cardborg costumes. They will now disguise you as a
standard borg to any silicon mobs and yourself.
As this is a per-client system, that means that only silicon mobs and you will
see yourself as a standard borg. All other mobs will see you as a silly
human in a cardborg costume.
This commit is contained in:
Tigercat2000
2016-04-06 12:36:26 -07:00
parent 1a1701d27a
commit 801cbe7f8d
8 changed files with 212 additions and 12 deletions
+6
View File
@@ -70,6 +70,12 @@
//readd this mob's HUDs (antag, med, etc)
reload_huds()
if(viewing_alternate_appearances && viewing_alternate_appearances.len)
for(var/aakey in viewing_alternate_appearances)
var/datum/alternate_appearance/AA = viewing_alternate_appearances[aakey]
if(AA)
AA.display_to(list(src))
CallHook("Login", list("client" = src.client, "mob" = src))
// Calling update_interface() in /mob/Login() causes the Cyborg to immediately be ghosted; because of winget().