either destroys the entire game, or increases performance... maybe both (#16178)

This commit is contained in:
ChesterTheCheesy
2022-10-29 16:02:44 +02:00
committed by GitHub
parent 1104e8e4be
commit 4aa6c0b45d
187 changed files with 1412 additions and 1410 deletions

View File

@@ -26,7 +26,7 @@
if(multicam_on)
var/turf/T = get_turf(A)
if(T)
for(var/obj/screen/movable/pic_in_pic/ai/P in T.vis_locs)
for(var/atom/movable/screen/movable/pic_in_pic/ai/P in T.vis_locs)
if(P.ai == src)
P.Click(params)
break
@@ -181,7 +181,7 @@
/* Humans (With upgrades) */
/mob/living/carbon/human/AIShiftClick(mob/living/silicon/ai/user)
if(user.client && (user.client.eye == user.eyeobj || user.client.eye == user.loc))
if(user.canExamineHumans)
user.examinate(src)

View File

@@ -448,14 +448,14 @@
setDir(WEST)
//debug
/obj/screen/proc/scale_to(x1,y1)
/atom/movable/screen/proc/scale_to(x1,y1)
if(!y1)
y1 = x1
var/matrix/M = new
M.Scale(x1,y1)
transform = M
/obj/screen/click_catcher
/atom/movable/screen/click_catcher
icon = 'icons/mob/screen_gen.dmi'
icon_state = "catcher"
plane = CLICKCATCHER_PLANE
@@ -465,7 +465,7 @@
#define MAX_SAFE_BYOND_ICON_SCALE_TILES (MAX_SAFE_BYOND_ICON_SCALE_PX / world.icon_size)
#define MAX_SAFE_BYOND_ICON_SCALE_PX (33 * 32) //Not using world.icon_size on purpose.
/obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
/atom/movable/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
var/icon/newicon = icon('icons/mob/screen_gen.dmi', "catcher")
var/ox = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_x)
var/oy = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_y)
@@ -480,7 +480,7 @@
M.Scale(px/sx, py/sy)
transform = M
/obj/screen/click_catcher/Click(location, control, params)
/atom/movable/screen/click_catcher/Click(location, control, params)
var/list/modifiers = params2list(params)
if(modifiers["middle"] && iscarbon(usr))
var/mob/living/carbon/C = usr

View File

@@ -97,10 +97,10 @@
/atom/proc/IsAutoclickable()
. = 1
/obj/screen/IsAutoclickable()
/atom/movable/screen/IsAutoclickable()
. = 0
/obj/screen/click_catcher/IsAutoclickable()
/atom/movable/screen/click_catcher/IsAutoclickable()
. = 1
//Please don't roast me too hard

View File

@@ -1,6 +1,6 @@
#define ACTION_BUTTON_DEFAULT_BACKGROUND "default"
/obj/screen/movable/action_button
/atom/movable/screen/movable/action_button
var/datum/action/linked_action
var/actiontooltipstyle = ""
screen_loc = null
@@ -11,7 +11,7 @@
var/id
var/ordered = TRUE //If the button gets placed into the default bar
/obj/screen/movable/action_button/proc/can_use(mob/user)
/atom/movable/screen/movable/action_button/proc/can_use(mob/user)
if (linked_action)
return linked_action.owner == user
else if (isobserver(user))
@@ -20,14 +20,14 @@
else
return TRUE
/obj/screen/movable/action_button/MouseDrop(over_object)
/atom/movable/screen/movable/action_button/MouseDrop(over_object)
if(!can_use(usr))
return
if((istype(over_object, /obj/screen/movable/action_button) && !istype(over_object, /obj/screen/movable/action_button/hide_toggle)))
if((istype(over_object, /atom/movable/screen/movable/action_button) && !istype(over_object, /atom/movable/screen/movable/action_button/hide_toggle)))
if(locked)
to_chat(usr, span_warning("Action button \"[name]\" is locked, unlock it first."))
return
var/obj/screen/movable/action_button/B = over_object
var/atom/movable/screen/movable/action_button/B = over_object
var/list/actions = usr.actions
actions.Swap(actions.Find(src.linked_action), actions.Find(B.linked_action))
moved = FALSE
@@ -38,7 +38,7 @@
else
return ..()
/obj/screen/movable/action_button/Click(location,control,params)
/atom/movable/screen/movable/action_button/Click(location,control,params)
if (!can_use(usr))
return
@@ -67,7 +67,7 @@
return TRUE
//Hide/Show Action Buttons ... Button
/obj/screen/movable/action_button/hide_toggle
/atom/movable/screen/movable/action_button/hide_toggle
name = "Hide Buttons"
desc = "Shift-click any button to reset its position, and Control-click it to lock it in place. Alt-click this button to reset all buttons to their default positions."
icon = 'icons/mob/actions.dmi'
@@ -77,7 +77,7 @@
var/hide_state = "hide"
var/show_state = "show"
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
/atom/movable/screen/movable/action_button/hide_toggle/Click(location,control,params)
if (!can_use(usr))
return
@@ -100,7 +100,7 @@
var/datum/action/A = V
if(A.owner != usr)
continue // This isnt your button fuck off
var/obj/screen/movable/action_button/B = A.button
var/atom/movable/screen/movable/action_button/B = A.button
B.moved = FALSE
if(B.id && usr.client)
usr.client.prefs.action_buttons_screen_locs["[B.name]_[B.id]"] = null
@@ -122,12 +122,12 @@
update_icon()
usr.update_action_buttons()
/obj/screen/movable/action_button/hide_toggle/AltClick(mob/user)
/atom/movable/screen/movable/action_button/hide_toggle/AltClick(mob/user)
for(var/V in user.actions)
var/datum/action/A = V
if(A.owner != user)
continue // This isnt your button fuck off
var/obj/screen/movable/action_button/B = A.button
var/atom/movable/screen/movable/action_button/B = A.button
B.moved = FALSE
if(moved)
moved = FALSE
@@ -135,7 +135,7 @@
to_chat(user, span_notice("Action button positions have been reset."))
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(datum/hud/owner_hud)
/atom/movable/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(datum/hud/owner_hud)
var/settings = owner_hud.get_action_buttons_icons()
icon = settings["bg_icon"]
icon_state = settings["bg_state"]
@@ -144,17 +144,17 @@
show_state = settings["toggle_show"]
update_icon()
/obj/screen/movable/action_button/hide_toggle/update_icon()
/atom/movable/screen/movable/action_button/hide_toggle/update_icon()
cut_overlays()
add_overlay(mutable_appearance(hide_icon, hidden ? show_state : hide_state))
/obj/screen/movable/action_button/MouseEntered(location,control,params)
/atom/movable/screen/movable/action_button/MouseEntered(location,control,params)
if(!QDELETED(src))
openToolTip(usr,src,params,title = name,content = desc,theme = actiontooltipstyle)
/obj/screen/movable/action_button/MouseExited()
/atom/movable/screen/movable/action_button/MouseExited()
closeToolTip(usr)
/datum/hud/proc/get_action_buttons_icons()
@@ -192,7 +192,7 @@
for(var/datum/action/A in actions)
var/is_owner = (A.owner == src)
A.UpdateButtonIcon()
var/obj/screen/movable/action_button/B = A.button
var/atom/movable/screen/movable/action_button/B = A.button
if(B.ordered)
button_number++
if(B.moved && is_owner)
@@ -233,7 +233,7 @@
return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:-6"
/datum/hud/proc/SetButtonCoords(obj/screen/button,number)
/datum/hud/proc/SetButtonCoords(atom/movable/screen/button,number)
var/row = round((number-1)/AB_MAX_COLUMNS)
var/col = ((number - 1)%(AB_MAX_COLUMNS)) + 1
var/x_offset = 32*(col-1) + 4 + 2*col

View File

@@ -1,146 +1,146 @@
/obj/screen/ai
/atom/movable/screen/ai
icon = 'icons/mob/screen_ai.dmi'
/obj/screen/ai/Click()
/atom/movable/screen/ai/Click()
if(isobserver(usr) || usr.incapacitated())
return TRUE
/obj/screen/ai/aicore
/atom/movable/screen/ai/aicore
name = "AI core"
icon_state = "ai_core"
/obj/screen/ai/aicore/Click()
/atom/movable/screen/ai/aicore/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.view_core()
/obj/screen/ai/camera_list
/atom/movable/screen/ai/camera_list
name = "Show Camera List"
icon_state = "camera"
/obj/screen/ai/camera_list/Click()
/atom/movable/screen/ai/camera_list/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.show_camera_list()
/obj/screen/ai/camera_track
/atom/movable/screen/ai/camera_track
name = "Track With Camera"
icon_state = "track"
/obj/screen/ai/camera_track/Click()
/atom/movable/screen/ai/camera_track/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs()
AI.ai_camera_track(target_name)
/obj/screen/ai/camera_light
/atom/movable/screen/ai/camera_light
name = "Toggle Camera Light"
icon_state = "camera_light"
/obj/screen/ai/camera_light/Click()
/atom/movable/screen/ai/camera_light/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.toggle_camera_light()
/obj/screen/ai/crew_monitor
/atom/movable/screen/ai/crew_monitor
name = "Crew Monitoring Console"
icon_state = "crew_monitor"
/obj/screen/ai/crew_monitor/Click()
/atom/movable/screen/ai/crew_monitor/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
GLOB.crewmonitor.show(AI,AI)
/obj/screen/ai/crew_manifest
/atom/movable/screen/ai/crew_manifest
name = "Crew Manifest"
icon_state = "manifest"
/obj/screen/ai/crew_manifest/Click()
/atom/movable/screen/ai/crew_manifest/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.ai_roster()
/obj/screen/ai/dashboard
/atom/movable/screen/ai/dashboard
name = "Processing Dashboard"
icon_state = "dashboard"
/obj/screen/ai/dashboard/Click()
/atom/movable/screen/ai/dashboard/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.dashboard.ui_interact(AI)
/obj/screen/ai/alerts
/atom/movable/screen/ai/alerts
name = "Show Alerts"
icon_state = "alerts"
/obj/screen/ai/alerts/Click()
/atom/movable/screen/ai/alerts/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.ai_alerts()
/obj/screen/ai/announcement
/atom/movable/screen/ai/announcement
name = "Make Vox Announcement"
icon_state = "announcement"
/obj/screen/ai/announcement/Click()
/atom/movable/screen/ai/announcement/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.announcement()
/obj/screen/ai/call_shuttle
/atom/movable/screen/ai/call_shuttle
name = "Call Emergency Shuttle"
icon_state = "call_shuttle"
/obj/screen/ai/call_shuttle/Click()
/atom/movable/screen/ai/call_shuttle/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.ai_call_shuttle()
/obj/screen/ai/state_laws
/atom/movable/screen/ai/state_laws
name = "State Laws"
icon_state = "state_laws"
/obj/screen/ai/state_laws/Click()
/atom/movable/screen/ai/state_laws/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.checklaws()
/obj/screen/ai/pda_msg_send
/atom/movable/screen/ai/pda_msg_send
name = "PDA - Send Message"
icon_state = "pda_send"
/obj/screen/ai/pda_msg_send/Click()
/atom/movable/screen/ai/pda_msg_send/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.cmd_send_pdamesg(usr)
/obj/screen/ai/pda_msg_show
/atom/movable/screen/ai/pda_msg_show
name = "PDA - Show Message Log"
icon_state = "pda_receive"
/obj/screen/ai/pda_msg_show/Click()
/atom/movable/screen/ai/pda_msg_show/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.cmd_show_message_log(usr)
/obj/screen/ai/image_take
/atom/movable/screen/ai/image_take
name = "Take Image"
icon_state = "take_picture"
/obj/screen/ai/image_take/Click()
/atom/movable/screen/ai/image_take/Click()
if(..())
return
if(isAI(usr))
@@ -150,42 +150,42 @@
var/mob/living/silicon/robot/R = usr
R.aicamera.toggle_camera_mode(usr)
/obj/screen/ai/image_view
/atom/movable/screen/ai/image_view
name = "View Images"
icon_state = "view_images"
/obj/screen/ai/image_view/Click()
/atom/movable/screen/ai/image_view/Click()
if(..())
return
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.aicamera.viewpictures(usr)
/obj/screen/ai/sensors
/atom/movable/screen/ai/sensors
name = "Sensor Augmentation"
icon_state = "ai_sensor"
/obj/screen/ai/sensors/Click()
/atom/movable/screen/ai/sensors/Click()
if(..())
return
var/mob/living/silicon/S = usr
S.toggle_sensors()
/obj/screen/ai/multicam
/atom/movable/screen/ai/multicam
name = "Multicamera Mode"
icon_state = "multicam"
/obj/screen/ai/multicam/Click()
/atom/movable/screen/ai/multicam/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.toggle_multicam()
/obj/screen/ai/add_multicam
/atom/movable/screen/ai/add_multicam
name = "New Camera"
icon_state = "new_cam"
/obj/screen/ai/add_multicam/Click()
/atom/movable/screen/ai/add_multicam/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
@@ -197,10 +197,10 @@
/datum/hud/ai/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
// Language menu
using = new /obj/screen/language_menu
using = new /atom/movable/screen/language_menu
if(owner?.client?.prefs?.widescreenpref)
using.screen_loc = ui_ai_language_menu_widescreen
else
@@ -208,12 +208,12 @@
static_inventory += using
//AI core
using = new /obj/screen/ai/aicore()
using = new /atom/movable/screen/ai/aicore()
using.screen_loc = ui_ai_core
static_inventory += using
//Dashboard
using = new /obj/screen/ai/dashboard
using = new /atom/movable/screen/ai/dashboard
if(owner?.client?.prefs?.widescreenpref)
using.screen_loc = ui_ai_dashboard_widescreen
else
@@ -222,77 +222,77 @@
static_inventory += using
//Camera list
using = new /obj/screen/ai/camera_list()
using = new /atom/movable/screen/ai/camera_list()
using.screen_loc = ui_ai_camera_list
static_inventory += using
//Track
using = new /obj/screen/ai/camera_track()
using = new /atom/movable/screen/ai/camera_track()
using.screen_loc = ui_ai_track_with_camera
static_inventory += using
//Camera light
using = new /obj/screen/ai/camera_light()
using = new /atom/movable/screen/ai/camera_light()
using.screen_loc = ui_ai_camera_light
static_inventory += using
//Crew Monitoring
using = new /obj/screen/ai/crew_monitor()
using = new /atom/movable/screen/ai/crew_monitor()
using.screen_loc = ui_ai_crew_monitor
static_inventory += using
//Crew Manifest
using = new /obj/screen/ai/crew_manifest()
using = new /atom/movable/screen/ai/crew_manifest()
using.screen_loc = ui_ai_crew_manifest
static_inventory += using
//Alerts
using = new /obj/screen/ai/alerts()
using = new /atom/movable/screen/ai/alerts()
using.screen_loc = ui_ai_alerts
static_inventory += using
//Announcement
using = new /obj/screen/ai/announcement()
using = new /atom/movable/screen/ai/announcement()
using.screen_loc = ui_ai_announcement
static_inventory += using
//Shuttle
using = new /obj/screen/ai/call_shuttle()
using = new /atom/movable/screen/ai/call_shuttle()
using.screen_loc = ui_ai_shuttle
static_inventory += using
//Laws
using = new /obj/screen/ai/state_laws()
using = new /atom/movable/screen/ai/state_laws()
using.screen_loc = ui_ai_state_laws
static_inventory += using
//PDA message
using = new /obj/screen/ai/pda_msg_send()
using = new /atom/movable/screen/ai/pda_msg_send()
using.screen_loc = ui_ai_pda_send
static_inventory += using
//PDA log
using = new /obj/screen/ai/pda_msg_show()
using = new /atom/movable/screen/ai/pda_msg_show()
using.screen_loc = ui_ai_pda_log
static_inventory += using
//Take image
using = new /obj/screen/ai/image_take()
using = new /atom/movable/screen/ai/image_take()
using.screen_loc = ui_ai_take_picture
static_inventory += using
//View images
using = new /obj/screen/ai/image_view()
using = new /atom/movable/screen/ai/image_view()
using.screen_loc = ui_ai_view_images
static_inventory += using
//Medical/Security sensors
using = new /obj/screen/ai/sensors()
using = new /atom/movable/screen/ai/sensors()
using.screen_loc = ui_ai_sensor
static_inventory += using
//Multicamera mode
using = new /obj/screen/ai/multicam()
using = new /atom/movable/screen/ai/multicam()
if(owner?.client?.prefs?.widescreenpref)
using.screen_loc = ui_ai_multicam_widescreen
else
@@ -300,7 +300,7 @@
static_inventory += using
//Add multicamera camera
using = new /obj/screen/ai/add_multicam()
using = new /atom/movable/screen/ai/add_multicam()
if(owner?.client?.prefs?.widescreenpref)
using.screen_loc = ui_ai_add_multicam_widescreen
else

View File

@@ -18,7 +18,7 @@
if(!category || QDELETED(src))
return
var/obj/screen/alert/thealert
var/atom/movable/screen/alert/thealert
if(alerts[category])
thealert = alerts[category]
if(thealert.override_alerts)
@@ -69,13 +69,13 @@
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)
// Proc to clear an existing alert.
/mob/proc/clear_alert(category, clear_override = FALSE)
var/obj/screen/alert/alert = alerts[category]
var/atom/movable/screen/alert/alert = alerts[category]
if(!alert)
return 0
if(alert.override_alerts && !clear_override)
@@ -87,7 +87,7 @@
client.screen -= alert
qdel(alert)
/obj/screen/alert
/atom/movable/screen/alert
icon = 'icons/mob/screen_alert.dmi'
icon_state = "default"
name = "Alert"
@@ -100,157 +100,157 @@
var/mob/mob_viewer //the mob viewing this alert
/obj/screen/alert/MouseEntered(location,control,params)
/atom/movable/screen/alert/MouseEntered(location,control,params)
if(!QDELETED(src))
openToolTip(usr,src,params,title = name,content = desc,theme = alerttooltipstyle)
/obj/screen/alert/MouseExited()
/atom/movable/screen/alert/MouseExited()
closeToolTip(usr)
//Gas alerts
/obj/screen/alert/not_enough_oxy
/atom/movable/screen/alert/not_enough_oxy
name = "Choking (No O2)"
desc = "You're not getting enough oxygen. Find some good air before you pass out! The box in your backpack has an oxygen tank and breath mask in it."
icon_state = "not_enough_oxy"
/obj/screen/alert/not_enough_oxy/ipc
/atom/movable/screen/alert/not_enough_oxy/ipc
name = "Overheating"
desc = "You're not able to disperse heat. Find some gas to cool back down!"
icon_state = "overheating"
/obj/screen/alert/too_much_oxy
/atom/movable/screen/alert/too_much_oxy
name = "Choking (O2)"
desc = "There's too much oxygen in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_oxy"
/obj/screen/alert/not_enough_nitro
/atom/movable/screen/alert/not_enough_nitro
name = "Choking (No N2)"
desc = "You're not getting enough nitrogen. Find some good air before you pass out!"
icon_state = "not_enough_nitro"
/obj/screen/alert/too_much_nitro
/atom/movable/screen/alert/too_much_nitro
name = "Choking (N2)"
desc = "There's too much nitrogen in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_nitro"
/obj/screen/alert/not_enough_co2
/atom/movable/screen/alert/not_enough_co2
name = "Choking (No CO2)"
desc = "You're not getting enough carbon dioxide. Find some good air before you pass out!"
icon_state = "not_enough_co2"
/obj/screen/alert/too_much_co2
/atom/movable/screen/alert/too_much_co2
name = "Choking (CO2)"
desc = "There's too much carbon dioxide in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_co2"
/obj/screen/alert/not_enough_tox
/atom/movable/screen/alert/not_enough_tox
name = "Choking (No Plasma)"
desc = "You're not getting enough plasma. Find some good air before you pass out!"
icon_state = "not_enough_tox"
/obj/screen/alert/too_much_tox
/atom/movable/screen/alert/too_much_tox
name = "Choking (Plasma)"
desc = "There's highly flammable, toxic plasma in the air and you're breathing it in. Find some fresh air. The box in your backpack has an oxygen tank and gas mask in it."
icon_state = "too_much_tox"
//End gas alerts
/obj/screen/alert/fat
/atom/movable/screen/alert/fat
name = "Fat"
desc = "You ate too much food, lardass. Run around the station and lose some weight."
icon_state = "fat"
/obj/screen/alert/hungry
/atom/movable/screen/alert/hungry
name = "Hungry"
desc = "Some food would be good right about now."
icon_state = "hungry"
/obj/screen/alert/starving
/atom/movable/screen/alert/starving
name = "Starving"
desc = "You're severely malnourished. The hunger pains make moving around a chore."
icon_state = "starving"
/obj/screen/alert/gross
/atom/movable/screen/alert/gross
name = "Grossed out."
desc = "That was kind of gross..."
icon_state = "gross"
/obj/screen/alert/verygross
/atom/movable/screen/alert/verygross
name = "Very grossed out."
desc = "You're not feeling very well..."
icon_state = "gross2"
/obj/screen/alert/disgusted
/atom/movable/screen/alert/disgusted
name = "DISGUSTED"
desc = "ABSOLUTELY DISGUSTIN'!"
icon_state = "gross3"
/obj/screen/alert/hot
/atom/movable/screen/alert/hot
name = "Too Hot"
desc = "You're flaming hot! Get somewhere cooler and take off any insulating clothing like a fire suit."
icon_state = "hot"
/obj/screen/alert/cold
/atom/movable/screen/alert/cold
name = "Too Cold"
desc = "You're freezing cold! Get somewhere warmer and take off any insulating clothing like a space suit."
icon_state = "cold"
/obj/screen/alert/lowpressure
/atom/movable/screen/alert/lowpressure
name = "Low Pressure"
desc = "The air around you is hazardously thin. A space suit would protect you."
icon_state = "lowpressure"
/obj/screen/alert/highpressure
/atom/movable/screen/alert/highpressure
name = "High Pressure"
desc = "The air around you is hazardously thick. A fire suit would protect you."
icon_state = "highpressure"
/obj/screen/alert/blind
/atom/movable/screen/alert/blind
name = "Blind"
desc = "You can't see! This may be caused by a genetic defect, eye trauma, being unconscious, \
or something covering your eyes."
icon_state = "blind"
/obj/screen/alert/high
/atom/movable/screen/alert/high
name = "High"
desc = "Whoa man, you're tripping balls! Careful you don't get addicted... if you aren't already."
icon_state = "high"
/obj/screen/alert/hypnosis
/atom/movable/screen/alert/hypnosis
name = "Hypnosis"
desc = "Something's hypnotizing you, but you're not sure what."
icon_state = "hypnosis"
var/phrase
/obj/screen/alert/mind_control
/atom/movable/screen/alert/mind_control
name = "Mind Control"
desc = "Your mind has been hijacked! Click to view the mind control command."
icon_state = "mind_control"
var/command
/obj/screen/alert/mind_control/Click()
/atom/movable/screen/alert/mind_control/Click()
var/mob/living/L = usr
to_chat(L, "[span_mind_control("[command]")]")
/obj/screen/alert/drunk
/atom/movable/screen/alert/drunk
name = "Drunk"
desc = "All that alcohol you've been drinking is impairing your speech, motor skills, and mental cognition."
icon_state = "drunk"
/obj/screen/alert/embeddedobject
/atom/movable/screen/alert/embeddedobject
name = "Embedded Object"
desc = "Something got lodged into your flesh and is causing major bleeding. It might fall out with time, but surgery is the safest way. \
If you're feeling frisky, examine yourself and click the underlined item to pull the object out."
icon_state = "embeddedobject"
/obj/screen/alert/embeddedobject/Click()
/atom/movable/screen/alert/embeddedobject/Click()
if(iscarbon(usr))
var/mob/living/carbon/C = usr
return C.try_remove_embedded_object(C)
/obj/screen/alert/weightless
/atom/movable/screen/alert/weightless
name = "Weightless"
desc = "Gravity has ceased affecting you, and you're floating around aimlessly. You'll need something large and heavy, like a \
wall or lattice, to push yourself off if you want to move. A jetpack would enable free range of motion. A pair of \
@@ -258,27 +258,27 @@ magboots would let you walk around normally on the floor. Barring those, you can
or shoot a gun to move around via Newton's 3rd Law of Motion."
icon_state = "weightless"
/obj/screen/alert/highgravity
/atom/movable/screen/alert/highgravity
name = "High Gravity"
desc = "You're getting crushed by high gravity, picking up items and movement will be slowed."
icon_state = "paralysis"
/obj/screen/alert/veryhighgravity
/atom/movable/screen/alert/veryhighgravity
name = "Crushing Gravity"
desc = "You're getting crushed by high gravity, picking up items and movement will be slowed. You'll also accumulate brute damage!"
icon_state = "paralysis"
/obj/screen/alert/fire
/atom/movable/screen/alert/fire
name = "On Fire"
desc = "You're on fire. Click to stop, drop and roll to put the fire out or move to a vacuum area."
icon_state = "fire"
/obj/screen/alert/brainwashed
/atom/movable/screen/alert/brainwashed
name = "Brainwashed"
desc = "You've been brainwashed! Check your notes to see your objective."
icon_state = "hypnosis"
/obj/screen/alert/fire/Click()
/atom/movable/screen/alert/fire/Click()
var/mob/living/L = usr
if(!istype(L) || !L.can_resist())
return
@@ -286,12 +286,12 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
if(L.mobility_flags & MOBILITY_MOVE)
return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt.
/obj/screen/alert/give // information set when the give alert is made
/atom/movable/screen/alert/give // information set when the give alert is made
icon_state = "default"
var/mob/living/carbon/giver
var/obj/item/receiving
/obj/screen/alert/give/proc/setup(mob/living/carbon/taker, mob/living/carbon/giver, obj/item/receiving)
/atom/movable/screen/alert/give/proc/setup(mob/living/carbon/taker, mob/living/carbon/giver, obj/item/receiving)
name = "[giver] is offering [receiving]"
desc = "[giver] is offering [receiving]. Click this alert to take it."
icon_state = "template"
@@ -299,33 +299,33 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
add_overlay(receiving)
src.receiving = receiving
src.giver = giver
RegisterSignal(taker, COMSIG_MOVABLE_MOVED, /obj/screen/alert/give/.proc/removeAlert)
RegisterSignal(taker, COMSIG_MOVABLE_MOVED, /atom/movable/screen/alert/give/.proc/removeAlert)
/obj/screen/alert/give/proc/removeAlert()
/atom/movable/screen/alert/give/proc/removeAlert()
to_chat(mob_viewer, span_warning("You moved out of range of [giver]!"))
mob_viewer.clear_alert("[giver]")
/obj/screen/alert/give/Click(location, control, params)
/atom/movable/screen/alert/give/Click(location, control, params)
. = ..()
var/mob/living/carbon/C = mob_viewer
C.take(giver, receiving)
//ALIENS
/obj/screen/alert/alien_tox
/atom/movable/screen/alert/alien_tox
name = "Plasma"
desc = "There's flammable plasma in the air. If it lights up, you'll be toast."
icon_state = "alien_tox"
alerttooltipstyle = "alien"
/obj/screen/alert/alien_fire
/atom/movable/screen/alert/alien_fire
// This alert is temporarily gonna be thrown for all hot air but one day it will be used for literally being on fire
name = "Too Hot"
desc = "It's too hot! Flee to space or at least away from the flames. Standing on weeds will heal you."
icon_state = "alien_fire"
alerttooltipstyle = "alien"
/obj/screen/alert/alien_vulnerable
/atom/movable/screen/alert/alien_vulnerable
name = "Severed Matriarchy"
desc = "Your queen has been killed, you will suffer movement penalties and loss of hivemind. A new queen cannot be made until you recover."
icon_state = "alien_noqueen"
@@ -333,7 +333,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
//BLOBS
/obj/screen/alert/nofactory
/atom/movable/screen/alert/nofactory
name = "No Factory"
desc = "You have no factory, and are slowly dying!"
icon_state = "blobbernaut_nofactory"
@@ -341,7 +341,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
// BLOODCULT
/obj/screen/alert/bloodsense
/atom/movable/screen/alert/bloodsense
name = "Blood Sense"
desc = "Allows you to sense blood that is manipulated by dark magicks."
icon_state = "cult_sense"
@@ -350,17 +350,17 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
var/angle = 0
var/mob/living/simple_animal/hostile/construct/Cviewer = null
/obj/screen/alert/bloodsense/Initialize()
/atom/movable/screen/alert/bloodsense/Initialize()
. = ..()
narnar = new('icons/mob/screen_alert.dmi', "mini_nar")
START_PROCESSING(SSprocessing, src)
/obj/screen/alert/bloodsense/Destroy()
/atom/movable/screen/alert/bloodsense/Destroy()
Cviewer = null
STOP_PROCESSING(SSprocessing, src)
return ..()
/obj/screen/alert/bloodsense/process()
/atom/movable/screen/alert/bloodsense/process()
var/atom/blood_target
if(!mob_viewer.mind)
@@ -450,15 +450,15 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
// CLOCKCULT
/obj/screen/alert/clockwork
/atom/movable/screen/alert/clockwork
alerttooltipstyle = "clockcult"
/obj/screen/alert/clockwork/infodump
/atom/movable/screen/alert/clockwork/infodump
name = "Global Records"
desc = "You shouldn't be seeing this description, because it should be dynamically generated."
icon_state = "clockinfo"
/obj/screen/alert/clockwork/infodump/MouseEntered(location,control,params)
/atom/movable/screen/alert/clockwork/infodump/MouseEntered(location,control,params)
if(GLOB.ratvar_awakens)
desc = "<font size=3><b>CHETR<br>NYY<br>HAGEHGUF-NAQ-UBABE<br>RATVAR.</b></font>"
else
@@ -492,19 +492,19 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
//GUARDIANS
/obj/screen/alert/cancharge
/atom/movable/screen/alert/cancharge
name = "Charge Ready"
desc = "You are ready to charge at a location!"
icon_state = "guardian_charge"
alerttooltipstyle = "parasite"
/obj/screen/alert/canstealth
/atom/movable/screen/alert/canstealth
name = "Stealth Ready"
desc = "You are ready to enter stealth!"
icon_state = "guardian_canstealth"
alerttooltipstyle = "parasite"
/obj/screen/alert/instealth
/atom/movable/screen/alert/instealth
name = "In Stealth"
desc = "You are in stealth and your next attack will do bonus damage!"
icon_state = "guardian_instealth"
@@ -512,54 +512,54 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
//SILICONS
/obj/screen/alert/nocell
/atom/movable/screen/alert/nocell
name = "Missing Power Cell"
desc = "Unit has no power cell. No modules available until a power cell is reinstalled. Robotics may provide assistance."
icon_state = "nocell"
/obj/screen/alert/emptycell
/atom/movable/screen/alert/emptycell
name = "Out of Power"
desc = "Unit's power cell has no charge remaining. No modules available until power cell is recharged. \
Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite."
icon_state = "emptycell"
/obj/screen/alert/lowcell
/atom/movable/screen/alert/lowcell
name = "Low Charge"
desc = "Unit's power cell is running low. Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite."
icon_state = "lowcell"
//Ethereal
/obj/screen/alert/etherealcharge
/atom/movable/screen/alert/etherealcharge
name = "Low Blood Charge"
desc = "Your blood's electric charge is running low, find a source of charge for your blood. Use a recharging station found in robotics or the dormitory bathrooms, or eat some Ethereal-friendly food."
icon_state = "etherealcharge"
/obj/screen/alert/ethereal_overcharge
/atom/movable/screen/alert/ethereal_overcharge
name = "Blood Overcharge"
desc = "Your blood's electric charge is becoming dangerously high, find an outlet for your energy. Use Grab Intent on an APC to channel your energy into it."
icon_state = "ethereal_overcharge"
//Need to cover all use cases - emag, illegal upgrade module, malf AI hack, traitor cyborg
/obj/screen/alert/hacked
/atom/movable/screen/alert/hacked
name = "Hacked"
desc = "Hazardous non-standard equipment detected. Please ensure any usage of this equipment is in line with unit's laws, if any."
icon_state = "hacked"
/obj/screen/alert/locked
/atom/movable/screen/alert/locked
name = "Locked Down"
desc = "Unit has been remotely locked down. Usage of a Robotics Control Console like the one in the Research Director's \
office by your AI master or any qualified human may resolve this matter. Robotics may provide further assistance if necessary."
icon_state = "locked"
/obj/screen/alert/newlaw
/atom/movable/screen/alert/newlaw
name = "Law Update"
desc = "Laws have potentially been uploaded to or removed from this unit. Please be aware of any changes \
so as to remain in compliance with the most up-to-date laws."
icon_state = "newlaw"
timeout = 300
/obj/screen/alert/hackingapc
/atom/movable/screen/alert/hackingapc
name = "Hacking APC"
desc = "An Area Power Controller is being hacked. When the process is \
complete, you will have exclusive control of it, and you will gain \
@@ -568,7 +568,7 @@ so as to remain in compliance with the most up-to-date laws."
timeout = 600
var/atom/target = null
/obj/screen/alert/hackingapc/Click()
/atom/movable/screen/alert/hackingapc/Click()
if(!usr || !usr.client)
return
if(!target)
@@ -580,7 +580,7 @@ so as to remain in compliance with the most up-to-date laws."
//MECHS
/obj/screen/alert/low_mech_integrity
/atom/movable/screen/alert/low_mech_integrity
name = "Mech Damaged"
desc = "Mech integrity is low."
icon_state = "low_mech_integrity"
@@ -588,19 +588,19 @@ so as to remain in compliance with the most up-to-date laws."
//GHOSTS
//TODO: expand this system to replace the pollCandidates/CheckAntagonist/"choose quickly"/etc Yes/No messages
/obj/screen/alert/notify_cloning
/atom/movable/screen/alert/notify_cloning
name = "Revival"
desc = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!"
icon_state = "template"
timeout = 300
/obj/screen/alert/notify_cloning/Click()
/atom/movable/screen/alert/notify_cloning/Click()
if(!usr || !usr.client)
return
var/mob/dead/observer/G = usr
G.reenter_corpse()
/obj/screen/alert/notify_action
/atom/movable/screen/alert/notify_action
name = "Body created"
desc = "A body was created. You can enter it."
icon_state = "template"
@@ -608,7 +608,7 @@ so as to remain in compliance with the most up-to-date laws."
var/atom/target = null
var/action = NOTIFY_JUMP
/obj/screen/alert/notify_action/Click()
/atom/movable/screen/alert/notify_action/Click()
if(!usr || !usr.client)
return
if(!target)
@@ -628,20 +628,20 @@ so as to remain in compliance with the most up-to-date laws."
//OBJECT-BASED
/obj/screen/alert/restrained/buckled
/atom/movable/screen/alert/restrained/buckled
name = "Buckled"
desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed."
icon_state = "buckled"
/obj/screen/alert/restrained/handcuffed
/atom/movable/screen/alert/restrained/handcuffed
name = "Handcuffed"
desc = "You're handcuffed and can't act. If anyone drags you, you won't be able to move. Click the alert to free yourself."
/obj/screen/alert/restrained/legcuffed
/atom/movable/screen/alert/restrained/legcuffed
name = "Legcuffed"
desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself."
/obj/screen/alert/restrained/Click()
/atom/movable/screen/alert/restrained/Click()
var/mob/living/L = usr
if(!istype(L) || !L.can_resist())
return
@@ -649,7 +649,7 @@ so as to remain in compliance with the most up-to-date laws."
if((L.mobility_flags & MOBILITY_MOVE) && (L.last_special <= world.time))
return L.resist_restraints()
/obj/screen/alert/restrained/buckled/Click()
/atom/movable/screen/alert/restrained/buckled/Click()
var/mob/living/L = usr
if(!istype(L) || !L.can_resist())
return
@@ -667,7 +667,7 @@ so as to remain in compliance with the most up-to-date laws."
mymob.client.screen -= alerts[alerts[i]]
return 1
for(var/i = 1, i <= alerts.len, i++)
var/obj/screen/alert/alert = alerts[alerts[i]]
var/atom/movable/screen/alert/alert = alerts[alerts[i]]
if(alert.icon_state == "template")
alert.icon = ui_style
switch(i)
@@ -688,9 +688,9 @@ so as to remain in compliance with the most up-to-date laws."
return 1
/mob
var/list/alerts = list() // contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly
var/list/alerts = list() // contains /atom/movable/screen/alert only // On /mob so clientless mobs will throw alerts properly
/obj/screen/alert/Click(location, control, params)
/atom/movable/screen/alert/Click(location, control, params)
if(!usr || !usr.client)
return
var/paramslist = params2list(params)
@@ -700,7 +700,7 @@ so as to remain in compliance with the most up-to-date laws."
if(master)
return usr.client.Click(master, location, control, params)
/obj/screen/alert/Destroy()
/atom/movable/screen/alert/Destroy()
. = ..()
severity = 0
master = null

View File

@@ -1,23 +1,23 @@
/obj/screen/alien
/atom/movable/screen/alien
icon = 'icons/mob/screen_alien.dmi'
/obj/screen/alien/leap
/atom/movable/screen/alien/leap
name = "toggle leap"
icon_state = "leap_off"
/obj/screen/alien/leap/Click()
/atom/movable/screen/alien/leap/Click()
if(isalienhunter(usr))
var/mob/living/carbon/alien/humanoid/hunter/AH = usr
AH.toggle_leap()
/obj/screen/alien/plasma_display
/atom/movable/screen/alien/plasma_display
icon = 'icons/mob/screen_gen.dmi'
icon_state = "power_display2"
name = "plasma stored"
screen_loc = ui_alienplasmadisplay
/obj/screen/alien/alien_queen_finder
/atom/movable/screen/alien/alien_queen_finder
icon = 'icons/mob/screen_alien.dmi'
icon_state = "queen_finder"
name = "queen sense"
@@ -30,7 +30,7 @@
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
//equippable shit
@@ -39,49 +39,49 @@
//begin buttons
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1)
static_inventory += using
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
static_inventory += using
using = new /obj/screen/act_intent/alien()
using = new /atom/movable/screen/act_intent/alien()
using.icon_state = mymob.a_intent
static_inventory += using
action_intent = using
if(isalienhunter(mymob))
var/mob/living/carbon/alien/humanoid/hunter/H = mymob
H.leap_icon = new /obj/screen/alien/leap()
H.leap_icon = new /atom/movable/screen/alien/leap()
H.leap_icon.screen_loc = ui_alien_storage_r
static_inventory += H.leap_icon
using = new/obj/screen/language_menu
using = new/atom/movable/screen/language_menu
using.screen_loc = ui_alien_language_menu
static_inventory += using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
static_inventory += using
using = new /obj/screen/resist()
using = new /atom/movable/screen/resist()
using.icon = ui_style
using.screen_loc = ui_above_movement
hotkeybuttons += using
throw_icon = new /obj/screen/throw_catch()
throw_icon = new /atom/movable/screen/throw_catch()
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
hotkeybuttons += throw_icon
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon(mymob)
pull_icon.screen_loc = ui_above_movement
@@ -89,21 +89,21 @@
//begin indicators
healths = new /obj/screen/healths/alien()
healths = new /atom/movable/screen/healths/alien()
infodisplay += healths
alien_plasma_display = new /obj/screen/alien/plasma_display()
alien_plasma_display = new /atom/movable/screen/alien/plasma_display()
infodisplay += alien_plasma_display
if(!isalienqueen(mymob))
alien_queen_finder = new /obj/screen/alien/alien_queen_finder
alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder
infodisplay += alien_queen_finder
zone_select = new /obj/screen/zone_sel/alien()
zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.update_icon(mymob)
static_inventory += zone_select
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv

View File

@@ -3,28 +3,28 @@
/datum/hud/larva/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
using = new /obj/screen/act_intent/alien()
using = new /atom/movable/screen/act_intent/alien()
using.icon_state = mymob.a_intent
static_inventory += using
action_intent = using
healths = new /obj/screen/healths/alien()
healths = new /atom/movable/screen/healths/alien()
infodisplay += healths
alien_queen_finder = new /obj/screen/alien/alien_queen_finder()
alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder()
infodisplay += alien_queen_finder
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = 'icons/mob/screen_alien.dmi'
pull_icon.update_icon(mymob)
pull_icon.screen_loc = ui_above_movement
hotkeybuttons += pull_icon
using = new/obj/screen/language_menu
using = new/atom/movable/screen/language_menu
using.screen_loc = ui_alien_language_menu
static_inventory += using
zone_select = new /obj/screen/zone_sel/alien()
zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.update_icon(mymob)
static_inventory += zone_select

View File

@@ -1,39 +1,39 @@
/obj/screen/blob
/atom/movable/screen/blob
icon = 'icons/mob/blob.dmi'
/obj/screen/blob/MouseEntered(location,control,params)
/atom/movable/screen/blob/MouseEntered(location,control,params)
openToolTip(usr,src,params,title = name,content = desc, theme = "blob")
/obj/screen/blob/MouseExited()
/atom/movable/screen/blob/MouseExited()
closeToolTip(usr)
/obj/screen/blob/BlobHelp
/atom/movable/screen/blob/BlobHelp
icon_state = "ui_help"
name = "Blob Help"
desc = "Help on playing blob!"
/obj/screen/blob/BlobHelp/Click()
/atom/movable/screen/blob/BlobHelp/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.blob_help()
/obj/screen/blob/JumpToNode
/atom/movable/screen/blob/JumpToNode
icon_state = "ui_tonode"
name = "Jump to Node"
desc = "Moves your camera to a selected blob node."
/obj/screen/blob/JumpToNode/Click()
/atom/movable/screen/blob/JumpToNode/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.jump_to_node()
/obj/screen/blob/JumpToCore
/atom/movable/screen/blob/JumpToCore
icon_state = "ui_tocore"
name = "Jump to Core"
desc = "Moves your camera to your blob core."
/obj/screen/blob/JumpToCore/MouseEntered(location,control,params)
/atom/movable/screen/blob/JumpToCore/MouseEntered(location,control,params)
if(hud && hud.mymob && isovermind(hud.mymob))
var/mob/camera/blob/B = hud.mymob
if(!B.placed)
@@ -44,59 +44,59 @@
desc = initial(desc)
..()
/obj/screen/blob/JumpToCore/Click()
/atom/movable/screen/blob/JumpToCore/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
if(!B.placed)
B.place_blob_core(BLOB_NORMAL_PLACEMENT)
B.transport_core()
/obj/screen/blob/Blobbernaut
/atom/movable/screen/blob/Blobbernaut
icon_state = "ui_blobbernaut"
name = "Produce Blobbernaut (40)"
desc = "Produces a strong, smart blobbernaut from a factory blob for 40 resources.<br>The factory blob used will become fragile and unable to produce spores."
/obj/screen/blob/Blobbernaut/Click()
/atom/movable/screen/blob/Blobbernaut/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_blobbernaut()
/obj/screen/blob/ResourceBlob
/atom/movable/screen/blob/ResourceBlob
icon_state = "ui_resource"
name = "Produce Resource Blob (40)"
desc = "Produces a resource blob for 40 resources.<br>Resource blobs will give you resources every few seconds."
/obj/screen/blob/ResourceBlob/Click()
/atom/movable/screen/blob/ResourceBlob/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_resource()
/obj/screen/blob/NodeBlob
/atom/movable/screen/blob/NodeBlob
icon_state = "ui_node"
name = "Produce Node Blob (50)"
desc = "Produces a node blob for 50 resources.<br>Node blobs will expand and activate nearby resource and factory blobs."
/obj/screen/blob/NodeBlob/Click()
/atom/movable/screen/blob/NodeBlob/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_node()
/obj/screen/blob/FactoryBlob
/atom/movable/screen/blob/FactoryBlob
icon_state = "ui_factory"
name = "Produce Factory Blob (60)"
desc = "Produces a factory blob for 60 resources.<br>Factory blobs will produce spores every few seconds."
/obj/screen/blob/FactoryBlob/Click()
/atom/movable/screen/blob/FactoryBlob/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_factory()
/obj/screen/blob/ReadaptStrain
/atom/movable/screen/blob/ReadaptStrain
icon_state = "ui_chemswap"
name = "Readapt Strain (40)"
desc = "Allows you to choose a new strain from 4 random choices for 40 resources."
/obj/screen/blob/ReadaptStrain/MouseEntered(location,control,params)
/atom/movable/screen/blob/ReadaptStrain/MouseEntered(location,control,params)
if(hud && hud.mymob && isovermind(hud.mymob))
var/mob/camera/blob/B = hud.mymob
if(B.free_strain_rerolls)
@@ -107,26 +107,26 @@
desc = initial(desc)
..()
/obj/screen/blob/ReadaptStrain/Click()
/atom/movable/screen/blob/ReadaptStrain/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.strain_reroll()
/obj/screen/blob/RelocateCore
/atom/movable/screen/blob/RelocateCore
icon_state = "ui_swap"
name = "Relocate Core (80)"
desc = "Swaps a node and your core for 80 resources."
/obj/screen/blob/RelocateCore/Click()
/atom/movable/screen/blob/RelocateCore/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.relocate_core()
/datum/hud/blob_overmind/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
blobpwrdisplay = new /obj/screen()
blobpwrdisplay = new /atom/movable/screen()
blobpwrdisplay.name = "blob power"
blobpwrdisplay.icon_state = "block"
blobpwrdisplay.screen_loc = ui_health
@@ -135,44 +135,44 @@
blobpwrdisplay.plane = ABOVE_HUD_PLANE
infodisplay += blobpwrdisplay
healths = new /obj/screen/healths/blob()
healths = new /atom/movable/screen/healths/blob()
infodisplay += healths
using = new /obj/screen/blob/BlobHelp()
using = new /atom/movable/screen/blob/BlobHelp()
using.screen_loc = "WEST:6,NORTH:-3"
static_inventory += using
using = new /obj/screen/blob/JumpToNode()
using = new /atom/movable/screen/blob/JumpToNode()
using.screen_loc = ui_inventory
static_inventory += using
using = new /obj/screen/blob/JumpToCore()
using = new /atom/movable/screen/blob/JumpToCore()
using.screen_loc = ui_zonesel
using.hud = src
static_inventory += using
using = new /obj/screen/blob/Blobbernaut()
using = new /atom/movable/screen/blob/Blobbernaut()
using.screen_loc = ui_belt
static_inventory += using
using = new /obj/screen/blob/ResourceBlob()
using = new /atom/movable/screen/blob/ResourceBlob()
using.screen_loc = ui_back
static_inventory += using
using = new /obj/screen/blob/NodeBlob()
using = new /atom/movable/screen/blob/NodeBlob()
using.screen_loc = ui_hand_position(2)
static_inventory += using
using = new /obj/screen/blob/FactoryBlob()
using = new /atom/movable/screen/blob/FactoryBlob()
using.screen_loc = ui_hand_position(1)
static_inventory += using
using = new /obj/screen/blob/ReadaptStrain()
using = new /atom/movable/screen/blob/ReadaptStrain()
using.screen_loc = ui_storage1
using.hud = src
static_inventory += using
using = new /obj/screen/blob/RelocateCore()
using = new /atom/movable/screen/blob/RelocateCore()
using.screen_loc = ui_storage2
static_inventory += using

View File

@@ -1,6 +1,6 @@
/datum/hud/living/blobbernaut/New(mob/living/owner)
. = ..()
blobpwrdisplay = new /obj/screen/healths/blob/overmind()
blobpwrdisplay = new /atom/movable/screen/healths/blob/overmind()
blobpwrdisplay.hud = src
infodisplay += blobpwrdisplay

View File

@@ -3,11 +3,11 @@
/datum/hud/constructs/New(mob/owner)
..()
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon(mymob)
pull_icon.screen_loc = ui_construct_pull
static_inventory += pull_icon
healths = new /obj/screen/healths/construct()
healths = new /atom/movable/screen/healths/construct()
infodisplay += healths

View File

@@ -15,7 +15,7 @@ GLOBAL_LIST(end_titles)
GLOB.end_titles += "<center><h1>Thanks for playing!</h1>"
for(var/client/C in GLOB.clients)
if(C.prefs.show_credits)
C.screen += new /obj/screen/credit/title_card(null, null, SSticker.mode.title_icon)
C.screen += new /atom/movable/screen/credit/title_card(null, null, SSticker.mode.title_icon)
sleep(CREDIT_SPAWN_SPEED * 3)
for(var/i in 1 to GLOB.end_titles.len)
var/C = GLOB.end_titles[i]
@@ -27,9 +27,9 @@ GLOBAL_LIST(end_titles)
/proc/create_credit(credit)
new /obj/screen/credit(null, credit)
new /atom/movable/screen/credit(null, credit)
/obj/screen/credit
/atom/movable/screen/credit
icon_state = "blank"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
alpha = 0
@@ -37,7 +37,7 @@ GLOBAL_LIST(end_titles)
layer = SPLASHSCREEN_LAYER
var/matrix/target
/obj/screen/credit/Initialize(mapload, credited)
/atom/movable/screen/credit/Initialize(mapload, credited)
. = ..()
maptext = "<font face='Verdana'>[credited]</font>"
maptext_height = world.icon_size * 2
@@ -50,20 +50,20 @@ GLOBAL_LIST(end_titles)
INVOKE_ASYNC(src, .proc/add_to_clients)
QDEL_IN(src, CREDIT_ROLL_SPEED)
/obj/screen/credit/proc/add_to_clients()
/atom/movable/screen/credit/proc/add_to_clients()
for(var/client/C in GLOB.clients)
if(C.prefs.show_credits)
C.screen += src
/obj/screen/credit/Destroy()
/atom/movable/screen/credit/Destroy()
screen_loc = null
return ..()
/obj/screen/credit/title_card
/atom/movable/screen/credit/title_card
icon = 'icons/title_cards.dmi'
screen_loc = "4,1"
/obj/screen/credit/title_card/Initialize(mapload, credited, title_icon_state)
/atom/movable/screen/credit/title_card/Initialize(mapload, credited, title_icon_state)
icon_state = title_icon_state
. = ..()
maptext = null

View File

@@ -4,14 +4,14 @@
/datum/hud/devil/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drone_drop
static_inventory += using
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon(mymob)
pull_icon.screen_loc = ui_drone_pull
@@ -19,7 +19,7 @@
build_hand_slots()
using = new /obj/screen/inventory()
using = new /atom/movable/screen/inventory()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_1_m"
@@ -28,7 +28,7 @@
using.plane = HUD_PLANE
static_inventory += using
using = new /obj/screen/inventory()
using = new /atom/movable/screen/inventory()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_2"
@@ -37,12 +37,12 @@
using.plane = HUD_PLANE
static_inventory += using
zone_select = new /obj/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style
zone_select.update_icon(mymob)
lingchemdisplay = new /obj/screen/ling/chems()
devilsouldisplay = new /obj/screen/devil/soul_counter
lingchemdisplay = new /atom/movable/screen/ling/chems()
devilsouldisplay = new /atom/movable/screen/devil/soul_counter
infodisplay += devilsouldisplay

View File

@@ -1,8 +1,8 @@
/datum/hud/dextrous/drone/New(mob/owner)
..()
var/obj/screen/inventory/inv_box
var/atom/movable/screen/inventory/inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "internal storage"
inv_box.icon = ui_style
inv_box.icon_state = "suit_storage"
@@ -11,7 +11,7 @@
inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "head/mask"
inv_box.icon = ui_style
inv_box.icon_state = "mask"
@@ -20,7 +20,7 @@
inv_box.slot_id = SLOT_HEAD
static_inventory += inv_box
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv

View File

@@ -3,7 +3,7 @@
var/list/screens = list()
/mob/proc/overlay_fullscreen(category, type, severity)
var/obj/screen/fullscreen/screen = screens[category]
var/atom/movable/screen/fullscreen/screen = screens[category]
if (!screen || screen.type != type)
// needs to be recreated
clear_fullscreen(category, FALSE)
@@ -21,7 +21,7 @@
return screen
/mob/proc/clear_fullscreen(category, animated = 1 SECONDS)
var/obj/screen/fullscreen/screen = screens[category]
var/atom/movable/screen/fullscreen/screen = screens[category]
if(!screen)
return
@@ -35,7 +35,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)
@@ -51,7 +51,7 @@
/mob/proc/reload_fullscreen()
if(client)
var/obj/screen/fullscreen/screen
var/atom/movable/screen/fullscreen/screen
for(var/category in screens)
screen = screens[category]
if(screen.should_show_to(src))
@@ -60,7 +60,7 @@
else
client.screen -= screen
/obj/screen/fullscreen
/atom/movable/screen/fullscreen
icon = 'icons/mob/screen_full.dmi'
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
@@ -71,79 +71,79 @@
var/severity = 0
var/show_when_dead = FALSE
/obj/screen/fullscreen/proc/update_for_view(client_view)
/atom/movable/screen/fullscreen/proc/update_for_view(client_view)
if (screen_loc == "CENTER-7,CENTER-7" && view != client_view)
var/list/actualview = getviewsize(client_view)
view = client_view
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
/obj/screen/fullscreen/proc/should_show_to(mob/mymob)
/atom/movable/screen/fullscreen/proc/should_show_to(mob/mymob)
if(!show_when_dead && mymob.stat == DEAD)
return FALSE
return TRUE
/obj/screen/fullscreen/Destroy()
/atom/movable/screen/fullscreen/Destroy()
severity = 0
. = ..()
/obj/screen/fullscreen/brute
/atom/movable/screen/fullscreen/brute
icon_state = "brutedamageoverlay"
layer = UI_DAMAGE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/oxy
/atom/movable/screen/fullscreen/oxy
icon_state = "oxydamageoverlay"
layer = UI_DAMAGE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/crit
/atom/movable/screen/fullscreen/crit
icon_state = "passage"
layer = CRIT_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/crit/vision
/atom/movable/screen/fullscreen/crit/vision
icon_state = "oxydamageoverlay"
layer = BLIND_LAYER
/obj/screen/fullscreen/blind
/atom/movable/screen/fullscreen/blind
icon_state = "blindimageoverlay"
layer = BLIND_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/black
/atom/movable/screen/fullscreen/black
icon_state = "blackimageoverlay"
layer = BLIND_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/curse
/atom/movable/screen/fullscreen/curse
icon_state = "curse"
layer = CURSE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/hive_mc
/atom/movable/screen/fullscreen/hive_mc
icon_state = "hive_mc"
layer = CURSE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/hive_eyes
/atom/movable/screen/fullscreen/hive_eyes
icon_state = "hive_eyes"
layer = CURSE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/impaired
/atom/movable/screen/fullscreen/impaired
icon_state = "impairedoverlay"
/obj/screen/fullscreen/flash
/atom/movable/screen/fullscreen/flash
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
/obj/screen/fullscreen/flash/static
/atom/movable/screen/fullscreen/flash/static
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "noise"
/obj/screen/fullscreen/laser
/atom/movable/screen/fullscreen/laser
icon = 'icons/mob/screen_gen.dmi'
icon_state = "laser"
screen_loc = "WEST,SOUTH to EAST,NORTH"
@@ -151,27 +151,27 @@
color = "#00ff00"
alpha = 127
/obj/screen/fullscreen/high
/atom/movable/screen/fullscreen/high
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "druggy"
/obj/screen/fullscreen/color_vision
/atom/movable/screen/fullscreen/color_vision
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
alpha = 80
/obj/screen/fullscreen/color_vision/green
/atom/movable/screen/fullscreen/color_vision/green
color = "#00ff00"
/obj/screen/fullscreen/color_vision/red
/atom/movable/screen/fullscreen/color_vision/red
color = "#ff0000"
/obj/screen/fullscreen/color_vision/blue
/atom/movable/screen/fullscreen/color_vision/blue
color = "#0000ff"
/obj/screen/fullscreen/cinematic_backdrop
/atom/movable/screen/fullscreen/cinematic_backdrop
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
@@ -180,11 +180,11 @@
color = "#000000"
show_when_dead = TRUE
/obj/screen/fullscreen/cinematic_backdrop/Initialize()
/atom/movable/screen/fullscreen/cinematic_backdrop/Initialize()
. = ..()
layer = SPLASHSCREEN_LAYER - 1
/obj/screen/fullscreen/lighting_backdrop
/atom/movable/screen/fullscreen/lighting_backdrop
icon = 'icons/mob/screen_gen.dmi'
icon_state = "flash"
transform = matrix(200, 0, 0, 0, 200, 0)
@@ -193,18 +193,18 @@
show_when_dead = TRUE
//Provides darkness to the back of the lighting plane
/obj/screen/fullscreen/lighting_backdrop/lit
/atom/movable/screen/fullscreen/lighting_backdrop/lit
invisibility = INVISIBILITY_LIGHTING
layer = BACKGROUND_LAYER+21
color = "#000"
show_when_dead = TRUE
//Provides whiteness in case you don't see lights so everything is still visible
/obj/screen/fullscreen/lighting_backdrop/unlit
/atom/movable/screen/fullscreen/lighting_backdrop/unlit
layer = BACKGROUND_LAYER+20
show_when_dead = TRUE
/obj/screen/fullscreen/see_through_darkness
/atom/movable/screen/fullscreen/see_through_darkness
icon_state = "nightvision"
plane = LIGHTING_PLANE
layer = LIGHTING_LAYER
@@ -212,7 +212,7 @@
show_when_dead = TRUE
//Triggered by übercharge activation
/obj/screen/fullscreen/uber
/atom/movable/screen/fullscreen/uber
icon_state = "uberoverlay"
plane = FULLSCREEN_PLANE
layer = CURSE_LAYER

View File

@@ -1,14 +1,14 @@
//Used for normal mobs that have hands.
/datum/hud/dextrous/New(mob/living/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drone_drop
static_inventory += using
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon(mymob)
pull_icon.screen_loc = ui_drone_pull
@@ -16,13 +16,13 @@
build_hand_slots()
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_1_m"
using.screen_loc = ui_swaphand_position(owner,1)
static_inventory += using
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
@@ -31,26 +31,26 @@
if(mymob.possible_a_intents)
if(mymob.possible_a_intents.len == 4)
// All possible intents - full intent selector
action_intent = new /obj/screen/act_intent/segmented
action_intent = new /atom/movable/screen/act_intent/segmented
else
action_intent = new /obj/screen/act_intent
action_intent = new /atom/movable/screen/act_intent
action_intent.icon = ui_style
action_intent.icon_state = mymob.a_intent
static_inventory += action_intent
zone_select = new /obj/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style
zone_select.update_icon(mymob)
static_inventory += zone_select
using = new /obj/screen/area_creator
using = new /atom/movable/screen/area_creator
using.icon = ui_style
static_inventory += using
mymob.client.screen = list()
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv

View File

@@ -1,94 +1,94 @@
/obj/screen/ghost
/atom/movable/screen/ghost
icon = 'icons/mob/screen_ghost.dmi'
/obj/screen/ghost/MouseEntered()
/atom/movable/screen/ghost/MouseEntered()
flick(icon_state + "_anim", src)
/obj/screen/ghost/jumptomob
/atom/movable/screen/ghost/jumptomob
name = "Jump to mob"
icon_state = "jumptomob"
/obj/screen/ghost/jumptomob/Click()
/atom/movable/screen/ghost/jumptomob/Click()
var/mob/dead/observer/G = usr
G.jumptomob()
/obj/screen/ghost/orbit
/atom/movable/screen/ghost/orbit
name = "Orbit"
icon_state = "orbit"
/obj/screen/ghost/orbit/Click()
/atom/movable/screen/ghost/orbit/Click()
var/mob/dead/observer/G = usr
G.follow()
/obj/screen/ghost/reenter_corpse
/atom/movable/screen/ghost/reenter_corpse
name = "Reenter corpse"
icon_state = "reenter_corpse"
/obj/screen/ghost/reenter_corpse/Click()
/atom/movable/screen/ghost/reenter_corpse/Click()
var/mob/dead/observer/G = usr
G.reenter_corpse()
/obj/screen/ghost/teleport
/atom/movable/screen/ghost/teleport
name = "Teleport"
icon_state = "teleport"
/obj/screen/ghost/teleport/Click()
/atom/movable/screen/ghost/teleport/Click()
var/mob/dead/observer/G = usr
G.dead_tele()
/obj/screen/ghost/spawners
/atom/movable/screen/ghost/spawners
name = "Ghost role spawners"
icon_state = "spawners"
/obj/screen/ghost/spawners/Click()
/atom/movable/screen/ghost/spawners/Click()
var/mob/dead/observer/G = usr
G.open_spawners_menu()
/datum/hud/ghost/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
using = new /obj/screen/ghost/jumptomob()
using = new /atom/movable/screen/ghost/jumptomob()
using.screen_loc = ui_ghost_jumptomob
static_inventory += using
using = new /obj/screen/ghost/orbit()
using = new /atom/movable/screen/ghost/orbit()
using.screen_loc = ui_ghost_orbit
static_inventory += using
using = new /obj/screen/ghost/reenter_corpse()
using = new /atom/movable/screen/ghost/reenter_corpse()
using.screen_loc = ui_ghost_reenter_corpse
static_inventory += using
using = new /obj/screen/ghost/teleport()
using = new /atom/movable/screen/ghost/teleport()
using.screen_loc = ui_ghost_teleport
static_inventory += using
using = new /obj/screen/ghost/spawners()
using = new /atom/movable/screen/ghost/spawners()
using.screen_loc = ui_ghost_spawners
static_inventory += using
using = new /obj/screen/ghost/med_scan()
using = new /atom/movable/screen/ghost/med_scan()
using.screen_loc = ui_ghost_med
static_inventory += using
using = new /obj/screen/ghost/chem_scan()
using = new /atom/movable/screen/ghost/chem_scan()
using.screen_loc = ui_ghost_chem
static_inventory += using
using = new /obj/screen/ghost/nanite_scan()
using = new /atom/movable/screen/ghost/nanite_scan()
using.screen_loc = ui_ghost_nanite
static_inventory += using
using = new /obj/screen/ghost/wound_scan()
using = new /atom/movable/screen/ghost/wound_scan()
using.screen_loc = ui_ghost_wound
static_inventory += using
using = new /obj/screen/ghost/pai()
using = new /atom/movable/screen/ghost/pai()
using.screen_loc = ui_ghost_pai
static_inventory += using
using = new /obj/screen/language_menu/ghost
using = new /atom/movable/screen/language_menu/ghost
using.icon = ui_style
static_inventory += using

View File

@@ -3,23 +3,23 @@
/datum/hud/guardian/New(mob/living/simple_animal/hostile/guardian/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull
pull_icon.hud = src
static_inventory += pull_icon
healths = new /obj/screen/healths/guardian()
healths = new /atom/movable/screen/healths/guardian()
infodisplay += healths
using = new /obj/screen/guardian/Manifest()
using = new /atom/movable/screen/guardian/Manifest()
using.screen_loc = ui_hand_position(2)
static_inventory += using
using = new /obj/screen/guardian/Recall()
using = new /atom/movable/screen/guardian/Recall()
using.screen_loc = ui_hand_position(1)
static_inventory += using
@@ -27,74 +27,74 @@
using.screen_loc = ui_storage1
static_inventory += using
using = new /obj/screen/guardian/ToggleLight()
using = new /atom/movable/screen/guardian/ToggleLight()
using.screen_loc = ui_inventory
static_inventory += using
using = new /obj/screen/guardian/Communicate()
using = new /atom/movable/screen/guardian/Communicate()
using.screen_loc = ui_back
static_inventory += using
/obj/screen/guardian
/atom/movable/screen/guardian
icon = 'icons/mob/guardian.dmi'
/obj/screen/guardian/Manifest
/atom/movable/screen/guardian/Manifest
icon_state = "manifest"
name = "Manifest"
desc = "Spring forth into battle!"
/obj/screen/guardian/Manifest/Click()
/atom/movable/screen/guardian/Manifest/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
G.Manifest()
/obj/screen/guardian/Recall
/atom/movable/screen/guardian/Recall
icon_state = "recall"
name = "Recall"
desc = "Return to your user."
/obj/screen/guardian/Recall/Click()
/atom/movable/screen/guardian/Recall/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
G.Recall()
/obj/screen/guardian/ToggleMode
/atom/movable/screen/guardian/ToggleMode
icon_state = "toggle"
name = "Toggle Mode"
desc = "Switch between ability modes."
/obj/screen/guardian/ToggleMode/Click()
/atom/movable/screen/guardian/ToggleMode/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
G.ToggleMode()
/obj/screen/guardian/ToggleMode/Inactive
/atom/movable/screen/guardian/ToggleMode/Inactive
icon_state = "notoggle" //greyed out so it doesn't look like it'll work
/obj/screen/guardian/ToggleMode/Assassin
/atom/movable/screen/guardian/ToggleMode/Assassin
icon_state = "stealth"
name = "Toggle Stealth"
desc = "Enter or exit stealth."
/obj/screen/guardian/Communicate
/atom/movable/screen/guardian/Communicate
icon_state = "communicate"
name = "Communicate"
desc = "Communicate telepathically with your user."
/obj/screen/guardian/Communicate/Click()
/atom/movable/screen/guardian/Communicate/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
G.Communicate()
/obj/screen/guardian/ToggleLight
/atom/movable/screen/guardian/ToggleLight
icon_state = "light"
name = "Toggle Light"
desc = "Glow like star dust."
/obj/screen/guardian/ToggleLight/Click()
/atom/movable/screen/guardian/ToggleLight/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
G.ToggleLight()

View File

@@ -1,15 +1,15 @@
/obj/screen/horror_chemicals
/atom/movable/screen/horror_chemicals
name = "chemicals"
icon_state = "horror_counter"
screen_loc = ui_lingchemdisplay
/datum/hud/chemical_counter
ui_style = 'icons/mob/screen_midnight.dmi'
var/obj/screen/horror_chemicals/chemical_counter
var/atom/movable/screen/horror_chemicals/chemical_counter
/datum/hud/chemical_counter/New(mob/owner)
. = ..()
chemical_counter = new /obj/screen/horror_chemicals
chemical_counter = new /atom/movable/screen/horror_chemicals
infodisplay += chemical_counter
/datum/hud/chemical_counter/Destroy()

View File

@@ -25,43 +25,43 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
var/inventory_shown = FALSE //Equipped item inventory
var/hotkey_ui_hidden = FALSE //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
var/obj/screen/ling/chems/lingchemdisplay
var/obj/screen/ling/sting/lingstingdisplay
var/atom/movable/screen/ling/chems/lingchemdisplay
var/atom/movable/screen/ling/sting/lingstingdisplay
var/obj/screen/bloodsucker/blood_counter/blood_display
var/obj/screen/bloodsucker/rank_counter/vamprank_display
var/obj/screen/bloodsucker/sunlight_counter/sunlight_display
var/atom/movable/screen/bloodsucker/blood_counter/blood_display
var/atom/movable/screen/bloodsucker/rank_counter/vamprank_display
var/atom/movable/screen/bloodsucker/sunlight_counter/sunlight_display
var/obj/screen/blobpwrdisplay
var/atom/movable/screen/blobpwrdisplay
var/obj/screen/alien_plasma_display
var/obj/screen/alien_queen_finder
var/atom/movable/screen/alien_plasma_display
var/atom/movable/screen/alien_queen_finder
var/obj/screen/devil/soul_counter/devilsouldisplay
var/atom/movable/screen/devil/soul_counter/devilsouldisplay
var/obj/screen/action_intent
var/obj/screen/zone_select
var/obj/screen/pull_icon
var/obj/screen/rest_icon
var/obj/screen/throw_icon
var/obj/screen/module_store_icon
var/atom/movable/screen/action_intent
var/atom/movable/screen/zone_select
var/atom/movable/screen/pull_icon
var/atom/movable/screen/rest_icon
var/atom/movable/screen/throw_icon
var/atom/movable/screen/module_store_icon
var/list/static_inventory = list() //the screen objects which are static
var/list/toggleable_inventory = list() //the screen objects which can be hidden
var/list/obj/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys
var/list/atom/movable/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys
var/list/infodisplay = list() //the screen objects that display mob info (health, alien plasma, etc...)
var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...)
var/list/inv_slots[SLOTS_AMT] // /obj/screen/inventory objects, ordered by their slot ID.
var/list/hand_slots // /obj/screen/inventory/hand objects, assoc list of "[held_index]" = object
var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
var/list/inv_slots[SLOTS_AMT] // /atom/movable/screen/inventory objects, ordered by their slot ID.
var/list/hand_slots // /atom/movable/screen/inventory/hand objects, assoc list of "[held_index]" = object
var/list/atom/movable/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/atom/movable/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/action_buttons_hidden = FALSE
var/obj/screen/healths
var/obj/screen/healthdoll
var/obj/screen/internals
var/obj/screen/stamina
var/atom/movable/screen/healths
var/atom/movable/screen/healthdoll
var/atom/movable/screen/internals
var/atom/movable/screen/stamina
// subtypes can override this to force a specific UI style
var/ui_style
@@ -80,8 +80,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
hand_slots = list()
for(var/mytype in subtypesof(/obj/screen/plane_master))
var/obj/screen/plane_master/instance = new mytype()
for(var/mytype in subtypesof(/atom/movable/screen/plane_master))
var/atom/movable/screen/plane_master/instance = new mytype()
plane_masters["[instance.plane]"] = instance
instance.backdrop(mymob)
@@ -177,7 +177,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
for(var/h in hand_slots)
var/obj/screen/hand = hand_slots[h]
var/atom/movable/screen/hand = hand_slots[h]
if(hand)
screenmob.client.screen += hand
if(action_intent)
@@ -216,7 +216,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
/datum/hud/proc/plane_masters_update()
// Plane masters are always shown to OUR mob, never to observers
for(var/thing in plane_masters)
var/obj/screen/plane_master/PM = plane_masters[thing]
var/atom/movable/screen/plane_master/PM = plane_masters[thing]
PM.backdrop(mymob)
mymob.client.screen += PM
@@ -270,13 +270,13 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
//9/10 this is only called once per mob and only for 2 hands
/datum/hud/proc/build_hand_slots()
for(var/h in hand_slots)
var/obj/screen/inventory/hand/H = hand_slots[h]
var/atom/movable/screen/inventory/hand/H = hand_slots[h]
if(H)
static_inventory -= H
hand_slots = list()
var/obj/screen/inventory/hand/hand_box
var/atom/movable/screen/inventory/hand/hand_box
for(var/i in 1 to mymob.held_items.len)
hand_box = new /obj/screen/inventory/hand()
hand_box = new /atom/movable/screen/inventory/hand()
hand_box.name = mymob.get_held_index_name(i)
hand_box.icon = ui_style
hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]"
@@ -288,10 +288,10 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
hand_box.update_icon()
var/i = 1
for(var/obj/screen/swap_hand/SH in static_inventory)
for(var/atom/movable/screen/swap_hand/SH in static_inventory)
SH.screen_loc = ui_swaphand_position(mymob,!(i % 2) ? 2: 1)
i++
for(var/obj/screen/human/equip/E in static_inventory)
for(var/atom/movable/screen/human/equip/E in static_inventory)
E.screen_loc = ui_equip_position(mymob)
if(ismob(mymob) && mymob.hud_used == src)

View File

@@ -1,11 +1,11 @@
/obj/screen/human
/atom/movable/screen/human
icon = 'icons/mob/screen_midnight.dmi'
/obj/screen/human/toggle
/atom/movable/screen/human/toggle
name = "toggle"
icon_state = "toggle"
/obj/screen/human/toggle/Click()
/atom/movable/screen/human/toggle/Click()
var/mob/targetmob = usr
@@ -23,26 +23,26 @@
targetmob.hud_used.hidden_inventory_update(usr)
/obj/screen/human/equip
/atom/movable/screen/human/equip
name = "equip"
icon_state = "act_equip"
/obj/screen/human/equip/Click()
/atom/movable/screen/human/equip/Click()
if(ismecha(usr.loc)) // stops inventory actions in a mech
return 1
var/mob/living/carbon/human/H = usr
H.quick_equip()
/obj/screen/devil
/atom/movable/screen/devil
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/devil/soul_counter
/atom/movable/screen/devil/soul_counter
icon = 'icons/mob/screen_gen.dmi'
name = "souls owned"
icon_state = "Devil-6"
screen_loc = ui_devilsouldisplay
/obj/screen/devil/soul_counter/proc/update_counter(souls = 0)
/atom/movable/screen/devil/soul_counter/proc/update_counter(souls = 0)
invisibility = 0
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#FF0000'>[souls]</font></div>"
switch(souls)
@@ -59,91 +59,91 @@
else
icon_state = "Devil-6"
/obj/screen/devil/soul_counter/proc/clear()
/atom/movable/screen/devil/soul_counter/proc/clear()
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/ling
/atom/movable/screen/ling
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/ling/sting
/atom/movable/screen/ling/sting
name = "current sting"
screen_loc = ui_lingstingdisplay
/obj/screen/ling/sting/Click()
/atom/movable/screen/ling/sting/Click()
if(isobserver(usr))
return
var/mob/living/carbon/U = usr
U.unset_sting()
/obj/screen/ling/chems
/atom/movable/screen/ling/chems
name = "chemical storage"
icon_state = "power_display"
screen_loc = ui_lingchemdisplay
/obj/screen/bloodsucker
/atom/movable/screen/bloodsucker
icon = 'icons/mob/actions/actions_bloodsucker.dmi'
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/bloodsucker/proc/clear()
/atom/movable/screen/bloodsucker/proc/clear()
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/bloodsucker/proc/update_counter()
/atom/movable/screen/bloodsucker/proc/update_counter()
invisibility = 0
/obj/screen/bloodsucker/blood_counter
/atom/movable/screen/bloodsucker/blood_counter
name = "Blood Consumed"
icon_state = "blood_display"
screen_loc = ui_blood_display
/obj/screen/bloodsucker/rank_counter
/atom/movable/screen/bloodsucker/rank_counter
name = "Bloodsucker Rank"
icon_state = "rank"
screen_loc = ui_vamprank_display
/obj/screen/bloodsucker/sunlight_counter
/atom/movable/screen/bloodsucker/sunlight_counter
name = "Solar Flare Timer"
icon_state = "sunlight_night"
screen_loc = ui_sunlight_display
/datum/hud/human/New(mob/living/carbon/human/owner)
..()
owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness)
owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/see_through_darkness)
var/widescreen_layout = FALSE
if(owner.client?.prefs?.widescreenpref)
widescreen_layout = TRUE
var/obj/screen/using
var/obj/screen/inventory/inv_box
var/atom/movable/screen/using
var/atom/movable/screen/inventory/inv_box
using = new/obj/screen/language_menu
using = new/atom/movable/screen/language_menu
using.icon = ui_style
if(!widescreen_layout)
using.screen_loc = UI_BOXLANG
static_inventory += using
using = new /obj/screen/area_creator
using = new /atom/movable/screen/area_creator
using.icon = ui_style
if(!widescreen_layout)
using.screen_loc = UI_BOXAREA
static_inventory += using
action_intent = new /obj/screen/act_intent/segmented
action_intent = new /atom/movable/screen/act_intent/segmented
action_intent.icon_state = mymob.a_intent
static_inventory += action_intent
using = new /obj/screen/mov_intent
using = new /atom/movable/screen/mov_intent
using.icon = ui_style
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi
static_inventory += using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
static_inventory += using
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "i_clothing"
inv_box.icon = ui_style
inv_box.slot_id = SLOT_W_UNIFORM
@@ -151,7 +151,7 @@
inv_box.screen_loc = ui_iclothing
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "o_clothing"
inv_box.icon = ui_style
inv_box.slot_id = SLOT_WEAR_SUIT
@@ -161,19 +161,19 @@
build_hand_slots()
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1)
static_inventory += using
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
static_inventory += using
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "id"
inv_box.icon = ui_style
inv_box.icon_state = "id"
@@ -181,7 +181,7 @@
inv_box.slot_id = SLOT_WEAR_ID
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "mask"
inv_box.icon = ui_style
inv_box.icon_state = "mask"
@@ -189,7 +189,7 @@
inv_box.slot_id = SLOT_WEAR_MASK
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "neck"
inv_box.icon = ui_style
inv_box.icon_state = "neck"
@@ -197,7 +197,7 @@
inv_box.slot_id = SLOT_NECK
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "back"
inv_box.icon = ui_style
inv_box.icon_state = "back"
@@ -205,7 +205,7 @@
inv_box.slot_id = SLOT_BACK
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "storage1"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
@@ -213,7 +213,7 @@
inv_box.slot_id = SLOT_L_STORE
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "storage2"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
@@ -221,7 +221,7 @@
inv_box.slot_id = SLOT_R_STORE
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "suit storage"
inv_box.icon = ui_style
inv_box.icon_state = "suit_storage"
@@ -229,22 +229,22 @@
inv_box.slot_id = SLOT_S_STORE
static_inventory += inv_box
using = new /obj/screen/resist()
using = new /atom/movable/screen/resist()
using.icon = ui_style
using.screen_loc = ui_above_intent
hotkeybuttons += using
using = new /obj/screen/human/toggle()
using = new /atom/movable/screen/human/toggle()
using.icon = ui_style
using.screen_loc = ui_inventory
static_inventory += using
using = new /obj/screen/human/equip()
using = new /atom/movable/screen/human/equip()
using.icon = ui_style
using.screen_loc = ui_equip_position(mymob)
static_inventory += using
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "gloves"
inv_box.icon = ui_style
inv_box.icon_state = "gloves"
@@ -252,7 +252,7 @@
inv_box.slot_id = SLOT_GLOVES
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "eyes"
inv_box.icon = ui_style
inv_box.icon_state = "glasses"
@@ -260,7 +260,7 @@
inv_box.slot_id = SLOT_GLASSES
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "ears"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
@@ -268,7 +268,7 @@
inv_box.slot_id = SLOT_EARS
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "head"
inv_box.icon = ui_style
inv_box.icon_state = "head"
@@ -276,7 +276,7 @@
inv_box.slot_id = SLOT_HEAD
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "shoes"
inv_box.icon = ui_style
inv_box.icon_state = "shoes"
@@ -284,7 +284,7 @@
inv_box.slot_id = SLOT_SHOES
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "belt"
inv_box.icon = ui_style
inv_box.icon_state = "belt"
@@ -293,58 +293,58 @@
inv_box.slot_id = SLOT_BELT
static_inventory += inv_box
throw_icon = new /obj/screen/throw_catch()
throw_icon = new /atom/movable/screen/throw_catch()
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
hotkeybuttons += throw_icon
rest_icon = new /obj/screen/rest()
rest_icon = new /atom/movable/screen/rest()
rest_icon.icon = ui_style
rest_icon.screen_loc = ui_above_movement
static_inventory += rest_icon
internals = new /obj/screen/internals()
internals = new /atom/movable/screen/internals()
infodisplay += internals
healths = new /obj/screen/healths()
healths = new /atom/movable/screen/healths()
infodisplay += healths
stamina = new /obj/screen/stamina()
stamina = new /atom/movable/screen/stamina()
stamina.hud = src
infodisplay += stamina
healthdoll = new /obj/screen/healthdoll()
healthdoll = new /atom/movable/screen/healthdoll()
infodisplay += healthdoll
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon(mymob)
pull_icon.screen_loc = ui_above_intent
static_inventory += pull_icon
lingchemdisplay = new /obj/screen/ling/chems()
lingchemdisplay = new /atom/movable/screen/ling/chems()
infodisplay += lingchemdisplay
lingstingdisplay = new /obj/screen/ling/sting()
lingstingdisplay = new /atom/movable/screen/ling/sting()
infodisplay += lingstingdisplay
devilsouldisplay = new /obj/screen/devil/soul_counter
devilsouldisplay = new /atom/movable/screen/devil/soul_counter
infodisplay += devilsouldisplay
//bloodsuckers
blood_display = new /obj/screen/bloodsucker/blood_counter
blood_display = new /atom/movable/screen/bloodsucker/blood_counter
infodisplay += blood_display
vamprank_display = new /obj/screen/bloodsucker/rank_counter
vamprank_display = new /atom/movable/screen/bloodsucker/rank_counter
infodisplay += vamprank_display
sunlight_display = new /obj/screen/bloodsucker/sunlight_counter
sunlight_display = new /atom/movable/screen/bloodsucker/sunlight_counter
infodisplay += sunlight_display
zone_select = new /obj/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style
zone_select.update_icon(mymob)
static_inventory += zone_select
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv
@@ -359,7 +359,7 @@
if(!istype(H) || !H.dna.species)
return
var/datum/species/S = H.dna.species
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
if(inv.slot_id in S.no_equip)
inv.alpha = 128

View File

@@ -3,13 +3,13 @@
/datum/hud/lavaland_elite/New(mob/living/simple_animal/hostile/asteroid/elite)
..()
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull
pull_icon.hud = src
static_inventory += pull_icon
healths = new /obj/screen/healths/lavaland_elite()
healths = new /atom/movable/screen/healths/lavaland_elite()
healths.hud = src
infodisplay += healths

View File

@@ -4,7 +4,7 @@
/datum/hud/living/New(mob/living/owner)
..()
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull
@@ -12,6 +12,6 @@
static_inventory += pull_icon
//mob health doll! assumes whatever sprite the mob is
healthdoll = new /obj/screen/healthdoll/living()
healthdoll = new /atom/movable/screen/healthdoll/living()
healthdoll.hud = src
infodisplay += healthdoll

View File

@@ -3,11 +3,11 @@
* Assoc list with all the active maps - when a screen obj is added to
* a map, it's put in here as well.
*
* Format: list(<mapname> = list(/obj/screen))
* Format: list(<mapname> = list(/atom/movable/screen))
*/
var/list/screen_maps = list()
/obj/screen
/atom/movable/screen
/**
* Map name assigned to this object.
* Automatically set by /client/proc/add_obj_to_map.
@@ -26,7 +26,7 @@
* A screen object, which acts as a container for turfs and other things
* you want to show on the map, which you usually attach to "vis_contents".
*/
/obj/screen/map_view
/atom/movable/screen/map_view
// Map view has to be on the lowest plane to enable proper lighting
layer = GAME_PLANE
plane = GAME_PLANE
@@ -36,7 +36,7 @@
* It is also implicitly used to allocate a rectangle on the map, which will
* be used for auto-scaling the map.
*/
/obj/screen/background
/atom/movable/screen/background
name = "background"
icon = 'icons/mob/map_backgrounds.dmi'
icon_state = "clear"
@@ -49,7 +49,7 @@
*
* If applicable, "assigned_map" has to be assigned before this proc call.
*/
/obj/screen/proc/set_position(x, y, px = 0, py = 0)
/atom/movable/screen/proc/set_position(x, y, px = 0, py = 0)
if(assigned_map)
screen_loc = "[assigned_map]:[x]:[px],[y]:[py]"
else
@@ -60,7 +60,7 @@
*
* If applicable, "assigned_map" has to be assigned before this proc call.
*/
/obj/screen/proc/fill_rect(x1, y1, x2, y2)
/atom/movable/screen/proc/fill_rect(x1, y1, x2, y2)
if(assigned_map)
screen_loc = "[assigned_map]:[x1],[y1] to [x2],[y2]"
else
@@ -70,7 +70,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])
@@ -92,7 +92,7 @@
/client/proc/clear_map(map_name)
if(!map_name || !(map_name in screen_maps))
return FALSE
for(var/obj/screen/screen_obj in screen_maps[map_name])
for(var/atom/movable/screen/screen_obj in screen_maps[map_name])
screen_maps[map_name] -= screen_obj
if(screen_obj.del_on_map_removal)
qdel(screen_obj)
@@ -146,7 +146,7 @@
var/y_value = world.icon_size * tilesize * height
var/map_name = create_popup(popup_name, x_value, y_value)
var/obj/screen/background/background = new
var/atom/movable/screen/background/background = new
background.assigned_map = map_name
background.fill_rect(1, 1, width, height)
if(bg_icon)

View File

@@ -1,44 +1,44 @@
/datum/hud/monkey/New(mob/living/carbon/monkey/owner)
..()
var/obj/screen/using
var/obj/screen/inventory/inv_box
var/atom/movable/screen/using
var/atom/movable/screen/inventory/inv_box
action_intent = new /obj/screen/act_intent()
action_intent = new /atom/movable/screen/act_intent()
action_intent.icon = ui_style
action_intent.icon_state = mymob.a_intent
action_intent.screen_loc = ui_acti
static_inventory += action_intent
using = new /obj/screen/mov_intent()
using = new /atom/movable/screen/mov_intent()
using.icon = ui_style
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi
static_inventory += using
using = new/obj/screen/language_menu
using = new/atom/movable/screen/language_menu
using.icon = ui_style
static_inventory += using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
static_inventory += using
build_hand_slots()
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_1_m" //extra wide!
using.screen_loc = ui_swaphand_position(owner,1)
static_inventory += using
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
static_inventory += using
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "mask"
inv_box.icon = ui_style
inv_box.icon_state = "mask"
@@ -47,7 +47,7 @@
inv_box.slot_id = SLOT_WEAR_MASK
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "neck"
inv_box.icon = ui_style
inv_box.icon_state = "neck"
@@ -56,7 +56,7 @@
inv_box.slot_id = SLOT_NECK
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "head"
inv_box.icon = ui_style
inv_box.icon_state = "head"
@@ -65,7 +65,7 @@
inv_box.slot_id = SLOT_HEAD
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "back"
inv_box.icon = ui_style
inv_box.icon_state = "back"
@@ -73,43 +73,43 @@
inv_box.slot_id = SLOT_BACK
static_inventory += inv_box
throw_icon = new /obj/screen/throw_catch()
throw_icon = new /atom/movable/screen/throw_catch()
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
hotkeybuttons += throw_icon
internals = new /obj/screen/internals()
internals = new /atom/movable/screen/internals()
infodisplay += internals
healths = new /obj/screen/healths()
healths = new /atom/movable/screen/healths()
infodisplay += healths
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon(mymob)
pull_icon.screen_loc = ui_above_movement
static_inventory += pull_icon
lingchemdisplay = new /obj/screen/ling/chems()
lingchemdisplay = new /atom/movable/screen/ling/chems()
infodisplay += lingchemdisplay
lingstingdisplay = new /obj/screen/ling/sting()
lingstingdisplay = new /atom/movable/screen/ling/sting()
infodisplay += lingstingdisplay
zone_select = new /obj/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style
zone_select.update_icon(mymob)
static_inventory += zone_select
mymob.client.screen = list()
using = new /obj/screen/resist()
using = new /atom/movable/screen/resist()
using.icon = ui_style
using.screen_loc = ui_above_intent
hotkeybuttons += using
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv

View File

@@ -8,7 +8,7 @@
//Movable Screen Object
//Not tied to the grid, places it's center where the cursor is
/obj/screen/movable
/atom/movable/screen/movable
var/snap2grid = FALSE
var/moved = FALSE
var/locked = FALSE
@@ -18,11 +18,11 @@
//Snap Screen Object
//Tied to the grid, snaps to the nearest turf
/obj/screen/movable/snap
/atom/movable/screen/movable/snap
snap2grid = TRUE
/obj/screen/movable/MouseDrop(over_object, src_location, over_location, src_control, over_control, params)
/atom/movable/screen/movable/MouseDrop(over_object, src_location, over_location, src_control, over_control, params)
if(locked) //no! I am locked! begone!
return
var/list/PM = params2list(params)
@@ -56,7 +56,7 @@
set category = "Misc.Server Debug"
set name = "Spawn Movable UI Object"
var/obj/screen/movable/M = new()
var/atom/movable/screen/movable/M = new()
M.name = "Movable UI Object"
M.icon_state = "block"
M.maptext = "Movable"
@@ -75,7 +75,7 @@
set category = "Misc.Server Debug"
set name = "Spawn Snap UI Object"
var/obj/screen/movable/snap/S = new()
var/atom/movable/screen/movable/snap/S = new()
S.name = "Snap UI Object"
S.icon_state = "block"
S.maptext = "Snap"

View File

@@ -1,10 +1,10 @@
#define PAI_MISSING_SOFTWARE_MESSAGE span_warning("You must download the required software to use this.")
/obj/screen/pai
/atom/movable/screen/pai
icon = 'icons/mob/screen_pai.dmi'
var/required_software
/obj/screen/pai/Click()
/atom/movable/screen/pai/Click()
if(isobserver(usr) || usr.incapacitated())
return FALSE
var/mob/living/silicon/pai/pAI = usr
@@ -13,21 +13,21 @@
return FALSE
return TRUE
/obj/screen/pai/software
/atom/movable/screen/pai/software
name = "Software Interface"
icon_state = "pai"
/obj/screen/pai/software/Click()
/atom/movable/screen/pai/software/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.paiInterface()
/obj/screen/pai/shell
/atom/movable/screen/pai/shell
name = "Toggle Holoform"
icon_state = "pai_holoform"
/obj/screen/pai/shell/Click()
/atom/movable/screen/pai/shell/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
@@ -36,53 +36,53 @@
else
pAI.fold_out()
/obj/screen/pai/chassis
/atom/movable/screen/pai/chassis
name = "Holochassis Appearance Composite"
icon_state = "pai_chassis"
/obj/screen/pai/chassis/Click()
/atom/movable/screen/pai/chassis/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.choose_chassis()
/obj/screen/pai/rest
/atom/movable/screen/pai/rest
name = "Rest"
icon_state = "pai_rest"
/obj/screen/pai/rest/Click()
/atom/movable/screen/pai/rest/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.lay_down()
/obj/screen/pai/light
/atom/movable/screen/pai/light
name = "Toggle Integrated Lights"
icon_state = "light"
/obj/screen/pai/light/Click()
/atom/movable/screen/pai/light/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.toggle_integrated_light()
/obj/screen/pai/newscaster
/atom/movable/screen/pai/newscaster
name = "pAI Newscaster"
icon_state = "newscaster"
required_software = "newscaster"
/obj/screen/pai/newscaster/Click()
/atom/movable/screen/pai/newscaster/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.newscaster.ui_interact(usr)
/obj/screen/pai/host_monitor
/atom/movable/screen/pai/host_monitor
name = "Host Health Scan"
icon_state = "host_monitor"
required_software = "host scan"
/obj/screen/pai/host_monitor/Click()
/atom/movable/screen/pai/host_monitor/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
@@ -92,77 +92,77 @@
to_chat(src, "You are not being carried by anyone!")
return 0
/obj/screen/pai/crew_manifest
/atom/movable/screen/pai/crew_manifest
name = "Crew Manifest"
icon_state = "manifest"
required_software = "crew manifest"
/obj/screen/pai/crew_manifest/Click()
/atom/movable/screen/pai/crew_manifest/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.ai_roster()
/obj/screen/pai/state_laws
/atom/movable/screen/pai/state_laws
name = "State Laws"
icon_state = "state_laws"
/obj/screen/pai/state_laws/Click()
/atom/movable/screen/pai/state_laws/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.checklaws()
/obj/screen/pai/pda_msg_send
/atom/movable/screen/pai/pda_msg_send
name = "PDA - Send Message"
icon_state = "pda_send"
required_software = "digital messenger"
/obj/screen/pai/pda_msg_send/Click()
/atom/movable/screen/pai/pda_msg_send/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.cmd_send_pdamesg(usr)
/obj/screen/pai/pda_msg_show
/atom/movable/screen/pai/pda_msg_show
name = "PDA - Show Message Log"
icon_state = "pda_receive"
required_software = "digital messenger"
/obj/screen/pai/pda_msg_show/Click()
/atom/movable/screen/pai/pda_msg_show/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.cmd_show_message_log(usr)
/obj/screen/pai/image_take
/atom/movable/screen/pai/image_take
name = "Take Image"
icon_state = "take_picture"
required_software = "photography module"
/obj/screen/pai/image_take/Click()
/atom/movable/screen/pai/image_take/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.aicamera.toggle_camera_mode(usr)
/obj/screen/pai/image_view
/atom/movable/screen/pai/image_view
name = "View Images"
icon_state = "view_images"
required_software = "photography module"
/obj/screen/pai/image_view/Click()
/atom/movable/screen/pai/image_view/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
pAI.aicamera.viewpictures(usr)
/obj/screen/pai/radio
/atom/movable/screen/pai/radio
name = "radio"
icon = 'icons/mob/screen_cyborg.dmi'
icon_state = "radio"
/obj/screen/pai/radio/Click()
/atom/movable/screen/pai/radio/Click()
if(!..())
return
var/mob/living/silicon/pai/pAI = usr
@@ -170,80 +170,80 @@
/datum/hud/pai/New(mob/living/silicon/pai/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
// Software menu
using = new /obj/screen/pai/software
using = new /atom/movable/screen/pai/software
using.screen_loc = ui_pai_software
static_inventory += using
// Holoform
using = new /obj/screen/pai/shell
using = new /atom/movable/screen/pai/shell
using.screen_loc = ui_pai_shell
static_inventory += using
// Chassis Select Menu
using = new /obj/screen/pai/chassis
using = new /atom/movable/screen/pai/chassis
using.screen_loc = ui_pai_chassis
static_inventory += using
// Rest
using = new /obj/screen/pai/rest
using = new /atom/movable/screen/pai/rest
using.screen_loc = ui_pai_rest
static_inventory += using
// Integrated Light
using = new /obj/screen/pai/light
using = new /atom/movable/screen/pai/light
using.screen_loc = ui_pai_light
static_inventory += using
// Newscaster
using = new /obj/screen/pai/newscaster
using = new /atom/movable/screen/pai/newscaster
using.screen_loc = ui_pai_newscaster
static_inventory += using
// Language menu
using = new /obj/screen/language_menu
using = new /atom/movable/screen/language_menu
using.screen_loc = ui_borg_language_menu
static_inventory += using
// Host Monitor
using = new /obj/screen/pai/host_monitor()
using = new /atom/movable/screen/pai/host_monitor()
using.screen_loc = ui_pai_host_monitor
static_inventory += using
// Crew Manifest
using = new /obj/screen/pai/crew_manifest()
using = new /atom/movable/screen/pai/crew_manifest()
using.screen_loc = ui_pai_crew_manifest
static_inventory += using
// Laws
using = new /obj/screen/pai/state_laws()
using = new /atom/movable/screen/pai/state_laws()
using.screen_loc = ui_pai_state_laws
static_inventory += using
// PDA message
using = new /obj/screen/pai/pda_msg_send()
using = new /atom/movable/screen/pai/pda_msg_send()
using.screen_loc = ui_pai_pda_send
static_inventory += using
// PDA log
using = new /obj/screen/pai/pda_msg_show()
using = new /atom/movable/screen/pai/pda_msg_show()
using.screen_loc = ui_pai_pda_log
static_inventory += using
// Take image
using = new /obj/screen/pai/image_take()
using = new /atom/movable/screen/pai/image_take()
using.screen_loc = ui_pai_take_picture
static_inventory += using
// View images
using = new /obj/screen/pai/image_view()
using = new /atom/movable/screen/pai/image_view()
using.screen_loc = ui_pai_view_images
static_inventory += using
// Radio
using = new /obj/screen/pai/radio()
using = new /atom/movable/screen/pai/radio()
using.screen_loc = ui_borg_radio
static_inventory += using
@@ -251,7 +251,7 @@
/datum/hud/pai/proc/update_software_buttons()
var/mob/living/silicon/pai/owner = mymob
for(var/obj/screen/pai/button in static_inventory)
for(var/atom/movable/screen/pai/button in static_inventory)
if(button.required_software)
button.color = owner.software.Find(button.required_software) ? null : "#808080"

View File

@@ -19,12 +19,12 @@
if(!length(C.parallax_layers_cached))
C.parallax_layers_cached = list()
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_1(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_2(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/planet(null, C.view)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_1(null, C.view)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_2(null, C.view)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/planet(null, C.view)
if(SSparallax.random_layer)
C.parallax_layers_cached += new SSparallax.random_layer
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_3(null, C.view)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_3(null, C.view)
C.parallax_layers = C.parallax_layers_cached.Copy()
@@ -32,9 +32,9 @@
C.parallax_layers.len = C.parallax_layers_max
C.screen |= (C.parallax_layers)
var/obj/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
var/atom/movable/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
if(screenmob != mymob)
C.screen -= locate(/obj/screen/plane_master/parallax_white) in C.screen
C.screen -= locate(/atom/movable/screen/plane_master/parallax_white) in C.screen
C.screen += PM
PM.color = list(
0, 0, 0, 0,
@@ -49,9 +49,9 @@
var/mob/screenmob = viewmob || mymob
var/client/C = screenmob.client
C.screen -= (C.parallax_layers_cached)
var/obj/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
var/atom/movable/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
if(screenmob != mymob)
C.screen -= locate(/obj/screen/plane_master/parallax_white) in C.screen
C.screen -= locate(/atom/movable/screen/plane_master/parallax_white) in C.screen
C.screen += PM
PM.color = initial(PM.color)
C.parallax_layers = null
@@ -102,7 +102,7 @@
if(new_parallax_movedir == FALSE)
var/animate_time = 0
for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing
var/atom/movable/screen/parallax_layer/L = thing
L.icon_state = initial(L.icon_state)
L.update_o(C.view)
var/T = PARALLAX_LOOP_TIME / L.speed
@@ -125,7 +125,7 @@
var/shortesttimer
if(!skip_windups)
for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing
var/atom/movable/screen/parallax_layer/L = thing
var/T = PARALLAX_LOOP_TIME / L.speed
if (isnull(shortesttimer))
@@ -153,7 +153,7 @@
return
C.parallax_animate_timer = FALSE
for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing
var/atom/movable/screen/parallax_layer/L = thing
if (!new_parallax_movedir)
animate(L)
continue
@@ -203,7 +203,7 @@
C.last_parallax_shift = world.time
for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing
var/atom/movable/screen/parallax_layer/L = thing
L.update_status(mymob)
if (L.view_sized != C.view)
L.update_o(C.view)
@@ -248,7 +248,7 @@
var/area/areaobj = get_area(client.eye)
hud_used.set_parallax_movedir(areaobj.parallax_movedir, TRUE)
/obj/screen/parallax_layer
/atom/movable/screen/parallax_layer
icon = 'icons/effects/parallax.dmi'
var/speed = 1
var/offset_x = 0
@@ -261,13 +261,13 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/parallax_layer/Initialize(mapload, view)
/atom/movable/screen/parallax_layer/Initialize(mapload, view)
. = ..()
if (!view)
view = world.view
update_o(view)
/obj/screen/parallax_layer/proc/update_o(view)
/atom/movable/screen/parallax_layer/proc/update_o(view)
if (!view)
view = world.view
@@ -286,52 +286,52 @@
add_overlay(new_overlays)
view_sized = view
/obj/screen/parallax_layer/proc/update_status(mob/M)
/atom/movable/screen/parallax_layer/proc/update_status(mob/M)
return
/obj/screen/parallax_layer/layer_1
/atom/movable/screen/parallax_layer/layer_1
icon_state = "layer1"
speed = 0.6
layer = 1
/obj/screen/parallax_layer/layer_2
/atom/movable/screen/parallax_layer/layer_2
icon_state = "layer2"
speed = 1
layer = 2
/obj/screen/parallax_layer/layer_3
/atom/movable/screen/parallax_layer/layer_3
icon_state = "layer3"
speed = 1.4
layer = 3
/obj/screen/parallax_layer/random
/atom/movable/screen/parallax_layer/random
blend_mode = BLEND_OVERLAY
speed = 3
layer = 3
/obj/screen/parallax_layer/random/space_gas
/atom/movable/screen/parallax_layer/random/space_gas
icon_state = "random_layer1"
/obj/screen/parallax_layer/random/space_gas/Initialize(mapload, view)
/atom/movable/screen/parallax_layer/random/space_gas/Initialize(mapload, view)
. = ..()
src.add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY)
/obj/screen/parallax_layer/random/asteroids
/atom/movable/screen/parallax_layer/random/asteroids
icon_state = "random_layer2"
/obj/screen/parallax_layer/planet
/atom/movable/screen/parallax_layer/planet
icon_state = "planet"
blend_mode = BLEND_OVERLAY
absolute = TRUE //Status of seperation
speed = 3
layer = 30
/obj/screen/parallax_layer/planet/update_status(mob/M)
/atom/movable/screen/parallax_layer/planet/update_status(mob/M)
var/turf/T = get_turf(M)
if(is_station_level(T.z))
invisibility = 0
else
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/parallax_layer/planet/update_o()
/atom/movable/screen/parallax_layer/planet/update_o()
return //Shit wont move

View File

@@ -1,4 +1,4 @@
/obj/screen/movable/pic_in_pic
/atom/movable/screen/movable/pic_in_pic
name = "Picture-in-picture"
screen_loc = "CENTER"
plane = FLOOR_PLANE
@@ -7,18 +7,18 @@
var/height = 0
var/list/shown_to = list()
var/list/viewing_turfs = list()
var/obj/screen/component_button/button_x
var/obj/screen/component_button/button_expand
var/obj/screen/component_button/button_shrink
var/atom/movable/screen/component_button/button_x
var/atom/movable/screen/component_button/button_expand
var/atom/movable/screen/component_button/button_shrink
var/mutable_appearance/standard_background
var/const/max_dimensions = 10
/obj/screen/movable/pic_in_pic/Initialize()
/atom/movable/screen/movable/pic_in_pic/Initialize()
. = ..()
make_backgrounds()
/obj/screen/movable/pic_in_pic/Destroy()
/atom/movable/screen/movable/pic_in_pic/Destroy()
for(var/C in shown_to)
unshow_to(C)
QDEL_NULL(button_x)
@@ -26,7 +26,7 @@
QDEL_NULL(button_expand)
return ..()
/obj/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)
@@ -34,13 +34,13 @@
else if(component == button_shrink)
set_view_size(width-1, height-1)
/obj/screen/movable/pic_in_pic/proc/make_backgrounds()
/atom/movable/screen/movable/pic_in_pic/proc/make_backgrounds()
standard_background = new /mutable_appearance()
standard_background.icon = 'icons/misc/pic_in_pic.dmi'
standard_background.icon_state = "background"
standard_background.layer = SPACE_LAYER
/obj/screen/movable/pic_in_pic/proc/add_buttons()
/atom/movable/screen/movable/pic_in_pic/proc/add_buttons()
var/static/mutable_appearance/move_tab
if(!move_tab)
move_tab = new /mutable_appearance()
@@ -55,7 +55,7 @@
add_overlay(move_tab)
if(!button_x)
button_x = new /obj/screen/component_button(null, src)
button_x = new /atom/movable/screen/component_button(null, src)
var/mutable_appearance/MA = new /mutable_appearance()
MA.name = "close"
MA.icon = 'icons/misc/pic_in_pic.dmi'
@@ -68,7 +68,7 @@
vis_contents += button_x
if(!button_expand)
button_expand = new /obj/screen/component_button(null, src)
button_expand = new /atom/movable/screen/component_button(null, src)
var/mutable_appearance/MA = new /mutable_appearance()
MA.name = "expand"
MA.icon = 'icons/misc/pic_in_pic.dmi'
@@ -81,7 +81,7 @@
vis_contents += button_expand
if(!button_shrink)
button_shrink = new /obj/screen/component_button(null, src)
button_shrink = new /atom/movable/screen/component_button(null, src)
var/mutable_appearance/MA = new /mutable_appearance()
MA.name = "shrink"
MA.icon = 'icons/misc/pic_in_pic.dmi'
@@ -93,7 +93,7 @@
button_shrink.transform = M
vis_contents += button_shrink
/obj/screen/movable/pic_in_pic/proc/add_background()
/atom/movable/screen/movable/pic_in_pic/proc/add_background()
if((width > 0) && (height > 0))
var/matrix/M = matrix()
M.Scale(width + 0.5, height + 0.5)
@@ -101,7 +101,7 @@
standard_background.transform = M
add_overlay(standard_background)
/obj/screen/movable/pic_in_pic/proc/set_view_size(width, height, do_refresh = TRUE)
/atom/movable/screen/movable/pic_in_pic/proc/set_view_size(width, height, do_refresh = TRUE)
width = clamp(width, 0, max_dimensions)
height = clamp(height, 0, max_dimensions)
src.width = width
@@ -115,19 +115,19 @@
if(do_refresh)
refresh_view()
/obj/screen/movable/pic_in_pic/proc/set_view_center(atom/target, do_refresh = TRUE)
/atom/movable/screen/movable/pic_in_pic/proc/set_view_center(atom/target, do_refresh = TRUE)
center = target
if(do_refresh)
refresh_view()
/obj/screen/movable/pic_in_pic/proc/refresh_view()
/atom/movable/screen/movable/pic_in_pic/proc/refresh_view()
vis_contents -= viewing_turfs
if(!width || !height)
return
viewing_turfs = get_visible_turfs()
vis_contents += viewing_turfs
/obj/screen/movable/pic_in_pic/proc/get_visible_turfs()
/atom/movable/screen/movable/pic_in_pic/proc/get_visible_turfs()
var/turf/T = get_turf(center)
if(!T)
return list()
@@ -135,12 +135,12 @@
var/turf/upperright = locate(min(world.maxx, lowerleft.x + width - 1), min(world.maxy, lowerleft.y + height - 1), lowerleft.z)
return block(lowerleft, upperright)
/obj/screen/movable/pic_in_pic/proc/show_to(client/C)
/atom/movable/screen/movable/pic_in_pic/proc/show_to(client/C)
if(C)
shown_to[C] = 1
C.screen += src
/obj/screen/movable/pic_in_pic/proc/unshow_to(client/C)
/atom/movable/screen/movable/pic_in_pic/proc/unshow_to(client/C)
if(C)
shown_to -= C
C.screen -= src

View File

@@ -1,4 +1,4 @@
/obj/screen/plane_master
/atom/movable/screen/plane_master
screen_loc = "CENTER"
icon_state = "blank"
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
@@ -6,60 +6,60 @@
var/show_alpha = 255
var/hide_alpha = 0
/obj/screen/plane_master/proc/Show(override)
/atom/movable/screen/plane_master/proc/Show(override)
alpha = override || show_alpha
/obj/screen/plane_master/proc/Hide(override)
/atom/movable/screen/plane_master/proc/Hide(override)
alpha = override || hide_alpha
//Why do plane masters need a backdrop sometimes? Read https://secure.byond.com/forum/?post=2141928
//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
/obj/screen/plane_master/proc/backdrop(mob/mymob)
/atom/movable/screen/plane_master/proc/backdrop(mob/mymob)
///Things rendered on "openspace"; holes in multi-z
/obj/screen/plane_master/openspace
/atom/movable/screen/plane_master/openspace
name = "open space plane master"
plane = FLOOR_OPENSPACE_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_MULTIPLY
alpha = 255
/obj/screen/plane_master/openspace/backdrop(mob/mymob)
/atom/movable/screen/plane_master/openspace/backdrop(mob/mymob)
filters = list()
filters += filter(type="alpha", render_source = LIGHTING_RENDER_TARGET, flags = MASK_INVERSE)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -10)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20)
/obj/screen/plane_master/proc/outline(_size, _color)
/atom/movable/screen/plane_master/proc/outline(_size, _color)
filters += filter(type = "outline", size = _size, color = _color)
/obj/screen/plane_master/proc/shadow(_size, _border, _offset = 0, _x = 0, _y = 0, _color = "#04080FAA")
/atom/movable/screen/plane_master/proc/shadow(_size, _border, _offset = 0, _x = 0, _y = 0, _color = "#04080FAA")
filters += filter(type = "drop_shadow", x = _x, y = _y, color = _color, size = _size, offset = _offset)
/obj/screen/plane_master/proc/clear_filters()
/atom/movable/screen/plane_master/proc/clear_filters()
filters = list()
///Contains just the floor
/obj/screen/plane_master/floor
/atom/movable/screen/plane_master/floor
name = "floor plane master"
plane = FLOOR_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/floor/backdrop(mob/mymob)
/atom/movable/screen/plane_master/floor/backdrop(mob/mymob)
filters = list()
if(istype(mymob) && mymob.eye_blurry)
filters += GAUSSIAN_BLUR(clamp(mymob.eye_blurry*0.1,0.6,3))
///Contains most things in the game world
/obj/screen/plane_master/game_world
/atom/movable/screen/plane_master/game_world
name = "game world plane master"
plane = GAME_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/game_world/backdrop(mob/mymob)
/atom/movable/screen/plane_master/game_world/backdrop(mob/mymob)
filters = list()
if(istype(mymob) && mymob.client && mymob.client.prefs && mymob.client.prefs.ambientocclusion)
filters += AMBIENT_OCCLUSION
@@ -68,13 +68,13 @@
///Contains all lighting objects
/obj/screen/plane_master/lighting
/atom/movable/screen/plane_master/lighting
name = "lighting plane master"
plane = LIGHTING_PLANE
blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/lighting/Initialize()
/atom/movable/screen/plane_master/lighting/Initialize()
. = ..()
filters += filter(type="alpha", render_source=EMISSIVE_RENDER_TARGET, flags=MASK_INVERSE)
filters += filter(type="alpha", render_source=EMISSIVE_UNBLOCKABLE_RENDER_TARGET, flags=MASK_INVERSE)
@@ -85,13 +85,13 @@
* Gets masked by blocking plane. Use for things that you want blocked by
* mobs, items, etc.
*/
/obj/screen/plane_master/emissive
/atom/movable/screen/plane_master/emissive
name = "emissive plane master"
plane = EMISSIVE_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_RENDER_TARGET
/obj/screen/plane_master/emissive/Initialize()
/atom/movable/screen/plane_master/emissive/Initialize()
. = ..()
filters += filter(type="alpha", render_source=EMISSIVE_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE)
@@ -102,7 +102,7 @@
* magic stuff, etc.
*/
/obj/screen/plane_master/emissive_unblockable
/atom/movable/screen/plane_master/emissive_unblockable
name = "unblockable emissive plane master"
plane = EMISSIVE_UNBLOCKABLE_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
@@ -113,40 +113,40 @@
*
* You really shouldn't be directly using this, use atom helpers instead
*/
/obj/screen/plane_master/emissive_blocker
/atom/movable/screen/plane_master/emissive_blocker
name = "emissive blocker plane master"
plane = EMISSIVE_BLOCKER_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_BLOCKER_RENDER_TARGET
///Contains space parallax
/obj/screen/plane_master/parallax
/atom/movable/screen/plane_master/parallax
name = "parallax plane master"
plane = PLANE_SPACE_PARALLAX
blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/parallax_white
/atom/movable/screen/plane_master/parallax_white
name = "parallax whitifier plane master"
plane = PLANE_SPACE
/obj/screen/plane_master/lighting/backdrop(mob/mymob)
mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit)
mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit)
/atom/movable/screen/plane_master/lighting/backdrop(mob/mymob)
mymob.overlay_fullscreen("lighting_backdrop_lit", /atom/movable/screen/fullscreen/lighting_backdrop/lit)
mymob.overlay_fullscreen("lighting_backdrop_unlit", /atom/movable/screen/fullscreen/lighting_backdrop/unlit)
/obj/screen/plane_master/camera_static
/atom/movable/screen/plane_master/camera_static
name = "camera static plane master"
plane = CAMERA_STATIC_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/runechat
/atom/movable/screen/plane_master/runechat
name = "runechat plane master"
plane = RUNECHAT_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/runechat/backdrop(mob/mymob)
/atom/movable/screen/plane_master/runechat/backdrop(mob/mymob)
filters = list()
if(istype(mymob) && mymob.client?.prefs?.ambientocclusion)
filters += AMBIENT_OCCLUSION

View File

@@ -3,50 +3,50 @@
GLOBAL_LIST_EMPTY(radial_menus)
/obj/screen/radial
/atom/movable/screen/radial
icon = 'icons/mob/radial.dmi'
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
var/datum/radial_menu/parent
/obj/screen/radial/slice
/atom/movable/screen/radial/slice
icon_state = "radial_slice"
var/choice
var/next_page = FALSE
var/tooltips = FALSE
/obj/screen/radial/slice/MouseEntered(location, control, params)
/atom/movable/screen/radial/slice/MouseEntered(location, control, params)
. = ..()
icon_state = "radial_slice_focus"
if(tooltips)
openToolTip(usr, src, params, title = name, content = desc)
/obj/screen/radial/slice/MouseExited(location, control, params)
/atom/movable/screen/radial/slice/MouseExited(location, control, params)
. = ..()
icon_state = "radial_slice"
if(tooltips)
closeToolTip(usr)
/obj/screen/radial/slice/Click(location, control, params)
/atom/movable/screen/radial/slice/Click(location, control, params)
if(usr.client == parent.current_user)
if(next_page)
parent.next_page()
else
parent.element_chosen(choice,usr)
/obj/screen/radial/center
/atom/movable/screen/radial/center
name = "Close Menu"
icon_state = "radial_center"
/obj/screen/radial/center/MouseEntered(location, control, params)
/atom/movable/screen/radial/center/MouseEntered(location, control, params)
. = ..()
icon_state = "radial_center_focus"
/obj/screen/radial/center/MouseExited(location, control, params)
/atom/movable/screen/radial/center/MouseExited(location, control, params)
. = ..()
icon_state = "radial_center"
/obj/screen/radial/center/Click(location, control, params)
/atom/movable/screen/radial/center/Click(location, control, params)
if(usr.client == parent.current_user)
parent.finished = TRUE
@@ -64,8 +64,8 @@ GLOBAL_LIST_EMPTY(radial_menus)
var/selected_choice
var/list/obj/screen/elements = list()
var/obj/screen/radial/center/close_button
var/list/atom/movable/screen/elements = list()
var/atom/movable/screen/radial/center/close_button
var/client/current_user
var/atom/anchor
var/image/menu_holder
@@ -127,7 +127,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
if(elements.len < max_elements)
var/elements_to_add = max_elements - elements.len
for(var/i in 1 to elements_to_add) //Create all elements
var/obj/screen/radial/slice/new_element = new /obj/screen/radial/slice
var/atom/movable/screen/radial/slice/new_element = new /atom/movable/screen/radial/slice
new_element.tooltips = use_tooltips
new_element.parent = src
elements += new_element
@@ -159,14 +159,14 @@ GLOBAL_LIST_EMPTY(radial_menus)
var/list/page_choices = page_data[current_page]
var/angle_per_element = round(zone / page_choices.len)
for(var/i in 1 to elements.len)
var/obj/screen/radial/E = elements[i]
var/atom/movable/screen/radial/E = elements[i]
var/angle = WRAP(starting_angle + (i - 1) * angle_per_element,0,360)
if(i > page_choices.len)
HideElement(E)
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"
@@ -176,7 +176,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)

View File

@@ -2,19 +2,19 @@
A derivative of radial menu which persists onscreen until closed and invokes a callback each time an element is clicked
*/
/obj/screen/radial/persistent/center
/atom/movable/screen/radial/persistent/center
name = "Close Menu"
icon_state = "radial_center"
/obj/screen/radial/persistent/center/Click(location, control, params)
/atom/movable/screen/radial/persistent/center/Click(location, control, params)
if(usr.client == parent.current_user)
parent.element_chosen(null,usr)
/obj/screen/radial/persistent/center/MouseEntered(location, control, params)
/atom/movable/screen/radial/persistent/center/MouseEntered(location, control, params)
. = ..()
icon_state = "radial_center_focus"
/obj/screen/radial/persistent/center/MouseExited(location, control, params)
/atom/movable/screen/radial/persistent/center/MouseExited(location, control, params)
. = ..()
icon_state = "radial_center"
@@ -25,7 +25,7 @@
var/datum/callback/select_proc_callback
/datum/radial_menu/persistent/New()
close_button = new /obj/screen/radial/persistent/center
close_button = new /atom/movable/screen/radial/persistent/center
close_button.parent = src

View File

@@ -4,12 +4,12 @@
/datum/hud/revenant/New(mob/owner)
..()
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull
pull_icon.hud = src
static_inventory += pull_icon
healths = new /obj/screen/healths/revenant()
healths = new /atom/movable/screen/healths/revenant()
infodisplay += healths

View File

@@ -1,15 +1,15 @@
/obj/screen/robot
/atom/movable/screen/robot
icon = 'icons/mob/screen_cyborg.dmi'
/obj/screen/robot/module
/atom/movable/screen/robot/module
name = "cyborg module"
icon_state = "nomod"
/obj/screen/robot/Click()
/atom/movable/screen/robot/Click()
if(isobserver(usr))
return 1
/obj/screen/robot/module/Click()
/atom/movable/screen/robot/module/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
@@ -18,61 +18,61 @@
return 1
R.pick_module()
/obj/screen/robot/module1
/atom/movable/screen/robot/module1
name = "module1"
icon_state = "inv1"
/obj/screen/robot/module1/Click()
/atom/movable/screen/robot/module1/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.toggle_module(1)
/obj/screen/robot/module2
/atom/movable/screen/robot/module2
name = "module2"
icon_state = "inv2"
/obj/screen/robot/module2/Click()
/atom/movable/screen/robot/module2/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.toggle_module(2)
/obj/screen/robot/module3
/atom/movable/screen/robot/module3
name = "module3"
icon_state = "inv3"
/obj/screen/robot/module3/Click()
/atom/movable/screen/robot/module3/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.toggle_module(3)
/obj/screen/robot/radio
/atom/movable/screen/robot/radio
name = "radio"
icon_state = "radio"
/obj/screen/robot/radio/Click()
/atom/movable/screen/robot/radio/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.radio.interact(R)
/obj/screen/robot/store
/atom/movable/screen/robot/store
name = "store"
icon_state = "store"
/obj/screen/robot/store/Click()
/atom/movable/screen/robot/store/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.uneq_active()
/obj/screen/robot/thrusters
/atom/movable/screen/robot/thrusters
name = "ion thrusters"
icon_state = "ionpulse0"
/obj/screen/robot/thrusters/Click()
/atom/movable/screen/robot/thrusters/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
@@ -84,97 +84,97 @@
/datum/hud/robot/New(mob/owner)
..()
var/mob/living/silicon/robot/mymobR = mymob
var/obj/screen/using
var/atom/movable/screen/using
using = new/obj/screen/language_menu
using = new/atom/movable/screen/language_menu
using.screen_loc = ui_borg_language_menu
static_inventory += using
//Radio
using = new /obj/screen/robot/radio()
using = new /atom/movable/screen/robot/radio()
using.screen_loc = ui_borg_radio
static_inventory += using
//Module select
using = new /obj/screen/robot/module1()
using = new /atom/movable/screen/robot/module1()
using.screen_loc = ui_inv1
static_inventory += using
mymobR.inv1 = using
using = new /obj/screen/robot/module2()
using = new /atom/movable/screen/robot/module2()
using.screen_loc = ui_inv2
static_inventory += using
mymobR.inv2 = using
using = new /obj/screen/robot/module3()
using = new /atom/movable/screen/robot/module3()
using.screen_loc = ui_inv3
static_inventory += using
mymobR.inv3 = using
//End of module select
using = new /obj/screen/robot/lamp()
using = new /atom/movable/screen/robot/lamp()
using.screen_loc = ui_borg_lamp
using.hud = src
static_inventory += using
mymobR.lampButton = using
var/obj/screen/robot/lamp/lampscreen = using
var/atom/movable/screen/robot/lamp/lampscreen = using
lampscreen.robot = mymobR
//Photography stuff
using = new /obj/screen/ai/image_take()
using = new /atom/movable/screen/ai/image_take()
using.screen_loc = ui_borg_camera
using.hud = src
static_inventory += using
//Sec/Med HUDs
using = new /obj/screen/ai/sensors()
using = new /atom/movable/screen/ai/sensors()
using.screen_loc = ui_borg_sensor
static_inventory += using
//Thrusters
using = new /obj/screen/robot/thrusters()
using = new /atom/movable/screen/robot/thrusters()
using.screen_loc = ui_borg_thrusters
static_inventory += using
mymobR.thruster_button = using
//Borg Integrated Tablet
using = new /obj/screen/robot/modPC()
using = new /atom/movable/screen/robot/modPC()
using.screen_loc = ui_borg_tablet
using.hud = src
static_inventory += using
mymobR.interfaceButton = using
if(mymobR.modularInterface)
using.vis_contents += mymobR.modularInterface
var/obj/screen/robot/modPC/tabletbutton = using
var/atom/movable/screen/robot/modPC/tabletbutton = using
tabletbutton.robot = mymobR
//Intent
action_intent = new /obj/screen/act_intent/robot()
action_intent = new /atom/movable/screen/act_intent/robot()
action_intent.icon_state = mymob.a_intent
static_inventory += action_intent
//Health
healths = new /obj/screen/healths/robot()
healths = new /atom/movable/screen/healths/robot()
infodisplay += healths
//Installed Module
mymobR.hands = new /obj/screen/robot/module()
mymobR.hands = new /atom/movable/screen/robot/module()
mymobR.hands.screen_loc = ui_borg_module
static_inventory += mymobR.hands
//Store
module_store_icon = new /obj/screen/robot/store()
module_store_icon = new /atom/movable/screen/robot/store()
module_store_icon.screen_loc = ui_borg_store
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = 'icons/mob/screen_cyborg.dmi'
pull_icon.update_icon(mymob)
pull_icon.screen_loc = ui_borg_pull
hotkeybuttons += pull_icon
zone_select = new /obj/screen/zone_sel/robot()
zone_select = new /atom/movable/screen/zone_sel/robot()
zone_select.update_icon(mymob)
static_inventory += zone_select
@@ -271,30 +271,30 @@
for(var/obj/item/I in R.held_items)
screenmob.client.screen -= I
/obj/screen/robot/lamp
/atom/movable/screen/robot/lamp
name = "headlamp"
icon_state = "lamp_off"
var/mob/living/silicon/robot/robot
/obj/screen/robot/lamp/Click()
/atom/movable/screen/robot/lamp/Click()
. = ..()
if(.)
return
robot?.toggle_headlamp()
update_icon()
/obj/screen/robot/lamp/update_icon()
/atom/movable/screen/robot/lamp/update_icon()
if(robot?.lamp_enabled)
icon_state = "lamp_on"
else
icon_state = "lamp_off"
/obj/screen/robot/modPC
/atom/movable/screen/robot/modPC
name = "Modular Interface"
icon_state = "template"
var/mob/living/silicon/robot/robot
/obj/screen/robot/modPC/Click()
/atom/movable/screen/robot/modPC/Click()
. = ..()
if(.)
return

View File

@@ -6,34 +6,36 @@
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
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
appearance_flags = APPEARANCE_UI
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
var/datum/hud/hud = null // A reference to the owner HUD, if any.
/obj/screen/take_damage()
/atom/movable/screen/proc/update_icon()
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(atom/movable/screen/component_button/component, params)
return
/obj/screen/text
/atom/movable/screen/text
icon = null
icon_state = null
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
@@ -41,12 +43,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)
@@ -60,19 +62,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)
@@ -81,71 +83,71 @@
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/ghost/pai
/atom/movable/screen/ghost/pai
name = "pAI Candidate"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "pai_setup"
screen_loc = ui_ghost_pai
/obj/screen/ghost/pai/Click()
/atom/movable/screen/ghost/pai/Click()
var/mob/dead/observer/G = usr
G.register_pai()
/obj/screen/ghost/med_scan
/atom/movable/screen/ghost/med_scan
name = "Toggle Medical Scan"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "med_scan"
screen_loc = ui_ghost_med
/obj/screen/ghost/med_scan/Click()
/atom/movable/screen/ghost/med_scan/Click()
var/mob/dead/observer/G = usr
G.toggle_health_scan()
/obj/screen/ghost/chem_scan
/atom/movable/screen/ghost/chem_scan
name = "Toggle Chemical Scan"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "chem_scan"
screen_loc = ui_ghost_chem
/obj/screen/ghost/chem_scan/Click()
/atom/movable/screen/ghost/chem_scan/Click()
var/mob/dead/observer/G = usr
G.toggle_chemical_scan()
/obj/screen/ghost/nanite_scan
/atom/movable/screen/ghost/nanite_scan
name = "Toggle Nanite Scan"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "nanite_scan"
screen_loc = ui_ghost_nanite
/obj/screen/ghost/nanite_scan/Click()
/atom/movable/screen/ghost/nanite_scan/Click()
var/mob/dead/observer/G = usr
G.toggle_nanite_scan()
/obj/screen/ghost/wound_scan
/atom/movable/screen/ghost/wound_scan
name = "Toggle Wound Scan"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "wound_scan"
screen_loc = ui_ghost_wound
/obj/screen/ghost/wound_scan/Click()
/atom/movable/screen/ghost/wound_scan/Click()
var/mob/dead/observer/G = usr
G.toggle_wound_scan()
/obj/screen/language_menu/ghost
/atom/movable/screen/language_menu/ghost
screen_loc = ui_ghost_language_menu
/obj/screen/inventory
/atom/movable/screen/inventory
var/slot_id // The indentifier for the slot. It has nothing to do with ID cards.
var/icon_empty // Icon when empty. For now used only by humans.
var/icon_full // Icon when contains an item. For now used only by humans.
@@ -153,7 +155,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)
@@ -173,16 +175,16 @@
usr.update_inv_hands()
return 1
/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()
/atom/movable/screen/inventory/update_icon()
if(!icon_empty)
icon_empty = icon_state
@@ -192,7 +194,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(hud && user && slot_id)
@@ -212,12 +214,12 @@
object_overlays += 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_icon()
/atom/movable/screen/inventory/hand/update_icon()
..()
if(!handcuff_overlay)
@@ -240,7 +242,7 @@
add_overlay("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
if(world.time <= usr.next_move)
@@ -258,41 +260,41 @@
hud.mymob.swap_hand(held_index)
return 1
/obj/screen/close
/atom/movable/screen/close
name = "close"
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
icon_state = "backpack_close"
/obj/screen/close/Initialize(mapload, new_master)
/atom/movable/screen/close/Initialize(mapload, new_master)
. = ..()
master = new_master
/obj/screen/close/Click()
/atom/movable/screen/close/Click()
var/datum/component/storage/S = master
S.hide_from(usr)
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"])
@@ -311,20 +313,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
@@ -379,15 +381,15 @@
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/Click()
/atom/movable/screen/mov_intent/Click()
toggle(usr)
/obj/screen/mov_intent/update_icon(mob/user)
/atom/movable/screen/mov_intent/update_icon(mob/user)
if(!user && hud)
user = hud.mymob
if(!user)
@@ -398,22 +400,22 @@
if(MOVE_INTENT_RUN)
icon_state = "running"
/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(mob/mymob)
/atom/movable/screen/pull/update_icon(mob/mymob)
if(!mymob)
return
if(mymob.pulling)
@@ -421,31 +423,31 @@
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(mob/mymob)
/atom/movable/screen/rest/update_icon(mob/mymob)
if(!isliving(mymob))
return
var/mob/living/L = mymob
@@ -454,18 +456,18 @@
else
icon_state = "act_rest0"
/obj/screen/storage
/atom/movable/screen/storage
name = "storage"
icon_state = "block"
screen_loc = "7,7 to 10,8"
layer = HUD_LAYER
plane = HUD_PLANE
/obj/screen/storage/Initialize(mapload, new_master)
/atom/movable/screen/storage/Initialize(mapload, new_master)
. = ..()
master = new_master
/obj/screen/storage/Click(location, control, params)
/atom/movable/screen/storage/Click(location, control, params)
if(world.time <= usr.next_move)
return TRUE
if(usr.incapacitated())
@@ -478,17 +480,17 @@
master.attackby(null, I, usr, params)
return TRUE
/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
@@ -496,7 +498,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
@@ -509,10 +511,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
@@ -541,12 +543,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)
@@ -584,7 +586,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(isobserver(user))
return
@@ -593,24 +595,24 @@
update_icon(usr)
return 1
/obj/screen/zone_sel/update_icon(mob/user)
/atom/movable/screen/zone_sel/update_icon(mob/user)
cut_overlays()
add_overlay(mutable_appearance('icons/mob/screen_gen.dmi', "[selecting]"))
user.zone_selected = selecting
/obj/screen/zone_sel/alien
/atom/movable/screen/zone_sel/alien
icon = 'icons/mob/screen_alien.dmi'
/obj/screen/zone_sel/alien/update_icon(mob/user)
/atom/movable/screen/zone_sel/alien/update_icon(mob/user)
cut_overlays()
add_overlay(mutable_appearance('icons/mob/screen_alien.dmi', "[selecting]"))
user.zone_selected = selecting
/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
@@ -618,7 +620,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"
@@ -628,99 +630,99 @@
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/overmind
/atom/movable/screen/healths/blob/overmind
name = "overmind health"
icon = 'icons/mob/blob.dmi'
screen_loc = ui_blobbernaut_overmind_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_living_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/slime
/atom/movable/screen/healths/slime
icon = 'icons/mob/screen_slime.dmi'
icon_state = "slime_health0"
screen_loc = ui_slime_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_living_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healthdoll
/atom/movable/screen/healthdoll
name = "health doll"
screen_loc = ui_healthdoll
/obj/screen/healthdoll/Click()
/atom/movable/screen/healthdoll/Click()
if (ishuman(usr))
var/mob/living/carbon/human/H = usr
H.check_self_for_injuries()
/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/sanity
/atom/movable/screen/sanity
name = "sanity"
icon_state = "sanity3"
screen_loc = ui_mood
/obj/screen/splash
/atom/movable/screen/splash
icon = 'icons/blank_title.png'
icon_state = ""
screen_loc = "1,1"
@@ -728,7 +730,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
@@ -747,7 +749,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)
@@ -758,25 +760,25 @@
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, atom/movable/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)
/obj/screen/cooldown_overlay
/atom/movable/screen/cooldown_overlay
name = ""
icon_state = "cooldown"
pixel_y = 4
@@ -784,20 +786,20 @@
appearance_flags = RESET_COLOR | PIXEL_SCALE | RESET_TRANSFORM | KEEP_TOGETHER | RESET_ALPHA
vis_flags = VIS_INHERIT_ID
var/end_time = 0
var/obj/screen/parent_button
var/atom/movable/screen/parent_button
var/datum/callback/callback
var/timer
/obj/screen/cooldown_overlay/Initialize(mapload, button)
/atom/movable/screen/cooldown_overlay/Initialize(mapload, button)
. = ..(mapload)
parent_button = button
/obj/screen/cooldown_overlay/Destroy()
/atom/movable/screen/cooldown_overlay/Destroy()
stop_cooldown()
deltimer(timer)
return ..()
/obj/screen/cooldown_overlay/proc/start_cooldown(end_time, need_timer = TRUE)
/atom/movable/screen/cooldown_overlay/proc/start_cooldown(end_time, need_timer = TRUE)
parent_button.color = "#8000007c"
parent_button.vis_contents += src
src.end_time = end_time
@@ -805,7 +807,7 @@
if(need_timer)
timer = addtimer(CALLBACK(src, .proc/tick), 1 SECONDS, TIMER_STOPPABLE)
/obj/screen/cooldown_overlay/proc/tick()
/atom/movable/screen/cooldown_overlay/proc/tick()
if(world.time >= end_time)
stop_cooldown()
return
@@ -813,19 +815,19 @@
if(timer)
timer = addtimer(CALLBACK(src, .proc/tick), 1 SECONDS, TIMER_STOPPABLE)
/obj/screen/cooldown_overlay/proc/stop_cooldown()
/atom/movable/screen/cooldown_overlay/proc/stop_cooldown()
parent_button.color = "#ffffffff"
parent_button.vis_contents -= src
if(callback)
callback.Invoke()
/obj/screen/cooldown_overlay/proc/set_maptext(time)
/atom/movable/screen/cooldown_overlay/proc/set_maptext(time)
maptext = "<div style=\"font-size:6pt;font:'Arial Black';text-align:center;\">[time]</div>"
/proc/start_cooldown(obj/screen/button, time, datum/callback/callback)
/proc/start_cooldown(atom/movable/screen/button, time, datum/callback/callback)
if(!time)
return
var/obj/screen/cooldown_overlay/cooldown = new(button, button)
var/atom/movable/screen/cooldown_overlay/cooldown = new(button, button)
if(callback)
cooldown.callback = callback
cooldown.start_cooldown(time)
@@ -833,7 +835,7 @@
cooldown.start_cooldown(time, FALSE)
return cooldown
/obj/screen/stamina
/atom/movable/screen/stamina
name = "stamina"
icon_state = "stamina0"
screen_loc = ui_stamina

View File

@@ -4,7 +4,7 @@
/datum/hud/slime/New(mob/living/simple_animal/slime/owner)
..()
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull
@@ -12,5 +12,5 @@
static_inventory += pull_icon
healths = new /obj/screen/healths/slime()
healths = new /atom/movable/screen/healths/slime()
infodisplay += healths

View File

@@ -1,103 +1,103 @@
/obj/screen/swarmer
/atom/movable/screen/swarmer
icon = 'icons/mob/swarmer.dmi'
/obj/screen/swarmer/MouseEntered(location, control, params)
/atom/movable/screen/swarmer/MouseEntered(location, control, params)
. = ..()
openToolTip(usr, src, params, title = name, content = desc)
/obj/screen/swarmer/MouseExited(location, control, params)
/atom/movable/screen/swarmer/MouseExited(location, control, params)
closeToolTip(usr)
/obj/screen/swarmer/fabricate_trap
/atom/movable/screen/swarmer/fabricate_trap
icon_state = "ui_trap"
name = "Create Trap (Costs 4 Resources)"
desc = "Creates a trap that will nonlethally shock any non-swarmer that attempts to cross it."
/obj/screen/swarmer/fabricate_trap/Click()
/atom/movable/screen/swarmer/fabricate_trap/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/our_swarmer = usr
our_swarmer.create_trap()
/obj/screen/swarmer/barricade
/atom/movable/screen/swarmer/barricade
icon_state = "ui_barricade"
name = "Create Barricade (Costs 4 Resources)"
desc = "Creates a destructible barricade that will stop any non-swarmer from passing it. Also allows disabler beams to pass through."
/obj/screen/swarmer/barricade/Click()
/atom/movable/screen/swarmer/barricade/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/our_swarmer = usr
our_swarmer.create_barricade()
/obj/screen/swarmer/replicate
/atom/movable/screen/swarmer/replicate
icon_state = "ui_replicate"
name = "Replicate (Costs 20 Resources)"
desc = "Creates an autonomous melee drone that will follow you and attack all non-swamers entities in sight. They can be ordered to move to a target location by a middle-click."
/obj/screen/swarmer/replicate/Click()
/atom/movable/screen/swarmer/replicate/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/our_swarmer = usr
our_swarmer.create_swarmer()
/obj/screen/swarmer/repair_self
/atom/movable/screen/swarmer/repair_self
icon_state = "ui_self_repair"
name = "Repair Self"
desc = "Fully repairs damage done to our body after a moderate delay."
/obj/screen/swarmer/repair_self/Click()
/atom/movable/screen/swarmer/repair_self/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/our_swarmer = usr
our_swarmer.repair_self()
/obj/screen/swarmer/toggle_light
/atom/movable/screen/swarmer/toggle_light
icon_state = "ui_light"
name = "Toggle Light"
desc = "Toggles our inbuilt light on or off. Follower drones will also synchronize their lights with a master unit."
/obj/screen/swarmer/toggle_light/Click()
/atom/movable/screen/swarmer/toggle_light/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/our_swarmer = usr
our_swarmer.toggle_light()
/obj/screen/swarmer/contact_swarmers
/atom/movable/screen/swarmer/contact_swarmers
icon_state = "ui_contact_swarmers"
name = "Contact Swarmers"
desc = "Sends a message to all other swarmers, should they exist."
/obj/screen/swarmer/contact_swarmers/Click()
/atom/movable/screen/swarmer/contact_swarmers/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/our_swarmer = usr
our_swarmer.contact_swarmers()
/datum/hud/living/swarmer/New(mob/owner)
. = ..()
var/obj/screen/using
var/atom/movable/screen/using
using = new /obj/screen/swarmer/fabricate_trap()
using = new /atom/movable/screen/swarmer/fabricate_trap()
using.screen_loc = ui_hand_position(2)
using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/barricade()
using = new /atom/movable/screen/swarmer/barricade()
using.screen_loc = ui_hand_position(1)
using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/replicate()
using = new /atom/movable/screen/swarmer/replicate()
using.screen_loc = ui_zonesel
using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/repair_self()
using = new /atom/movable/screen/swarmer/repair_self()
using.screen_loc = ui_storage1
using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/toggle_light()
using = new /atom/movable/screen/swarmer/toggle_light()
using.screen_loc = ui_back
using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/contact_swarmers()
using = new /atom/movable/screen/swarmer/contact_swarmers()
using.screen_loc = ui_inventory
using.hud = src
static_inventory += using