mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 00:23:29 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user