Merge pull request #14728 from Seris02/fixaiholo

fixes unique holograms, their outdated icons, and hologram offsets
This commit is contained in:
Heroman3003
2023-03-25 14:39:15 +10:00
committed by CHOMPStation2
parent 6916040a4d
commit ad1c6ed5aa
2 changed files with 48 additions and 3 deletions

View File

@@ -117,6 +117,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
var/obj/effect/overlay/aiholo/hologram = new(T)//Spawn a blank effect at the location. //VOREStation Edit to specific type for adding vars var/obj/effect/overlay/aiholo/hologram = new(T)//Spawn a blank effect at the location. //VOREStation Edit to specific type for adding vars
hologram.master = A //VOREStation Edit: So you can reference the master AI from in the hologram procs hologram.master = A //VOREStation Edit: So you can reference the master AI from in the hologram procs
hologram.icon = A.holo_icon hologram.icon = A.holo_icon
hologram.pixel_x = 16 - round(A.holo_icon.Width() / 2) //VOREStation Edit: centers the hologram on the tile
//hologram.mouse_opacity = 0//So you can't click on it. //VOREStation Removal //hologram.mouse_opacity = 0//So you can't click on it. //VOREStation Removal
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them. hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
hologram.anchored = TRUE//So space wind cannot drag it. hologram.anchored = TRUE//So space wind cannot drag it.

View File

@@ -663,9 +663,53 @@ var/list/ai_verbs_default = list(
"female skrell" "female skrell"
) )
input = tgui_input_list(usr, "Please select a hologram:", "Hologram Choice", icon_list) input = tgui_input_list(usr, "Please select a hologram:", "Hologram Choice", icon_list)
if(input)
qdel(holo_icon)
switch(input)
if("default")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1"))
if("floating face")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo2"))
if("singularity")
holo_icon = getHologramIcon(icon('icons/obj/singularity.dmi',"singularity_s1"))
if("drone")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"drone"))
if("carp")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo4"))
if("spider")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"nurse"))
if("bear")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"brownbear"))
if("slime")
holo_icon = getHologramIcon(icon('icons/mob/slimes.dmi',"cerulean adult slime"))
if("ian")
holo_icon = getHologramIcon(icon('icons/mob/pets.dmi',"corgi"))
if("runtime")
holo_icon = getHologramIcon(icon('icons/mob/pets.dmi',"cat"))
if("poly")
holo_icon = getHologramIcon(icon('icons/mob/birds.dmi',"poly-flap"))
if("pun pun")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"punpun"))
if("male human")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holohumm"))
if("female human")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holohumf"))
if("male unathi")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holounam"))
if("female unathi")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holounaf"))
if("male tajaran")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotajm"))
if("female tajaran")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotajf"))
if("male tesharii")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotesm"))
if("female tesharii")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotesf"))
if("male skrell")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holoskrm"))
if("female skrell")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holoskrf"))
//Toggles the luminosity and applies it by re-entereing the camera. //Toggles the luminosity and applies it by re-entereing the camera.
/mob/living/silicon/ai/proc/toggle_camera_light() /mob/living/silicon/ai/proc/toggle_camera_light()