mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Allow AI to use custom holograms (#3114)
* Compound icon generator proc Why didn't this exist before? Am I missing something? I need manipulatable icons of existing atoms including their overlays. Is there some easier way to get them than this...? * Polaris Portion of AI Upgrade
This commit is contained in:
@@ -793,6 +793,26 @@ proc // Creates a single icon from a given /atom or /image. Only the first argu
|
||||
alpha_mask.Blend(image_overlay,ICON_OR)//OR so they are lumped together in a nice overlay.
|
||||
return alpha_mask//And now return the mask.
|
||||
|
||||
//getFlatIcon but generates an icon that can face ALL four directions. The only four.
|
||||
/proc/getCompoundIcon(atom/A)
|
||||
var/icon/north = getFlatIcon(A,defdir=NORTH,always_use_defdir=1)
|
||||
var/icon/south = getFlatIcon(A,defdir=SOUTH,always_use_defdir=1)
|
||||
var/icon/east = getFlatIcon(A,defdir=EAST,always_use_defdir=1)
|
||||
var/icon/west = getFlatIcon(A,defdir=WEST,always_use_defdir=1)
|
||||
|
||||
//Starts with a blank icon because of byond bugs.
|
||||
var/icon/full = icon('icons/effects/effects.dmi', "icon_state"="nothing")
|
||||
|
||||
full.Insert(north,dir=NORTH)
|
||||
full.Insert(south,dir=SOUTH)
|
||||
full.Insert(east,dir=EAST)
|
||||
full.Insert(west,dir=WEST)
|
||||
qdel(north)
|
||||
qdel(south)
|
||||
qdel(east)
|
||||
qdel(west)
|
||||
return full
|
||||
|
||||
/mob/proc/AddCamoOverlay(atom/A)//A is the atom which we are using as the overlay.
|
||||
var/icon/opacity_icon = new(A.icon, A.icon_state)//Don't really care for overlays/underlays.
|
||||
//Now we need to culculate overlays+underlays and add them together to form an image for a mask.
|
||||
|
||||
Reference in New Issue
Block a user