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

* introduce helper + remove unused proc

* we love compatibility

* Update code/_onclick/hud/action_button.dm

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

* Update code/_onclick/hud/action_button.dm

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

* Update code/_onclick/hud/alert.dm

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

* Update code/_onclick/hud/blob_overmind.dm

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

* Update code/_onclick/hud/blob_overmind.dm

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

* Update code/_onclick/hud/blob_overmind.dm

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

* Update code/modules/martial_arts/martial.dm

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

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

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

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

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

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

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

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

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

* Update code/_onclick/hud/screen_objects.dm

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

* Update code/_onclick/hud/screen_objects.dm

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

* Update code/_onclick/hud/screen_objects.dm

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

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

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

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

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

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

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

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

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

* Update code/game/mecha/mecha.dm

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

* deconflict

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
Contrabang
2024-03-03 17:37:51 +00:00
committed by GitHub
co-authored by Burzah
parent cc433a3794
commit 87a318a7de
125 changed files with 1036 additions and 1047 deletions
+5 -5
View File
@@ -463,23 +463,23 @@
else direction = WEST
dir = direction
/obj/screen/click_catcher
/atom/movable/screen/click_catcher
icon = 'icons/mob/screen_gen.dmi'
icon_state = "catcher"
plane = CLICKCATCHER_PLANE
mouse_opacity = MOUSE_OPACITY_OPAQUE
screen_loc = "CENTER"
/obj/screen/click_catcher/MouseEntered(location, control, params)
/atom/movable/screen/click_catcher/MouseEntered(location, control, params)
return
/obj/screen/click_catcher/MouseExited(location, control, params)
/atom/movable/screen/click_catcher/MouseExited(location, control, params)
return
#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)
@@ -494,7 +494,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
+1 -1
View File
@@ -28,7 +28,7 @@ FALSE if not
return
var/lagging = could_be_click_lag()
drag_start = 0
if(!(istype(over, /obj/screen) || (loc && loc == over.loc)))
if(!(is_screen_atom(over) || (loc && loc == over.loc)))
if(!Adjacent(usr) || !over.Adjacent(usr)) // should stop you from dragging through windows
if(lagging)
usr.ClickOn(src, params)
+21 -21
View File
@@ -1,4 +1,4 @@
/obj/screen/movable/action_button
/atom/movable/screen/movable/action_button
desc = "CTRL-Shift click on this button to bind it to a hotkey."
var/datum/action/linked_action
var/actiontooltipstyle = ""
@@ -6,7 +6,7 @@
var/ordered = TRUE
var/datum/keybinding/mob/trigger_action_button/linked_keybind
/obj/screen/movable/action_button/MouseDrop(over_object)
/atom/movable/screen/movable/action_button/MouseDrop(over_object)
if(locked && could_be_click_lag()) // in case something bad happend and game realised we dragged our ability instead of pressing it
Click()
drag_start = 0
@@ -16,8 +16,8 @@
to_chat(usr, "<span class='warning'>Action button \"[name]\" is locked, unlock it first.</span>")
closeToolTip(usr)
return
if((istype(over_object, /obj/screen/movable/action_button) && !istype(over_object, /obj/screen/movable/action_button/hide_toggle)))
var/obj/screen/movable/action_button/B = over_object
if((istype(over_object, /atom/movable/screen/movable/action_button) && !istype(over_object, /atom/movable/screen/movable/action_button/hide_toggle)))
var/atom/movable/screen/movable/action_button/B = over_object
var/list/actions = usr.actions
actions.Swap(actions.Find(linked_action), actions.Find(B.linked_action))
moved = FALSE
@@ -26,13 +26,13 @@
B.ordered = TRUE
closeToolTip(usr)
usr.update_action_buttons()
else if(istype(over_object, /obj/screen/movable/action_button/hide_toggle))
else if(istype(over_object, /atom/movable/screen/movable/action_button/hide_toggle))
closeToolTip(usr)
else
closeToolTip(usr)
return ..()
/obj/screen/movable/action_button/Click(location,control,params)
/atom/movable/screen/movable/action_button/Click(location, control, params)
var/list/modifiers = params2list(params)
if(modifiers["ctrl"] && modifiers["shift"])
INVOKE_ASYNC(src, PROC_REF(set_to_keybind), usr)
@@ -63,7 +63,7 @@
animate(src, transform = matrix(), time = 0.4 SECONDS, alpha = 255)
return TRUE
/obj/screen/movable/action_button/proc/set_to_keybind(mob/user)
/atom/movable/screen/movable/action_button/proc/set_to_keybind(mob/user)
var/keybind_to_set_to = uppertext(input(user, "What keybind do you want to set this action button to?") as text)
if(keybind_to_set_to)
if(linked_keybind)
@@ -78,10 +78,10 @@
clean_up_keybinds(user)
to_chat(user, "<span class='info'>Your active keybinding on [src] has been cleared.</span>")
/obj/screen/movable/action_button/AltClick(mob/user)
/atom/movable/screen/movable/action_button/AltClick(mob/user)
return linked_action.AltTrigger()
/obj/screen/movable/action_button/proc/clean_up_keybinds(mob/owner)
/atom/movable/screen/movable/action_button/proc/clean_up_keybinds(mob/owner)
if(linked_keybind)
owner.client.active_keybindings[linked_keybind.binded_to] -= (linked_keybind)
if(!length(owner.client.active_keybindings[linked_keybind.binded_to]))
@@ -90,21 +90,21 @@
QDEL_NULL(linked_keybind)
//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/unlock its position. Alt-click this button to reset all buttons to their default positions."
icon = 'icons/mob/actions/actions.dmi'
icon_state = "bg_default"
var/hidden = FALSE
/obj/screen/movable/action_button/hide_toggle/MouseDrop(over_object)
if(istype(over_object, /obj/screen/movable/action_button))
/atom/movable/screen/movable/action_button/hide_toggle/MouseDrop(over_object)
if(istype(over_object, /atom/movable/screen/movable/action_button))
closeToolTip(usr)
else
closeToolTip(usr)
return ..()
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
/atom/movable/screen/movable/action_button/hide_toggle/Click(location, control, params)
var/list/modifiers = params2list(params)
if(modifiers["alt"])
@@ -121,17 +121,17 @@
update_icon(UPDATE_OVERLAYS)
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
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
user.update_action_buttons(TRUE)
to_chat(user, "<span class='notice'>Action button positions have been reset.</span>")
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(mob/living/user)
/atom/movable/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(mob/living/user)
if(isalien(user))
icon = 'icons/mob/actions/actions.dmi'
icon_state = "bg_alien"
@@ -146,13 +146,13 @@
color = user.client.prefs.UI_style_color
update_icon(UPDATE_OVERLAYS)
/obj/screen/movable/action_button/hide_toggle/update_overlays()
/atom/movable/screen/movable/action_button/hide_toggle/update_overlays()
. = ..()
var/image/img = image(initial(icon), src, hidden ? "show" : "hide")
img.appearance_flags = RESET_COLOR | RESET_ALPHA
. += img
/obj/screen/movable/action_button/MouseEntered(location, control, params)
/atom/movable/screen/movable/action_button/MouseEntered(location, control, params)
. = ..()
if(!QDELETED(src))
if(!linked_keybind)
@@ -164,7 +164,7 @@
desc_information = desc_information.Join(" ")
openToolTip(usr, src, params, title = name, content = desc_information, theme = actiontooltipstyle)
/obj/screen/movable/action_button/MouseExited()
/atom/movable/screen/movable/action_button/MouseExited()
closeToolTip(usr)
/mob/proc/update_action_buttons_icon()
@@ -192,7 +192,7 @@
A.override_location() // If the action has a location override, call it
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)
@@ -227,7 +227,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
+49 -49
View File
@@ -1,138 +1,138 @@
/obj/screen/ai
/atom/movable/screen/ai
icon = 'icons/mob/screen_ai.dmi'
/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(isAI(usr))
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()
var/mob/living/silicon/ai/AI = usr
var/camera = tgui_input_list(AI, "Choose which camera you want to view", "Cameras", AI.get_camera_list())
AI.ai_camera_list(camera)
/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(isAI(usr))
var/mob/living/silicon/ai/AI = usr
var/target_name = tgui_input_list(AI, "Choose a target you want to track", "Tracking", AI.trackable_mobs())
if(target_name)
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(isAI(usr))
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(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.subsystem_crew_monitor()
/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(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.ai_roster()
/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(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.ai_alerts()
/obj/screen/ai/announcement
/atom/movable/screen/ai/announcement
name = "Make Announcement"
icon_state = "announcement"
/obj/screen/ai/announcement/Click()
/atom/movable/screen/ai/announcement/Click()
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(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.ai_call_shuttle()
/obj/screen/ai/state_laws
/atom/movable/screen/ai/state_laws
name = "Law Manager"
icon_state = "state_laws"
/obj/screen/ai/state_laws/Click()
/atom/movable/screen/ai/state_laws/Click()
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.subsystem_law_manager()
/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(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.aiPDA.cmd_send_pdamesg()
/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(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.aiPDA.cmd_show_message_log()
/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(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.aiCamera.toggle_camera_mode()
/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(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.aiCamera.viewpictures()
/obj/screen/ai/sensors
/atom/movable/screen/ai/sensors
name = "Toggle Sensor Augmentation"
icon_state = "ai_sensor"
/obj/screen/ai/sensors/Click()
/atom/movable/screen/ai/sensors/Click()
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.sensor_mode()
@@ -147,89 +147,89 @@
/datum/hud/ai/New(mob/owner)
..()
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_lanugage_menu
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
//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 Monitorting
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
//Intent
using = new /obj/screen/act_intent/robot/AI()
using = new /atom/movable/screen/act_intent/robot/AI()
using.icon_state = mymob.a_intent
static_inventory += using
action_intent = using
+110 -110
View File
@@ -21,7 +21,7 @@
if(!category)
return
var/obj/screen/alert/alert = LAZYACCESS(alerts, category)
var/atom/movable/screen/alert/alert = LAZYACCESS(alerts, category)
if(alert)
if(alert.override_alerts)
return 0
@@ -75,14 +75,14 @@
var/timeout = timeout_override || alert.timeout
if(timeout)
addtimer(CALLBACK(alert, TYPE_PROC_REF(/obj/screen/alert, do_timeout), src, category), timeout)
addtimer(CALLBACK(alert, TYPE_PROC_REF(/atom/movable/screen/alert, do_timeout), src, category), timeout)
alert.timeout = world.time + timeout - world.tick_lag
return alert
// Proc to clear an existing alert.
/mob/proc/clear_alert(category, clear_override = FALSE)
var/obj/screen/alert/alert = LAZYACCESS(alerts, category)
var/atom/movable/screen/alert/alert = LAZYACCESS(alerts, category)
if(!alert)
return 0
if(alert.override_alerts && !clear_override)
@@ -94,7 +94,7 @@
client.screen -= alert
qdel(alert)
/obj/screen/alert
/atom/movable/screen/alert
icon = 'icons/mob/screen_alert.dmi'
icon_state = "default"
name = "Alert"
@@ -105,16 +105,16 @@
var/alerttooltipstyle = ""
var/override_alerts = FALSE //If it is overriding other alerts of the same type
/obj/screen/alert/MouseEntered(location,control,params)
/atom/movable/screen/alert/MouseEntered(location, control, params)
. = ..()
openToolTip(usr, src, params, title = name, content = desc, theme = alerttooltipstyle)
/obj/screen/alert/MouseExited()
/atom/movable/screen/alert/MouseExited()
closeToolTip(usr)
return ..()
/obj/screen/alert/proc/do_timeout(mob/M, category)
/atom/movable/screen/alert/proc/do_timeout(mob/M, category)
if(!M || !M.alerts)
return
@@ -122,42 +122,42 @@
M.clear_alert(category)
//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/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"
@@ -165,161 +165,161 @@
// Hunger alerts
/obj/screen/alert/hunger
/atom/movable/screen/alert/hunger
icon = 'icons/mob/screen_hunger.dmi'
/obj/screen/alert/hunger/fat
/atom/movable/screen/alert/hunger/fat
name = "Fat"
desc = "You ate too much food, lardass. Run around the station and lose some weight."
icon_state = "fat"
/obj/screen/alert/hunger/full
/atom/movable/screen/alert/hunger/full
name = "Full"
desc = "You feel full and satisfied, but you shouldn't eat much more."
icon_state = "full"
/obj/screen/alert/hunger/well_fed
/atom/movable/screen/alert/hunger/well_fed
name = "Well Fed"
desc = "You feel quite satisfied, but you may be able to eat a bit more."
icon_state = "well_fed"
/obj/screen/alert/hunger/fed
/atom/movable/screen/alert/hunger/fed
name = "Fed"
desc = "You feel moderately satisfied, but a bit more food may not hurt."
icon_state = "fed"
/obj/screen/alert/hunger/hungry
/atom/movable/screen/alert/hunger/hungry
name = "Hungry"
desc = "Some food would be good right about now."
icon_state = "hungry"
/obj/screen/alert/hunger/starving
/atom/movable/screen/alert/hunger/starving
name = "Starving"
desc = "You're severely malnourished. The hunger pains make moving around a chore."
icon_state = "starving"
/// Machine "hunger"
/obj/screen/alert/hunger/fat/machine
/atom/movable/screen/alert/hunger/fat/machine
name = "Over Charged"
desc = "Your cell has excessive charge due to electrical shocks. Run around the station and spend some energy."
/obj/screen/alert/hunger/full/machine
/atom/movable/screen/alert/hunger/full/machine
name = "Full Charge"
desc = "Your cell is at full charge. Might want to give APCs some space."
/obj/screen/alert/hunger/well_fed/machine
/atom/movable/screen/alert/hunger/well_fed/machine
name = "High Charge"
desc = "You're almost all charged, but could top up a bit more."
/obj/screen/alert/hunger/fed/machine
/atom/movable/screen/alert/hunger/fed/machine
name = "Half Charge"
desc = "You feel moderately charged, but a bit more juice couldn't hurt."
/obj/screen/alert/hunger/hungry/machine
/atom/movable/screen/alert/hunger/hungry/machine
name = "Low Charge"
desc = "Could use a little charging right about now."
/obj/screen/alert/hunger/starving/machine
/atom/movable/screen/alert/hunger/starving/machine
name = "Nearly Discharged"
desc = "You're almost drained. The low power makes moving around a chore."
// End of Machine "hunger"
///Vampire "hunger"
/obj/screen/alert/hunger/fat/vampire
/atom/movable/screen/alert/hunger/fat/vampire
desc = "You somehow drank too much blood, lardass. Run around the station and lose some weight."
/obj/screen/alert/hunger/full/vampire
/atom/movable/screen/alert/hunger/full/vampire
desc = "You feel full and satisfied, but you know you will thirst for more blood soon..."
/obj/screen/alert/hunger/well_fed/vampire
/atom/movable/screen/alert/hunger/well_fed/vampire
desc = "You feel quite satisfied, but you could do with a bit more blood."
/obj/screen/alert/hunger/fed/vampire
/atom/movable/screen/alert/hunger/fed/vampire
desc = "You feel moderately satisfied, but a bit more blood wouldn't hurt."
/obj/screen/alert/hunger/hungry/vampire
/atom/movable/screen/alert/hunger/hungry/vampire
desc = "You currently thirst for blood."
/obj/screen/alert/hunger/starving/vampire
/atom/movable/screen/alert/hunger/starving/vampire
desc = "You're severely thirsty. The thirst pains make moving around a chore."
//End of Vampire "hunger"
/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/hot/robot
/atom/movable/screen/alert/hot/robot
desc = "The air around you is too hot for a humanoid. Be careful to avoid exposing them to this environment."
/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/cold/drask
/atom/movable/screen/alert/cold/drask
name = "Cold"
desc = "You're breathing supercooled gas! It's stimulating your metabolism to regenerate damaged tissue."
/obj/screen/alert/cold/robot
/atom/movable/screen/alert/cold/robot
desc = "The air around you is too cold for a humanoid. Be careful to avoid exposing them to this environment."
/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/lightexposure
/atom/movable/screen/alert/lightexposure
name = "Light Exposure"
desc = "You're exposed to light."
icon_state = "lightexposure"
/obj/screen/alert/nolight
/atom/movable/screen/alert/nolight
name = "No Light"
desc = "You're not exposed to any light."
icon_state = "nolight"
/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/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, click yourself in help intent to pull the object out."
icon_state = "embeddedobject"
/obj/screen/alert/embeddedobject/Click()
/atom/movable/screen/alert/embeddedobject/Click()
if(isliving(usr))
var/mob/living/carbon/human/M = usr
return M.help_shake_act(M)
/obj/screen/alert/asleep
/atom/movable/screen/alert/asleep
name = "Asleep"
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
icon_state = "asleep"
/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 \
@@ -327,48 +327,48 @@ 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/fire
/atom/movable/screen/alert/fire
name = "On Fire"
desc = "You're on fire. Stop, drop and roll to put the fire out or move to a vacuum area."
icon_state = "fire"
/obj/screen/alert/fire/Click()
/atom/movable/screen/alert/fire/Click()
if(isliving(usr))
var/mob/living/L = usr
return L.resist()
/obj/screen/alert/direction_lock
/atom/movable/screen/alert/direction_lock
name = "Direction Lock"
desc = "You are facing only one direction, slowing your movement down. Click here to stop the direction lock."
icon_state = "direction_lock"
/obj/screen/alert/direction_lock/Click()
/atom/movable/screen/alert/direction_lock/Click()
if(isliving(usr))
var/mob/living/L = usr
return L.clear_forced_look()
//Constructs
/obj/screen/alert/holy_fire
/atom/movable/screen/alert/holy_fire
name = "Holy Fire"
desc = "Your body is crumbling from the holy energies. Get out."
icon_state = "fire"
//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"
@@ -376,7 +376,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"
@@ -384,39 +384,39 @@ 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"
//Diona Nymph
/obj/screen/alert/nymph
/atom/movable/screen/alert/nymph
name = "Gestalt merge"
desc = "You have merged with a diona gestalt and are now part of it's biomass. You can still wiggle yourself free though."
/obj/screen/alert/nymph/Click()
/atom/movable/screen/alert/nymph/Click()
if(!usr || !usr.client)
return
if(isnymph(usr))
var/mob/living/simple_animal/diona/D = usr
return D.resist()
/obj/screen/alert/gestalt
/atom/movable/screen/alert/gestalt
name = "Merged nymph"
desc = "You have merged with one or more diona nymphs. Click here to drop it (or one of them)."
/obj/screen/alert/gestalt/Click()
/atom/movable/screen/alert/gestalt/Click()
if(!usr || !usr.client)
return
@@ -433,25 +433,25 @@ Recharging stations are available in robotics, the dormitory bathrooms, and the
D.split(TRUE)
//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 \
@@ -460,11 +460,11 @@ so as to remain in compliance with the most up-to-date laws."
timeout = 600
var/atom/target = null
/obj/screen/alert/hackingapc/Destroy()
/atom/movable/screen/alert/hackingapc/Destroy()
target = null
return ..()
/obj/screen/alert/hackingapc/Click()
/atom/movable/screen/alert/hackingapc/Click()
if(!usr || !usr.client)
return
if(!target)
@@ -475,22 +475,22 @@ so as to remain in compliance with the most up-to-date laws."
AI.eyeobj.setLoc(T)
//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"
/obj/screen/alert/mech_port_available
/atom/movable/screen/alert/mech_port_available
name = "Connect to Port"
desc = "Click here to connect to an air port and refill your oxygen!"
icon_state = "mech_port"
var/obj/machinery/atmospherics/unary/portables_connector/target = null
/obj/screen/alert/mech_port_available/Destroy()
/atom/movable/screen/alert/mech_port_available/Destroy()
target = null
return ..()
/obj/screen/alert/mech_port_available/Click()
/atom/movable/screen/alert/mech_port_available/Click()
if(!usr || !usr.client)
return
if(!ismecha(usr.loc) || !target)
@@ -501,12 +501,12 @@ so as to remain in compliance with the most up-to-date laws."
else
to_chat(usr, "<span class='notice'>[M] failed to connect to the port.</span>")
/obj/screen/alert/mech_port_disconnect
/atom/movable/screen/alert/mech_port_disconnect
name = "Disconnect from Port"
desc = "Click here to disconnect from your air port."
icon_state = "mech_port_x"
/obj/screen/alert/mech_port_disconnect/Click()
/atom/movable/screen/alert/mech_port_disconnect/Click()
if(!usr || !usr.client)
return
if(!ismecha(usr.loc))
@@ -517,40 +517,40 @@ so as to remain in compliance with the most up-to-date laws."
else
to_chat(usr, "<span class='notice'>[M] is not connected to a port at the moment.</span>")
/obj/screen/alert/mech_nocell
/atom/movable/screen/alert/mech_nocell
name = "Missing Power Cell"
desc = "Mech has no power cell."
icon_state = "nocell"
/obj/screen/alert/mech_emptycell
/atom/movable/screen/alert/mech_emptycell
name = "Out of Power"
desc = "Mech is out of power."
icon_state = "emptycell"
/obj/screen/alert/mech_lowcell
/atom/movable/screen/alert/mech_lowcell
name = "Low Charge"
desc = "Mech is running out of power."
icon_state = "lowcell"
/obj/screen/alert/mech_maintenance
/atom/movable/screen/alert/mech_maintenance
name = "Maintenance Protocols"
desc = "Maintenance protocols are currently in effect, most actions disabled."
icon_state = "locked"
//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"
@@ -559,32 +559,32 @@ 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/ghost
/atom/movable/screen/alert/ghost
name = "Ghost"
desc = "Would you like to ghost? You will be notified when your body is removed from the nest."
icon_state = "template"
timeout = 5 MINUTES // longer than any infection should be
/obj/screen/alert/ghost/Initialize(mapload)
/atom/movable/screen/alert/ghost/Initialize(mapload)
. = ..()
var/image/I = image('icons/mob/mob.dmi', icon_state = "ghost", layer = FLOAT_LAYER, dir = SOUTH)
I.layer = FLOAT_LAYER
I.plane = FLOAT_PLANE
overlays += I
/obj/screen/alert/ghost/Click()
/atom/movable/screen/alert/ghost/Click()
var/mob/living/carbon/human/infected_user = usr
if(!istype(infected_user) || infected_user.stat == DEAD)
infected_user.clear_alert("ghost_nest")
@@ -595,7 +595,7 @@ so as to remain in compliance with the most up-to-date laws."
return
infected_user.ghostize(TRUE)
/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"
@@ -607,7 +607,7 @@ so as to remain in compliance with the most up-to-date laws."
var/image/signed_up_overlay // image showing that you're signed up
var/datum/candidate_poll/poll // If set, on Click() it'll register the player as a candidate
/obj/screen/alert/notify_action/process()
/atom/movable/screen/alert/notify_action/process()
if(show_time_left)
var/timeleft = timeout - world.time
if(timeleft <= 0)
@@ -632,14 +632,14 @@ so as to remain in compliance with the most up-to-date laws."
qdel(O)
..()
/obj/screen/alert/notify_action/Destroy()
/atom/movable/screen/alert/notify_action/Destroy()
target = null
if(signed_up_overlay)
overlays -= signed_up_overlay
qdel(signed_up_overlay)
return ..()
/obj/screen/alert/notify_action/Click()
/atom/movable/screen/alert/notify_action/Click()
if(!usr || !usr.client)
return
var/mob/dead/observer/G = usr
@@ -672,7 +672,7 @@ so as to remain in compliance with the most up-to-date laws."
return
G.ManualFollow(target)
/obj/screen/alert/notify_action/Topic(href, href_list)
/atom/movable/screen/alert/notify_action/Topic(href, href_list)
if(!href_list["signup"])
return
if(!poll)
@@ -684,7 +684,7 @@ so as to remain in compliance with the most up-to-date laws."
poll.sign_up(G)
update_signed_up_alert(G)
/obj/screen/alert/notify_action/proc/update_signed_up_alert(mob/user)
/atom/movable/screen/alert/notify_action/proc/update_signed_up_alert(mob/user)
if(!signed_up_overlay)
signed_up_overlay = image('icons/mob/screen_gen.dmi', icon_state = "selector")
signed_up_overlay.layer = FLOAT_LAYER
@@ -694,7 +694,7 @@ so as to remain in compliance with the most up-to-date laws."
else
overlays -= signed_up_overlay
/obj/screen/alert/notify_action/proc/display_stacks(stacks = 1)
/atom/movable/screen/alert/notify_action/proc/display_stacks(stacks = 1)
if(stacks <= 1)
return
@@ -712,7 +712,7 @@ so as to remain in compliance with the most up-to-date laws."
qdel(O)
/obj/screen/alert/notify_soulstone
/atom/movable/screen/alert/notify_soulstone
name = "Soul Stone"
desc = "Someone is trying to capture your soul in a soul stone. Click to allow it."
icon_state = "template"
@@ -720,7 +720,7 @@ so as to remain in compliance with the most up-to-date laws."
var/obj/item/soulstone/stone = null
var/stoner = null
/obj/screen/alert/notify_soulstone/Click()
/atom/movable/screen/alert/notify_soulstone/Click()
if(!usr || !usr.client)
return
if(stone)
@@ -728,39 +728,39 @@ so as to remain in compliance with the most up-to-date laws."
impossible for you to get back into the game as your regular character.", "Respawn", list("No", "Yes")) == "Yes")
stone?.opt_in = TRUE
/obj/screen/alert/notify_soulstone/Destroy()
/atom/movable/screen/alert/notify_soulstone/Destroy()
stone = null
return ..()
/obj/screen/alert/notify_mapvote
/atom/movable/screen/alert/notify_mapvote
name = "Map Vote"
desc = "Vote on which map you would like to play on next!"
icon_state = "map_vote"
/obj/screen/alert/notify_mapvote/Click()
/atom/movable/screen/alert/notify_mapvote/Click()
usr.client.vote()
//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()
if(isliving(usr))
var/mob/living/L = usr
return L.resist()
/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
@@ -780,7 +780,7 @@ so as to remain in compliance with the most up-to-date laws."
mymob.client.screen -= alerts[alerts[i]]
return TRUE
for(var/i in 1 to alerts.len)
var/obj/screen/alert/alert = alerts[alerts[i]]
var/atom/movable/screen/alert/alert = alerts[alerts[i]]
if(alert.icon_state == "template")
if(!icon_pref)
icon_pref = ui_style2icon(mymob.client.prefs.UI_style)
@@ -802,7 +802,7 @@ so as to remain in compliance with the most up-to-date laws."
mymob.client.screen |= alert
return TRUE
/obj/screen/alert/Click(location, control, params)
/atom/movable/screen/alert/Click(location, control, params)
if(!usr || !usr.client)
return
var/paramslist = params2list(params)
@@ -812,7 +812,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
screen_loc = ""
+25 -25
View File
@@ -1,20 +1,20 @@
/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(isalienadult(usr))
var/mob/living/carbon/alien/humanoid/hunter/AH = usr
AH.toggle_leap()
/obj/screen/alien/nightvision
/atom/movable/screen/alien/nightvision
name = "toggle night-vision"
icon_state = "nightvision1"
/obj/screen/alien/nightvision/Click()
/atom/movable/screen/alien/nightvision/Click()
var/mob/living/carbon/alien/humanoid/A = usr
A.night_vision_toggle()
@@ -32,7 +32,7 @@
update_sight()
/obj/screen/alien/plasma_display
/atom/movable/screen/alien/plasma_display
icon = 'icons/mob/screen_gen.dmi'
icon_state = "power_display2"
name = "plasma stored"
@@ -46,20 +46,20 @@
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner)
..()
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.screen_loc = ui_alien_language_menu
static_inventory += using
using = new /obj/screen/act_intent/alien()
using = new /atom/movable/screen/act_intent/alien()
using.icon_state = (mymob.a_intent == "hurt" ? INTENT_HARM : mymob.a_intent)
using.screen_loc = ui_acti
static_inventory += using
action_intent = using
using = new /obj/screen/mov_intent()
using = new /atom/movable/screen/mov_intent()
using.icon = 'icons/mob/screen_alien.dmi'
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi
@@ -67,13 +67,13 @@
move_intent = using
if(isalienhunter(mymob))
mymob.leap_icon = new /obj/screen/alien/leap()
mymob.leap_icon = new /atom/movable/screen/alien/leap()
mymob.leap_icon.icon = 'icons/mob/screen_alien.dmi'
mymob.leap_icon.screen_loc = ui_alien_storage_r
static_inventory += mymob.leap_icon
//equippable shit
inv_box = new /obj/screen/inventory/hand()
inv_box = new /atom/movable/screen/inventory/hand()
inv_box.name = "r_hand"
inv_box.icon = 'icons/mob/screen_alien.dmi'
inv_box.icon_state = "hand_r"
@@ -81,7 +81,7 @@
inv_box.slot_id = SLOT_HUD_RIGHT_HAND
static_inventory += inv_box
inv_box = new /obj/screen/inventory/hand()
inv_box = new /atom/movable/screen/inventory/hand()
inv_box.name = "l_hand"
inv_box.icon = 'icons/mob/screen_alien.dmi'
inv_box.icon_state = "hand_l"
@@ -89,14 +89,14 @@
inv_box.slot_id = SLOT_HUD_LEFT_HAND
static_inventory += inv_box
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.name = "hand"
using.icon = 'icons/mob/screen_alien.dmi'
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
static_inventory += using
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.name = "hand"
using.icon = 'icons/mob/screen_alien.dmi'
using.icon_state = "hand2"
@@ -105,47 +105,47 @@
//end of equippable shit
using = new /obj/screen/resist()
using = new /atom/movable/screen/resist()
using.name = "resist"
using.icon = 'icons/mob/screen_alien.dmi'
using.icon_state = "act_resist"
using.screen_loc = ui_pull_resist
static_inventory += using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.name = "drop"
using.icon = 'icons/mob/screen_alien.dmi'
using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw
static_inventory += using
mymob.throw_icon = new /obj/screen/throw_catch()
mymob.throw_icon = new /atom/movable/screen/throw_catch()
mymob.throw_icon.icon = 'icons/mob/screen_alien.dmi'
mymob.throw_icon.screen_loc = ui_drop_throw
static_inventory += mymob.throw_icon
mymob.healths = new /obj/screen/healths/alien()
mymob.healths = new /atom/movable/screen/healths/alien()
infodisplay += mymob.healths
nightvisionicon = new /obj/screen/alien/nightvision()
nightvisionicon = new /atom/movable/screen/alien/nightvision()
infodisplay += nightvisionicon
mymob.pullin = new /obj/screen/pull()
mymob.pullin = new /atom/movable/screen/pull()
mymob.pullin.icon = 'icons/mob/screen_alien.dmi'
mymob.pullin.hud = src
mymob.pullin.update_icon(UPDATE_ICON_STATE)
mymob.pullin.screen_loc = ui_pull_resist
hotkeybuttons += mymob.pullin
alien_plasma_display = new /obj/screen/alien/plasma_display()
alien_plasma_display = new /atom/movable/screen/alien/plasma_display()
infodisplay += alien_plasma_display
zone_select = new /obj/screen/zone_sel/alien()
zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.hud = src
zone_select.update_icon(UPDATE_OVERLAYS)
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
+8 -8
View File
@@ -5,37 +5,37 @@
/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
using = new /obj/screen/mov_intent()
using = new /atom/movable/screen/mov_intent()
using.icon = 'icons/mob/screen_alien.dmi'
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
static_inventory += using
move_intent = using
mymob.healths = new /obj/screen/healths/alien()
mymob.healths = new /atom/movable/screen/healths/alien()
infodisplay += mymob.healths
nightvisionicon = new /obj/screen/alien/nightvision()
nightvisionicon = new /atom/movable/screen/alien/nightvision()
infodisplay += nightvisionicon
mymob.pullin = new /obj/screen/pull()
mymob.pullin = new /atom/movable/screen/pull()
mymob.pullin.icon = 'icons/mob/screen_alien.dmi'
mymob.pullin.hud = src
mymob.pullin.update_icon(UPDATE_ICON_STATE)
mymob.pullin.screen_loc = ui_pull_resist
hotkeybuttons += mymob.pullin
using = new /obj/screen/language_menu
using = new /atom/movable/screen/language_menu
using.screen_loc = ui_alienlarva_language_menu
static_inventory += using
zone_select = new /obj/screen/zone_sel/alien()
zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.hud = src
zone_select.update_icon(UPDATE_OVERLAYS)
static_inventory += zone_select
+41 -41
View File
@@ -2,135 +2,135 @@
if(client && !hud_used)
hud_used = new /datum/hud/blob_overmind(src)
/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)
return ..()
/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))
name = initial(name)
desc = initial(desc)
return ..()
/obj/screen/blob/JumpToCore/Click()
/atom/movable/screen/blob/JumpToCore/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.transport_core()
/obj/screen/blob/Blobbernaut
/atom/movable/screen/blob/Blobbernaut
icon_state = "ui_blobbernaut"
name = "Produce Blobbernaut (60)"
desc = "Produces a strong, intelligent blobbernaut from a factory blob for 60 resources.<br>The factory blob will be destroyed in the process."
/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/StorageBlob
/atom/movable/screen/blob/StorageBlob
icon_state = "ui_storage"
name = "Produce Storage Blob (40)"
desc = "Produces a storage blob for 40 resources.<br>Storage blobs will raise your max resource cap by 50."
/obj/screen/blob/StorageBlob/Click()
/atom/movable/screen/blob/StorageBlob/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_storage()
/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 (60)"
desc = "Produces a node blob for 60 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/ReadaptChemical
/atom/movable/screen/blob/ReadaptChemical
icon_state = "ui_chemswap"
name = "Readapt Chemical (50)"
desc = "Randomly rerolls your chemical for 50 resources."
/obj/screen/blob/ReadaptChemical/MouseEntered(location,control,params)
/atom/movable/screen/blob/ReadaptChemical/MouseEntered(location, control, params)
if(hud && hud.mymob && isovermind(hud.mymob))
name = initial(name)
desc = initial(desc)
return ..()
/obj/screen/blob/ReadaptChemical/Click()
/atom/movable/screen/blob/ReadaptChemical/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.chemical_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()
/obj/screen/blob/Split
/atom/movable/screen/blob/Split
icon_state = "ui_split"
name = "Split consciousness (100)"
desc = "Creates another Blob Overmind at the targeted node. One use only.<br>Offspring are unable to use this ability."
/obj/screen/blob/Split/Click()
/atom/movable/screen/blob/Split/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.split_consciousness()
@@ -139,9 +139,9 @@
/datum/hud/blob_overmind/New(mob/user)
..()
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
@@ -150,56 +150,56 @@
blobpwrdisplay.plane = ABOVE_HUD_PLANE
static_inventory += blobpwrdisplay
blobhealthdisplay = new /obj/screen()
blobhealthdisplay = new /atom/movable/screen()
blobhealthdisplay.name = "blob health"
blobhealthdisplay.icon_state = "block"
blobhealthdisplay.screen_loc = ui_internal
static_inventory += blobhealthdisplay
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_id
static_inventory += using
using = new /obj/screen/blob/StorageBlob()
using = new /atom/movable/screen/blob/StorageBlob()
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 = using.screen_loc = ui_rhand
static_inventory += using
using = new /obj/screen/blob/FactoryBlob()
using = new /atom/movable/screen/blob/FactoryBlob()
using.screen_loc = using.screen_loc = ui_lhand
static_inventory += using
using = new /obj/screen/blob/ReadaptChemical()
using = new /atom/movable/screen/blob/ReadaptChemical()
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
var/mob/camera/blob/B = user
if(!B.is_offspring) // Checks if the blob is an offspring, to not create split button if it is
using = new /obj/screen/blob/Split()
using = new /atom/movable/screen/blob/Split()
using.screen_loc = ui_acti
static_inventory += using
+7 -7
View File
@@ -1,12 +1,12 @@
/obj/screen/bot
/atom/movable/screen/bot
icon = 'icons/mob/screen_bot.dmi'
/obj/screen/bot/radio
/atom/movable/screen/bot/radio
name = "radio"
icon_state = "radio"
screen_loc = ui_bot_radio
/obj/screen/bot/radio/Click()
/atom/movable/screen/bot/radio/Click()
if(isbot(usr))
var/mob/living/simple_animal/bot/B = usr
B.Radio.interact(usr)
@@ -17,16 +17,16 @@
/datum/hud/bot/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
using = new /obj/screen/bot/radio()
using = new /atom/movable/screen/bot/radio()
static_inventory += using
mymob.healths = new /obj/screen/healths/bot()
mymob.healths = new /atom/movable/screen/healths/bot()
mymob.healths.screen_loc = ui_borg_health
infodisplay += mymob.healths
mymob.pullin = new /obj/screen/pull()
mymob.pullin = new /atom/movable/screen/pull()
mymob.pullin.icon = 'icons/mob/screen_bot.dmi'
mymob.pullin.hud = src
mymob.pullin.update_icon(UPDATE_ICON_STATE)
+7 -7
View File
@@ -8,7 +8,7 @@
/datum/hud/construct/armoured/New(mob/owner)
..()
mymob.healths = new /obj/screen()
mymob.healths = new /atom/movable/screen()
mymob.healths.icon = 'icons/mob/screen_construct.dmi'
mymob.healths.icon_state = "juggernaut_health0"
mymob.healths.name = "health"
@@ -21,7 +21,7 @@
/datum/hud/construct/builder/New(mob/owner)
..()
mymob.healths = new /obj/screen()
mymob.healths = new /atom/movable/screen()
mymob.healths.icon = 'icons/mob/screen_construct.dmi'
mymob.healths.icon_state = "artificer_health0"
mymob.healths.name = "health"
@@ -34,7 +34,7 @@
/datum/hud/construct/wraith/New(mob/owner)
..()
mymob.healths = new /obj/screen()
mymob.healths = new /atom/movable/screen()
mymob.healths.icon = 'icons/mob/screen_construct.dmi'
mymob.healths.icon_state = "wraith_health0"
mymob.healths.name = "health"
@@ -47,7 +47,7 @@
/datum/hud/construct/harvester/New(mob/owner)
..()
mymob.healths = new /obj/screen()
mymob.healths = new /atom/movable/screen()
mymob.healths.icon = 'icons/mob/screen_construct.dmi'
mymob.healths.icon_state = "harvester_health0"
mymob.healths.name = "health"
@@ -56,13 +56,13 @@
/datum/hud/construct/New(mob/owner)
..()
mymob.pullin = new /obj/screen/pull()
mymob.pullin = new /atom/movable/screen/pull()
mymob.pullin.icon = 'icons/mob/screen_construct.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_construct_pull
var/obj/screen/using
using = new /obj/screen/act_intent/simple_animal()
var/atom/movable/screen/using
using = new /atom/movable/screen/act_intent/simple_animal()
using.icon_state = mymob.a_intent
static_inventory += using
action_intent = using
+14 -14
View File
@@ -1,4 +1,4 @@
/obj/screen/alert/augury
/atom/movable/screen/alert/augury
name = "Something interesting!"
desc = "Click to follow."
/// The atom being followed
@@ -19,7 +19,7 @@
* * follow_target: The atom to start out following. Can be null, in which case change_targets() should be used at some point.
* * alert_overlay_override: If follow_target is provided (or not), use this for the alert image.
*/
/obj/screen/alert/augury/Initialize(mapload, atom/movable/follow_target, image/alert_overlay_override)
/atom/movable/screen/alert/augury/Initialize(mapload, atom/movable/follow_target, image/alert_overlay_override)
. = ..()
src.follow_target = follow_target
@@ -37,7 +37,7 @@
alert_overlay_override.plane = FLOAT_PLANE
overlays += alert_overlay_override
/obj/screen/alert/augury/Click(location, control, params)
/atom/movable/screen/alert/augury/Click(location, control, params)
. = ..()
if(!usr || !usr.client || !isobserver(usr))
return
@@ -48,7 +48,7 @@
to_chat(usr, "<span class='notice'>You are now auto-following [thing_followed]. Click again to stop.</span>")
add_follower(usr)
/obj/screen/alert/augury/Destroy(force)
/atom/movable/screen/alert/augury/Destroy(force)
for(var/atom/movable/follower in followers) // in case something was nulled
follower.stop_orbit()
@@ -68,7 +68,7 @@
/// Executed when the parent is deleted.
/// Don't immediately kill ourselves, since it's possible that we might want to move somewhere else
/// (for example, after a meteor strike)
/obj/screen/alert/augury/proc/on_following_qdel(atom/movable/A)
/atom/movable/screen/alert/augury/proc/on_following_qdel(atom/movable/A)
SIGNAL_HANDLER // COMSIG_PARENT_QDELETING
for(var/atom/movable/follower in followers)
follower.stop_orbit()
@@ -86,7 +86,7 @@
* Arguments:
* * next_to - The next atom to follow.
*/
/obj/screen/alert/augury/proc/change_targets(atom/movable/next_to)
/atom/movable/screen/alert/augury/proc/change_targets(atom/movable/next_to)
// unregister first so we aren't bombarded when changing orbits
if(isnull(next_to))
return
@@ -100,15 +100,15 @@
RegisterSignal(follow_target, COMSIG_ATOM_ORBIT_STOP, PROC_REF(remove_follower_on_stop_orbit))
/obj/screen/alert/augury/proc/add_follower(atom/movable/follower)
/atom/movable/screen/alert/augury/proc/add_follower(atom/movable/follower)
followers |= follower
follower.orbit(follow_target)
/obj/screen/alert/augury/proc/remove_follower(atom/movable/follower)
/atom/movable/screen/alert/augury/proc/remove_follower(atom/movable/follower)
followers -= follower
follower.stop_orbit()
/obj/screen/alert/augury/proc/get_next_target()
/atom/movable/screen/alert/augury/proc/get_next_target()
if(!length(next_targets))
return
@@ -121,27 +121,27 @@
return target
/// Called when someone stops orbiting our followed object, so they can actually get out of the loop.
/obj/screen/alert/augury/proc/remove_follower_on_stop_orbit(atom/movable/followed, atom/movable/follower)
/atom/movable/screen/alert/augury/proc/remove_follower_on_stop_orbit(atom/movable/followed, atom/movable/follower)
SIGNAL_HANDLER // COMSIG_ATOM_ORBIT_STOP
if(locateUID(follower.orbiting_uid) != follow_target)
remove_follower(follower) // don't try to stop the orbit again
/// Meteor alert.
/// Appears during a meteor storm and allows for auto-following of debris.
/obj/screen/alert/augury/meteor
/atom/movable/screen/alert/augury/meteor
name = "Meteors incoming!"
desc = "Click to automatically follow debris, and click again to stop."
/obj/screen/alert/augury/meteor/Initialize(mapload)
/atom/movable/screen/alert/augury/meteor/Initialize(mapload)
var/image/meteor_img = image(icon = 'icons/obj/meteor.dmi', icon_state = "flaming")
. = ..(mapload, alert_overlay_override = meteor_img)
START_PROCESSING(SSfastprocess, src)
/obj/screen/alert/augury/meteor/Destroy(force)
/atom/movable/screen/alert/augury/meteor/Destroy(force)
. = ..()
STOP_PROCESSING(SSfastprocess, src)
/obj/screen/alert/augury/meteor/process()
/atom/movable/screen/alert/augury/meteor/process()
var/overridden = FALSE
for(var/obj/effect/meteor/M in GLOB.meteor_list)
if(!is_station_level(M.z))
+27 -27
View File
@@ -1,5 +1,5 @@
/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)
@@ -17,7 +17,7 @@
return screen
/mob/proc/clear_fullscreen(category, animated = 10)
var/obj/screen/fullscreen/screen = screens[category]
var/atom/movable/screen/fullscreen/screen = screens[category]
if(!screen)
return
@@ -41,7 +41,7 @@
/datum/hud/proc/reload_fullscreen()
if(mymob.client)
var/obj/screen/fullscreen/screen
var/atom/movable/screen/fullscreen/screen
var/list/screens = mymob.screens
for(var/category in screens)
screen = screens[category]
@@ -51,7 +51,7 @@
else
mymob.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"
@@ -62,66 +62,66 @@
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
return ..()
/obj/screen/fullscreen/brute
/atom/movable/screen/fullscreen/brute
icon_state = "brutedamageoverlay"
layer = UI_DAMAGE_LAYER
/obj/screen/fullscreen/oxy
/atom/movable/screen/fullscreen/oxy
icon_state = "oxydamageoverlay"
layer = UI_DAMAGE_LAYER
/obj/screen/fullscreen/crit
/atom/movable/screen/fullscreen/crit
icon_state = "passage"
layer = CRIT_LAYER
/obj/screen/fullscreen/blind
/atom/movable/screen/fullscreen/blind
icon_state = "blackimageoverlay"
layer = BLIND_LAYER
/obj/screen/fullscreen/impaired
/atom/movable/screen/fullscreen/impaired
icon_state = "impairedoverlay"
/obj/screen/fullscreen/payback
/atom/movable/screen/fullscreen/payback
icon = 'icons/mob/screen_payback.dmi'
icon_state = "payback"
show_when_dead = TRUE
/obj/screen/fullscreen/fog
/atom/movable/screen/fullscreen/fog
icon = 'icons/mob/screen_fog.dmi'
icon_state = "fog"
color = "#FF0000"
/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/noise
/atom/movable/screen/fullscreen/flash/noise
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "noise"
/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/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)
@@ -130,18 +130,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
@@ -149,7 +149,7 @@
show_when_dead = TRUE
/// An effect which tracks the cursor's location on the screen
/obj/screen/fullscreen/cursor_catcher
/atom/movable/screen/fullscreen/cursor_catcher
icon_state = "fullscreen_blocker" // Fullscreen semi transparent icon
plane = HUD_PLANE
mouse_opacity = MOUSE_OPACITY_ICON
@@ -167,14 +167,14 @@
var/mouse_params
/// Links this up with a mob
/obj/screen/fullscreen/cursor_catcher/proc/assign_to_mob(mob/owner)
/atom/movable/screen/fullscreen/cursor_catcher/proc/assign_to_mob(mob/owner)
src.owner = owner
view_list = getviewsize(owner.client.view)
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
calculate_params()
/// Update when the mob we're assigned to has moved
/obj/screen/fullscreen/cursor_catcher/proc/on_move(atom/source, atom/oldloc, dir, forced)
/atom/movable/screen/fullscreen/cursor_catcher/proc/on_move(atom/source, atom/oldloc, dir, forced)
SIGNAL_HANDLER
if(!given_turf)
@@ -184,18 +184,18 @@
given_turf = locate(given_turf.x + x_offset, given_turf.y + y_offset, given_turf.z)
/obj/screen/fullscreen/cursor_catcher/MouseEntered(location, control, params)
/atom/movable/screen/fullscreen/cursor_catcher/MouseEntered(location, control, params)
. = ..()
MouseMove(location, control, params)
if(usr == owner)
calculate_params()
/obj/screen/fullscreen/cursor_catcher/MouseMove(location, control, params)
/atom/movable/screen/fullscreen/cursor_catcher/MouseMove(location, control, params)
if(usr != owner)
return
mouse_params = params
/obj/screen/fullscreen/cursor_catcher/proc/calculate_params()
/atom/movable/screen/fullscreen/cursor_catcher/proc/calculate_params()
var/list/modifiers = params2list(mouse_params)
var/icon_x = text2num(LAZYACCESS(modifiers, "vis-x"))
if(isnull(icon_x))
+24 -24
View File
@@ -3,47 +3,47 @@
hud_used = new /datum/hud/ghost(src)
SEND_SIGNAL(src, COMSIG_MOB_HUD_CREATED)
/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/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 = "Re-enter 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/respawn_list
/atom/movable/screen/ghost/respawn_list
name = "Ghost spawns"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "template"
/obj/screen/ghost/respawn_list/Initialize(mapload)
/atom/movable/screen/ghost/respawn_list/Initialize(mapload)
. = ..()
update_hidden_state()
/obj/screen/ghost/respawn_list/Click()
/atom/movable/screen/ghost/respawn_list/Click()
var/client/C = hud.mymob.client
hud.inventory_shown = !hud.inventory_shown
if(hud.inventory_shown)
@@ -52,7 +52,7 @@
C.screen -= hud.toggleable_inventory
update_hidden_state()
/obj/screen/ghost/respawn_list/proc/update_hidden_state()
/atom/movable/screen/ghost/respawn_list/proc/update_hidden_state()
var/matrix/M = matrix(transform)
M.Turn(-90)
@@ -61,19 +61,19 @@
img.transform = M
overlays += img
/obj/screen/ghost/respawn_mob
/atom/movable/screen/ghost/respawn_mob
name = "Mob spawners"
icon_state = "mob_spawner"
/obj/screen/ghost/respawn_mob/Click()
/atom/movable/screen/ghost/respawn_mob/Click()
var/mob/dead/observer/G = usr
G.open_spawners_menu()
/obj/screen/ghost/respawn_pai
/atom/movable/screen/ghost/respawn_pai
name = "Configure pAI"
icon_state = "pai"
/obj/screen/ghost/respawn_pai/Click()
/atom/movable/screen/ghost/respawn_pai/Click()
var/mob/dead/observer/G = usr
if(!GLOB.paiController.check_recruit(G))
to_chat(G, "<span class='warning'>You are not eligible to become a pAI.</span>")
@@ -85,34 +85,34 @@
/datum/hud/ghost/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/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
static_inventory += using
using = new /obj/screen/ghost/respawn_list()
using = new /atom/movable/screen/ghost/respawn_list()
using.screen_loc = ui_ghost_respawn_list
static_inventory += using
using = new /obj/screen/ghost/respawn_mob()
using = new /atom/movable/screen/ghost/respawn_mob()
using.screen_loc = ui_ghost_respawn_mob
toggleable_inventory += using
using = new /obj/screen/ghost/respawn_pai()
using = new /atom/movable/screen/ghost/respawn_pai()
using.screen_loc = ui_ghost_respawn_pai
toggleable_inventory += using
for(var/obj/screen/S in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/S in (static_inventory + toggleable_inventory))
S.hud = src
/datum/hud/ghost/show_hud()
+19 -19
View File
@@ -4,49 +4,49 @@
/datum/hud/guardian/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
guardianhealthdisplay = new /obj/screen/healths/guardian()
guardianhealthdisplay = new /atom/movable/screen/healths/guardian()
infodisplay += guardianhealthdisplay
using = new /obj/screen/act_intent/guardian()
using = new /atom/movable/screen/act_intent/guardian()
using.icon_state = mymob.a_intent
static_inventory += using
action_intent = using
using = new /obj/screen/guardian/Manifest()
using = new /atom/movable/screen/guardian/Manifest()
using.screen_loc = ui_rhand
static_inventory += using
using = new /obj/screen/guardian/Recall()
using = new /atom/movable/screen/guardian/Recall()
using.screen_loc = ui_lhand
static_inventory += using
using = new /obj/screen/guardian/ToggleMode()
using = new /atom/movable/screen/guardian/ToggleMode()
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
//HUD BUTTONS
/obj/screen/guardian
/atom/movable/screen/guardian
icon = 'icons/mob/guardian.dmi'
icon_state = "base"
/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
var/summoner_loc = G.summoner.loc
@@ -59,43 +59,43 @@
if(G.loc == G.summoner)
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/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()
+20 -20
View File
@@ -12,36 +12,36 @@
var/inventory_shown = TRUE //the 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/lingchemdisplay
var/obj/screen/lingstingdisplay
var/atom/movable/screen/lingchemdisplay
var/atom/movable/screen/lingstingdisplay
var/obj/screen/guardianhealthdisplay
var/atom/movable/screen/guardianhealthdisplay
var/obj/screen/blobpwrdisplay
var/obj/screen/blobhealthdisplay
var/obj/screen/vampire_blood_display
var/obj/screen/alien_plasma_display
var/obj/screen/nightvisionicon
var/obj/screen/action_intent
var/obj/screen/zone_select
var/obj/screen/move_intent
var/obj/screen/module_store_icon
var/obj/screen/combo/combo_display
var/atom/movable/screen/blobpwrdisplay
var/atom/movable/screen/blobhealthdisplay
var/atom/movable/screen/vampire_blood_display
var/atom/movable/screen/alien_plasma_display
var/atom/movable/screen/nightvisionicon
var/atom/movable/screen/action_intent
var/atom/movable/screen/zone_select
var/atom/movable/screen/move_intent
var/atom/movable/screen/module_store_icon
var/atom/movable/screen/combo/combo_display
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/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/inv_slots[SLOT_HUD_AMOUNT] // /obj/screen/inventory objects, ordered by their slot ID.
var/list/inv_slots[SLOT_HUD_AMOUNT] // /atom/movable/screen/inventory objects, ordered by their slot ID.
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/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
var/list/atom/movable/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
///Assoc list of controller groups, associated with key string group name with value of the plane master controller ref
var/list/atom/movable/plane_master_controller/plane_master_controllers = list()
///UI for screentips that appear when you mouse over things
var/obj/screen/screentip/screentip_text
var/atom/movable/screen/screentip/screentip_text
/mob/proc/create_mob_hud()
if(client && !hud_used)
@@ -53,8 +53,8 @@
hide_actions_toggle = new
hide_actions_toggle.InitialiseIcon(mymob)
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)
@@ -181,7 +181,7 @@
/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
+49 -49
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()
if(usr.hud_used.inventory_shown)
usr.hud_used.inventory_shown = FALSE
usr.client.screen -= usr.hud_used.toggleable_inventory
@@ -15,28 +15,28 @@
usr.hud_used.hidden_inventory_update()
/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/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()
var/datum/antagonist/changeling/cling = usr.mind.has_antag_datum(/datum/antagonist/changeling)
cling?.chosen_sting?.unset_sting()
/obj/screen/ling/chems
/atom/movable/screen/ling/chems
name = "chemical storage"
icon_state = "power_display"
screen_loc = ui_lingchemdisplay
@@ -58,32 +58,32 @@
/datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_white.dmi', ui_color = "#ffffff", ui_alpha = 255)
..()
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/obj/screen/using
var/obj/screen/inventory/inv_box
var/atom/movable/screen/using
var/atom/movable/screen/inventory/inv_box
hud_alpha = ui_alpha
using = new /obj/screen/craft
using = new /atom/movable/screen/craft
using.icon = ui_style
using.color = ui_color
using.alpha = ui_alpha
static_inventory += using
using = new /obj/screen/language_menu
using = new /atom/movable/screen/language_menu
using.icon = ui_style
using.color = ui_color
using.alpha = ui_alpha
static_inventory += using
using = new /obj/screen/act_intent()
using = new /atom/movable/screen/act_intent()
using.icon_state = mymob.a_intent
using.alpha = ui_alpha
static_inventory += using
action_intent = using
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
@@ -92,14 +92,14 @@
static_inventory += using
move_intent = using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
using.color = ui_color
using.alpha = ui_alpha
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_HUD_JUMPSUIT
@@ -109,7 +109,7 @@
inv_box.alpha = ui_alpha
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_HUD_OUTER_SUIT
@@ -119,7 +119,7 @@
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory/hand()
inv_box = new /atom/movable/screen/inventory/hand()
inv_box.name = "r_hand"
inv_box.icon = ui_style
inv_box.icon_state = "hand_r"
@@ -129,7 +129,7 @@
inv_box.slot_id = SLOT_HUD_RIGHT_HAND
static_inventory += inv_box
inv_box = new /obj/screen/inventory/hand()
inv_box = new /atom/movable/screen/inventory/hand()
inv_box.name = "l_hand"
inv_box.icon = ui_style
inv_box.icon_state = "hand_l"
@@ -139,7 +139,7 @@
inv_box.slot_id = SLOT_HUD_LEFT_HAND
static_inventory += inv_box
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_1"
@@ -148,7 +148,7 @@
using.alpha = ui_alpha
static_inventory += using
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_2"
@@ -157,7 +157,7 @@
using.alpha = ui_alpha
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"
@@ -167,7 +167,7 @@
inv_box.alpha = ui_alpha
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "pda"
inv_box.icon = ui_style
inv_box.icon_state = "pda"
@@ -177,7 +177,7 @@
inv_box.alpha = ui_alpha
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"
@@ -187,7 +187,7 @@
inv_box.alpha = ui_alpha
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"
@@ -197,7 +197,7 @@
inv_box.alpha = ui_alpha
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"
@@ -207,7 +207,7 @@
inv_box.alpha = ui_alpha
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"
@@ -217,7 +217,7 @@
inv_box.alpha = ui_alpha
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"
@@ -227,28 +227,28 @@
inv_box.slot_id = SLOT_HUD_SUIT_STORE
static_inventory += inv_box
using = new /obj/screen/resist()
using = new /atom/movable/screen/resist()
using.icon = ui_style
using.color = ui_color
using.alpha = ui_alpha
using.screen_loc = ui_pull_resist
hotkeybuttons += using
using = new /obj/screen/human/toggle()
using = new /atom/movable/screen/human/toggle()
using.icon = ui_style
using.color = ui_color
using.alpha = ui_alpha
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.color = ui_color
using.alpha = ui_alpha
using.screen_loc = ui_equip
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"
@@ -258,7 +258,7 @@
inv_box.alpha = ui_alpha
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"
@@ -268,7 +268,7 @@
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "l_ear"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
@@ -278,7 +278,7 @@
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "r_ear"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
@@ -288,7 +288,7 @@
inv_box.alpha = ui_alpha
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"
@@ -298,7 +298,7 @@
inv_box.alpha = ui_alpha
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"
@@ -308,7 +308,7 @@
inv_box.alpha = ui_alpha
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"
@@ -318,33 +318,33 @@
inv_box.alpha = ui_alpha
static_inventory += inv_box
mymob.throw_icon = new /obj/screen/throw_catch()
mymob.throw_icon = new /atom/movable/screen/throw_catch()
mymob.throw_icon.icon = ui_style
mymob.throw_icon.screen_loc = ui_drop_throw
mymob.throw_icon.color = ui_color
mymob.throw_icon.alpha = ui_alpha
hotkeybuttons += mymob.throw_icon
mymob.healths = new /obj/screen/healths()
mymob.healths = new /atom/movable/screen/healths()
infodisplay += mymob.healths
mymob.healthdoll = new()
infodisplay += mymob.healthdoll
mymob.pullin = new /obj/screen/pull()
mymob.pullin = new /atom/movable/screen/pull()
mymob.pullin.icon = ui_style
mymob.pullin.hud = src
mymob.pullin.update_icon(UPDATE_ICON_STATE)
mymob.pullin.screen_loc = ui_pull_resist
static_inventory += mymob.pullin
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.color = ui_color
zone_select.icon = ui_style
zone_select.alpha = ui_alpha
@@ -357,7 +357,7 @@
combo_display = new()
infodisplay += combo_display
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
@@ -372,13 +372,13 @@
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 = hud_alpha / 2
else
inv.alpha = hud_alpha
for(var/obj/screen/craft/crafting in static_inventory)
for(var/atom/movable/screen/craft/crafting in static_inventory)
if(!S.can_craft)
crafting.invisibility = INVISIBILITY_ABSTRACT
H.handcrafting?.close(H)
+8 -23
View File
@@ -3,30 +3,15 @@
* 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
/**
* Map name assigned to this object.
* Automatically set by /client/proc/add_obj_to_map.
*/
var/assigned_map
/**
* Mark this object as garbage-collectible after you clean the map
* it was registered on.
*
* This could probably be changed to be a proc, for conditional removal.
* But for now, this works.
*/
var/del_on_map_removal = TRUE
/**
* 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 +21,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 +34,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 +45,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 +55,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 +77,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 +131,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)
+5 -5
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 = TRUE
@@ -18,10 +18,10 @@
//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
@@ -55,7 +55,7 @@
set category = "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"
@@ -73,7 +73,7 @@
set category = "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"
+5 -5
View File
@@ -4,11 +4,11 @@
/datum/hud/simple_animal/New(mob/user)
..()
mymob.healths = new /obj/screen/healths()
mymob.healths = new /atom/movable/screen/healths()
infodisplay += mymob.healths
var/obj/screen/using
using = new /obj/screen/act_intent/simple_animal()
var/atom/movable/screen/using
using = new /atom/movable/screen/act_intent/simple_animal()
using.icon_state = mymob.a_intent
static_inventory += using
action_intent = using
@@ -21,10 +21,10 @@
/datum/hud/corgi/New(mob/user)
..()
mymob.healths = new /obj/screen/healths/corgi()
mymob.healths = new /atom/movable/screen/healths/corgi()
infodisplay += mymob.healths
mymob.pullin = new /obj/screen/pull()
mymob.pullin = new /atom/movable/screen/pull()
mymob.pullin.icon = 'icons/mob/screen_corgi.dmi'
mymob.pullin.hud = src
mymob.pullin.update_icon(UPDATE_ICON_STATE)
+29 -29
View File
@@ -1,7 +1,7 @@
/client
var/list/parallax_layers
var/list/parallax_layers_cached
var/static/list/parallax_static_layers_tail = newlist(/obj/screen/parallax_pmaster, /obj/screen/parallax_space_whitifier)
var/static/list/parallax_static_layers_tail = newlist(/atom/movable/screen/parallax_pmaster, /atom/movable/screen/parallax_space_whitifier)
var/atom/movable/movingmob
var/turf/previous_turf
var/dont_animate_parallax //world.time of when we can state animate()ing parallax again
@@ -16,7 +16,7 @@
if(!apply_parallax_pref())
return
// this is needed so it blends properly with the space plane and blackness plane.
var/obj/screen/plane_master/space/S = plane_masters["[PLANE_SPACE]"]
var/atom/movable/screen/plane_master/space/S = plane_masters["[PLANE_SPACE]"]
if(C.prefs.toggles2 & PREFTOGGLE_2_PARALLAX_IN_DARKNESS)
S.color = rgb(0, 0, 0, 0)
else
@@ -27,16 +27,16 @@
S.appearance_flags |= NO_CLIENT_COLOR
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()
var/obj/screen/plane_master/parallax/parallax_plane_master = plane_masters["[PLANE_SPACE_PARALLAX]"]
var/atom/movable/screen/plane_master/parallax/parallax_plane_master = plane_masters["[PLANE_SPACE_PARALLAX]"]
if(C.prefs.toggles2 & PREFTOGGLE_2_PARALLAX_IN_DARKNESS)
parallax_plane_master.blend_mode = BLEND_ADD
else
@@ -51,7 +51,7 @@
var/client/C = mymob.client
C.screen -= (C.parallax_layers_cached + C.parallax_static_layers_tail)
C.parallax_layers = null
var/obj/screen/plane_master/space/S = plane_masters["[PLANE_SPACE]"]
var/atom/movable/screen/plane_master/space/S = plane_masters["[PLANE_SPACE]"]
S.color = null
S.appearance_flags &= ~NO_CLIENT_COLOR
@@ -101,7 +101,7 @@
if(!new_parallax_movedir)
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
@@ -123,7 +123,7 @@
var/shortesttimer
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))
@@ -148,7 +148,7 @@
/datum/hud/proc/update_parallax_motionblur(client/C, animatedir, new_parallax_movedir, matrix/newtransform)
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
@@ -206,7 +206,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)
@@ -236,7 +236,7 @@
if(M && M.client && M.hud_used && length(M.client.parallax_layers))
M.hud_used.update_parallax()
/obj/screen/parallax_layer
/atom/movable/screen/parallax_layer
icon = 'icons/effects/parallax.dmi'
var/speed = 1
var/offset_x = 0
@@ -249,13 +249,13 @@
mouse_opacity = 0
/obj/screen/parallax_layer/New(view)
/atom/movable/screen/parallax_layer/New(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
@@ -278,70 +278,70 @@
// Cache this
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 = "space_gas"
/obj/screen/parallax_layer/random/space_gas/New(view)
/atom/movable/screen/parallax_layer/random/space_gas/New(view)
..()
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 = "asteroids"
layer = 4
/obj/screen/parallax_layer/planet
/atom/movable/screen/parallax_layer/planet
icon_state = "planet_lava"
blend_mode = BLEND_OVERLAY
absolute = TRUE //Status of seperation
speed = 3
layer = 30
/obj/screen/parallax_layer/planet/Initialize(mapload)
/atom/movable/screen/parallax_layer/planet/Initialize(mapload)
. = ..()
if(SSmapping.lavaland_theme?.planet_icon_state)
icon_state = SSmapping.lavaland_theme.planet_icon_state
/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
/obj/screen/parallax_pmaster
/atom/movable/screen/parallax_pmaster
appearance_flags = PLANE_MASTER
plane = PLANE_SPACE_PARALLAX
blend_mode = BLEND_MULTIPLY
mouse_opacity = FALSE
screen_loc = "CENTER-7,CENTER-7"
/obj/screen/parallax_space_whitifier
/atom/movable/screen/parallax_space_whitifier
appearance_flags = PLANE_MASTER
plane = PLANE_SPACE
color = list(
+18 -18
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 @@
overlays += 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
overlays += 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,12 +115,12 @@
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
@@ -133,12 +133,12 @@
vis_contents += viewing_turfs
/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
+20 -20
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,58 +6,58 @@
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 http://www.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)
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, add_filter), "displace", 1, displacement_map_filter(render_source = GRAVITY_PULSE_RENDER_TARGET, size = 10)), 2 SECONDS)//Why a timer vs just apply on initialize / async? I don't know. It just can't be, neither works correctly. Don't lower below 2 seconds unless you can see effects through walls with no issue.
/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/game_world
/atom/movable/screen/plane_master/game_world
name = "game world plane master"
plane = GAME_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/game_world/backdrop(mob/mymob)
/atom/movable/screen/plane_master/game_world/backdrop(mob/mymob)
. = ..() //if you delete it so help me god
clear_filters()
if(istype(mymob) && mymob.client && mymob.client.prefs && (mymob.client.prefs.toggles & PREFTOGGLE_AMBIENT_OCCLUSION))
add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA"))
/obj/screen/plane_master/lighting
/atom/movable/screen/plane_master/lighting
name = "lighting plane master"
plane = LIGHTING_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/lighting/backdrop(mob/mymob)
/atom/movable/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)
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/lighting/Initialize()
/atom/movable/screen/plane_master/lighting/Initialize()
. = ..()
add_filter("emissives", 1, alpha_mask_filter(render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE))
/obj/screen/plane_master/point
/atom/movable/screen/plane_master/point
name = "point plane master"
plane = POINT_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/point/backdrop(mob/mymob)
/atom/movable/screen/plane_master/point/backdrop(mob/mymob)
if(istype(mymob) && mymob.client && mymob.client.prefs)
alpha = (mymob.client.prefs.toggles2 & PREFTOGGLE_2_THOUGHT_BUBBLE) ? 255 : 0
@@ -67,29 +67,29 @@
* 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()
. = ..()
add_filter("em_block_masking", 1, color_matrix_filter(GLOB.em_mask_matrix))
/obj/screen/plane_master/space
/atom/movable/screen/plane_master/space
name = "space plane master"
plane = PLANE_SPACE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/parallax
/atom/movable/screen/plane_master/parallax
name = "parallax plane master"
plane = PLANE_SPACE_PARALLAX
appearance_flags = PLANE_MASTER
blend_mode = BLEND_MULTIPLY
/obj/screen/plane_master/blackness
/atom/movable/screen/plane_master/blackness
name = "blackness plane master"
plane = BLACKNESS_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
@@ -97,7 +97,7 @@
blend_mode = BLEND_ADD
appearance_flags = PLANE_MASTER | NO_CLIENT_COLOR | PIXEL_SCALE
/obj/screen/plane_master/gravpulse
/atom/movable/screen/plane_master/gravpulse
name = "gravpulse plane"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
plane = GRAVITY_PULSE_PLANE
+9 -9
View File
@@ -11,7 +11,7 @@
owner_hud = hud
var/assoc_controlled_planes = list()
for(var/i in controlled_planes)
var/obj/screen/plane_master/instance = owner_hud.plane_masters["[i]"]
var/atom/movable/screen/plane_master/instance = owner_hud.plane_masters["[i]"]
assoc_controlled_planes["[i]"] = instance
controlled_planes = assoc_controlled_planes
@@ -19,41 +19,41 @@
/atom/movable/plane_master_controller/add_filter(name, priority, list/params)
. = ..()
for(var/i in controlled_planes)
var/obj/screen/plane_master/pm_iterator = controlled_planes[i]
var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i]
pm_iterator.add_filter(name, priority, params)
///Full override so we can just use filterrific
/atom/movable/plane_master_controller/remove_filter(name_or_names)
. = ..()
for(var/i in controlled_planes)
var/obj/screen/plane_master/pm_iterator = controlled_planes[i]
var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i]
pm_iterator.remove_filter(name_or_names)
/atom/movable/plane_master_controller/update_filters()
. = ..()
for(var/i in controlled_planes)
var/obj/screen/plane_master/pm_iterator = controlled_planes[i]
var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i]
pm_iterator.update_filters()
///Gets all filters for this controllers plane masters
/atom/movable/plane_master_controller/proc/get_filters(name)
. = list()
for(var/i in controlled_planes)
var/obj/screen/plane_master/pm_iterator = controlled_planes[i]
var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i]
. += pm_iterator.get_filter(name)
///Transitions all filters owned by this plane master controller
/atom/movable/plane_master_controller/transition_filter(name, time, list/new_params, easing, loop)
. = ..()
for(var/i in controlled_planes)
var/obj/screen/plane_master/pm_iterator = controlled_planes[i]
var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i]
pm_iterator.transition_filter(name, time, new_params, easing, loop)
///Full override so we can just use filterrific
/atom/movable/plane_master_controller/add_atom_colour(coloration, colour_priority)
. = ..()
for(var/i in controlled_planes)
var/obj/screen/plane_master/pm_iterator = controlled_planes[i]
var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i]
pm_iterator.add_atom_colour(coloration, colour_priority)
@@ -61,14 +61,14 @@
/atom/movable/plane_master_controller/remove_atom_colour(colour_priority, coloration)
. = ..()
for(var/i in controlled_planes)
var/obj/screen/plane_master/pm_iterator = controlled_planes[i]
var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i]
pm_iterator.remove_atom_colour(colour_priority, coloration)
///Resets the atom's color to null, and then sets it to the highest priority colour available
/atom/movable/plane_master_controller/update_atom_colour()
for(var/i in controlled_planes)
var/obj/screen/plane_master/pm_iterator = controlled_planes[i]
var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i]
pm_iterator.update_atom_colour()
+16 -16
View File
@@ -3,51 +3,51 @@
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/Destroy()
/atom/movable/screen/radial/Destroy()
parent = null
return ..()
/obj/screen/radial/slice
/atom/movable/screen/radial/slice
icon_state = "radial_slice"
var/choice
var/next_page = FALSE
/obj/screen/radial/slice/MouseEntered(location, control, params)
/atom/movable/screen/radial/slice/MouseEntered(location, control, params)
. = ..()
icon_state = "radial_slice_focus"
openToolTip(usr, src, params, title = name)
/obj/screen/radial/slice/MouseExited(location, control, params)
/atom/movable/screen/radial/slice/MouseExited(location, control, params)
. = ..()
icon_state = "radial_slice"
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/Click(location, control, params)
/atom/movable/screen/radial/center/Click(location, control, params)
if(usr.client == parent.current_user)
parent.finished = TRUE
/obj/screen/radial/center/MouseEntered(location, control, params)
/atom/movable/screen/radial/center/MouseEntered(location, control, params)
. = ..()
openToolTip(usr, src, params, title = name)
/obj/screen/radial/center/MouseExited(location, control, params)
/atom/movable/screen/radial/center/MouseExited(location, control, params)
. = ..()
closeToolTip(usr)
@@ -59,8 +59,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/movable/anchor
var/pixel_x_difference
@@ -94,7 +94,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/new_element = new /obj/screen/radial/slice
var/atom/movable/screen/radial/new_element = new /atom/movable/screen/radial/slice
new_element.parent = src
elements += new_element
@@ -128,14 +128,14 @@ GLOBAL_LIST_EMPTY(radial_menus)
pixel_x_difference = ((world.icon_size * anchor.x) + anchor.step_x + anchor.pixel_x) - ((world.icon_size * current_user.mob.x) + current_user.mob.step_x + current_user.mob.pixel_x)
pixel_y_difference = ((world.icon_size * anchor.y) + anchor.step_y + anchor.pixel_y) - ((world.icon_size * current_user.mob.y) + current_user.mob.step_y + current_user.mob.pixel_y)
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)
/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"
@@ -144,7 +144,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)
/datum/radial_menu/proc/SetElement(atom/movable/screen/radial/slice/E, choice_id, angle)
//Position
E.pixel_y = round(cos(angle) * radius) + py_shift
E.pixel_x = round(sin(angle) * radius)
+35 -35
View File
@@ -1,11 +1,11 @@
/obj/screen/robot
/atom/movable/screen/robot
icon = 'icons/mob/screen_robot.dmi'
/obj/screen/robot/module
/atom/movable/screen/robot/module
name = "cyborg module"
icon_state = "nomod"
/obj/screen/robot/module/Click()
/atom/movable/screen/robot/module/Click()
if(isrobot(usr))
var/mob/living/silicon/robot/R = usr
if(R.module)
@@ -13,76 +13,76 @@
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(isrobot(usr))
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(isrobot(usr))
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(isrobot(usr))
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(issilicon(usr))
var/mob/living/silicon/robot/R = usr
R.radio_menu()
/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(isrobot(usr))
var/mob/living/silicon/robot/R = usr
R.uneq_active()
R.hud_used.update_robot_modules_display()
/obj/screen/robot/lamp
/atom/movable/screen/robot/lamp
name = "Toggle Headlamp"
icon_state = "lamp0"
screen_loc = ui_borg_lamp
/obj/screen/robot/lamp/Click()
/atom/movable/screen/robot/lamp/Click()
if(isrobot(usr))
var/mob/living/silicon/robot/R = usr
R.control_headlamp()
/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()
var/mob/living/silicon/robot/R = usr
R.toggle_ionpulse()
/obj/screen/robot/mov_intent
/atom/movable/screen/robot/mov_intent
name = "fast/slow toggle"
icon_state = "running"
/obj/screen/robot/mov_intent/Click()
/atom/movable/screen/robot/mov_intent/Click()
usr.toggle_move_intent()
@@ -93,31 +93,31 @@
/datum/hud/robot/New(mob/user)
..()
var/obj/screen/using
var/atom/movable/screen/using
var/mob/living/silicon/robot/mymobR = mymob
//Language menu
using = new /obj/screen/language_menu
using = new /atom/movable/screen/language_menu
using.screen_loc = ui_borg_lanugage_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
@@ -125,55 +125,55 @@
//End of module select
//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
//Intent
// Attack intent
using = new /obj/screen/act_intent/robot()
using = new /atom/movable/screen/act_intent/robot()
using.icon_state = mymob.a_intent
static_inventory += using
action_intent = using
// Movement intent
using = new /obj/screen/robot/mov_intent()
using = new /atom/movable/screen/robot/mov_intent()
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
static_inventory += using
using.screen_loc = ui_movi
move_intent = using
//Health
mymob.healths = new /obj/screen/healths/robot()
mymob.healths = new /atom/movable/screen/healths/robot()
infodisplay += mymob.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
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
mymob.pullin = new /obj/screen/pull()
mymob.pullin = new /atom/movable/screen/pull()
mymob.pullin.icon = 'icons/mob/screen_robot.dmi'
mymob.pullin.hud = src
mymob.pullin.update_icon(UPDATE_ICON_STATE)
mymob.pullin.screen_loc = ui_borg_pull
hotkeybuttons += mymob.pullin
zone_select = new /obj/screen/zone_sel/robot()
zone_select = new /atom/movable/screen/zone_sel/robot()
zone_select.hud = src
zone_select.update_icon(UPDATE_OVERLAYS)
static_inventory += zone_select
//Headlamp
mymobR.lamp_button = new /obj/screen/robot/lamp()
mymobR.lamp_button = new /atom/movable/screen/robot/lamp()
mymobR.lamp_button.screen_loc = ui_borg_lamp
static_inventory += mymobR.lamp_button
//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
+88 -78
View File
@@ -1,34 +1,44 @@
/*
Screen objects
Screen "objects"
Todo: improve/re-implement
Screen objects are only used for the hud and should not appear anywhere "in-game".
They are not actually objects, which is counterintuitive to their name.
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
flags = NO_SCREENTIPS
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
var/datum/hud/hud = null
appearance_flags = NO_CLIENT_COLOR
/**
* Map name assigned to this object.
* Automatically set by /client/proc/add_obj_to_map.
*/
var/assigned_map
/**
* Mark this object as garbage-collectible after you clean the map
* it was registered on.
*
* This could probably be changed to be a proc, for conditional removal.
* But for now, this works.
*/
var/del_on_map_removal = TRUE
/obj/screen/take_damage()
return
/obj/screen/Destroy()
/atom/movable/screen/Destroy()
master = null
hud = null
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
@@ -36,44 +46,44 @@
maptext_height = 480
maptext_width = 480
/obj/screen/close
/atom/movable/screen/close
name = "close"
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
/obj/screen/close/Click()
/atom/movable/screen/close/Click()
if(master)
if(isstorage(master))
var/obj/item/storage/S = master
S.close(usr)
return 1
/obj/screen/drop
/atom/movable/screen/drop
name = "drop"
icon_state = "act_drop"
/obj/screen/drop/Click()
/atom/movable/screen/drop/Click()
usr.drop_item_v()
/obj/screen/grab
/atom/movable/screen/grab
name = "grab"
/obj/screen/grab/Click()
/atom/movable/screen/grab/Click()
var/obj/item/grab/G = master
G.s_click(src)
return 1
/obj/screen/grab/attack_hand()
/atom/movable/screen/grab/attack_hand()
return
/obj/screen/grab/attackby()
/atom/movable/screen/grab/attackby()
return
/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)
if(ishuman(usr))
var/_x = text2num(params2list(params)["icon-x"])
var/_y = text2num(params2list(params)["icon-y"])
@@ -88,69 +98,69 @@
else
usr.a_intent_change("right")
/obj/screen/act_intent/alien
/atom/movable/screen/act_intent/alien
icon = 'icons/mob/screen_alien.dmi'
screen_loc = ui_acti
/obj/screen/act_intent/robot
/atom/movable/screen/act_intent/robot
icon = 'icons/mob/screen_robot.dmi'
screen_loc = ui_borg_intents
/obj/screen/act_intent/robot/AI
/atom/movable/screen/act_intent/robot/AI
screen_loc = "SOUTH+1:6,EAST-1:32"
/obj/screen/mov_intent
/atom/movable/screen/mov_intent
name = "run/walk toggle"
icon_state = "running"
/obj/screen/act_intent/simple_animal
/atom/movable/screen/act_intent/simple_animal
icon = 'icons/mob/screen_simplemob.dmi'
screen_loc = ui_acti
/obj/screen/act_intent/guardian
/atom/movable/screen/act_intent/guardian
icon = 'icons/mob/guardian.dmi'
screen_loc = ui_acti
/obj/screen/mov_intent/Click()
/atom/movable/screen/mov_intent/Click()
usr.toggle_move_intent()
/obj/screen/pull
/atom/movable/screen/pull
name = "stop pulling"
icon_state = "pull"
/obj/screen/pull/Click()
/atom/movable/screen/pull/Click()
usr.stop_pulling()
/obj/screen/pull/update_icon_state()
/atom/movable/screen/pull/update_icon_state()
if(hud?.mymob?.pulling)
icon_state = "pull"
else
icon_state = "pull0"
/obj/screen/resist
/atom/movable/screen/resist
name = "resist"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_resist"
/obj/screen/resist/Click()
/atom/movable/screen/resist/Click()
if(isliving(usr))
var/mob/living/L = usr
L.resist()
/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/storage
/atom/movable/screen/storage
name = "storage"
/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(ignore_restraints = TRUE))
@@ -163,7 +173,7 @@
master.attackby(I, usr, params)
return TRUE
/obj/screen/storage/proc/is_item_accessible(obj/item/I, mob/user)
/atom/movable/screen/storage/proc/is_item_accessible(obj/item/I, mob/user)
if(!user || !I)
return FALSE
@@ -180,7 +190,7 @@
return TRUE
return FALSE
/obj/screen/storage/MouseDrop_T(obj/item/I, mob/user)
/atom/movable/screen/storage/MouseDrop_T(obj/item/I, mob/user)
if(!user || !istype(I) || user.incapacitated(ignore_restraints = TRUE) || ismecha(user.loc) || !master)
return
@@ -219,7 +229,7 @@
S.attackby(I, user)
return TRUE
/obj/screen/zone_sel
/atom/movable/screen/zone_sel
name = "damage zone"
icon_state = "zone_sel"
screen_loc = ui_zonesel
@@ -228,7 +238,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
@@ -241,11 +251,11 @@
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
@@ -275,13 +285,13 @@
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)
cut_overlay(hover_overlays_cache[hovering])
hovering = null
return ..()
/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 3) //Feet
switch(icon_x)
@@ -325,7 +335,7 @@
return "eyes"
return "head"
/obj/screen/zone_sel/proc/set_selected_zone(choice)
/atom/movable/screen/zone_sel/proc/set_selected_zone(choice)
if(!hud)
return
if(isobserver(hud.mymob))
@@ -334,58 +344,58 @@
if(choice != selecting)
selecting = choice
update_icon(UPDATE_OVERLAYS)
return 1
return TRUE
/obj/screen/zone_sel/update_overlays()
/atom/movable/screen/zone_sel/update_overlays()
. = ..()
var/image/sel = image(overlay_file, "[selecting]")
sel.appearance_flags = RESET_COLOR
. += sel
hud.mymob.zone_selected = selecting
/obj/screen/zone_sel/alien
/atom/movable/screen/zone_sel/alien
icon = 'icons/mob/screen_alien.dmi'
overlay_file = 'icons/mob/screen_alien.dmi'
/obj/screen/zone_sel/robot
/atom/movable/screen/zone_sel/robot
icon = 'icons/mob/screen_robot.dmi'
/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/craft/Click()
/atom/movable/screen/craft/Click()
var/mob/living/M = usr
M.OpenCraftingMenu()
/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
if(!istype(M))
return
M.check_languages()
/obj/screen/inventory
/atom/movable/screen/inventory
var/slot_id //The indentifier for the slot. It has nothing to do with ID cards.
var/list/object_overlays = list()
/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/proc/add_overlays()
/atom/movable/screen/inventory/proc/add_overlays()
var/mob/user = hud.mymob
if(hud && user && slot_id)
@@ -405,7 +415,7 @@
object_overlays += item_overlay
add_overlay(object_overlays)
/obj/screen/inventory/MouseDrop(atom/over)
/atom/movable/screen/inventory/MouseDrop(atom/over)
cut_overlay(object_overlays)
object_overlays.Cut()
if(could_be_click_lag())
@@ -414,7 +424,7 @@
return
return ..()
/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)
@@ -432,14 +442,14 @@
if(usr.attack_ui(slot_id))
usr.update_inv_l_hand()
usr.update_inv_r_hand()
return 1
return TRUE
/obj/screen/inventory/hand
/atom/movable/screen/inventory/hand
var/image/active_overlay
var/image/handcuff_overlay
var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked")
/obj/screen/inventory/hand/update_overlays()
/atom/movable/screen/inventory/hand/update_overlays()
. = ..()
if(!active_overlay)
active_overlay = image("icon"=icon, "icon_state"="hand_active")
@@ -462,7 +472,7 @@
else if(slot_id == SLOT_HUD_RIGHT_HAND && !hud.mymob.hand)
. += active_overlay
/obj/screen/inventory/hand/Click()
/atom/movable/screen/inventory/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)
@@ -479,12 +489,12 @@
M.activate_hand("r")
if("left hand", "l_hand")
M.activate_hand("l")
return 1
return TRUE
/obj/screen/swap_hand
/atom/movable/screen/swap_hand
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)
@@ -498,57 +508,57 @@
M.swap_hand()
return 1
/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/bot
/atom/movable/screen/healths/bot
icon = 'icons/mob/screen_bot.dmi'
screen_loc = ui_borg_health
/obj/screen/healths/robot
/atom/movable/screen/healths/robot
icon = 'icons/mob/screen_robot.dmi'
screen_loc = ui_borg_health
/obj/screen/healths/corgi
/atom/movable/screen/healths/corgi
icon = 'icons/mob/screen_corgi.dmi'
/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/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/healthdoll
/atom/movable/screen/healthdoll
name = "health doll"
icon_state = "healthdoll_DEAD"
screen_loc = ui_healthdoll
var/list/cached_healthdoll_overlays = list() // List of icon states (strings) for overlays
/obj/screen/healthdoll/Click()
/atom/movable/screen/healthdoll/Click()
if(ishuman(usr) && !usr.is_dead())
var/mob/living/carbon/H = usr
H.check_self_for_injuries()
/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/new_parent)
/atom/movable/screen/component_button/Initialize(mapload, atom/movable/screen/new_parent)
. = ..()
parent = new_parent
/obj/screen/component_button/Click(params)
/atom/movable/screen/component_button/Click(params)
if(parent)
parent.component_click(src, params)
+3 -3
View File
@@ -1,4 +1,4 @@
/obj/screen/screentip
/atom/movable/screen/screentip
icon = null
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
screen_loc = "TOP,LEFT"
@@ -7,12 +7,12 @@
maptext_y = -50
maptext = ""
/obj/screen/screentip/Initialize(mapload, _hud)
/atom/movable/screen/screentip/Initialize(mapload, _hud)
. = ..()
hud = _hud
update_view()
/obj/screen/screentip/proc/update_view(datum/source)
/atom/movable/screen/screentip/proc/update_view(datum/source)
if(!hud) //Might not have been initialized by now
return
maptext_width = getviewsize(hud.mymob.client.view)[1] * world.icon_size
+1 -1
View File
@@ -1,6 +1,6 @@
/datum/hud/slime/New(mob/living/simple_animal/slime/owner, ui_style = 'icons/mob/screen_slime.dmi')
..()
mymob.healths = new /obj/screen/healths/slime()
mymob.healths = new /atom/movable/screen/healths/slime()
infodisplay += mymob.healths
/mob/living/simple_animal/slime/create_mob_hud()