mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 06:58:30 +01:00
obj screen to atom movable screen (#18434)
* obj screen to atom movable screen * .
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
var/turf/last_camera_turf
|
||||
// Stuff needed to render the map
|
||||
var/map_name
|
||||
var/obj/screen/map_view/cam_screen
|
||||
var/atom/movable/screen/map_view/cam_screen
|
||||
var/list/cam_plane_masters
|
||||
var/obj/screen/background/cam_background
|
||||
var/obj/screen/skybox/local_skybox
|
||||
var/atom/movable/screen/background/cam_background
|
||||
var/atom/movable/screen/skybox/local_skybox
|
||||
|
||||
// Proc: setup_tgui_camera()
|
||||
// Parameters: None
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
cam_plane_masters = get_tgui_plane_masters()
|
||||
|
||||
for(var/obj/screen/instance as anything in cam_plane_masters)
|
||||
for(var/atom/movable/screen/instance as anything in cam_plane_masters)
|
||||
instance.assigned_map = map_name
|
||||
instance.del_on_map_removal = FALSE
|
||||
instance.screen_loc = "[map_name]:CENTER"
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
var/mob/M = usr
|
||||
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
|
||||
return
|
||||
if(!istype(over_object, /obj/screen))
|
||||
if(!istype(over_object, /atom/movable/screen))
|
||||
return attack_self(M)
|
||||
return
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
voice_mobs.Add(new_voice)
|
||||
GLOB.listening_objects |= src
|
||||
|
||||
var/obj/screen/blackness = new() //Makes a black screen, so the candidate can't see what's going on before actually 'connecting' to the communicator.
|
||||
var/atom/movable/screen/blackness = new() //Makes a black screen, so the candidate can't see what's going on before actually 'connecting' to the communicator.
|
||||
blackness.screen_loc = ui_entire_screen
|
||||
blackness.icon = 'icons/effects/effects.dmi'
|
||||
blackness.icon_state = "1"
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
|
||||
return
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
if (!( istype(over_object, /atom/movable/screen) ))
|
||||
return ..()
|
||||
|
||||
//makes sure that the thing is equipped, so that we can't drag it into our hand from miles away.
|
||||
@@ -202,7 +202,7 @@
|
||||
if (( usr.restrained() ) || ( usr.stat ))
|
||||
return
|
||||
|
||||
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
|
||||
if ((src.loc == usr) && !(istype(over_object, /atom/movable/screen)) && !usr.unEquip(src))
|
||||
return
|
||||
|
||||
switch(over_object.name)
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/obj/screen/alert/leash_dom
|
||||
/atom/movable/screen/alert/leash_dom
|
||||
name = "Leash Holder"
|
||||
desc = "You're holding a leash, with someone on the end."
|
||||
icon_state = "leash_master"
|
||||
|
||||
/obj/screen/alert/leash_dom/Click()
|
||||
/atom/movable/screen/alert/leash_dom/Click()
|
||||
var/obj/item/leash/owner = master
|
||||
owner.unleash()
|
||||
|
||||
/obj/screen/alert/leash_pet
|
||||
/atom/movable/screen/alert/leash_pet
|
||||
name = "Leashed"
|
||||
desc = "You're on the hook now!"
|
||||
icon_state = "leash_pet"
|
||||
|
||||
/obj/screen/alert/leash_dom/Click()
|
||||
/atom/movable/screen/alert/leash_dom/Click()
|
||||
var/obj/item/leash/owner = master
|
||||
owner.struggle_leash()
|
||||
|
||||
@@ -85,12 +85,12 @@
|
||||
|
||||
leash_pet = C //Save pet reference for later
|
||||
leash_pet.add_modifier(/datum/modifier/leash)
|
||||
leash_pet.throw_alert("leashed", /obj/screen/alert/leash_pet, new_master = src) //Is the leasher
|
||||
leash_pet.throw_alert("leashed", /atom/movable/screen/alert/leash_pet, new_master = src) //Is the leasher
|
||||
RegisterSignal(leash_pet, COMSIG_MOVABLE_MOVED, PROC_REF(on_pet_move))
|
||||
to_chat(leash_pet, span_userdanger("You have been leashed!"))
|
||||
to_chat(leash_pet, span_danger("(You can use OOC escape to detach the leash)"))
|
||||
leash_master = user //Save dom reference for later
|
||||
leash_master.throw_alert("leash", /obj/screen/alert/leash_dom, new_master = src)//Has now been leashed
|
||||
leash_master.throw_alert("leash", /atom/movable/screen/alert/leash_dom, new_master = src)//Has now been leashed
|
||||
RegisterSignal(leash_master, COMSIG_MOVABLE_MOVED, PROC_REF(on_master_move))
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
|
||||
return
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
if (!( istype(over_object, /atom/movable/screen) ))
|
||||
return ..()
|
||||
|
||||
//makes sure that the thing is equipped, so that we can't drag it into our hand from miles away.
|
||||
@@ -98,7 +98,7 @@
|
||||
if (( usr.restrained() ) || ( usr.stat ))
|
||||
return
|
||||
|
||||
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
|
||||
if ((src.loc == usr) && !(istype(over_object, /atom/movable/screen)) && !usr.unEquip(src))
|
||||
return
|
||||
|
||||
switch(over_object.name)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
src.open(user)
|
||||
return 0
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
if (!( istype(over_object, /atom/movable/screen) ))
|
||||
return 1
|
||||
|
||||
//makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away.
|
||||
|
||||
@@ -27,19 +27,19 @@
|
||||
var/storage_slots = null //The number of storage slots in this container. If null, it uses the volume-based storage instead.
|
||||
|
||||
/// Boxes screen object for fixed-size storage (belts, etc)
|
||||
var/obj/screen/storage/boxes = null
|
||||
var/atom/movable/screen/storage/boxes = null
|
||||
/// List of 'click catchers' for boxes for fixed-size storage
|
||||
var/list/box_catchers = null
|
||||
|
||||
/// For dynamic storage, the leftmost pixel column for the whole storage display. Most of the interesting effects are hung on this in vis_contents.
|
||||
var/obj/screen/storage/storage_start = null
|
||||
var/atom/movable/screen/storage/storage_start = null
|
||||
/// For dynamic storage, the majority of the width of the whole storage display. Decorative, but sized to the width appropriate to represent how much storage there is.
|
||||
var/obj/screen/storage/storage_continue = null
|
||||
var/atom/movable/screen/storage/storage_continue = null
|
||||
/// For dynamic storage, the rightmost pixel column for the whole storage display. Decorative.
|
||||
var/obj/screen/storage/storage_end = null
|
||||
var/atom/movable/screen/storage/storage_end = null
|
||||
|
||||
/// The "X" button at the far right of the storage
|
||||
var/obj/screen/close/closer = null
|
||||
var/atom/movable/screen/close/closer = null
|
||||
|
||||
var/use_to_pickup //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/display_contents_with_number //Set this to make the storage item group contents of the same type and display them as a number.
|
||||
@@ -66,31 +66,31 @@
|
||||
verbs -= /obj/item/storage/verb/toggle_gathering_mode
|
||||
|
||||
if(storage_slots)
|
||||
src.boxes = new /obj/screen/storage( )
|
||||
src.boxes = new /atom/movable/screen/storage( )
|
||||
src.boxes.name = "storage"
|
||||
src.boxes.master = src
|
||||
src.boxes.icon_state = "block"
|
||||
src.boxes.screen_loc = "7,7 to 10,8"
|
||||
else
|
||||
src.storage_start = new /obj/screen/storage( )
|
||||
src.storage_start = new /atom/movable/screen/storage( )
|
||||
src.storage_start.name = "storage"
|
||||
src.storage_start.master = src
|
||||
src.storage_start.icon_state = "storage_start"
|
||||
src.storage_start.screen_loc = "7,7 to 10,8"
|
||||
|
||||
src.storage_continue = new /obj/screen/storage( )
|
||||
src.storage_continue = new /atom/movable/screen/storage( )
|
||||
src.storage_continue.name = "storage"
|
||||
src.storage_continue.master = src
|
||||
src.storage_continue.icon_state = "storage_continue"
|
||||
src.storage_continue.screen_loc = "7,7 to 10,8"
|
||||
|
||||
src.storage_end = new /obj/screen/storage( )
|
||||
src.storage_end = new /atom/movable/screen/storage( )
|
||||
src.storage_end.name = "storage"
|
||||
src.storage_end.master = src
|
||||
src.storage_end.icon_state = "storage_end"
|
||||
src.storage_end.screen_loc = "7,7 to 10,8"
|
||||
|
||||
src.closer = new /obj/screen/close( )
|
||||
src.closer = new /atom/movable/screen/close( )
|
||||
src.closer.master = src
|
||||
src.closer.icon_state = "storage_close"
|
||||
src.closer.hud_layerise()
|
||||
@@ -135,7 +135,7 @@
|
||||
src.open(usr)
|
||||
return
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
if (!( istype(over_object, /atom/movable/screen) ))
|
||||
return ..()
|
||||
|
||||
//makes sure that the storage is equipped, so that we can't drag it into our hand from miles away.
|
||||
@@ -146,7 +146,7 @@
|
||||
if (( usr.restrained() ) || ( usr.stat ))
|
||||
return
|
||||
|
||||
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
|
||||
if ((src.loc == usr) && !(istype(over_object, /atom/movable/screen)) && !usr.unEquip(src))
|
||||
return
|
||||
|
||||
switch(over_object.name)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
|
||||
return
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
if (!( istype(over_object, /atom/movable/screen) ))
|
||||
return ..()
|
||||
|
||||
//makes sure that the thing is equipped, so that we can't drag it into our hand from miles away.
|
||||
@@ -51,7 +51,7 @@
|
||||
if (( usr.restrained() ) || ( usr.stat ))
|
||||
return
|
||||
|
||||
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
|
||||
if ((src.loc == usr) && !(istype(over_object, /atom/movable/screen)) && !usr.unEquip(src))
|
||||
return
|
||||
|
||||
switch(over_object.name)
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
|
||||
return
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
if (!( istype(over_object, /atom/movable/screen) ))
|
||||
return ..()
|
||||
|
||||
//makes sure that the thing is equipped, so that we can't drag it into our hand from miles away.
|
||||
@@ -249,7 +249,7 @@
|
||||
if (( usr.restrained() ) || ( usr.stat ))
|
||||
return
|
||||
|
||||
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
|
||||
if ((src.loc == usr) && !(istype(over_object, /atom/movable/screen)) && !usr.unEquip(src))
|
||||
return
|
||||
|
||||
switch(over_object.name)
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
|
||||
return
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
if (!( istype(over_object, /atom/movable/screen) ))
|
||||
return ..()
|
||||
|
||||
//makes sure that the thing is equipped, so that we can't drag it into our hand from miles away.
|
||||
@@ -132,7 +132,7 @@
|
||||
if (( usr.restrained() ) || ( usr.stat ))
|
||||
return
|
||||
|
||||
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
|
||||
if ((src.loc == usr) && !(istype(over_object, /atom/movable/screen)) && !usr.unEquip(src))
|
||||
return
|
||||
|
||||
switch(over_object.name)
|
||||
|
||||
Reference in New Issue
Block a user