Actually makes it work by /obj/screen --> /atom/movable/screen

This commit is contained in:
Artur
2021-07-29 14:06:18 +03:00
parent 82ccfc40dc
commit 4b2bffdff0
12 changed files with 16 additions and 20 deletions
+1 -1
View File
@@ -235,7 +235,7 @@
return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:-6"
/datum/hud/proc/SetButtonCoords(obj/screen/button,number, supportedcolumns)
/datum/hud/proc/SetButtonCoords(atom/movable/screen/button,number, supportedcolumns)
var/row = round((number-1)/supportedcolumns)
var/col = ((number - 1)%(supportedcolumns)) + 1
var/x_offset = 32*(col-1) + 4 + 2*col
+1 -1
View File
@@ -69,7 +69,7 @@
thealert.timeout = world.time + thealert.timeout - world.tick_lag
return thealert
/mob/proc/alert_timeout(obj/screen/alert/alert, category)
/mob/proc/alert_timeout(atom/movable/screen/alert/alert, category)
if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout)
clear_alert(category)
+1 -1
View File
@@ -31,7 +31,7 @@
client.screen -= screen
qdel(screen)
/mob/proc/clear_fullscreen_after_animate(obj/screen/fullscreen/screen)
/mob/proc/clear_fullscreen_after_animate(atom/movable/screen/fullscreen/screen)
if(client)
client.screen -= screen
qdel(screen)
+1 -1
View File
@@ -46,7 +46,7 @@
* Registers screen obj with the client, which makes it visible on the
* assigned map, and becomes a part of the assigned map's lifecycle.
*/
/client/proc/register_map_obj(obj/screen/screen_obj)
/client/proc/register_map_obj(atom/movable/screen/screen_obj)
if(!screen_obj.assigned_map)
CRASH("Can't register [screen_obj] without 'assigned_map' property.")
if(!screen_maps[screen_obj.assigned_map])
+1 -1
View File
@@ -26,7 +26,7 @@
QDEL_NULL(button_expand)
return ..()
/atom/movable/screen/movable/pic_in_pic/component_click(obj/screen/component_button/component, params)
/atom/movable/screen/movable/pic_in_pic/component_click(atom/movable/screen/component_button/component, params)
if(component == button_x)
qdel(src)
else if(component == button_expand)
+2 -2
View File
@@ -159,7 +159,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
else
SetElement(E,page_choices[i],angle,anim = anim,anim_order = i)
/datum/radial_menu/proc/HideElement(obj/screen/radial/slice/E)
/datum/radial_menu/proc/HideElement(atom/movable/screen/radial/slice/E)
E.cut_overlays()
E.alpha = 0
E.name = "None"
@@ -168,7 +168,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
E.choice = null
E.next_page = FALSE
/datum/radial_menu/proc/SetElement(obj/screen/radial/slice/E,choice_id,angle,anim,anim_order)
/datum/radial_menu/proc/SetElement(atom/movable/screen/radial/slice/E,choice_id,angle,anim,anim_order)
//Position
var/py = round(cos(angle) * radius) + py_shift
var/px = round(sin(angle) * radius)
+2 -6
View File
@@ -11,7 +11,6 @@
icon = 'icons/mob/screen_gen.dmi'
layer = HUD_LAYER
plane = HUD_PLANE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
animate_movement = SLIDE_STEPS
speech_span = SPAN_ROBOT
vis_flags = VIS_INHERIT_PLANE
@@ -34,9 +33,6 @@
*/
var/del_on_map_removal = TRUE
/atom/movable/screen/take_damage()
return
/atom/movable/screen/Destroy()
master = null
hud = null
@@ -48,7 +44,7 @@
/atom/movable/screen/orbit()
return
/atom/movable/screen/proc/component_click(obj/screen/component_button/component, params)
/atom/movable/screen/proc/component_click(atom/movable/screen/component_button/component, params)
return
/atom/movable/screen/text
@@ -695,7 +691,7 @@
/atom/movable/screen/component_button
var/atom/movable/screen/parent
/atom/movable/screen/component_button/Initialize(mapload, obj/screen/parent)
/atom/movable/screen/component_button/Initialize(mapload, atom/movable/screen/parent)
. = ..()
src.parent = parent
+2 -2
View File
@@ -159,7 +159,7 @@
button.color = rgb(255,255,255,255)
return 1
/datum/action/proc/ApplyIcon(obj/screen/movable/action_button/current_button, force = FALSE)
/datum/action/proc/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force = FALSE)
if(icon_icon && button_icon_state && ((current_button.button_icon_state != button_icon_state) || force))
current_button.cut_overlays()
current_button.add_overlay(mutable_appearance(icon_icon, button_icon_state))
@@ -821,7 +821,7 @@
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "storage_gather_switch"
/datum/action/item_action/storage_gather_mode/ApplyIcon(obj/screen/movable/action_button/current_button)
/datum/action/item_action/storage_gather_mode/ApplyIcon(atom/movable/screen/movable/action_button/current_button)
. = ..()
var/old_layer = target.layer
var/old_plane = target.plane
+1 -1
View File
@@ -323,7 +323,7 @@
Deletion.Cut(Deletion.len)
qdel(DL)
/datum/component/personal_crafting/proc/component_ui_interact(obj/screen/craft/image, location, control, params, user)
/datum/component/personal_crafting/proc/component_ui_interact(atom/movable/screen/craft/image, location, control, params, user)
if(user == parent)
ui_interact(user)
+1 -1
View File
@@ -88,7 +88,7 @@
var/datum/player_details/player_details //these persist between logins/logouts during the same round.
var/list/char_render_holders //Should only be a key-value list of north/south/east/west = obj/screen.
var/list/char_render_holders //Should only be a key-value list of north/south/east/west = atom/movable/screen.
/// Last time they used fix macros
var/last_macro_fix = 0
@@ -505,7 +505,7 @@
button_icon_state = "slimeeject"
..()
/datum/action/innate/integrate_extract/ApplyIcon(obj/screen/movable/action_button/current_button, force)
/datum/action/innate/integrate_extract/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force)
..(current_button, TRUE)
if(species && species.current_extract)
current_button.add_overlay(mutable_appearance(species.current_extract.icon, species.current_extract.icon_state))
@@ -559,7 +559,7 @@
return TRUE
return FALSE
/datum/action/innate/use_extract/ApplyIcon(obj/screen/movable/action_button/current_button, force)
/datum/action/innate/use_extract/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force)
..(current_button, TRUE)
if(species && species.current_extract)
current_button.add_overlay(mutable_appearance(species.current_extract.icon, species.current_extract.icon_state))
@@ -251,7 +251,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
to_chat(src, "<span class='notice'>Multiple-camera viewing mode deactivated.</span>")
/mob/living/silicon/ai/proc/select_main_multicam_window(obj/screen/movable/pic_in_pic/ai/P)
/mob/living/silicon/ai/proc/select_main_multicam_window(atom/movable/screen/movable/pic_in_pic/ai/P)
if(master_multicam == P)
return