/obj/screen --> /atom/movable/screen
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
They are used with the client/screen list and the screen_loc var.
|
||||
For more information, see the byond documentation on the screen_loc and screen vars.
|
||||
*/
|
||||
/obj/screen
|
||||
/atom/movable/screen
|
||||
name = ""
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
layer = HUD_LAYER
|
||||
@@ -34,24 +34,24 @@
|
||||
*/
|
||||
var/del_on_map_removal = TRUE
|
||||
|
||||
/obj/screen/take_damage()
|
||||
/atom/movable/screen/take_damage()
|
||||
return
|
||||
|
||||
/obj/screen/Destroy()
|
||||
/atom/movable/screen/Destroy()
|
||||
master = null
|
||||
hud = null
|
||||
return ..()
|
||||
|
||||
/obj/screen/examine(mob/user)
|
||||
/atom/movable/screen/examine(mob/user)
|
||||
return list()
|
||||
|
||||
/obj/screen/orbit()
|
||||
/atom/movable/screen/orbit()
|
||||
return
|
||||
|
||||
/obj/screen/proc/component_click(obj/screen/component_button/component, params)
|
||||
/atom/movable/screen/proc/component_click(obj/screen/component_button/component, params)
|
||||
return
|
||||
|
||||
/obj/screen/text
|
||||
/atom/movable/screen/text
|
||||
icon = null
|
||||
icon_state = null
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
@@ -59,12 +59,12 @@
|
||||
maptext_height = 480
|
||||
maptext_width = 480
|
||||
|
||||
/obj/screen/swap_hand
|
||||
/atom/movable/screen/swap_hand
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
name = "swap hand"
|
||||
|
||||
/obj/screen/swap_hand/Click()
|
||||
/atom/movable/screen/swap_hand/Click()
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
// We don't even know if it's a middle click
|
||||
// if(world.time <= usr.next_move)
|
||||
@@ -78,19 +78,19 @@
|
||||
M.swap_hand()
|
||||
return 1
|
||||
|
||||
/obj/screen/craft
|
||||
/atom/movable/screen/craft
|
||||
name = "crafting menu"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "craft"
|
||||
screen_loc = ui_crafting
|
||||
|
||||
/obj/screen/area_creator
|
||||
/atom/movable/screen/area_creator
|
||||
name = "create new area"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "area_edit"
|
||||
screen_loc = ui_building
|
||||
|
||||
/obj/screen/area_creator/Click()
|
||||
/atom/movable/screen/area_creator/Click()
|
||||
if(usr.incapacitated() || (isobserver(usr) && !IsAdminGhost(usr)))
|
||||
return TRUE
|
||||
var/area/A = get_area(usr)
|
||||
@@ -99,18 +99,18 @@
|
||||
return TRUE
|
||||
create_area(usr)
|
||||
|
||||
/obj/screen/language_menu
|
||||
/atom/movable/screen/language_menu
|
||||
name = "language menu"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "talk_wheel"
|
||||
screen_loc = ui_language_menu
|
||||
|
||||
/obj/screen/language_menu/Click()
|
||||
/atom/movable/screen/language_menu/Click()
|
||||
var/mob/M = usr
|
||||
var/datum/language_holder/H = M.get_language_holder()
|
||||
H.open_language_menu(usr)
|
||||
|
||||
/obj/screen/inventory
|
||||
/atom/movable/screen/inventory
|
||||
/// The identifier for the slot. It has nothing to do with ID cards.
|
||||
var/slot_id
|
||||
/// Icon when empty. For now used only by humans.
|
||||
@@ -122,7 +122,7 @@
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/inventory/Click(location, control, params)
|
||||
/atom/movable/screen/inventory/Click(location, control, params)
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
// We don't even know if it's a middle click
|
||||
// if(world.time <= usr.next_move)
|
||||
@@ -142,16 +142,16 @@
|
||||
usr.update_inv_hands()
|
||||
return TRUE
|
||||
|
||||
/obj/screen/inventory/MouseEntered()
|
||||
/atom/movable/screen/inventory/MouseEntered()
|
||||
..()
|
||||
add_overlays()
|
||||
|
||||
/obj/screen/inventory/MouseExited()
|
||||
/atom/movable/screen/inventory/MouseExited()
|
||||
..()
|
||||
cut_overlay(object_overlays)
|
||||
object_overlays.Cut()
|
||||
|
||||
/obj/screen/inventory/update_icon_state()
|
||||
/atom/movable/screen/inventory/update_icon_state()
|
||||
if(!icon_empty)
|
||||
icon_empty = icon_state
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
else
|
||||
icon_state = icon_empty
|
||||
|
||||
/obj/screen/inventory/proc/add_overlays()
|
||||
/atom/movable/screen/inventory/proc/add_overlays()
|
||||
var/mob/user = hud?.mymob
|
||||
|
||||
if(!user || !slot_id)
|
||||
@@ -184,12 +184,12 @@
|
||||
// object_overlay = item_overlay
|
||||
add_overlay(object_overlays)
|
||||
|
||||
/obj/screen/inventory/hand
|
||||
/atom/movable/screen/inventory/hand
|
||||
var/mutable_appearance/handcuff_overlay
|
||||
var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked")
|
||||
var/held_index = 0
|
||||
|
||||
/obj/screen/inventory/hand/update_overlays()
|
||||
/atom/movable/screen/inventory/hand/update_overlays()
|
||||
. = ..()
|
||||
|
||||
if(!handcuff_overlay)
|
||||
@@ -212,7 +212,7 @@
|
||||
. += "hand_active"
|
||||
|
||||
|
||||
/obj/screen/inventory/hand/Click(location, control, params)
|
||||
/atom/movable/screen/inventory/hand/Click(location, control, params)
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
// We don't even know if it's a middle click
|
||||
var/mob/user = hud?.mymob
|
||||
@@ -234,26 +234,26 @@
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/screen/drop
|
||||
/atom/movable/screen/drop
|
||||
name = "drop"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_drop"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/drop/Click()
|
||||
/atom/movable/screen/drop/Click()
|
||||
if(usr.stat == CONSCIOUS)
|
||||
usr.dropItemToGround(usr.get_active_held_item())
|
||||
|
||||
/obj/screen/act_intent
|
||||
/atom/movable/screen/act_intent
|
||||
name = "intent"
|
||||
icon_state = "help"
|
||||
screen_loc = ui_acti
|
||||
|
||||
/obj/screen/act_intent/Click(location, control, params)
|
||||
/atom/movable/screen/act_intent/Click(location, control, params)
|
||||
usr.a_intent_change(INTENT_HOTKEY_RIGHT)
|
||||
|
||||
/obj/screen/act_intent/segmented/Click(location, control, params)
|
||||
/atom/movable/screen/act_intent/segmented/Click(location, control, params)
|
||||
if(usr.client.prefs.toggles & INTENT_STYLE)
|
||||
var/_x = text2num(params2list(params)["icon-x"])
|
||||
var/_y = text2num(params2list(params)["icon-y"])
|
||||
@@ -272,20 +272,20 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/screen/act_intent/alien
|
||||
/atom/movable/screen/act_intent/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
screen_loc = ui_movi
|
||||
|
||||
/obj/screen/act_intent/robot
|
||||
/atom/movable/screen/act_intent/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
screen_loc = ui_borg_intents
|
||||
|
||||
/obj/screen/internals
|
||||
/atom/movable/screen/internals
|
||||
name = "toggle internals"
|
||||
icon_state = "internal0"
|
||||
screen_loc = ui_internal
|
||||
|
||||
/obj/screen/internals/Click()
|
||||
/atom/movable/screen/internals/Click()
|
||||
if(!iscarbon(usr))
|
||||
return
|
||||
var/mob/living/carbon/C = usr
|
||||
@@ -346,71 +346,71 @@
|
||||
return
|
||||
C.update_action_buttons_icon()
|
||||
|
||||
/obj/screen/mov_intent
|
||||
/atom/movable/screen/mov_intent
|
||||
name = "run/walk toggle"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "running"
|
||||
|
||||
/obj/screen/mov_intent/Initialize(mapload)
|
||||
/atom/movable/screen/mov_intent/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/screen/mov_intent/Click()
|
||||
/atom/movable/screen/mov_intent/Click()
|
||||
toggle(usr)
|
||||
|
||||
/obj/screen/mov_intent/update_icon_state()
|
||||
/atom/movable/screen/mov_intent/update_icon_state()
|
||||
switch(hud?.mymob?.m_intent)
|
||||
if(MOVE_INTENT_WALK)
|
||||
icon_state = CONFIG_GET(flag/sprint_enabled)? "walking" : "walking_nosprint"
|
||||
if(MOVE_INTENT_RUN)
|
||||
icon_state = CONFIG_GET(flag/sprint_enabled)? "running" : "running_nosprint"
|
||||
|
||||
/obj/screen/mov_intent/proc/toggle(mob/user)
|
||||
/atom/movable/screen/mov_intent/proc/toggle(mob/user)
|
||||
if(isobserver(user))
|
||||
return
|
||||
user.toggle_move_intent(user)
|
||||
|
||||
/obj/screen/pull
|
||||
/atom/movable/screen/pull
|
||||
name = "stop pulling"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "pull"
|
||||
|
||||
/obj/screen/pull/Click()
|
||||
/atom/movable/screen/pull/Click()
|
||||
if(isobserver(usr))
|
||||
return
|
||||
usr.stop_pulling()
|
||||
|
||||
/obj/screen/pull/update_icon_state()
|
||||
/atom/movable/screen/pull/update_icon_state()
|
||||
if(hud?.mymob?.pulling)
|
||||
icon_state = "pull"
|
||||
else
|
||||
icon_state = "pull0"
|
||||
|
||||
/obj/screen/resist
|
||||
/atom/movable/screen/resist
|
||||
name = "resist"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_resist"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/resist/Click()
|
||||
/atom/movable/screen/resist/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.resist()
|
||||
|
||||
/obj/screen/rest
|
||||
/atom/movable/screen/rest
|
||||
name = "rest"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_rest"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/rest/Click()
|
||||
/atom/movable/screen/rest/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.lay_down()
|
||||
|
||||
/obj/screen/rest/update_icon_state()
|
||||
/atom/movable/screen/rest/update_icon_state()
|
||||
var/mob/living/user = hud?.mymob
|
||||
if(!istype(user))
|
||||
return
|
||||
@@ -419,17 +419,17 @@
|
||||
else
|
||||
icon_state = "act_rest0"
|
||||
|
||||
/obj/screen/throw_catch
|
||||
/atom/movable/screen/throw_catch
|
||||
name = "throw/catch"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_throw_off"
|
||||
|
||||
/obj/screen/throw_catch/Click()
|
||||
/atom/movable/screen/throw_catch/Click()
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.toggle_throw_mode()
|
||||
|
||||
/obj/screen/zone_sel
|
||||
/atom/movable/screen/zone_sel
|
||||
name = "damage zone"
|
||||
icon_state = "zone_sel"
|
||||
screen_loc = ui_zonesel
|
||||
@@ -437,7 +437,7 @@
|
||||
var/static/list/hover_overlays_cache = list()
|
||||
var/hovering
|
||||
|
||||
/obj/screen/zone_sel/Click(location, control,params)
|
||||
/atom/movable/screen/zone_sel/Click(location, control,params)
|
||||
if(isobserver(usr))
|
||||
return
|
||||
|
||||
@@ -450,10 +450,10 @@
|
||||
|
||||
return set_selected_zone(choice, usr)
|
||||
|
||||
/obj/screen/zone_sel/MouseEntered(location, control, params)
|
||||
/atom/movable/screen/zone_sel/MouseEntered(location, control, params)
|
||||
MouseMove(location, control, params)
|
||||
|
||||
/obj/screen/zone_sel/MouseMove(location, control, params)
|
||||
/atom/movable/screen/zone_sel/MouseMove(location, control, params)
|
||||
if(isobserver(usr))
|
||||
return
|
||||
|
||||
@@ -482,12 +482,12 @@
|
||||
layer = ABOVE_HUD_LAYER
|
||||
plane = ABOVE_HUD_PLANE
|
||||
|
||||
/obj/screen/zone_sel/MouseExited(location, control, params)
|
||||
/atom/movable/screen/zone_sel/MouseExited(location, control, params)
|
||||
if(!isobserver(usr) && hovering)
|
||||
vis_contents -= hover_overlays_cache[hovering]
|
||||
hovering = null
|
||||
|
||||
/obj/screen/zone_sel/proc/get_zone_at(icon_x, icon_y)
|
||||
/atom/movable/screen/zone_sel/proc/get_zone_at(icon_x, icon_y)
|
||||
switch(icon_y)
|
||||
if(1 to 9) //Legs
|
||||
switch(icon_x)
|
||||
@@ -525,7 +525,7 @@
|
||||
return BODY_ZONE_PRECISE_EYES
|
||||
return BODY_ZONE_HEAD
|
||||
|
||||
/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
|
||||
/atom/movable/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
|
||||
if(user != hud?.mymob)
|
||||
return
|
||||
|
||||
@@ -535,21 +535,21 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/screen/zone_sel/update_overlays()
|
||||
/atom/movable/screen/zone_sel/update_overlays()
|
||||
. = ..()
|
||||
if(!hud?.mymob)
|
||||
return
|
||||
. += mutable_appearance(overlay_icon, "[hud.mymob.zone_selected]")
|
||||
|
||||
/obj/screen/zone_sel/alien
|
||||
/atom/movable/screen/zone_sel/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
overlay_icon = 'icons/mob/screen_alien.dmi'
|
||||
|
||||
/obj/screen/zone_sel/robot
|
||||
/atom/movable/screen/zone_sel/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
|
||||
/obj/screen/flash
|
||||
/atom/movable/screen/flash
|
||||
name = "flash"
|
||||
icon_state = "blank"
|
||||
blend_mode = BLEND_ADD
|
||||
@@ -557,7 +557,7 @@
|
||||
layer = FLASH_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/damageoverlay
|
||||
/atom/movable/screen/damageoverlay
|
||||
icon = 'icons/mob/screen_full.dmi'
|
||||
icon_state = "oxydamageoverlay0"
|
||||
name = "dmg"
|
||||
@@ -567,87 +567,87 @@
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/healths
|
||||
/atom/movable/screen/healths
|
||||
name = "health"
|
||||
icon_state = "health0"
|
||||
screen_loc = ui_health
|
||||
|
||||
/obj/screen/healths/alien
|
||||
/atom/movable/screen/healths/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
screen_loc = ui_alien_health
|
||||
|
||||
/obj/screen/healths/robot
|
||||
/atom/movable/screen/healths/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
screen_loc = ui_borg_health
|
||||
|
||||
/obj/screen/healths/blob
|
||||
/atom/movable/screen/healths/blob
|
||||
name = "blob health"
|
||||
icon_state = "block"
|
||||
screen_loc = ui_internal
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/screen/healths/blob/naut
|
||||
/atom/movable/screen/healths/blob/naut
|
||||
name = "health"
|
||||
icon = 'icons/mob/blob.dmi'
|
||||
icon_state = "nauthealth"
|
||||
|
||||
/obj/screen/healths/blob/naut/core
|
||||
/atom/movable/screen/healths/blob/naut/core
|
||||
name = "overmind health"
|
||||
screen_loc = ui_health
|
||||
icon_state = "corehealth"
|
||||
|
||||
/obj/screen/healths/guardian
|
||||
/atom/movable/screen/healths/guardian
|
||||
name = "summoner health"
|
||||
icon = 'icons/mob/guardian.dmi'
|
||||
icon_state = "base"
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/screen/healths/clock
|
||||
/atom/movable/screen/healths/clock
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon_state = "bg_clock"
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/screen/healths/clock/gear
|
||||
/atom/movable/screen/healths/clock/gear
|
||||
icon = 'icons/mob/clockwork_mobs.dmi'
|
||||
icon_state = "bg_gear"
|
||||
screen_loc = ui_internal
|
||||
|
||||
/obj/screen/healths/revenant
|
||||
/atom/movable/screen/healths/revenant
|
||||
name = "essence"
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon_state = "bg_revenant"
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/screen/healths/construct
|
||||
/atom/movable/screen/healths/construct
|
||||
icon = 'icons/mob/screen_construct.dmi'
|
||||
icon_state = "artificer_health0"
|
||||
screen_loc = ui_construct_health
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/screen/healths/lavaland_elite
|
||||
/atom/movable/screen/healths/lavaland_elite
|
||||
icon = 'icons/mob/screen_elite.dmi'
|
||||
icon_state = "elite_health0"
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/screen/healthdoll
|
||||
/atom/movable/screen/healthdoll
|
||||
name = "health doll"
|
||||
screen_loc = ui_healthdoll
|
||||
|
||||
/obj/screen/healthdoll/living
|
||||
/atom/movable/screen/healthdoll/living
|
||||
icon_state = "fullhealth0"
|
||||
screen_loc = ui_living_healthdoll
|
||||
var/filtered = FALSE //so we don't repeatedly create the mask of the mob every update
|
||||
|
||||
/obj/screen/mood
|
||||
/atom/movable/screen/mood
|
||||
name = "mood"
|
||||
icon_state = "mood5"
|
||||
screen_loc = ui_mood
|
||||
|
||||
/obj/screen/splash
|
||||
/atom/movable/screen/splash
|
||||
icon = 'icons/blank_title.png'
|
||||
icon_state = ""
|
||||
screen_loc = "1,1"
|
||||
@@ -655,7 +655,7 @@
|
||||
plane = SPLASHSCREEN_PLANE
|
||||
var/client/holder
|
||||
|
||||
/obj/screen/splash/New(client/C, visible, use_previous_title) //TODO: Make this use INITIALIZE_IMMEDIATE, except its not easy
|
||||
/atom/movable/screen/splash/New(client/C, visible, use_previous_title) //TODO: Make this use INITIALIZE_IMMEDIATE, except its not easy
|
||||
. = ..()
|
||||
|
||||
holder = C
|
||||
@@ -674,7 +674,7 @@
|
||||
|
||||
holder.screen += src
|
||||
|
||||
/obj/screen/splash/proc/Fade(out, qdel_after = TRUE)
|
||||
/atom/movable/screen/splash/proc/Fade(out, qdel_after = TRUE)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(out)
|
||||
@@ -685,20 +685,20 @@
|
||||
if(qdel_after)
|
||||
QDEL_IN(src, 30)
|
||||
|
||||
/obj/screen/splash/Destroy()
|
||||
/atom/movable/screen/splash/Destroy()
|
||||
if(holder)
|
||||
holder.screen -= src
|
||||
holder = null
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/screen/component_button
|
||||
var/obj/screen/parent
|
||||
/atom/movable/screen/component_button
|
||||
var/atom/movable/screen/parent
|
||||
|
||||
/obj/screen/component_button/Initialize(mapload, obj/screen/parent)
|
||||
/atom/movable/screen/component_button/Initialize(mapload, obj/screen/parent)
|
||||
. = ..()
|
||||
src.parent = parent
|
||||
|
||||
/obj/screen/component_button/Click(params)
|
||||
/atom/movable/screen/component_button/Click(params)
|
||||
if(parent)
|
||||
parent.component_click(src, params)
|
||||
|
||||
Reference in New Issue
Block a user