var/NPC_HUD/NH = new()
var/const/tmp/MapText_Font = "<font color = white><font face = Comic Sans MS><b>"
var/const/tmp/HUD_LAYER = MOB_LAYER + 15
var/const/tmp/TEXT_LAYER = MOB_LAYER + 16
mob
var/tmp/extended_text = ""
var/obj/extended_NPC
mob
var/tmp/list/hud_screen = list()
proc
add_screen(x)
src.hud_screen += x
src.update_screen()
remove_all_from_screen(x)
for (var/atom/a in src.hud_screen)
if (a.type == x)
src.hud_screen -= a
src.update_screen()
remove_one_from_screen(x)
src.hud_screen -= locate(x) in hud_screen
src.update_screen()
update_screen()
src.client.screen = null
for (var/obj/t in src.hud_screen)
src.client.screen.Add(t)
NPC_HUD
proc
NPC_Talk(atom/m, obj/NPC, words)
if (!istype(m, /mob/players))
return
if (istype(NPC, /obj/shops))
Small_Box(m, NPC, words)
Small_Box(atom/at, obj/NPC, words)
if (!istype(at, /mob/players))
return
var/mob/m = at
if (length(m.extended_text))
m.extended_text = ""
m.remove_all_from_screen(/obj/Hud_Controls/blank, 1)
m.remove_all_from_screen(/obj/Hud_Controls/text, 1)
m.remove_all_from_screen(/obj/Hud_Face/face, 1)
m.remove_all_from_screen(/obj/Hud_Boxes/Hud_Box_1, 1)
m.remove_all_from_screen(/obj/Hud_Boxes/Hud_Box_2, 1)
m.remove_all_from_screen(/obj/Hud_Boxes/Hud_Box_3, 1)
m.remove_all_from_screen(/obj/Hud_Boxes/Hud_Box_4, 1)
m.remove_all_from_screen(/obj/Hud_Boxes/Hud_Box_5, 1)
m.remove_all_from_screen(/obj/Hud_Boxes/Hud_Box_6, 1)
m.remove_all_from_screen(/obj/Hud_Boxes/Hud_Box_7, 1)
m.remove_all_from_screen(/obj/Hud_Boxes/Hud_Box_8, 1)
m.remove_all_from_screen(/obj/Hud_Boxes/Hud_Box_9, 1)
if (!words) return
var/new_words = copytext(words, 1, 35)
var/obj/Hud_Boxes/Hud_Box_1/H1 = new()
m.add_screen(H1)
H1.screen_loc = "1,1"
for (var/a = 2, a < 11, a ++)
var/obj/Hud_Boxes/Hud_Box_2/H2 = new()
m.add_screen(H2)
H2.screen_loc = "[a],1"
var/obj/Hud_Boxes/Hud_Box_5/H5 = new()
m.add_screen(H5)
H5.screen_loc = "[a],2"
var/obj/Hud_Boxes/Hud_Box_3/H3 = new()
m.add_screen(H3)
H3.screen_loc = "11,1"
var/obj/Hud_Boxes/Hud_Box_4/H4 = new()
m.add_screen(H4)
H4.screen_loc = "1,2"
var/obj/Hud_Boxes/Hud_Box_6/H6 = new()
m.add_screen(H6)
H6.screen_loc = "11,2"
var/obj/Hud_Face/face/npc_face = new()
npc_face.screen_loc = "1,2"
npc_face.layer = HUD_LAYER
npc_face.icon = 'Icons/faces.dmi'
npc_face.icon_state = "[NPC.name]"
m.add_screen(npc_face)
var/obj/Hud_Controls/text/mt = new()
mt.screen_loc = "2,2"
mt.layer = TEXT_LAYER
mt.maptext = "[MapText_Font][new_words]</b>"
m.add_screen(mt)
if (length(words) > 35)
m.extended_text = copytext(words, 35, length(words) + 1)
m.extended_NPC = NPC
var/obj/Hud_Controls/blank/b = new()
var/obj/Hud_Controls/blank/t = new()
b.screen_loc = "11:-6,1:5"
t.screen_loc = "11,1:7"
b.layer = HUD_LAYER
t.layer = TEXT_LAYER
t.icon_state = "nothing"
t.maptext = "<font size = \"1\">[MapText_Font]Next"
m.add_screen(b)
m.add_screen(t)
obj
Hud_Face
face
icon = 'Icons/faces.dmi'
Hud_Controls
text
blank
icon = 'Icons/textboxstuff.dmi'
icon_state = "blank"
Click(atom/a)
if (!istype(a, /mob/players))
return
var/mob/m = a
NH.Small_Box(m.extended_NPC ,m.extended_text)
Hud_Boxes
Hud_Box_1
icon = 'Icons/textboxstuff.dmi'
icon_state = "1"
layer = HUD_LAYER
Hud_Box_2
icon = 'Icons/textboxstuff.dmi'
icon_state = "2"
layer = HUD_LAYER
Hud_Box_3
icon = 'Icons/textboxstuff.dmi'
icon_state = "3"
layer = HUD_LAYER
Hud_Box_4
icon = 'Icons/textboxstuff.dmi'
icon_state = "4"
layer = HUD_LAYER
Hud_Box_5
icon = 'Icons/textboxstuff.dmi'
icon_state = "5"
layer = HUD_LAYER
Hud_Box_6
icon = 'Icons/textboxstuff.dmi'
icon_state = "6"
layer = HUD_LAYER
Hud_Box_7
icon = 'Icons/textboxstuff.dmi'
icon_state = "7"
layer = HUD_LAYER
Hud_Box_8
icon = 'Icons/textboxstuff.dmi'
icon_state = "8"
layer = HUD_LAYER
Hud_Box_9
icon = 'Icons/textboxstuff.dmi'
icon_state = "9"
layer = HUD_LAYER
Problem description:
The maptext is being displayed under the Hud_Boxs and even goes under the turf layer.
No word on any fixes though.