Refactors screen objects to /atom/movable (#24068)

* introduce helper + remove unused proc

* we love compatibility

* Update code/_onclick/hud/action_button.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/_onclick/hud/action_button.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/_onclick/hud/alert.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/_onclick/hud/blob_overmind.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/_onclick/hud/blob_overmind.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/_onclick/hud/blob_overmind.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/martial_arts/martial.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/mining/lavaland/loot/tendril_loot.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/species/shadow.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/species/shadow.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/mob/living/living_update_status.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/_onclick/hud/screen_objects.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/_onclick/hud/screen_objects.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/_onclick/hud/screen_objects.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/objects/items/weapons/storage/internal.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/machinery/computer/camera_advanced.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/machinery/computer/camera_advanced.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/objects/items/weapons/storage/internal.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/mecha/mecha.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* deconflict

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
Contrabang
2024-03-03 12:37:51 -05:00
committed by GitHub
parent cc433a3794
commit 87a318a7de
125 changed files with 1036 additions and 1047 deletions
+1 -1
View File
@@ -90,7 +90,7 @@
M.setDir(dir)
buckled_mobs |= M
ADD_TRAIT(M, TRAIT_IMMOBILIZED, BUCKLING_TRAIT)
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
M.throw_alert("buckled", /atom/movable/screen/alert/restrained/buckled)
post_buckle_mob(M)
SEND_SIGNAL(src, COMSIG_MOVABLE_BUCKLE, M, force)
return TRUE
@@ -372,7 +372,7 @@
/datum/hud/sword/New(mob/user)
..()
mymob.healths = new /obj/screen/healths()
mymob.healths = new /atom/movable/screen/healths()
infodisplay += mymob.healths
/mob/living/simple_animal/shade/sword/ClickOn(atom/A, params)
@@ -61,7 +61,7 @@
/obj/item/storage/belt/MouseDrop(obj/over_object, src_location, over_location)
var/mob/M = usr
if(!istype(over_object, /obj/screen))
if(!is_screen_atom(over_object))
return ..()
playsound(loc, "rustle", 50, TRUE, -5)
if(!M.restrained() && !M.stat && can_use())
@@ -37,10 +37,10 @@
if(over_object == user && Adjacent(user)) // this must come before the screen objects only block
open(user)
return 0
return FALSE
if(!istype(over_object, /obj/screen))
return 1
if(!is_screen_atom(over_object))
return TRUE
//makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away.
//there's got to be a better way of doing this...
@@ -26,8 +26,8 @@
var/max_combined_w_class = 14
/// The number of storage slots in this container.
var/storage_slots = 7
var/obj/screen/storage/boxes = null
var/obj/screen/close/closer = null
var/atom/movable/screen/storage/boxes = null
var/atom/movable/screen/close/closer = null
/// Set this to make it possible to use this item in an inverse way, so you can have the item in your hand and click items on the floor to pick them up.
var/use_to_pickup = FALSE
@@ -59,14 +59,14 @@
populate_contents()
boxes = new /obj/screen/storage()
boxes = new /atom/movable/screen/storage()
boxes.name = "storage"
boxes.master = src
boxes.icon_state = "block"
boxes.screen_loc = "7,7 to 10,8"
boxes.layer = HUD_LAYER
boxes.plane = HUD_PLANE
closer = new /obj/screen/close()
closer = new /atom/movable/screen/close()
closer.master = src
closer.icon_state = "backpack_close"
closer.layer = ABOVE_HUD_LAYER
@@ -136,7 +136,7 @@
update_icon() // For content-sensitive icons
return
if(!(istype(over_object, /obj/screen)))
if(!is_screen_atom(over_object))
return ..()
if(!(loc == M) || (loc && loc.loc == M))
return
@@ -233,7 +233,7 @@
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
..()
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
if(is_screen_atom(O)) //fix for HUD elements making their way into the world -Pete
return
if(O.loc == user)
return
@@ -371,7 +371,7 @@
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1)
/obj/structure/closet/ex_act(severity)
for(var/atom/A in contents)
+2 -2
View File
@@ -241,7 +241,7 @@
/obj/structure/morgue/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)
/*
* Morgue tray
@@ -534,7 +534,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/crematorium/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)
/*
* Crematorium tray
+2 -2
View File
@@ -359,13 +359,13 @@ GLOBAL_LIST_EMPTY(safes)
drill.song.start_playing(driller)
notify_ghosts("Security assault in progress in [get_area(src)]!", enter_link="<a href=?src=[UID()];follow=1>(Click to jump to!)</a>", source = src, action = NOTIFY_FOLLOW)
for(var/mob/dead/observer/O in GLOB.player_list)
O.overlay_fullscreen("payback", /obj/screen/fullscreen/payback, 0)
O.overlay_fullscreen("payback", /atom/movable/screen/fullscreen/payback, 0)
addtimer(CALLBACK(src, PROC_REF(ghost_payback_phase_2)), 2.7 SECONDS)
/obj/structure/safe/proc/ghost_payback_phase_2()
for(var/mob/dead/observer/O in GLOB.player_list)
O.clear_fullscreen("payback")
O.overlay_fullscreen("payback", /obj/screen/fullscreen/payback, 1)
O.overlay_fullscreen("payback", /atom/movable/screen/fullscreen/payback, 1)
addtimer(CALLBACK(src, PROC_REF(clear_payback)), 2 MINUTES)
/obj/structure/safe/proc/clear_payback()
@@ -75,7 +75,7 @@
if(istype(hugger_mask) && !hugger_mask.sterile && (locate(/obj/item/organ/internal/body_egg/alien_embryo) in buckled_mob.internal_organs))
if(user && !isalien(user))
return
buckled_mob.throw_alert("ghost_nest", /obj/screen/alert/ghost)
buckled_mob.throw_alert("ghost_nest", /atom/movable/screen/alert/ghost)
to_chat(buckled_mob, "<span class='ghostalert'>You may now ghost, you keep respawnability in this state. You will be alerted when you're removed from the nest.</span>")
/obj/structure/bed/nest/post_buckle_mob(mob/living/M)