[MIRROR] Hud screens now set hud owner in Initialize. [MDB IGNORE] (#22501)

* Hud screens now set hud owner in Initialize.

* Merge conflicts

* modular adjustments

* Missed one

* Make this easier to spot

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
This commit is contained in:
SkyratBot
2023-07-18 22:41:01 +02:00
committed by GitHub
parent 7d80e387d0
commit daba1d93ae
43 changed files with 257 additions and 395 deletions

View File

@@ -530,7 +530,7 @@
M.Scale(px/sx, py/sy)
transform = M
/atom/movable/screen/click_catcher/Initialize(mapload)
/atom/movable/screen/click_catcher/Initialize(mapload, datum/hud/hud_owner)
. = ..()
RegisterSignal(SSmapping, COMSIG_PLANE_OFFSET_INCREASE, PROC_REF(offset_increased))
offset_increased(SSmapping, 0, SSmapping.max_plane_offset)

View File

@@ -252,12 +252,12 @@
/atom/movable/screen/button_palette/Destroy()
if(our_hud)
our_hud.mymob?.client?.screen -= src
our_hud.mymob?.canon_client?.screen -= src
our_hud.toggle_palette = null
our_hud = null
return ..()
/atom/movable/screen/button_palette/Initialize(mapload)
/atom/movable/screen/button_palette/Initialize(mapload, datum/hud/hud_owner)
. = ..()
update_appearance()
@@ -416,7 +416,7 @@ GLOBAL_LIST_INIT(palette_removed_matrix, list(1.4,0,0,0, 0.7,0.4,0,0, 0.4,0,0.6,
/atom/movable/screen/palette_scroll/down/Destroy()
if(our_hud)
our_hud.mymob?.client?.screen -= src
our_hud.mymob?.canon_client?.screen -= src
our_hud.palette_down = null
our_hud = null
return ..()
@@ -429,7 +429,7 @@ GLOBAL_LIST_INIT(palette_removed_matrix, list(1.4,0,0,0, 0.7,0.4,0,0, 0.4,0,0.6,
/atom/movable/screen/palette_scroll/up/Destroy()
if(our_hud)
our_hud.mymob?.client?.screen -= src
our_hud.mymob?.canon_client?.screen -= src
our_hud.palette_up = null
our_hud = null
return ..()
@@ -447,7 +447,7 @@ GLOBAL_LIST_INIT(palette_removed_matrix, list(1.4,0,0,0, 0.7,0.4,0,0, 0.4,0,0.6,
/atom/movable/screen/action_landing/Destroy()
if(owner)
owner.landing = null
owner?.owner?.mymob?.client?.screen -= src
owner?.owner?.mymob?.canon_client?.screen -= src
owner.refresh_actions()
owner = null
return ..()

View File

@@ -184,106 +184,89 @@
var/mob/living/silicon/ai/myai = mymob
// Language menu
using = new /atom/movable/screen/language_menu
using = new /atom/movable/screen/language_menu(null, src)
using.screen_loc = ui_ai_language_menu
using.hud = src
static_inventory += using
//AI core
using = new /atom/movable/screen/ai/aicore()
using = new /atom/movable/screen/ai/aicore(null, src)
using.screen_loc = ui_ai_core
using.hud = src
static_inventory += using
//Camera list
using = new /atom/movable/screen/ai/camera_list()
using = new /atom/movable/screen/ai/camera_list(null, src)
using.screen_loc = ui_ai_camera_list
using.hud = src
static_inventory += using
//Track
using = new /atom/movable/screen/ai/camera_track()
using = new /atom/movable/screen/ai/camera_track(null, src)
using.screen_loc = ui_ai_track_with_camera
using.hud = src
static_inventory += using
//Camera light
using = new /atom/movable/screen/ai/camera_light()
using = new /atom/movable/screen/ai/camera_light(null, src)
using.screen_loc = ui_ai_camera_light
using.hud = src
static_inventory += using
//Crew Monitoring
using = new /atom/movable/screen/ai/crew_monitor()
using = new /atom/movable/screen/ai/crew_monitor(null, src)
using.screen_loc = ui_ai_crew_monitor
using.hud = src
static_inventory += using
//Crew Manifest
using = new /atom/movable/screen/ai/crew_manifest()
using = new /atom/movable/screen/ai/crew_manifest(null, src)
using.screen_loc = ui_ai_crew_manifest
using.hud = src
static_inventory += using
//Alerts
using = new /atom/movable/screen/ai/alerts()
using = new /atom/movable/screen/ai/alerts(null, src)
using.screen_loc = ui_ai_alerts
using.hud = src
static_inventory += using
//Announcement
using = new /atom/movable/screen/ai/announcement()
using = new /atom/movable/screen/ai/announcement(null, src)
using.screen_loc = ui_ai_announcement
using.hud = src
static_inventory += using
//Shuttle
using = new /atom/movable/screen/ai/call_shuttle()
using = new /atom/movable/screen/ai/call_shuttle(null, src)
using.screen_loc = ui_ai_shuttle
using.hud = src
static_inventory += using
//Laws
using = new /atom/movable/screen/ai/state_laws()
using = new /atom/movable/screen/ai/state_laws(null, src)
using.screen_loc = ui_ai_state_laws
using.hud = src
static_inventory += using
// Modular Interface
using = new /atom/movable/screen/ai/modpc()
using = new /atom/movable/screen/ai/modpc(null, src)
using.screen_loc = ui_ai_mod_int
using.hud = src
static_inventory += using
myai.interfaceButton = using
var/atom/movable/screen/ai/modpc/tabletbutton = using
tabletbutton.robot = myai
//Take image
using = new /atom/movable/screen/ai/image_take()
using = new /atom/movable/screen/ai/image_take(null, src)
using.screen_loc = ui_ai_take_picture
using.hud = src
static_inventory += using
//View images
using = new /atom/movable/screen/ai/image_view()
using = new /atom/movable/screen/ai/image_view(null, src)
using.screen_loc = ui_ai_view_images
using.hud = src
static_inventory += using
//Medical/Security sensors
using = new /atom/movable/screen/ai/sensors()
using = new /atom/movable/screen/ai/sensors(null, src)
using.screen_loc = ui_ai_sensor
using.hud = src
static_inventory += using
//Multicamera mode
using = new /atom/movable/screen/ai/multicam()
using = new /atom/movable/screen/ai/multicam(null, src)
using.screen_loc = ui_ai_multicam
using.hud = src
static_inventory += using
//Add multicamera camera
using = new /atom/movable/screen/ai/add_multicam()
using = new /atom/movable/screen/ai/add_multicam(null, src)
using.screen_loc = ui_ai_add_multicam
using.hud = src
static_inventory += using

View File

@@ -504,7 +504,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
var/angle = 0
var/mob/living/simple_animal/hostile/construct/Cviewer = null
/atom/movable/screen/alert/bloodsense/Initialize(mapload)
/atom/movable/screen/alert/bloodsense/Initialize(mapload, datum/hud/hud_owner)
. = ..()
narnar = new('icons/hud/screen_alert.dmi', "mini_nar")
START_PROCESSING(SSprocessing, src)
@@ -637,7 +637,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
desc = "Unit's power cell has no charge remaining. No modules available until power cell is recharged."
icon_state = "empty_cell"
/atom/movable/screen/alert/emptycell/Initialize(mapload)
/atom/movable/screen/alert/emptycell/Initialize(mapload, datum/hud/hud_owner)
. = ..()
update_appearance(updates=UPDATE_DESC)
@@ -652,7 +652,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
desc = "Unit's power cell is running low."
icon_state = "low_cell"
/atom/movable/screen/alert/lowcell/Initialize(mapload)
/atom/movable/screen/alert/lowcell/Initialize(mapload, datum/hud/hud_owner)
. = ..()
update_appearance(updates=UPDATE_DESC)

View File

@@ -36,22 +36,19 @@
//begin buttons
using = new /atom/movable/screen/swap_hand()
using = new /atom/movable/screen/swap_hand(null, src)
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src
static_inventory += using
using = new /atom/movable/screen/swap_hand()
using = new /atom/movable/screen/swap_hand(null, src)
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
using.hud = src
static_inventory += using
action_intent = new /atom/movable/screen/combattoggle/flashy()
action_intent.hud = src
action_intent = new /atom/movable/screen/combattoggle/flashy(null, src)
action_intent.icon = ui_style
action_intent.screen_loc = ui_combat_toggle
static_inventory += action_intent
@@ -62,64 +59,53 @@
H.leap_icon.screen_loc = ui_alien_storage_r
static_inventory += H.leap_icon
using = new/atom/movable/screen/language_menu
using = new/atom/movable/screen/language_menu(null, src)
using.screen_loc = ui_alien_language_menu
using.hud = src
static_inventory += using
using = new /atom/movable/screen/navigate
using = new /atom/movable/screen/navigate(null, src)
using.screen_loc = ui_alien_navigate_menu
using.hud = src
static_inventory += using
using = new /atom/movable/screen/drop()
using = new /atom/movable/screen/drop(null, src)
using.icon = ui_style
using.screen_loc = ui_drop_throw
using.hud = src
static_inventory += using
using = new /atom/movable/screen/resist()
using = new /atom/movable/screen/resist(null, src)
using.icon = ui_style
using.screen_loc = ui_above_movement
using.hud = src
hotkeybuttons += using
throw_icon = new /atom/movable/screen/throw_catch()
throw_icon = new /atom/movable/screen/throw_catch(null, src)
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
throw_icon.hud = src
hotkeybuttons += throw_icon
pull_icon = new /atom/movable/screen/pull()
pull_icon = new /atom/movable/screen/pull(null, src)
pull_icon.icon = ui_style
pull_icon.update_appearance()
pull_icon.screen_loc = ui_above_movement
pull_icon.hud = src
static_inventory += pull_icon
//begin indicators
healths = new /atom/movable/screen/healths/alien()
healths.hud = src
healths = new /atom/movable/screen/healths/alien(null, src)
infodisplay += healths
alien_plasma_display = new /atom/movable/screen/alien/plasma_display()
alien_plasma_display.hud = src
alien_plasma_display = new /atom/movable/screen/alien/plasma_display(null, src)
infodisplay += alien_plasma_display
if(!isalienqueen(mymob))
alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder
alien_queen_finder.hud = src
alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder(null, src)
infodisplay += alien_queen_finder
zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.hud = src
zone_select = new /atom/movable/screen/zone_sel/alien(null, src)
zone_select.update_appearance()
static_inventory += zone_select
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv
inv.update_appearance()

View File

@@ -5,38 +5,31 @@
..()
var/atom/movable/screen/using
action_intent = new /atom/movable/screen/combattoggle/flashy()
action_intent.hud = src
action_intent = new /atom/movable/screen/combattoggle/flashy(null, src)
action_intent.icon = ui_style
action_intent.screen_loc = ui_combat_toggle
static_inventory += action_intent
healths = new /atom/movable/screen/healths/alien()
healths.hud = src
healths = new /atom/movable/screen/healths/alien(null, src)
infodisplay += healths
alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder()
alien_queen_finder.hud = src
alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder(null, src)
infodisplay += alien_queen_finder
pull_icon = new /atom/movable/screen/pull()
pull_icon = new /atom/movable/screen/pull(null, src)
pull_icon.icon = 'icons/hud/screen_alien.dmi'
pull_icon.update_appearance()
pull_icon.screen_loc = ui_above_movement
pull_icon.hud = src
hotkeybuttons += pull_icon
using = new/atom/movable/screen/language_menu
using = new/atom/movable/screen/language_menu(null, src)
using.screen_loc = ui_alien_language_menu
using.hud = src
static_inventory += using
zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.hud = src
using = new /atom/movable/screen/navigate(null, src)
using.screen_loc = ui_alien_navigate_menu
static_inventory += using
zone_select = new /atom/movable/screen/zone_sel/alien(null, src)
zone_select.update_appearance()
static_inventory += zone_select
using = new /atom/movable/screen/navigate
using.screen_loc = ui_alien_navigate_menu
using.hud = src
static_inventory += using

View File

@@ -50,7 +50,7 @@
name = "Produce Blobbernaut (ERROR)"
desc = "Produces a strong, smart blobbernaut from a factory blob for (ERROR) resources.<br>The factory blob used will become fragile and unable to produce spores."
/atom/movable/screen/blob/blobbernaut/Initialize(mapload)
/atom/movable/screen/blob/blobbernaut/Initialize(mapload, datum/hud/hud_owner)
. = ..()
name = "Produce Blobbernaut ([BLOBMOB_BLOBBERNAUT_RESOURCE_COST])"
desc = "Produces a strong, smart blobbernaut from a factory blob for [BLOBMOB_BLOBBERNAUT_RESOURCE_COST] resources.<br>The factory blob used will become fragile and unable to produce spores."
@@ -67,7 +67,7 @@
name = "Produce Resource Blob (ERROR)"
desc = "Produces a resource blob for ERROR resources.<br>Resource blobs will give you resources every few seconds."
/atom/movable/screen/blob/resource_blob/Initialize(mapload)
/atom/movable/screen/blob/resource_blob/Initialize(mapload, datum/hud/hud_owner)
. = ..()
name = "Produce Resource Blob ([BLOB_STRUCTURE_RESOURCE_COST])"
desc = "Produces a resource blob for [BLOB_STRUCTURE_RESOURCE_COST] resources.<br>Resource blobs will give you resources every few seconds."
@@ -84,7 +84,7 @@
name = "Produce Node Blob (ERROR)"
desc = "Produces a node blob for ERROR resources.<br>Node blobs will expand and activate nearby resource and factory blobs."
/atom/movable/screen/blob/node_blob/Initialize(mapload)
/atom/movable/screen/blob/node_blob/Initialize(mapload, datum/hud/hud_owner)
. = ..()
name = "Produce Node Blob ([BLOB_STRUCTURE_NODE_COST])"
desc = "Produces a node blob for [BLOB_STRUCTURE_NODE_COST] resources.<br>Node blobs will expand and activate nearby resource and factory blobs."
@@ -101,7 +101,7 @@
name = "Produce Factory Blob (ERROR)"
desc = "Produces a factory blob for ERROR resources.<br>Factory blobs will produce spores every few seconds."
/atom/movable/screen/blob/factory_blob/Initialize(mapload)
/atom/movable/screen/blob/factory_blob/Initialize(mapload, datum/hud/hud_owner)
. = ..()
name = "Produce Factory Blob ([BLOB_STRUCTURE_FACTORY_COST])"
desc = "Produces a factory blob for [BLOB_STRUCTURE_FACTORY_COST] resources.<br>Factory blobs will produce spores every few seconds."
@@ -140,7 +140,7 @@
name = "Relocate Core (ERROR)"
desc = "Swaps a node and your core for ERROR resources."
/atom/movable/screen/blob/relocate_core/Initialize(mapload)
/atom/movable/screen/blob/relocate_core/Initialize(mapload, datum/hud/hud_owner)
. = ..()
name = "Relocate Core ([BLOB_POWER_RELOCATE_COST])"
desc = "Swaps a node and your core for [BLOB_POWER_RELOCATE_COST] resources."
@@ -154,55 +154,45 @@
..()
var/atom/movable/screen/using
blobpwrdisplay = new /atom/movable/screen()
blobpwrdisplay = new /atom/movable/screen(null, src)
blobpwrdisplay.name = "blob power"
blobpwrdisplay.icon_state = "block"
blobpwrdisplay.screen_loc = ui_health
blobpwrdisplay.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
SET_PLANE_EXPLICIT(blobpwrdisplay, ABOVE_HUD_PLANE, owner)
blobpwrdisplay.hud = src
infodisplay += blobpwrdisplay
healths = new /atom/movable/screen/healths/blob()
healths.hud = src
healths = new /atom/movable/screen/healths/blob(null, src)
infodisplay += healths
using = new /atom/movable/screen/blob/jump_to_node()
using = new /atom/movable/screen/blob/jump_to_node(null, src)
using.screen_loc = ui_inventory
using.hud = src
static_inventory += using
using = new /atom/movable/screen/blob/jump_to_core()
using = new /atom/movable/screen/blob/jump_to_core(null, src)
using.screen_loc = ui_zonesel
using.hud = src
static_inventory += using
using = new /atom/movable/screen/blob/blobbernaut()
using = new /atom/movable/screen/blob/blobbernaut(null, src)
using.screen_loc = ui_belt
using.hud = src
static_inventory += using
using = new /atom/movable/screen/blob/resource_blob()
using = new /atom/movable/screen/blob/resource_blob(null, src)
using.screen_loc = ui_back
using.hud = src
static_inventory += using
using = new /atom/movable/screen/blob/node_blob()
using = new /atom/movable/screen/blob/node_blob(null, src)
using.screen_loc = ui_hand_position(2)
using.hud = src
static_inventory += using
using = new /atom/movable/screen/blob/factory_blob()
using = new /atom/movable/screen/blob/factory_blob(null, src)
using.screen_loc = ui_hand_position(1)
using.hud = src
static_inventory += using
using = new /atom/movable/screen/blob/readapt_strain()
using = new /atom/movable/screen/blob/readapt_strain(null, src)
using.screen_loc = ui_storage1
using.hud = src
static_inventory += using
using = new /atom/movable/screen/blob/relocate_core()
using = new /atom/movable/screen/blob/relocate_core(null, src)
using.screen_loc = ui_storage2
using.hud = src
static_inventory += using

View File

@@ -1,6 +1,5 @@
/datum/hud/living/blobbernaut/New(mob/living/owner)
. = ..()
blobpwrdisplay = new /atom/movable/screen/healths/blob/overmind()
blobpwrdisplay.hud = src
blobpwrdisplay = new /atom/movable/screen/healths/blob/overmind(null, src)
infodisplay += blobpwrdisplay

View File

@@ -18,7 +18,7 @@
for(var/I in credit_order_for_this_round)
if(!credits)
return
_credits += new /atom/movable/screen/credit(null, I, src, credits_icon)
_credits += new /atom/movable/screen/credit(null, null, I, src, credits_icon)
sleep(CREDIT_SPAWN_SPEED)
sleep(CREDIT_ROLL_SPEED - CREDIT_SPAWN_SPEED)
remove_verb(src, /client/proc/ClearCredits)
@@ -39,7 +39,7 @@
var/client/parent
var/matrix/target
/atom/movable/screen/credit/Initialize(mapload, credited, client/P, icon/I)
/atom/movable/screen/credit/Initialize(mapload, datum/hud/hud_owner, credited, client/P, icon/I)
. = ..()
icon = I
parent = P

View File

@@ -2,29 +2,26 @@
..()
var/atom/movable/screen/inventory/inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "internal storage"
inv_box.icon = ui_style
inv_box.icon_state = "suit_storage"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_drone_storage
inv_box.slot_id = ITEM_SLOT_DEX_STORAGE
inv_box.hud = src
static_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "head/mask"
inv_box.icon = ui_style
inv_box.icon_state = "mask"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_drone_head
inv_box.slot_id = ITEM_SLOT_HEAD
inv_box.hud = src
static_inventory += inv_box
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv
inv.update_appearance()

View File

@@ -3,58 +3,50 @@
..()
var/atom/movable/screen/using
using = new /atom/movable/screen/drop()
using = new /atom/movable/screen/drop(null, src)
using.icon = ui_style
using.screen_loc = ui_drone_drop
using.hud = src
static_inventory += using
pull_icon = new /atom/movable/screen/pull()
pull_icon = new /atom/movable/screen/pull(null, src)
pull_icon.icon = ui_style
pull_icon.update_appearance()
pull_icon.screen_loc = ui_drone_pull
pull_icon.hud = src
static_inventory += pull_icon
build_hand_slots()
using = new /atom/movable/screen/swap_hand()
using = new /atom/movable/screen/swap_hand(null, src)
using.icon = ui_style
using.icon_state = "swap_1_m"
using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src
static_inventory += using
using = new /atom/movable/screen/swap_hand()
using = new /atom/movable/screen/swap_hand(null, src)
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
using.hud = src
static_inventory += using
action_intent = new /atom/movable/screen/combattoggle/flashy()
action_intent.hud = src
action_intent = new /atom/movable/screen/combattoggle/flashy(null, src)
action_intent.icon = ui_style
action_intent.screen_loc = ui_combat_toggle
static_inventory += action_intent
zone_select = new /atom/movable/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel(null, src)
zone_select.icon = ui_style
zone_select.hud = src
zone_select.update_appearance()
static_inventory += zone_select
using = new /atom/movable/screen/area_creator
using = new /atom/movable/screen/area_creator(null, src)
using.icon = ui_style
using.hud = src
static_inventory += using
mymob.client.clear_screen()
mymob.canon_client.clear_screen()
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv
inv.update_appearance()

View File

@@ -57,40 +57,33 @@
..()
var/atom/movable/screen/using
using = new /atom/movable/screen/ghost/spawners_menu()
using = new /atom/movable/screen/ghost/spawners_menu(null, src)
using.screen_loc = ui_ghost_spawners_menu
using.hud = src
static_inventory += using
using = new /atom/movable/screen/ghost/orbit()
using = new /atom/movable/screen/ghost/orbit(null, src)
using.screen_loc = ui_ghost_orbit
using.hud = src
static_inventory += using
using = new /atom/movable/screen/ghost/reenter_corpse()
using = new /atom/movable/screen/ghost/reenter_corpse(null, src)
using.screen_loc = ui_ghost_reenter_corpse
using.hud = src
static_inventory += using
using = new /atom/movable/screen/ghost/teleport()
using = new /atom/movable/screen/ghost/teleport(null, src)
using.screen_loc = ui_ghost_teleport
using.hud = src
static_inventory += using
using = new /atom/movable/screen/ghost/pai()
using = new /atom/movable/screen/ghost/pai(null, src)
using.screen_loc = ui_ghost_pai
using.hud = src
static_inventory += using
using = new /atom/movable/screen/ghost/minigames_menu()
using = new /atom/movable/screen/ghost/minigames_menu(null, src)
using.screen_loc = ui_ghost_minigames
using.hud = src
static_inventory += using
using = new /atom/movable/screen/language_menu
using = new /atom/movable/screen/language_menu(null, src)
using.screen_loc = ui_ghost_language_menu
using.icon = ui_style
using.hud = src
static_inventory += using
/datum/hud/ghost/show_hud(version = 0, mob/viewmob)

View File

@@ -5,40 +5,33 @@
..()
var/atom/movable/screen/using
pull_icon = new /atom/movable/screen/pull()
pull_icon = new /atom/movable/screen/pull(null, src)
pull_icon.icon = ui_style
pull_icon.update_appearance()
pull_icon.screen_loc = ui_living_pull
pull_icon.hud = src
static_inventory += pull_icon
healths = new /atom/movable/screen/healths/guardian()
healths.hud = src
healths = new /atom/movable/screen/healths/guardian(null, src)
infodisplay += healths
using = new /atom/movable/screen/guardian/manifest()
using = new /atom/movable/screen/guardian/manifest(null, src)
using.screen_loc = ui_hand_position(2)
using.hud = src
static_inventory += using
using = new /atom/movable/screen/guardian/recall()
using = new /atom/movable/screen/guardian/recall(null, src)
using.screen_loc = ui_hand_position(1)
using.hud = src
static_inventory += using
using = new owner.toggle_button_type()
using = new owner.toggle_button_type(null, src)
using.screen_loc = ui_storage1
using.hud = src
static_inventory += using
using = new /atom/movable/screen/guardian/toggle_light()
using = new /atom/movable/screen/guardian/toggle_light(null, src)
using.screen_loc = ui_inventory
using.hud = src
static_inventory += using
using = new /atom/movable/screen/guardian/communicate()
using = new /atom/movable/screen/guardian/communicate(null, src)
using.screen_loc = ui_back
using.hud = src
static_inventory += using
/datum/hud/dextrous/guardian/New(mob/living/simple_animal/hostile/guardian/owner) //for a dextrous guardian
@@ -47,56 +40,47 @@
if(istype(owner, /mob/living/simple_animal/hostile/guardian/dextrous))
var/atom/movable/screen/inventory/inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "internal storage"
inv_box.icon = ui_style
inv_box.icon_state = "suit_storage"
inv_box.screen_loc = ui_id
inv_box.slot_id = ITEM_SLOT_DEX_STORAGE
inv_box.hud = src
static_inventory += inv_box
using = new /atom/movable/screen/guardian/communicate()
using = new /atom/movable/screen/guardian/communicate(null, src)
using.screen_loc = ui_sstore1
using.hud = src
static_inventory += using
else
using = new /atom/movable/screen/guardian/communicate()
using = new /atom/movable/screen/guardian/communicate(null, src)
using.screen_loc = ui_id
using.hud = src
static_inventory += using
pull_icon = new /atom/movable/screen/pull()
pull_icon = new /atom/movable/screen/pull(null, src)
pull_icon.icon = ui_style
pull_icon.update_appearance()
pull_icon.screen_loc = ui_living_pull
pull_icon.hud = src
static_inventory += pull_icon
healths = new /atom/movable/screen/healths/guardian()
healths.hud = src
healths = new /atom/movable/screen/healths/guardian(null, src)
infodisplay += healths
using = new /atom/movable/screen/guardian/manifest()
using = new /atom/movable/screen/guardian/manifest(null, src)
using.screen_loc = ui_belt
using.hud = src
static_inventory += using
using = new /atom/movable/screen/guardian/recall()
using = new /atom/movable/screen/guardian/recall(null, src)
using.screen_loc = ui_back
using.hud = src
static_inventory += using
using = new owner.toggle_button_type()
using = new owner.toggle_button_type(null, src)
using.screen_loc = ui_storage2
using.hud = src
static_inventory += using
using = new /atom/movable/screen/guardian/toggle_light()
using = new /atom/movable/screen/guardian/toggle_light(null, src)
using.screen_loc = ui_inventory
using.hud = src
static_inventory += using
/datum/hud/dextrous/guardian/persistent_inventory_update()

View File

@@ -160,8 +160,8 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list(
/datum/hud/proc/client_refresh(datum/source)
SIGNAL_HANDLER
RegisterSignal(mymob.client, COMSIG_CLIENT_SET_EYE, PROC_REF(on_eye_change))
on_eye_change(null, null, mymob.client.eye)
RegisterSignal(mymob.canon_client, COMSIG_CLIENT_SET_EYE, PROC_REF(on_eye_change))
on_eye_change(null, null, mymob.canon_client.eye)
/datum/hud/proc/clear_client(datum/source)
SIGNAL_HANDLER
@@ -472,14 +472,13 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list(
hand_slots = list()
var/atom/movable/screen/inventory/hand/hand_box
for(var/i in 1 to mymob.held_items.len)
hand_box = new /atom/movable/screen/inventory/hand()
hand_box = new /atom/movable/screen/inventory/hand(null, src)
hand_box.name = mymob.get_held_index_name(i)
hand_box.icon = ui_style
hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]"
hand_box.screen_loc = ui_hand_position(i)
hand_box.held_index = i
hand_slots["[i]"] = hand_box
hand_box.hud = src
static_inventory += hand_box
hand_box.update_appearance()
@@ -533,7 +532,7 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list(
palette_actions.insert_action(button, palette_actions.index_of(relative_to))
if(SCRN_OBJ_FLOATING) // If we don't have it as a define, this is a screen_loc, and we should be floating
floating_actions += button
var/client/our_client = mymob.client
var/client/our_client = mymob.canon_client
if(!our_client)
position_action(button, button.linked_action.default_button_position)
return
@@ -574,7 +573,7 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list(
/// Ensures all of our buttons are properly within the bounds of our client's view, moves them if they're not
/datum/hud/proc/view_audit_buttons()
var/our_view = mymob?.client?.view
var/our_view = mymob?.canon_client?.view
if(!our_view)
return
listed_actions.check_against_view()
@@ -690,7 +689,7 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list(
return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:-[pixel_north_offset]"
/datum/action_group/proc/check_against_view()
var/owner_view = owner?.mymob?.client?.view
var/owner_view = owner?.mymob?.canon_client?.view
if(!owner_view)
return
// Unlikey as it is, we may have been changed. Want to start from our target position and fail down

View File

@@ -58,279 +58,241 @@
var/atom/movable/screen/using
var/atom/movable/screen/inventory/inv_box
using = new/atom/movable/screen/language_menu
using = new /atom/movable/screen/language_menu(null, src)
using.icon = ui_style
using.hud = src
static_inventory += using
using = new/atom/movable/screen/navigate
using = new /atom/movable/screen/navigate(null, src)
using.icon = ui_style
using.hud = src
static_inventory += using
using = new /atom/movable/screen/area_creator
using = new /atom/movable/screen/area_creator(null, src)
using.icon = ui_style
using.hud = src
static_inventory += using
action_intent = new /atom/movable/screen/combattoggle/flashy()
action_intent.hud = src
action_intent = new /atom/movable/screen/combattoggle/flashy(null, src)
action_intent.icon = ui_style
action_intent.screen_loc = ui_combat_toggle
static_inventory += action_intent
using = new /atom/movable/screen/mov_intent
using = new /atom/movable/screen/mov_intent(null, src)
using.icon = ui_style
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi
using.hud = src
static_inventory += using
using = new /atom/movable/screen/drop()
using = new /atom/movable/screen/drop(null, src)
using.icon = ui_style
using.screen_loc = ui_drop_throw
using.hud = src
static_inventory += using
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "uniform"
inv_box.icon = ui_style
inv_box.slot_id = ITEM_SLOT_ICLOTHING
inv_box.icon_state = "uniform"
inv_box.icon_full = "template"
inv_box.screen_loc = ui_iclothing
inv_box.hud = src
toggleable_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "suit"
inv_box.icon = ui_style
inv_box.slot_id = ITEM_SLOT_OCLOTHING
inv_box.icon_state = "suit"
inv_box.icon_full = "template"
inv_box.screen_loc = ui_oclothing
inv_box.hud = src
toggleable_inventory += inv_box
build_hand_slots()
using = new /atom/movable/screen/swap_hand()
using = new /atom/movable/screen/swap_hand(null, src)
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src
static_inventory += using
using = new /atom/movable/screen/swap_hand()
using = new /atom/movable/screen/swap_hand(null, src)
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
using.hud = src
static_inventory += using
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "id"
inv_box.icon = ui_style
inv_box.icon_state = "id"
inv_box.icon_full = "template_small"
inv_box.screen_loc = ui_id
inv_box.slot_id = ITEM_SLOT_ID
inv_box.hud = src
static_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "mask"
inv_box.icon = ui_style
inv_box.icon_state = "mask"
inv_box.icon_full = "template"
inv_box.screen_loc = ui_mask
inv_box.slot_id = ITEM_SLOT_MASK
inv_box.hud = src
toggleable_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "neck"
inv_box.icon = ui_style
inv_box.icon_state = "neck"
inv_box.icon_full = "template"
inv_box.screen_loc = ui_neck
inv_box.slot_id = ITEM_SLOT_NECK
inv_box.hud = src
toggleable_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "back"
inv_box.icon = ui_style
inv_box.icon_state = "back"
inv_box.icon_full = "template_small"
inv_box.screen_loc = ui_back
inv_box.slot_id = ITEM_SLOT_BACK
inv_box.hud = src
static_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "left pocket"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
inv_box.icon_full = "template_small"
inv_box.screen_loc = ui_storage1
inv_box.slot_id = ITEM_SLOT_LPOCKET
inv_box.hud = src
static_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "right pocket"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
inv_box.icon_full = "template_small"
inv_box.screen_loc = ui_storage2
inv_box.slot_id = ITEM_SLOT_RPOCKET
inv_box.hud = src
static_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "suit storage"
inv_box.icon = ui_style
inv_box.icon_state = "suit_storage"
inv_box.icon_full = "template"
inv_box.screen_loc = ui_sstore1
inv_box.slot_id = ITEM_SLOT_SUITSTORE
inv_box.hud = src
static_inventory += inv_box
using = new /atom/movable/screen/resist()
using = new /atom/movable/screen/resist(null, src)
using.icon = ui_style
using.screen_loc = ui_above_intent
using.hud = src
hotkeybuttons += using
using = new /atom/movable/screen/human/toggle()
using = new /atom/movable/screen/human/toggle(null, src)
using.icon = ui_style
using.screen_loc = ui_inventory
using.hud = src
static_inventory += using
using = new /atom/movable/screen/human/equip()
using.icon = ui_style
using.screen_loc = ui_equip_position(mymob)
using.hud = src
static_inventory += using
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "gloves"
inv_box.icon = ui_style
inv_box.icon_state = "gloves"
inv_box.icon_full = "template"
inv_box.screen_loc = ui_gloves
inv_box.slot_id = ITEM_SLOT_GLOVES
inv_box.hud = src
toggleable_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "eyes"
inv_box.icon = ui_style
inv_box.icon_state = "glasses"
inv_box.icon_full = "template"
inv_box.screen_loc = ui_glasses
inv_box.slot_id = ITEM_SLOT_EYES
inv_box.hud = src
toggleable_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "ears"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
inv_box.icon_full = "template"
inv_box.screen_loc = ui_ears
inv_box.slot_id = ITEM_SLOT_EARS
inv_box.hud = src
toggleable_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "head"
inv_box.icon = ui_style
inv_box.icon_state = "head"
inv_box.icon_full = "template"
inv_box.screen_loc = ui_head
inv_box.slot_id = ITEM_SLOT_HEAD
inv_box.hud = src
toggleable_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "shoes"
inv_box.icon = ui_style
inv_box.icon_state = "shoes"
inv_box.icon_full = "template"
inv_box.screen_loc = ui_shoes
inv_box.slot_id = ITEM_SLOT_FEET
inv_box.hud = src
toggleable_inventory += inv_box
inv_box = new /atom/movable/screen/inventory()
inv_box = new /atom/movable/screen/inventory(null, src)
inv_box.name = "belt"
inv_box.icon = ui_style
inv_box.icon_state = "belt"
inv_box.icon_full = "template_small"
inv_box.screen_loc = ui_belt
inv_box.slot_id = ITEM_SLOT_BELT
inv_box.hud = src
static_inventory += inv_box
throw_icon = new /atom/movable/screen/throw_catch()
throw_icon = new /atom/movable/screen/throw_catch(null, src)
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
throw_icon.hud = src
hotkeybuttons += throw_icon
rest_icon = new /atom/movable/screen/rest()
rest_icon = new /atom/movable/screen/rest(null, src)
rest_icon.icon = ui_style
rest_icon.screen_loc = ui_above_movement
rest_icon.hud = src
rest_icon.update_appearance()
static_inventory += rest_icon
spacesuit = new /atom/movable/screen/spacesuit
spacesuit.hud = src
spacesuit = new /atom/movable/screen/spacesuit(null, src)
infodisplay += spacesuit
healths = new /atom/movable/screen/healths()
healths.hud = src
healths = new /atom/movable/screen/healths(null, src)
infodisplay += healths
healthdoll = new /atom/movable/screen/healthdoll()
healthdoll.hud = src
healthdoll = new /atom/movable/screen/healthdoll(null, src)
infodisplay += healthdoll
stamina = new /atom/movable/screen/stamina()
stamina.hud = src
stamina = new /atom/movable/screen/stamina(null, src)
infodisplay += stamina
pull_icon = new /atom/movable/screen/pull()
pull_icon = new /atom/movable/screen/pull(null, src)
pull_icon.icon = ui_style
pull_icon.screen_loc = ui_above_intent
pull_icon.hud = src
pull_icon.update_appearance()
static_inventory += pull_icon
zone_select = new /atom/movable/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel(null, src)
zone_select.icon = ui_style
zone_select.hud = src
zone_select.update_appearance()
static_inventory += zone_select
combo_display = new /atom/movable/screen/combo()
combo_display = new /atom/movable/screen/combo(null, src)
infodisplay += combo_display
//SKYRAT EDIT ADDITION
ammo_counter = new /atom/movable/screen/ammo_counter()
ammo_counter.hud = src
infodisplay += ammo_counter
//SKYRAT EDIT END
ammo_counter = new /atom/movable/screen/ammo_counter(null, src) //SKYRAT EDIT ADDITION
infodisplay += ammo_counter //SKYRAT EDIT ADDITION
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[TOBITSHIFT(inv.slot_id) + 1] = inv
inv.update_appearance()

View File

@@ -4,17 +4,15 @@
/datum/hud/living/New(mob/living/owner)
..()
pull_icon = new /atom/movable/screen/pull()
pull_icon = new /atom/movable/screen/pull(null, src)
pull_icon.icon = ui_style
pull_icon.update_appearance()
pull_icon.screen_loc = ui_living_pull
pull_icon.hud = src
static_inventory += pull_icon
combo_display = new /atom/movable/screen/combo()
combo_display = new /atom/movable/screen/combo(null, src)
infodisplay += combo_display
//mob health doll! assumes whatever sprite the mob is
healthdoll = new /atom/movable/screen/healthdoll/living()
healthdoll.hud = src
healthdoll = new /atom/movable/screen/healthdoll/living(null, src)
infodisplay += healthdoll

View File

@@ -34,6 +34,7 @@
///Whether this HUD element can be hidden from the client's "screen" (moved off-screen) or not
var/always_shown = FALSE
///Set the HUD in New, as lobby screens are made before Atoms are Initialized.
/atom/movable/screen/lobby/New(loc, datum/hud/our_hud, ...)
if(our_hud)
hud = our_hud
@@ -139,7 +140,7 @@
if(!.)
return
var/datum/preferences/preferences = hud.mymob.client.prefs
var/datum/preferences/preferences = hud.mymob.canon_client.prefs
preferences.current_window = PREFERENCE_TAB_CHARACTER_PREFERENCES
preferences.update_static_data(usr)
preferences.ui_interact(usr)
@@ -154,7 +155,7 @@
///Whether we are readied up for the round or not
var/ready = FALSE
/atom/movable/screen/lobby/button/ready/Initialize(mapload)
/atom/movable/screen/lobby/button/ready/Initialize(mapload, datum/hud/hud_owner)
. = ..()
switch(SSticker.current_state)
if(GAME_STATE_PREGAME, GAME_STATE_STARTUP)
@@ -207,7 +208,7 @@
base_icon_state = "join_game"
enabled = FALSE
/atom/movable/screen/lobby/button/join/Initialize(mapload)
/atom/movable/screen/lobby/button/join/Initialize(mapload, datum/hud/hud_owner)
. = ..()
switch(SSticker.current_state)
if(GAME_STATE_PREGAME, GAME_STATE_STARTUP)
@@ -283,7 +284,7 @@
base_icon_state = "observe"
enabled = FALSE
/atom/movable/screen/lobby/button/observe/Initialize(mapload)
/atom/movable/screen/lobby/button/observe/Initialize(mapload, datum/hud/hud_owner)
. = ..()
if(SSticker.current_state > GAME_STATE_STARTUP)
set_button_status(TRUE)
@@ -319,7 +320,7 @@
if(!.)
return
var/datum/preferences/preferences = hud.mymob.client.prefs
var/datum/preferences/preferences = hud.mymob.canon_client.prefs
preferences.current_window = PREFERENCE_TAB_GAME_PREFERENCES
preferences.update_static_data(usr)
preferences.ui_interact(usr)

View File

@@ -2,14 +2,12 @@
/datum/hud/ooze/New(mob/living/owner)
. = ..()
zone_select = new /atom/movable/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel(null, src)
zone_select.icon = ui_style
zone_select.hud = src
zone_select.update_appearance()
static_inventory += zone_select
alien_plasma_display = new /atom/movable/screen/ooze_nutrition_display //Just going to use the alien plasma display because making new vars for each object is braindead.
alien_plasma_display.hud = src
alien_plasma_display = new /atom/movable/screen/ooze_nutrition_display(null, src) //Just going to use the alien plasma display because making new vars for each object is braindead.
infodisplay += alien_plasma_display
/atom/movable/screen/ooze_nutrition_display

View File

@@ -13,12 +13,12 @@
if(!length(C.parallax_layers_cached))
C.parallax_layers_cached = list()
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_1(null, screenmob)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_2(null, screenmob)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/planet(null, screenmob)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_1(null, src)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_2(null, src)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/planet(null, src)
if(SSparallax.random_layer)
C.parallax_layers_cached += new SSparallax.random_layer(null, screenmob)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_3(null, screenmob)
C.parallax_layers_cached += new SSparallax.random_layer(null, src)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_3(null, src)
C.parallax_layers = C.parallax_layers_cached.Copy()
@@ -271,9 +271,9 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/parallax_layer)
screen_loc = "CENTER-7,CENTER-7"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/atom/movable/screen/parallax_layer/Initialize(mapload, mob/owner)
/atom/movable/screen/parallax_layer/Initialize(mapload, datum/hud/hud_owner)
. = ..()
var/client/boss = owner?.client
var/client/boss = hud_owner?.mymob?.canon_client
if(!boss) // If this typepath all starts to harddel your culprit is likely this
return INITIALIZE_HINT_QDEL
@@ -330,9 +330,9 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/parallax_layer)
/atom/movable/screen/parallax_layer/random/space_gas
icon_state = "space_gas"
/atom/movable/screen/parallax_layer/random/space_gas/Initialize(mapload, mob/owner)
/atom/movable/screen/parallax_layer/random/space_gas/Initialize(mapload, datum/hud/hud_owner)
. = ..()
src.add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY)
add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY)
/atom/movable/screen/parallax_layer/random/asteroids
icon_state = "asteroids"
@@ -345,16 +345,17 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/parallax_layer)
speed = 3
layer = 30
/atom/movable/screen/parallax_layer/planet/Initialize(mapload, mob/owner)
/atom/movable/screen/parallax_layer/planet/Initialize(mapload, datum/hud/hud_owner)
. = ..()
if(!owner?.client)
var/client/boss = hud_owner?.mymob?.canon_client
if(!boss)
return
var/static/list/connections = list(
COMSIG_MOVABLE_Z_CHANGED = PROC_REF(on_z_change),
COMSIG_MOB_LOGOUT = PROC_REF(on_mob_logout),
)
AddComponent(/datum/component/connect_mob_behalf, owner.client, connections)
on_z_change(owner)
AddComponent(/datum/component/connect_mob_behalf, boss, connections)
on_z_change(hud_owner?.mymob)
/atom/movable/screen/parallax_layer/planet/proc/on_mob_logout(mob/source)
SIGNAL_HANDLER

View File

@@ -13,7 +13,7 @@
var/mutable_appearance/standard_background
/atom/movable/screen/movable/pic_in_pic/Initialize(mapload)
/atom/movable/screen/movable/pic_in_pic/Initialize(mapload, datum/hud/hud_owner)
. = ..()
make_backgrounds()
RegisterSignal(SSmapping, COMSIG_PLANE_OFFSET_INCREASE, PROC_REF(multiz_offset_increase))

View File

@@ -64,7 +64,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master)
/// If this plane master is outside of our visual bounds right now
var/is_outside_bounds = FALSE
/atom/movable/screen/plane_master/Initialize(mapload, datum/plane_master_group/home, offset = 0)
/atom/movable/screen/plane_master/Initialize(mapload, datum/hud/hud_owner, datum/plane_master_group/home, offset = 0)
. = ..()
src.offset = offset
true_alpha = alpha
@@ -132,7 +132,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master)
if(force_hidden)
return FALSE
var/client/our_client = mymob?.client
var/client/our_client = mymob?.canon_client
// Alright, let's get this out of the way
// Mobs can move z levels without their client. If this happens, we need to ensure critical display settings are respected
// This is done here. Mild to severe pain but it's nessesary
@@ -386,7 +386,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master)
plane = GAME_PLANE_FOV_HIDDEN
render_relay_planes = list(RENDER_PLANE_GAME_WORLD)
/atom/movable/screen/plane_master/game_world_fov_hidden/Initialize(mapload)
/atom/movable/screen/plane_master/game_world_fov_hidden/Initialize(mapload, datum/hud/hud_owner)
. = ..()
add_filter("vision_cone", 1, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(FIELD_OF_VISION_BLOCKER_RENDER_TARGET, offset), flags = MASK_INVERSE))
@@ -433,7 +433,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master)
plane = GAME_PLANE_UPPER_FOV_HIDDEN
render_relay_planes = list(RENDER_PLANE_GAME_WORLD)
/atom/movable/screen/plane_master/game_world_upper_fov_hidden/Initialize(mapload)
/atom/movable/screen/plane_master/game_world_upper_fov_hidden/Initialize(mapload, datum/hud/hud_owner)
. = ..()
// Dupe of the other hidden plane
add_filter("vision_cone", 1, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(FIELD_OF_VISION_BLOCKER_RENDER_TARGET, offset), flags = MASK_INVERSE))
@@ -536,7 +536,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master)
plane = PIPECRAWL_IMAGES_PLANE
start_hidden = TRUE
/atom/movable/screen/plane_master/pipecrawl/Initialize(mapload)
/atom/movable/screen/plane_master/pipecrawl/Initialize(mapload, datum/hud/hud_owner)
. = ..()
// Makes everything on this plane slightly brighter
// Has a nice effect, makes thing stand out
@@ -563,7 +563,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master)
// This can call on a cycle cause we don't clear in hide_from
// Yes this is the best way of hooking into the hud, I hate myself too
RegisterSignal(our_hud, COMSIG_HUD_EYE_CHANGED, PROC_REF(eye_changed), override = TRUE)
eye_changed(our_hud, null, our_hud.mymob?.client?.eye)
eye_changed(our_hud, null, our_hud.mymob?.canon_client?.eye)
/atom/movable/screen/plane_master/camera_static/proc/eye_changed(datum/hud/source, atom/old_eye, atom/new_eye)
SIGNAL_HANDLER
@@ -611,7 +611,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/plane_master)
if(!.)
return
remove_filter("AO")
if(istype(mymob) && mymob.client?.prefs?.read_preference(/datum/preference/toggle/ambient_occlusion))
if(istype(mymob) && mymob.canon_client?.prefs?.read_preference(/datum/preference/toggle/ambient_occlusion))
add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA"))
/atom/movable/screen/plane_master/balloon_chat

View File

@@ -84,7 +84,7 @@
for(var/plane_offset in starting_offset to ending_offset)
if(plane_offset != 0 && !initial(mytype.allows_offsetting))
continue
var/atom/movable/screen/plane_master/instance = new mytype(null, src, plane_offset)
var/atom/movable/screen/plane_master/instance = new mytype(null, null, src, plane_offset)
plane_masters["[instance.plane]"] = instance
prep_plane_instance(instance)

View File

@@ -76,7 +76,7 @@
plane = RENDER_PLANE_GAME
render_relay_planes = list(RENDER_PLANE_MASTER)
/atom/movable/screen/plane_master/rendering_plate/game_plate/Initialize(mapload)
/atom/movable/screen/plane_master/rendering_plate/game_plate/Initialize(mapload, datum/hud/hud_owner)
. = ..()
add_filter("displacer", 1, displacement_map_filter(render_source = OFFSET_RENDER_TARGET(GRAVITY_PULSE_RENDER_TARGET, offset), size = 10))
@@ -91,7 +91,7 @@
plane = RENDER_PLANE_TRANSPARENT
appearance_flags = PLANE_MASTER
/atom/movable/screen/plane_master/rendering_plate/transparent/Initialize(mapload, datum/plane_master_group/home, offset)
/atom/movable/screen/plane_master/rendering_plate/transparent/Initialize(mapload, datum/hud/hud_owner, datum/plane_master_group/home, offset)
. = ..()
// Don't display us if we're below everything else yeah?
AddComponent(/datum/component/plane_hide_highest_offset)
@@ -110,7 +110,7 @@
if(!.)
return
remove_filter("AO")
if(istype(mymob) && mymob.client?.prefs?.read_preference(/datum/preference/toggle/ambient_occlusion))
if(istype(mymob) && mymob.canon_client?.prefs?.read_preference(/datum/preference/toggle/ambient_occlusion))
add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA"))
///Contains all lighting objects
@@ -140,7 +140,7 @@
* A color matrix filter is applied to the emissive plane to mask out anything that isn't whatever the emissive color is.
* This is then used to alpha mask the lighting plane.
*/
/atom/movable/screen/plane_master/rendering_plate/lighting/Initialize(mapload)
/atom/movable/screen/plane_master/rendering_plate/lighting/Initialize(mapload, datum/hud/hud_owner)
. = ..()
add_filter("emissives", 1, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(EMISSIVE_RENDER_TARGET, offset), flags = MASK_INVERSE))
add_filter("object_lighting", 2, alpha_mask_filter(render_source = OFFSET_RENDER_TARGET(O_LIGHTING_VISUAL_RENDER_TARGET, offset), flags = MASK_INVERSE))
@@ -225,7 +225,7 @@
render_relay_planes = list()
critical = PLANE_CRITICAL_DISPLAY
/atom/movable/screen/plane_master/rendering_plate/emissive_slate/Initialize(mapload, datum/plane_master_group/home, offset)
/atom/movable/screen/plane_master/rendering_plate/emissive_slate/Initialize(mapload, datum/hud/hud_owner, datum/plane_master_group/home, offset)
. = ..()
add_filter("em_block_masking", 2, color_matrix_filter(GLOB.em_mask_matrix))
if(offset != 0)
@@ -324,7 +324,7 @@
if(get_relay_to(target_plane))
return
render_relay_planes += target_plane
var/client/display_lad = home?.our_hud?.mymob?.client
var/client/display_lad = home?.our_hud?.mymob?.canon_client
var/atom/movable/render_plane_relay/relay = generate_relay_to(target_plane, show_to = display_lad, blend_override = blend_override, relay_layer = relay_layer)
relay.color = relay_color
@@ -374,7 +374,7 @@
relays -= existing_relay
if(!length(relays) && !initial(render_target))
render_target = null
var/client/lad = home?.our_hud?.mymob?.client
var/client/lad = home?.our_hud?.mymob?.canon_client
if(lad)
lad.screen -= existing_relay

View File

@@ -4,13 +4,11 @@
/datum/hud/revenant/New(mob/owner)
..()
pull_icon = new /atom/movable/screen/pull()
pull_icon = new /atom/movable/screen/pull(null, src)
pull_icon.icon = ui_style
pull_icon.update_appearance()
pull_icon.screen_loc = ui_living_pull
pull_icon.hud = src
static_inventory += pull_icon
healths = new /atom/movable/screen/healths/revenant()
healths.hud = src
healths = new /atom/movable/screen/healths/revenant(null, src)
infodisplay += healths

View File

@@ -77,62 +77,52 @@
var/mob/living/silicon/robot/robit = mymob
var/atom/movable/screen/using
using = new/atom/movable/screen/language_menu
using = new/atom/movable/screen/language_menu(null, src)
using.screen_loc = ui_borg_language_menu
static_inventory += using
// Navigation
using = new /atom/movable/screen/navigate
using = new /atom/movable/screen/navigate(null, src)
using.screen_loc = ui_borg_navigate_menu
static_inventory += using
//Radio
using = new /atom/movable/screen/robot/radio()
using = new /atom/movable/screen/robot/radio(null, src)
using.screen_loc = ui_borg_radio
using.hud = src
static_inventory += using
//Module select
if(!robit.inv1)
robit.inv1 = new /atom/movable/screen/robot/module1()
robit.inv1 = new /atom/movable/screen/robot/module1(null, src)
robit.inv1.screen_loc = ui_inv1
robit.inv1.hud = src
static_inventory += robit.inv1
if(!robit.inv2)
robit.inv2 = new /atom/movable/screen/robot/module2()
robit.inv2 = new /atom/movable/screen/robot/module2(null, src)
robit.inv2.screen_loc = ui_inv2
robit.inv2.hud = src
static_inventory += robit.inv2
if(!robit.inv3)
robit.inv3 = new /atom/movable/screen/robot/module3()
robit.inv3 = new /atom/movable/screen/robot/module3(null, src)
robit.inv3.screen_loc = ui_inv3
robit.inv3.hud = src
static_inventory += robit.inv3
//End of module select
using = new /atom/movable/screen/robot/lamp()
using = new /atom/movable/screen/robot/lamp(null, src)
using.screen_loc = ui_borg_lamp
using.hud = src
static_inventory += using
robit.lampButton = using
var/atom/movable/screen/robot/lamp/lampscreen = using
lampscreen.robot = robit
//Photography stuff
using = new /atom/movable/screen/ai/image_take()
using = new /atom/movable/screen/ai/image_take(null, src)
using.screen_loc = ui_borg_camera
using.hud = src
static_inventory += using
//Borg Integrated Tablet
using = new /atom/movable/screen/robot/modpc()
using = new /atom/movable/screen/robot/modpc(null, src)
using.screen_loc = ui_borg_tablet
using.hud = src
static_inventory += using
robit.interfaceButton = using
if(robit.modularInterface)
@@ -143,44 +133,37 @@
tabletbutton.robot = robit
//Alerts
using = new /atom/movable/screen/robot/alerts()
using = new /atom/movable/screen/robot/alerts(null, src)
using.screen_loc = ui_borg_alerts
using.hud = src
static_inventory += using
//Combat Mode
action_intent = new /atom/movable/screen/combattoggle/robot()
action_intent.hud = src
action_intent = new /atom/movable/screen/combattoggle/robot(null, src)
action_intent.icon = ui_style
action_intent.screen_loc = ui_combat_toggle
static_inventory += action_intent
//Health
healths = new /atom/movable/screen/healths/robot()
healths.hud = src
healths = new /atom/movable/screen/healths/robot(null, src)
infodisplay += healths
//Installed Module
robit.hands = new /atom/movable/screen/robot/module()
robit.hands = new /atom/movable/screen/robot/module(null, src)
robit.hands.screen_loc = ui_borg_module
robit.hands.hud = src
static_inventory += robit.hands
//Store
module_store_icon = new /atom/movable/screen/robot/store()
module_store_icon = new /atom/movable/screen/robot/store(null, src)
module_store_icon.screen_loc = ui_borg_store
module_store_icon.hud = src
pull_icon = new /atom/movable/screen/pull()
pull_icon = new /atom/movable/screen/pull(null, src)
pull_icon.icon = 'icons/hud/screen_cyborg.dmi'
pull_icon.screen_loc = ui_borg_pull
pull_icon.hud = src
pull_icon.update_appearance()
hotkeybuttons += pull_icon
zone_select = new /atom/movable/screen/zone_sel/robot()
zone_select.hud = src
zone_select = new /atom/movable/screen/zone_sel/robot(null, src)
zone_select.update_appearance()
static_inventory += zone_select

View File

@@ -18,7 +18,7 @@
/// A reference to the object in the slot. Grabs or items, generally.
var/obj/master = null
/// A reference to the owner HUD, if any.
var/datum/hud/hud = null
VAR_PRIVATE/datum/hud/hud = null
/**
* Map name assigned to this object.
* Automatically set by /client/proc/add_obj_to_map.
@@ -36,6 +36,11 @@
/// If FALSE, this will not be cleared when calling /client/clear_screen()
var/clear_with_screen = TRUE
/atom/movable/screen/Initialize(mapload, datum/hud/hud_owner)
. = ..()
if(hud_owner && istype(hud_owner))
hud = hud_owner
/atom/movable/screen/Destroy()
master = null
hud = null
@@ -242,7 +247,7 @@
plane = ABOVE_HUD_PLANE
icon_state = "backpack_close"
/atom/movable/screen/close/Initialize(mapload, new_master)
/atom/movable/screen/close/Initialize(mapload, datum/hud/hud_owner, new_master)
. = ..()
master = new_master
@@ -267,7 +272,7 @@
icon_state = "combat_off"
screen_loc = ui_combat_toggle
/atom/movable/screen/combattoggle/Initialize(mapload)
/atom/movable/screen/combattoggle/Initialize(mapload, datum/hud/hud_owner)
. = ..()
update_appearance()
@@ -384,7 +389,7 @@
screen_loc = "7,7 to 10,8"
plane = HUD_PLANE
/atom/movable/screen/storage/Initialize(mapload, new_master)
/atom/movable/screen/storage/Initialize(mapload, datum/hud/hud_owner, new_master)
. = ..()
master = new_master
@@ -625,7 +630,7 @@
INITIALIZE_IMMEDIATE(/atom/movable/screen/splash)
/* SKYRAT EDIT REMOVAL
/atom/movable/screen/splash/Initialize(mapload, client/C, visible, use_previous_title)
/atom/movable/screen/splash/Initialize(mapload, datum/hud/hud_owner, client/C, visible, use_previous_title)
. = ..()
if(!istype(C))
return

View File

@@ -8,15 +8,14 @@
maptext = ""
layer = SCREENTIP_LAYER //Added to make screentips appear above action buttons (and other /atom/movable/screen objects)
/atom/movable/screen/screentip/Initialize(mapload, _hud)
/atom/movable/screen/screentip/Initialize(mapload, datum/hud/hud_owner)
. = ..()
hud = _hud
update_view()
/atom/movable/screen/screentip/proc/update_view(datum/source)
SIGNAL_HANDLER
if(!hud || !hud.mymob.client.view_size) //Might not have been initialized by now
if(!hud || !hud.mymob.canon_client.view_size) //Might not have been initialized by now
return
maptext_width = view_to_pixels(hud.mymob.client.view_size.getView())[1]
maptext_width = view_to_pixels(hud.mymob.canon_client.view_size.getView())[1]

View File

@@ -83,7 +83,7 @@
/// The `world.time` when the last color update occurred.
var/last_update_time = 0
/atom/movable/screen/admin_popup/Initialize(mapload, ...)
/atom/movable/screen/admin_popup/Initialize(mapload, datum/hud/hud_owner, ...)
. = ..()
START_PROCESSING(SSobj, src)

View File

@@ -173,7 +173,7 @@
layer = ECHO_LAYER
show_when_dead = TRUE
/atom/movable/screen/fullscreen/echo/Initialize(mapload)
/atom/movable/screen/fullscreen/echo/Initialize(mapload, datum/hud/hud_owner)
. = ..()
particles = new /particles/echo()

View File

@@ -89,8 +89,8 @@
var/display_contents = TRUE
/datum/storage/New(atom/parent, max_slots, max_specific_storage, max_total_storage, numerical_stacking, allow_quick_gather, allow_quick_empty, collection_mode, attack_hand_interact)
boxes = new(null, src)
closer = new(null, src)
boxes = new(null, null, src)
closer = new(null, null, src)
src.parent = WEAKREF(parent)
src.real_location = src.parent

View File

@@ -125,7 +125,7 @@
color = EM_BLOCK_COLOR
appearance_flags = EMISSIVE_APPEARANCE_FLAGS
/atom/movable/Initialize(mapload)
/atom/movable/Initialize(mapload, ...)
. = ..()
#ifdef UNIT_TESTS
if(explosion_block && !HAS_TRAIT(src, TRAIT_BLOCKING_EXPLOSIVES))

View File

@@ -165,12 +165,10 @@
if(living_mob.hud_used)
var/datum/hud/hud_used = living_mob.hud_used
lingchemdisplay = new /atom/movable/screen/ling/chems()
lingchemdisplay.hud = hud_used
lingchemdisplay = new /atom/movable/screen/ling/chems(null, hud_used)
hud_used.infodisplay += lingchemdisplay
lingstingdisplay = new /atom/movable/screen/ling/sting()
lingstingdisplay.hud = hud_used
lingstingdisplay = new /atom/movable/screen/ling/sting(null, hud_used)
hud_used.infodisplay += lingstingdisplay
hud_used.show_hud(hud_used.hud_version)
@@ -204,12 +202,10 @@
var/datum/hud/ling_hud = owner.current.hud_used
lingchemdisplay = new
lingchemdisplay.hud = ling_hud
lingchemdisplay = new(null, ling_hud)
ling_hud.infodisplay += lingchemdisplay
lingstingdisplay = new
lingstingdisplay.hud = ling_hud
lingstingdisplay = new(null, ling_hud)
ling_hud.infodisplay += lingstingdisplay
ling_hud.show_hud(ling_hud.hud_version)

View File

@@ -18,7 +18,7 @@
/datum/action/innate/cult/blood_magic/proc/Positioning()
for(var/datum/hud/hud as anything in viewers)
var/our_view = hud.mymob?.client?.view || "15x15"
var/our_view = hud.mymob?.canon_client?.view || "15x15"
var/atom/movable/screen/movable/action_button/button = viewers[hud]
var/position = screen_loc_to_offset(button.screen_loc)
var/list/position_list = list()

View File

@@ -451,7 +451,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
/// Handles the background of the portal, ensures the effect well, works properly
var/atom/movable/screen/background/cam_background
/atom/movable/screen/map_view/gateway_port/Initialize(mapload)
/atom/movable/screen/map_view/gateway_port/Initialize(mapload, datum/hud/hud_owner)
. = ..()
cam_background = new
cam_background.del_on_map_removal = FALSE

View File

@@ -13,7 +13,7 @@ GLOBAL_DATUM(escape_menu_details, /atom/movable/screen/escape_menu/details)
maptext_height = 100
maptext_width = 200
/atom/movable/screen/escape_menu/details/Initialize(mapload)
/atom/movable/screen/escape_menu/details/Initialize(mapload, datum/hud/hud_owner)
. = ..()
update_text()

View File

@@ -2,6 +2,7 @@
page_holder.give_screen_object(
new /atom/movable/screen/escape_menu/home_button(
null,
/* hud_owner = */ src,
src,
"Resume",
/* offset = */ 0,
@@ -12,6 +13,7 @@
page_holder.give_screen_object(
new /atom/movable/screen/escape_menu/home_button(
null,
/* hud_owner = */ null,
src,
"Settings",
/* offset = */ 1,
@@ -22,6 +24,7 @@
page_holder.give_screen_object(
new /atom/movable/screen/escape_menu/home_button/admin_help(
null,
/* hud_owner = */ src,
src,
"Admin Help",
/* offset = */ 2,
@@ -32,6 +35,7 @@
page_holder.give_screen_object(
new /atom/movable/screen/escape_menu/home_button/leave_body(
null,
/* hud_owner = */ src,
src,
"Leave Body",
/* offset = */ 3,
@@ -58,6 +62,7 @@
/atom/movable/screen/escape_menu/home_button/Initialize(
mapload,
datum/hud/hud_owner,
datum/escape_menu/escape_menu,
button_text,
offset,
@@ -70,6 +75,7 @@
home_button_text = new /atom/movable/screen/escape_menu/home_button_text(
src,
/* hud_owner = */ src,
button_text,
)
@@ -112,7 +118,7 @@
button_text
hovered = FALSE
/atom/movable/screen/escape_menu/home_button_text/Initialize(mapload, button_text)
/atom/movable/screen/escape_menu/home_button_text/Initialize(mapload, datum/hud/hud_owner, button_text)
. = ..()
src.button_text = button_text

View File

@@ -13,7 +13,7 @@ GLOBAL_DATUM(escape_menu_title, /atom/movable/screen/escape_menu/title)
maptext_height = 100
maptext_width = 500
/atom/movable/screen/escape_menu/title/Initialize(mapload)
/atom/movable/screen/escape_menu/title/Initialize(mapload, datum/hud/hud_owner)
. = ..()
update_text()

View File

@@ -74,7 +74,7 @@ INITIALIZE_IMMEDIATE(/mob/dead)
var/client/C = client
to_chat(C, span_notice("Sending you to [pick]."))
new /atom/movable/screen/splash(null, C)
new /atom/movable/screen/splash(null, null, C)
notransform = TRUE
sleep(2.9 SECONDS) //let the animation play

View File

@@ -6,7 +6,7 @@
var/highlighted = FALSE
var/mob/camera/ai_eye/pic_in_pic/aiEye
/atom/movable/screen/movable/pic_in_pic/ai/Initialize(mapload)
/atom/movable/screen/movable/pic_in_pic/ai/Initialize(mapload, datum/hud/hud_owner)
. = ..()
aiEye = new /mob/camera/ai_eye/pic_in_pic()
aiEye.screen = src

View File

@@ -180,62 +180,62 @@
var/mob/living/silicon/pai/mypai = mymob
// Software menu
using = new /atom/movable/screen/pai/software
using = new /atom/movable/screen/pai/software(null, src)
using.screen_loc = ui_pai_software
static_inventory += using
// Holoform
using = new /atom/movable/screen/pai/shell
using = new /atom/movable/screen/pai/shell(null, src)
using.screen_loc = ui_pai_shell
static_inventory += using
// Chassis Select Menu
using = new /atom/movable/screen/pai/chassis
using = new /atom/movable/screen/pai/chassis(null, src)
using.screen_loc = ui_pai_chassis
static_inventory += using
// Rest
using = new /atom/movable/screen/pai/rest
using = new /atom/movable/screen/pai/rest(null, src)
using.screen_loc = ui_pai_rest
static_inventory += using
// Integrated Light
using = new /atom/movable/screen/pai/light
using = new /atom/movable/screen/pai/light(null, src)
using.screen_loc = ui_pai_light
static_inventory += using
// Newscaster
using = new /atom/movable/screen/pai/newscaster
using = new /atom/movable/screen/pai/newscaster(null, src)
using.screen_loc = ui_pai_newscaster
static_inventory += using
// Language menu
using = new /atom/movable/screen/language_menu
using = new /atom/movable/screen/language_menu(null, src)
using.screen_loc = ui_pai_language_menu
static_inventory += using
// Navigation
using = new /atom/movable/screen/navigate
using = new /atom/movable/screen/navigate(null, src)
using.screen_loc = ui_pai_navigate_menu
static_inventory += using
// Host Monitor
using = new /atom/movable/screen/pai/host_monitor()
using = new /atom/movable/screen/pai/host_monitor(null, src)
using.screen_loc = ui_pai_host_monitor
static_inventory += using
// Crew Manifest
using = new /atom/movable/screen/pai/crew_manifest()
using = new /atom/movable/screen/pai/crew_manifest(null, src)
using.screen_loc = ui_pai_crew_manifest
static_inventory += using
// Laws
using = new /atom/movable/screen/pai/state_laws()
using = new /atom/movable/screen/pai/state_laws(null, src)
using.screen_loc = ui_pai_state_laws
static_inventory += using
// Modular Interface
using = new /atom/movable/screen/pai/modpc()
using = new /atom/movable/screen/pai/modpc(null, src)
using.screen_loc = ui_pai_mod_int
static_inventory += using
mypai.pda_button = using
@@ -243,22 +243,22 @@
tablet_button.pAI = mypai
// Internal GPS
using = new /atom/movable/screen/pai/internal_gps()
using = new /atom/movable/screen/pai/internal_gps(null, src)
using.screen_loc = ui_pai_internal_gps
static_inventory += using
// Take image
using = new /atom/movable/screen/pai/image_take()
using = new /atom/movable/screen/pai/image_take(null, src)
using.screen_loc = ui_pai_take_picture
static_inventory += using
// View images
using = new /atom/movable/screen/pai/image_view()
using = new /atom/movable/screen/pai/image_view(null, src)
using.screen_loc = ui_pai_view_images
static_inventory += using
// Radio
using = new /atom/movable/screen/pai/radio()
using = new /atom/movable/screen/pai/radio(null, src)
using.screen_loc = ui_pai_radio
static_inventory += using

View File

@@ -100,7 +100,7 @@
PROTECTED_PROC(TRUE)
if (isnull(instruction_screen))
instruction_screen = new(null, message, user.client)
instruction_screen = new(null, null, message, user.client)
user.client?.screen += instruction_screen
else
instruction_screen.change_message(message)

View File

@@ -10,7 +10,7 @@
var/client/client
var/atom/movable/screen/tutorial_instruction_text/instruction_text
/atom/movable/screen/tutorial_instruction/Initialize(mapload, message, client/client)
/atom/movable/screen/tutorial_instruction/Initialize(mapload, datum/hud/hud_owner, message, client/client)
. = ..()
transform = transform.Scale(36, 2.5)
@@ -18,7 +18,7 @@
src.client = client
animate(src, alpha = 245, time = 0.8 SECONDS, easing = SINE_EASING)
instruction_text = new(src, message, client)
instruction_text = new(src, null, message, client)
vis_contents += instruction_text
/atom/movable/screen/tutorial_instruction/Destroy()
@@ -36,7 +36,7 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
layer = TUTORIAL_INSTRUCTIONS_LAYER
/atom/movable/screen/tutorial_instruction_text/Initialize(mapload, message, client/client)
/atom/movable/screen/tutorial_instruction_text/Initialize(mapload, datum/hud/hud_owner, message, client/client)
. = ..()
var/view = client?.view_size.getView()

View File

@@ -256,9 +256,8 @@ GLOBAL_LIST_INIT(call911_do_and_do_not, list(
var/mob/living/M = mob_override || owner.current
if(M.hud_used)
var/datum/hud/H = M.hud_used
var/atom/movable/screen/wanted/giving_wanted_lvl = new /atom/movable/screen/wanted()
var/atom/movable/screen/wanted/giving_wanted_lvl = new /atom/movable/screen/wanted(null, H)
H.wanted_lvl = giving_wanted_lvl
giving_wanted_lvl.hud = H
H.infodisplay += giving_wanted_lvl
H.mymob.client.screen += giving_wanted_lvl