initial commit - cross reference with 5th port - obviously has compile errors
This commit is contained in:
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
These defines specificy screen locations. For more information, see the byond documentation on the screen_loc var.
|
||||
|
||||
The short version:
|
||||
|
||||
Everything is encoded as strings because apparently that's how Byond rolls.
|
||||
|
||||
"1,1" is the bottom left square of the user's screen. This aligns perfectly with the turf grid.
|
||||
"1:2,3:4" is the square (1,3) with pixel offsets (+2, +4); slightly right and slightly above the turf grid.
|
||||
Pixel offsets are used so you don't perfectly hide the turf under them, that would be crappy.
|
||||
|
||||
In addition, the keywords NORTH, SOUTH, EAST, WEST and CENTER can be used to represent their respective
|
||||
screen borders. NORTH-1, for example, is the row just below the upper edge. Useful if you want your
|
||||
UI to scale with screen size.
|
||||
|
||||
The size of the user's screen is defined by client.view (indirectly by world.view), in our case "15x15".
|
||||
Therefore, the top right corner (except during admin shenanigans) is at "15,15"
|
||||
*/
|
||||
|
||||
//Lower left, persistant menu
|
||||
#define ui_inventory "WEST:6,SOUTH:5"
|
||||
|
||||
//Middle left indicators
|
||||
#define ui_lingchemdisplay "WEST:6,CENTER-1:15"
|
||||
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
|
||||
#define ui_crafting "12:-10,1:5"
|
||||
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"
|
||||
|
||||
//Lower center, persistant menu
|
||||
#define ui_sstore1 "CENTER-5:10,SOUTH:5"
|
||||
#define ui_id "CENTER-4:12,SOUTH:5"
|
||||
#define ui_belt "CENTER-3:14,SOUTH:5"
|
||||
#define ui_back "CENTER-2:14,SOUTH:5"
|
||||
#define ui_rhand "CENTER:-16,SOUTH:5"
|
||||
#define ui_lhand "CENTER: 16,SOUTH:5"
|
||||
#define ui_equip "CENTER:-16,SOUTH+1:5"
|
||||
#define ui_swaphand1 "CENTER:-16,SOUTH+1:5"
|
||||
#define ui_swaphand2 "CENTER: 16,SOUTH+1:5"
|
||||
#define ui_storage1 "CENTER+1:18,SOUTH:5"
|
||||
#define ui_storage2 "CENTER+2:20,SOUTH:5"
|
||||
|
||||
#define ui_borg_sensor "CENTER-3:16, SOUTH:5" //borgs
|
||||
#define ui_borg_lamp "CENTER-4:16, SOUTH:5" //borgies
|
||||
#define ui_borg_thrusters "CENTER-5:16, SOUTH:5"//borgies
|
||||
#define ui_inv1 "CENTER-2:16,SOUTH:5" //borgs
|
||||
#define ui_inv2 "CENTER-1 :16,SOUTH:5" //borgs
|
||||
#define ui_inv3 "CENTER :16,SOUTH:5" //borgs
|
||||
#define ui_borg_module "CENTER+1:16,SOUTH:5"
|
||||
#define ui_borg_store "CENTER+2:16,SOUTH:5" //borgs
|
||||
|
||||
#define ui_borg_camera "CENTER+3:21,SOUTH:5" //borgs
|
||||
#define ui_borg_album "CENTER+4:21,SOUTH:5" //borgs
|
||||
|
||||
#define ui_monkey_head "CENTER-4:13,SOUTH:5" //monkey
|
||||
#define ui_monkey_mask "CENTER-3:14,SOUTH:5" //monkey
|
||||
#define ui_monkey_back "CENTER-2:15,SOUTH:5" //monkey
|
||||
|
||||
#define ui_alien_storage_l "CENTER-2:14,SOUTH:5"//alien
|
||||
#define ui_alien_storage_r "CENTER+1:18,SOUTH:5"//alien
|
||||
|
||||
#define ui_drone_drop "CENTER+1:18,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_pull "CENTER+2:2,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_storage "CENTER-2:14,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_head "CENTER-3:14,SOUTH:5" //maintenance drones
|
||||
|
||||
//Lower right, persistant menu
|
||||
#define ui_drop_throw "EAST-1:28,SOUTH+1:7"
|
||||
#define ui_pull_resist "EAST-2:26,SOUTH+1:7"
|
||||
#define ui_movi "EAST-2:26,SOUTH:5"
|
||||
#define ui_acti "EAST-3:24,SOUTH:5"
|
||||
#define ui_zonesel "EAST-1:28,SOUTH:5"
|
||||
#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12)
|
||||
|
||||
#define ui_borg_pull "EAST-2:26,SOUTH+1:7"
|
||||
#define ui_borg_radio "EAST-1:28,SOUTH+1:7"
|
||||
#define ui_borg_intents "EAST-2:26,SOUTH:5"
|
||||
|
||||
|
||||
//Upper-middle right (alerts)
|
||||
#define ui_alert1 "EAST-1:28,CENTER+5:27"
|
||||
#define ui_alert2 "EAST-1:28,CENTER+4:25"
|
||||
#define ui_alert3 "EAST-1:28,CENTER+3:23"
|
||||
#define ui_alert4 "EAST-1:28,CENTER+2:21"
|
||||
#define ui_alert5 "EAST-1:28,CENTER+1:19"
|
||||
|
||||
|
||||
//Middle right (status indicators)
|
||||
#define ui_healthdoll "EAST-1:28,CENTER-2:13"
|
||||
#define ui_health "EAST-1:28,CENTER-1:15"
|
||||
#define ui_internal "EAST-1:28,CENTER:17"
|
||||
|
||||
//borgs and aliens
|
||||
#define ui_alien_nightvision "EAST-1:28,CENTER:17"
|
||||
#define ui_borg_health "EAST-1:28,CENTER-1:15" //borgs have the health display where humans have the pressure damage indicator.
|
||||
#define ui_alien_health "EAST-1:28,CENTER-1:15" //aliens have the health display where humans have the pressure damage indicator.
|
||||
#define ui_alienplasmadisplay "EAST-1:28,CENTER-2:15"
|
||||
|
||||
// AI
|
||||
|
||||
#define ui_ai_core "SOUTH:6,WEST"
|
||||
#define ui_ai_camera_list "SOUTH:6,WEST+1"
|
||||
#define ui_ai_track_with_camera "SOUTH:6,WEST+2"
|
||||
#define ui_ai_camera_light "SOUTH:6,WEST+3"
|
||||
#define ui_ai_crew_monitor "SOUTH:6,WEST+4"
|
||||
#define ui_ai_crew_manifest "SOUTH:6,WEST+5"
|
||||
#define ui_ai_alerts "SOUTH:6,WEST+6"
|
||||
#define ui_ai_announcement "SOUTH:6,WEST+7"
|
||||
#define ui_ai_shuttle "SOUTH:6,WEST+8"
|
||||
#define ui_ai_state_laws "SOUTH:6,WEST+9"
|
||||
#define ui_ai_pda_send "SOUTH:6,WEST+10"
|
||||
#define ui_ai_pda_log "SOUTH:6,WEST+11"
|
||||
#define ui_ai_take_picture "SOUTH:6,WEST+12"
|
||||
#define ui_ai_view_images "SOUTH:6,WEST+13"
|
||||
#define ui_ai_sensor "SOUTH:6,WEST+14"
|
||||
|
||||
//Pop-up inventory
|
||||
#define ui_shoes "WEST+1:8,SOUTH:5"
|
||||
|
||||
#define ui_iclothing "WEST:6,SOUTH+1:7"
|
||||
#define ui_oclothing "WEST+1:8,SOUTH+1:7"
|
||||
#define ui_gloves "WEST+2:10,SOUTH+1:7"
|
||||
|
||||
#define ui_glasses "WEST:6,SOUTH+2:9"
|
||||
#define ui_mask "WEST+1:8,SOUTH+2:9"
|
||||
#define ui_ears "WEST+2:10,SOUTH+2:9"
|
||||
|
||||
#define ui_head "WEST+1:8,SOUTH+3:11"
|
||||
|
||||
//Ghosts
|
||||
|
||||
#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:16"
|
||||
#define ui_ghost_orbit "SOUTH:6,CENTER-1:16"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:16"
|
||||
#define ui_ghost_teleport "SOUTH:6,CENTER+1:16"
|
||||
|
||||
//Hand of God, god
|
||||
|
||||
#define ui_deityhealth "EAST-1:28,CENTER-2:13"
|
||||
#define ui_deitypower "EAST-1:28,CENTER-1:15"
|
||||
#define ui_deityfollowers "EAST-1:28,CENTER:17"
|
||||
@@ -0,0 +1,129 @@
|
||||
|
||||
/obj/screen/movable/action_button
|
||||
var/datum/action/linked_action
|
||||
screen_loc = null
|
||||
|
||||
/obj/screen/movable/action_button/Click(location,control,params)
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"])
|
||||
moved = 0
|
||||
usr.update_action_buttons() //redraw buttons that are no longer considered "moved"
|
||||
return 1
|
||||
if(usr.next_move >= world.time) // Is this needed ?
|
||||
return
|
||||
linked_action.Trigger()
|
||||
return 1
|
||||
|
||||
//Hide/Show Action Buttons ... Button
|
||||
/obj/screen/movable/action_button/hide_toggle
|
||||
name = "Hide Buttons"
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon_state = "bg_default"
|
||||
var/hidden = 0
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"])
|
||||
moved = 0
|
||||
return 1
|
||||
usr.hud_used.action_buttons_hidden = !usr.hud_used.action_buttons_hidden
|
||||
|
||||
hidden = usr.hud_used.action_buttons_hidden
|
||||
if(hidden)
|
||||
name = "Show Buttons"
|
||||
else
|
||||
name = "Hide Buttons"
|
||||
UpdateIcon()
|
||||
usr.update_action_buttons()
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(mob/living/user)
|
||||
if(isalien(user))
|
||||
icon_state = "bg_alien"
|
||||
else
|
||||
icon_state = "bg_default"
|
||||
UpdateIcon()
|
||||
return
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/proc/UpdateIcon()
|
||||
cut_overlays()
|
||||
var/image/img = image(icon, src, hidden ? "show" : "hide")
|
||||
add_overlay(img)
|
||||
return
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/MouseEntered(location,control,params)
|
||||
openToolTip(usr,src,params,title = name,content = desc)
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/MouseExited()
|
||||
closeToolTip(usr)
|
||||
|
||||
|
||||
/mob/proc/update_action_buttons_icon()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
//This is the proc used to update all the action buttons.
|
||||
/mob/proc/update_action_buttons(reload_screen)
|
||||
if(!hud_used || !client)
|
||||
return
|
||||
|
||||
if(hud_used.hud_shown != HUD_STYLE_STANDARD)
|
||||
return
|
||||
|
||||
var/button_number = 0
|
||||
|
||||
if(hud_used.action_buttons_hidden)
|
||||
for(var/datum/action/A in actions)
|
||||
A.button.screen_loc = null
|
||||
if(reload_screen)
|
||||
client.screen += A.button
|
||||
else
|
||||
for(var/datum/action/A in actions)
|
||||
button_number++
|
||||
A.UpdateButtonIcon()
|
||||
var/obj/screen/movable/action_button/B = A.button
|
||||
if(!B.moved)
|
||||
B.screen_loc = hud_used.ButtonNumberToScreenCoords(button_number)
|
||||
else
|
||||
B.screen_loc = B.moved
|
||||
if(reload_screen)
|
||||
client.screen += B
|
||||
|
||||
if(!button_number)
|
||||
hud_used.hide_actions_toggle.screen_loc = null
|
||||
return
|
||||
|
||||
if(!hud_used.hide_actions_toggle.moved)
|
||||
hud_used.hide_actions_toggle.screen_loc = hud_used.ButtonNumberToScreenCoords(button_number+1)
|
||||
else
|
||||
hud_used.hide_actions_toggle.screen_loc = hud_used.hide_actions_toggle.moved
|
||||
if(reload_screen)
|
||||
client.screen += hud_used.hide_actions_toggle
|
||||
|
||||
|
||||
|
||||
#define AB_MAX_COLUMNS 10
|
||||
|
||||
/datum/hud/proc/ButtonNumberToScreenCoords(number) // TODO : Make this zero-indexed for readabilty
|
||||
var/row = round((number - 1)/AB_MAX_COLUMNS)
|
||||
var/col = ((number - 1)%(AB_MAX_COLUMNS)) + 1
|
||||
|
||||
var/coord_col = "+[col-1]"
|
||||
var/coord_col_offset = 4 + 2 * col
|
||||
|
||||
var/coord_row = "[row ? -row : "+0"]"
|
||||
|
||||
return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:-6"
|
||||
|
||||
/datum/hud/proc/SetButtonCoords(obj/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
|
||||
var/y_offset = -32*(row+1) + 26
|
||||
|
||||
var/matrix/M = matrix()
|
||||
M.Translate(x_offset,y_offset)
|
||||
button.transform = M
|
||||
@@ -0,0 +1,218 @@
|
||||
/obj/screen/ai
|
||||
icon = 'icons/mob/screen_ai.dmi'
|
||||
|
||||
/obj/screen/ai/aicore
|
||||
name = "AI core"
|
||||
icon_state = "ai_core"
|
||||
|
||||
/obj/screen/ai/aicore/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.view_core()
|
||||
|
||||
/obj/screen/ai/camera_list
|
||||
name = "Show Camera List"
|
||||
icon_state = "camera"
|
||||
|
||||
/obj/screen/ai/camera_list/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
var/camera = input(AI, "Choose which camera you want to view", "Cameras") as null|anything in AI.get_camera_list()
|
||||
AI.ai_camera_list(camera)
|
||||
|
||||
/obj/screen/ai/camera_track
|
||||
name = "Track With Camera"
|
||||
icon_state = "track"
|
||||
|
||||
/obj/screen/ai/camera_track/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs()
|
||||
AI.ai_camera_track(target_name)
|
||||
|
||||
/obj/screen/ai/camera_light
|
||||
name = "Toggle Camera Light"
|
||||
icon_state = "camera_light"
|
||||
|
||||
/obj/screen/ai/camera_light/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.toggle_camera_light()
|
||||
|
||||
/obj/screen/ai/crew_monitor
|
||||
name = "Crew Monitoring Console"
|
||||
icon_state = "crew_monitor"
|
||||
|
||||
/obj/screen/ai/crew_monitor/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
crewmonitor.show(AI)
|
||||
|
||||
/obj/screen/ai/crew_manifest
|
||||
name = "Crew Manifest"
|
||||
icon_state = "manifest"
|
||||
|
||||
/obj/screen/ai/crew_manifest/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.ai_roster()
|
||||
|
||||
/obj/screen/ai/alerts
|
||||
name = "Show Alerts"
|
||||
icon_state = "alerts"
|
||||
|
||||
/obj/screen/ai/alerts/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.ai_alerts()
|
||||
|
||||
/obj/screen/ai/announcement
|
||||
name = "Make Announcement"
|
||||
icon_state = "announcement"
|
||||
|
||||
/obj/screen/ai/announcement/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.announcement()
|
||||
|
||||
/obj/screen/ai/call_shuttle
|
||||
name = "Call Emergency Shuttle"
|
||||
icon_state = "call_shuttle"
|
||||
|
||||
/obj/screen/ai/call_shuttle/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.ai_call_shuttle()
|
||||
|
||||
/obj/screen/ai/state_laws
|
||||
name = "State Laws"
|
||||
icon_state = "state_laws"
|
||||
|
||||
/obj/screen/ai/state_laws/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.checklaws()
|
||||
|
||||
/obj/screen/ai/pda_msg_send
|
||||
name = "PDA - Send Message"
|
||||
icon_state = "pda_send"
|
||||
|
||||
/obj/screen/ai/pda_msg_send/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.cmd_send_pdamesg(usr)
|
||||
|
||||
/obj/screen/ai/pda_msg_show
|
||||
name = "PDA - Show Message Log"
|
||||
icon_state = "pda_receive"
|
||||
|
||||
/obj/screen/ai/pda_msg_show/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.cmd_show_message_log(usr)
|
||||
|
||||
/obj/screen/ai/image_take
|
||||
name = "Take Image"
|
||||
icon_state = "take_picture"
|
||||
|
||||
/obj/screen/ai/image_take/Click()
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.aicamera.toggle_camera_mode()
|
||||
else if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.aicamera.toggle_camera_mode()
|
||||
|
||||
/obj/screen/ai/image_view
|
||||
name = "View Images"
|
||||
icon_state = "view_images"
|
||||
|
||||
/obj/screen/ai/image_view/Click()
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.aicamera.viewpictures()
|
||||
else if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.aicamera.viewpictures()
|
||||
|
||||
/obj/screen/ai/sensors
|
||||
name = "Sensor Augmentation"
|
||||
icon_state = "ai_sensor"
|
||||
|
||||
/obj/screen/ai/sensors/Click()
|
||||
var/mob/living/silicon/S = usr
|
||||
S.sensor_mode()
|
||||
|
||||
|
||||
/datum/hud/ai/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
//AI core
|
||||
using = new /obj/screen/ai/aicore()
|
||||
using.screen_loc = ui_ai_core
|
||||
static_inventory += using
|
||||
|
||||
//Camera list
|
||||
using = new /obj/screen/ai/camera_list()
|
||||
using.screen_loc = ui_ai_camera_list
|
||||
static_inventory += using
|
||||
|
||||
//Track
|
||||
using = new /obj/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.screen_loc = ui_ai_camera_light
|
||||
static_inventory += using
|
||||
|
||||
//Crew Monitoring
|
||||
using = new /obj/screen/ai/crew_monitor()
|
||||
using.screen_loc = ui_ai_crew_monitor
|
||||
static_inventory += using
|
||||
|
||||
//Crew Manifest
|
||||
using = new /obj/screen/ai/crew_manifest()
|
||||
using.screen_loc = ui_ai_crew_manifest
|
||||
static_inventory += using
|
||||
|
||||
//Alerts
|
||||
using = new /obj/screen/ai/alerts()
|
||||
using.screen_loc = ui_ai_alerts
|
||||
static_inventory += using
|
||||
|
||||
//Announcement
|
||||
using = new /obj/screen/ai/announcement()
|
||||
using.screen_loc = ui_ai_announcement
|
||||
static_inventory += using
|
||||
|
||||
//Shuttle
|
||||
using = new /obj/screen/ai/call_shuttle()
|
||||
using.screen_loc = ui_ai_shuttle
|
||||
static_inventory += using
|
||||
|
||||
//Laws
|
||||
using = new /obj/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.screen_loc = ui_ai_pda_send
|
||||
static_inventory += using
|
||||
|
||||
//PDA log
|
||||
using = new /obj/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.screen_loc = ui_ai_take_picture
|
||||
static_inventory += using
|
||||
|
||||
//View images
|
||||
using = new /obj/screen/ai/image_view()
|
||||
using.screen_loc = ui_ai_view_images
|
||||
static_inventory += using
|
||||
|
||||
|
||||
//Medical/Security sensors
|
||||
using = new /obj/screen/ai/sensors()
|
||||
using.screen_loc = ui_ai_sensor
|
||||
static_inventory += using
|
||||
|
||||
|
||||
/mob/living/silicon/ai/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/ai(src)
|
||||
@@ -0,0 +1,413 @@
|
||||
//A system to manage and display alerts on screen without needing you to do it yourself
|
||||
|
||||
//PUBLIC - call these wherever you want
|
||||
|
||||
|
||||
/mob/proc/throw_alert(category, type, severity, obj/new_master)
|
||||
|
||||
/* Proc to create or update an alert. Returns the alert if the alert is new or updated, 0 if it was thrown already
|
||||
category is a text string. Each mob may only have one alert per category; the previous one will be replaced
|
||||
path is a type path of the actual alert type to throw
|
||||
severity is an optional number that will be placed at the end of the icon_state for this alert
|
||||
For example, high pressure's icon_state is "highpressure" and can be serverity 1 or 2 to get "highpressure1" or "highpressure2"
|
||||
new_master is optional and sets the alert's icon state to "template" in the ui_style icons with the master as an overlay.
|
||||
Clicks are forwarded to master */
|
||||
|
||||
if(!category)
|
||||
return
|
||||
|
||||
var/obj/screen/alert/alert
|
||||
if(alerts[category])
|
||||
alert = alerts[category]
|
||||
if(new_master && new_master != alert.master)
|
||||
WARNING("[src] threw alert [category] with new_master [new_master] while already having that alert with master [alert.master]")
|
||||
clear_alert(category)
|
||||
return .()
|
||||
else if(alert.type != type)
|
||||
clear_alert(category)
|
||||
return .()
|
||||
else if(!severity || severity == alert.severity)
|
||||
if(alert.timeout)
|
||||
clear_alert(category)
|
||||
return .()
|
||||
else //no need to update
|
||||
return 0
|
||||
else
|
||||
alert = PoolOrNew(type)
|
||||
|
||||
if(new_master)
|
||||
var/old_layer = new_master.layer
|
||||
new_master.layer = FLOAT_LAYER
|
||||
alert.overlays += new_master
|
||||
new_master.layer = old_layer
|
||||
alert.icon_state = "template" // We'll set the icon to the client's ui pref in reorganize_alerts()
|
||||
alert.master = new_master
|
||||
else
|
||||
alert.icon_state = "[initial(alert.icon_state)][severity]"
|
||||
alert.severity = severity
|
||||
|
||||
alerts[category] = alert
|
||||
if(client && hud_used)
|
||||
hud_used.reorganize_alerts()
|
||||
alert.transform = matrix(32, 6, MATRIX_TRANSLATE)
|
||||
animate(alert, transform = matrix(), time = 2.5, easing = CUBIC_EASING)
|
||||
|
||||
if(alert.timeout)
|
||||
spawn(alert.timeout)
|
||||
if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout)
|
||||
clear_alert(category)
|
||||
alert.timeout = world.time + alert.timeout - world.tick_lag
|
||||
return alert
|
||||
|
||||
// Proc to clear an existing alert.
|
||||
/mob/proc/clear_alert(category)
|
||||
var/obj/screen/alert/alert = alerts[category]
|
||||
if(!alert)
|
||||
return 0
|
||||
|
||||
alerts -= category
|
||||
if(client && hud_used)
|
||||
hud_used.reorganize_alerts()
|
||||
client.screen -= alert
|
||||
qdel(alert)
|
||||
|
||||
/obj/screen/alert
|
||||
icon = 'icons/mob/screen_alert.dmi'
|
||||
icon_state = "default"
|
||||
name = "Alert"
|
||||
desc = "Something seems to have gone wrong with this alert, so report this bug please"
|
||||
mouse_opacity = 1
|
||||
var/timeout = 0 //If set to a number, this alert will clear itself after that many deciseconds
|
||||
var/severity = 0
|
||||
var/alerttooltipstyle = ""
|
||||
|
||||
|
||||
/obj/screen/alert/MouseEntered(location,control,params)
|
||||
openToolTip(usr,src,params,title = name,content = desc,theme = alerttooltipstyle)
|
||||
|
||||
|
||||
/obj/screen/alert/MouseExited()
|
||||
closeToolTip(usr)
|
||||
|
||||
|
||||
//Gas alerts
|
||||
/obj/screen/alert/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 = "oxy"
|
||||
|
||||
/obj/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_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
|
||||
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
|
||||
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/tox_in_air
|
||||
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 = "tox_in_air"
|
||||
//End gas alerts
|
||||
|
||||
|
||||
/obj/screen/alert/fat
|
||||
name = "Fat"
|
||||
desc = "You ate too much food, lardass. Run around the station and lose some weight."
|
||||
icon_state = "fat"
|
||||
|
||||
/obj/screen/alert/hungry
|
||||
name = "Hungry"
|
||||
desc = "Some food would be good right about now."
|
||||
icon_state = "hungry"
|
||||
|
||||
/obj/screen/alert/starving
|
||||
name = "Starving"
|
||||
desc = "You're severely malnourished. The hunger pains make moving around a chore."
|
||||
icon_state = "starving"
|
||||
|
||||
/obj/screen/alert/hot
|
||||
name = "Too Hot"
|
||||
desc = "You're flaming hot! Get somewhere cooler and take off any insulating clothing like a fire suit."
|
||||
icon_state = "hot"
|
||||
|
||||
/obj/screen/alert/cold
|
||||
name = "Too Cold"
|
||||
desc = "You're freezing cold! Get somewhere warmer and take off any insulating clothing like a space suit."
|
||||
icon_state = "cold"
|
||||
|
||||
/obj/screen/alert/lowpressure
|
||||
name = "Low Pressure"
|
||||
desc = "The air around you is hazardously thin. A space suit would protect you."
|
||||
icon_state = "lowpressure"
|
||||
|
||||
/obj/screen/alert/highpressure
|
||||
name = "High Pressure"
|
||||
desc = "The air around you is hazardously thick. A fire suit would protect you."
|
||||
icon_state = "highpressure"
|
||||
|
||||
/obj/screen/alert/blind
|
||||
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
|
||||
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 //Not implemented
|
||||
name = "Drunk"
|
||||
desc = "All that alcohol you've been drinking is impairing your speech, motor skills, and mental cognition. Make sure to act like it."
|
||||
icon_state = "drunk"
|
||||
|
||||
/obj/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()
|
||||
if(isliving(usr))
|
||||
var/mob/living/carbon/human/M = usr
|
||||
return M.help_shake_act(M)
|
||||
|
||||
/obj/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
|
||||
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 \
|
||||
magboots would let you walk around normally on the floor. Barring those, you can throw things, use a fire extinguisher, \
|
||||
or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
icon_state = "weightless"
|
||||
|
||||
/obj/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()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
return L.resist()
|
||||
|
||||
|
||||
//ALIENS
|
||||
|
||||
/obj/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
|
||||
// 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
|
||||
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"
|
||||
alerttooltipstyle = "alien"
|
||||
|
||||
//BLOBS
|
||||
|
||||
/obj/screen/alert/nofactory
|
||||
name = "No Factory"
|
||||
desc = "You have no factory, and are slowly dying!"
|
||||
icon_state = "blobbernaut_nofactory"
|
||||
alerttooltipstyle = "blob"
|
||||
|
||||
//GUARDIANS
|
||||
|
||||
/obj/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
|
||||
name = "Stealth Ready"
|
||||
desc = "You are ready to enter stealth!"
|
||||
icon_state = "guardian_canstealth"
|
||||
alerttooltipstyle = "parasite"
|
||||
|
||||
/obj/screen/alert/instealth
|
||||
name = "In Stealth"
|
||||
desc = "You are in stealth and your next attack will do bonus damage!"
|
||||
icon_state = "guardian_instealth"
|
||||
alerttooltipstyle = "parasite"
|
||||
|
||||
//SILICONS
|
||||
|
||||
/obj/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
|
||||
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
|
||||
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"
|
||||
|
||||
//Need to cover all use cases - emag, illegal upgrade module, malf AI hack, traitor cyborg
|
||||
/obj/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
|
||||
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
|
||||
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
|
||||
|
||||
//MECHS
|
||||
|
||||
/obj/screen/alert/low_mech_integrity
|
||||
name = "Mech Damaged"
|
||||
desc = "Mech integrity is low."
|
||||
icon_state = "low_mech_integrity"
|
||||
|
||||
|
||||
//GHOSTS
|
||||
//TODO: expand this system to replace the pollCandidates/CheckAntagonist/"choose quickly"/etc Yes/No messages
|
||||
/obj/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()
|
||||
if(!usr || !usr.client) return
|
||||
var/mob/dead/observer/G = usr
|
||||
G.reenter_corpse()
|
||||
|
||||
/obj/screen/alert/notify_action
|
||||
name = "Body created"
|
||||
desc = "A body was created. You can enter it."
|
||||
icon_state = "template"
|
||||
timeout = 300
|
||||
var/atom/target = null
|
||||
var/action = NOTIFY_JUMP
|
||||
|
||||
/obj/screen/alert/notify_action/Click()
|
||||
if(!usr || !usr.client) return
|
||||
if(!target) return
|
||||
var/mob/dead/observer/G = usr
|
||||
if(!istype(G)) return
|
||||
switch(action)
|
||||
if(NOTIFY_ATTACK)
|
||||
target.attack_ghost(G)
|
||||
if(NOTIFY_JUMP)
|
||||
var/turf/T = get_turf(target)
|
||||
if(T && isturf(T))
|
||||
G.loc = T
|
||||
if(NOTIFY_ORBIT)
|
||||
G.ManualFollow(target)
|
||||
|
||||
//OBJECT-BASED
|
||||
|
||||
/obj/screen/alert/restrained/buckled
|
||||
name = "Buckled"
|
||||
desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed."
|
||||
|
||||
/obj/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
|
||||
name = "Legcuffed"
|
||||
desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself."
|
||||
|
||||
/obj/screen/alert/restrained/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
return L.resist()
|
||||
// PRIVATE = only edit, use, or override these if you're editing the system as a whole
|
||||
|
||||
// Re-render all alerts - also called in /datum/hud/show_hud() because it's needed there
|
||||
/datum/hud/proc/reorganize_alerts()
|
||||
var/list/alerts = mymob.alerts
|
||||
var/icon_pref
|
||||
if(!hud_shown)
|
||||
for(var/i = 1, i <= alerts.len, i++)
|
||||
mymob.client.screen -= alerts[alerts[i]]
|
||||
return 1
|
||||
for(var/i = 1, i <= alerts.len, i++)
|
||||
var/obj/screen/alert/alert = alerts[alerts[i]]
|
||||
if(alert.icon_state == "template")
|
||||
if(!icon_pref)
|
||||
icon_pref = ui_style2icon(mymob.client.prefs.UI_style)
|
||||
alert.icon = icon_pref
|
||||
switch(i)
|
||||
if(1)
|
||||
. = ui_alert1
|
||||
if(2)
|
||||
. = ui_alert2
|
||||
if(3)
|
||||
. = ui_alert3
|
||||
if(4)
|
||||
. = ui_alert4
|
||||
if(5)
|
||||
. = ui_alert5 // Right now there's 5 slots
|
||||
else
|
||||
. = ""
|
||||
alert.screen_loc = .
|
||||
mymob.client.screen |= alert
|
||||
return 1
|
||||
|
||||
/mob
|
||||
var/list/alerts = list() // contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly
|
||||
|
||||
/obj/screen/alert/Click(location, control, params)
|
||||
if(!usr || !usr.client)
|
||||
return
|
||||
var/paramslist = params2list(params)
|
||||
if(paramslist["shift"]) // screen objects don't do the normal Click() stuff so we'll cheat
|
||||
usr << "<span class='boldnotice'>[name]</span> - <span class='info'>[desc]</span>"
|
||||
return
|
||||
if(master)
|
||||
return usr.client.Click(master, location, control, params)
|
||||
|
||||
/obj/screen/alert/Destroy()
|
||||
..()
|
||||
severity = 0
|
||||
master = null
|
||||
screen_loc = ""
|
||||
return QDEL_HINT_PUTINPOOL //Don't destroy me, I have a family!
|
||||
@@ -0,0 +1,142 @@
|
||||
/obj/screen/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
|
||||
/obj/screen/alien/leap
|
||||
name = "toggle leap"
|
||||
icon_state = "leap_off"
|
||||
|
||||
/obj/screen/alien/leap/Click()
|
||||
if(istype(usr, /mob/living/carbon/alien/humanoid/hunter))
|
||||
var/mob/living/carbon/alien/humanoid/hunter/AH = usr
|
||||
AH.toggle_leap()
|
||||
|
||||
/obj/screen/alien/nightvision
|
||||
name = "toggle night-vision"
|
||||
icon_state = "nightvision1"
|
||||
screen_loc = ui_alien_nightvision
|
||||
|
||||
/obj/screen/alien/nightvision/Click()
|
||||
var/mob/living/carbon/alien/A = usr
|
||||
var/obj/effect/proc_holder/alien/nightvisiontoggle/T = locate() in A.abilities
|
||||
if(T)
|
||||
T.fire(A)
|
||||
|
||||
|
||||
/obj/screen/alien/plasma_display
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "power_display2"
|
||||
name = "plasma stored"
|
||||
screen_loc = ui_alienplasmadisplay
|
||||
|
||||
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner)
|
||||
..()
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
//equippable shit
|
||||
|
||||
//hands
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = 'icons/mob/screen_alien.dmi'
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = 'icons/mob/screen_alien.dmi'
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
//begin buttons
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.icon_state = "swap_1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/act_intent/alien()
|
||||
using.icon_state = mymob.a_intent
|
||||
static_inventory += using
|
||||
action_intent = using
|
||||
|
||||
if(istype(mymob, /mob/living/carbon/alien/humanoid/hunter))
|
||||
var/mob/living/carbon/alien/humanoid/hunter/H = mymob
|
||||
H.leap_icon = new /obj/screen/alien/leap()
|
||||
H.leap_icon.screen_loc = ui_alien_storage_r
|
||||
static_inventory += H.leap_icon
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/resist()
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += using
|
||||
|
||||
throw_icon = new /obj/screen/throw_catch()
|
||||
throw_icon.icon = 'icons/mob/screen_alien.dmi'
|
||||
throw_icon.screen_loc = ui_drop_throw
|
||||
hotkeybuttons += throw_icon
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = 'icons/mob/screen_alien.dmi'
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
static_inventory += pull_icon
|
||||
|
||||
//begin indicators
|
||||
|
||||
healths = new /obj/screen/healths/alien()
|
||||
infodisplay += healths
|
||||
|
||||
nightvisionicon = new /obj/screen/alien/nightvision()
|
||||
infodisplay += nightvisionicon
|
||||
|
||||
alien_plasma_display = new /obj/screen/alien/plasma_display()
|
||||
infodisplay += alien_plasma_display
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/alien()
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/alien/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/alien/humanoid/H = mymob
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(H.r_hand)
|
||||
H.r_hand.screen_loc = ui_rhand
|
||||
H.client.screen += H.r_hand
|
||||
if(H.l_hand)
|
||||
H.l_hand.screen_loc = ui_lhand
|
||||
H.client.screen += H.l_hand
|
||||
else
|
||||
if(H.r_hand)
|
||||
H.r_hand.screen_loc = null
|
||||
if(H.l_hand)
|
||||
H.l_hand.screen_loc = null
|
||||
|
||||
/mob/living/carbon/alien/humanoid/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/alien(src)
|
||||
@@ -0,0 +1,29 @@
|
||||
/datum/hud/larva/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen/act_intent/alien()
|
||||
using.icon_state = mymob.a_intent
|
||||
static_inventory += using
|
||||
action_intent = using
|
||||
|
||||
healths = new /obj/screen/healths/alien()
|
||||
infodisplay += healths
|
||||
|
||||
nightvisionicon = new /obj/screen/alien/nightvision()
|
||||
nightvisionicon.screen_loc = ui_alien_nightvision
|
||||
infodisplay += nightvisionicon
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = 'icons/mob/screen_alien.dmi'
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += pull_icon
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/alien()
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
/mob/living/carbon/alien/larva/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/larva(src)
|
||||
@@ -0,0 +1,175 @@
|
||||
|
||||
/obj/screen/blob
|
||||
icon = 'icons/mob/blob.dmi'
|
||||
|
||||
/obj/screen/blob/MouseEntered(location,control,params)
|
||||
openToolTip(usr,src,params,title = name,content = desc, theme = "blob")
|
||||
|
||||
/obj/screen/blob/MouseExited()
|
||||
closeToolTip(usr)
|
||||
|
||||
/obj/screen/blob/BlobHelp
|
||||
icon_state = "ui_help"
|
||||
name = "Blob Help"
|
||||
desc = "Help on playing blob!"
|
||||
|
||||
/obj/screen/blob/BlobHelp/Click()
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
B.blob_help()
|
||||
|
||||
/obj/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()
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
B.jump_to_node()
|
||||
|
||||
/obj/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)
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
if(!B.placed)
|
||||
openToolTip(usr,src,params,title = "Place Blob Core",content = "Attempt to place your blob core at this location.", theme = "blob")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/screen/blob/JumpToCore/Click()
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
if(!B.placed)
|
||||
B.place_blob_core(B.base_point_rate, 0)
|
||||
B.transport_core()
|
||||
|
||||
/obj/screen/blob/Blobbernaut
|
||||
icon_state = "ui_blobbernaut"
|
||||
name = "Produce Blobbernaut (40)"
|
||||
desc = "Produces a strong, smart blobbernaut from a factory blob for 40 points.<br>The factory blob used will become fragile and unable to produce spores."
|
||||
|
||||
/obj/screen/blob/Blobbernaut/Click()
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
B.create_blobbernaut()
|
||||
|
||||
/obj/screen/blob/ResourceBlob
|
||||
icon_state = "ui_resource"
|
||||
name = "Produce Resource Blob (40)"
|
||||
desc = "Produces a resource blob for 40 points.<br>Resource blobs will give you points every few seconds."
|
||||
|
||||
/obj/screen/blob/ResourceBlob/Click()
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
B.create_resource()
|
||||
|
||||
/obj/screen/blob/NodeBlob
|
||||
icon_state = "ui_node"
|
||||
name = "Produce Node Blob (60)"
|
||||
desc = "Produces a node blob for 60 points.<br>Node blobs will expand and activate nearby resource and factory blobs."
|
||||
|
||||
/obj/screen/blob/NodeBlob/Click()
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
B.create_node()
|
||||
|
||||
/obj/screen/blob/FactoryBlob
|
||||
icon_state = "ui_factory"
|
||||
name = "Produce Factory Blob (60)"
|
||||
desc = "Produces a factory blob for 60 points.<br>Factory blobs will produce spores every few seconds."
|
||||
|
||||
/obj/screen/blob/FactoryBlob/Click()
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
B.create_factory()
|
||||
|
||||
/obj/screen/blob/ReadaptChemical
|
||||
icon_state = "ui_chemswap"
|
||||
name = "Readapt Chemical (40)"
|
||||
desc = "Randomly rerolls your chemical for 40 points."
|
||||
|
||||
/obj/screen/blob/ReadaptChemical/MouseEntered(location,control,params)
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
if(B.free_chem_rerolls)
|
||||
openToolTip(usr,src,params,title = "Readapt Chemical (FREE)",content = "Randomly rerolls your chemical for free.", theme = "blob")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/screen/blob/ReadaptChemical/Click()
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
B.chemical_reroll()
|
||||
|
||||
/obj/screen/blob/RelocateCore
|
||||
icon_state = "ui_swap"
|
||||
name = "Relocate Core (80)"
|
||||
desc = "Swaps a node and your core for 80 points."
|
||||
|
||||
/obj/screen/blob/RelocateCore/Click()
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
B.relocate_core()
|
||||
|
||||
/datum/hud/blob_overmind/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
blobpwrdisplay = new /obj/screen()
|
||||
blobpwrdisplay.name = "blob power"
|
||||
blobpwrdisplay.icon_state = "block"
|
||||
blobpwrdisplay.screen_loc = ui_health
|
||||
blobpwrdisplay.mouse_opacity = 0
|
||||
blobpwrdisplay.layer = ABOVE_HUD_LAYER
|
||||
infodisplay += blobpwrdisplay
|
||||
|
||||
healths = new /obj/screen/healths/blob()
|
||||
infodisplay += healths
|
||||
|
||||
using = new /obj/screen/blob/BlobHelp()
|
||||
using.screen_loc = "WEST:6,NORTH:-3"
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/JumpToNode()
|
||||
using.screen_loc = ui_inventory
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/JumpToCore()
|
||||
using.screen_loc = ui_zonesel
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/Blobbernaut()
|
||||
using.screen_loc = ui_belt
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/ResourceBlob()
|
||||
using.screen_loc = ui_back
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/NodeBlob()
|
||||
using.screen_loc = ui_lhand
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/FactoryBlob()
|
||||
using.screen_loc = ui_rhand
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/ReadaptChemical()
|
||||
using.screen_loc = ui_storage1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/RelocateCore()
|
||||
using.screen_loc = ui_storage2
|
||||
static_inventory += using
|
||||
|
||||
|
||||
/mob/camera/blob/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/blob_overmind(src)
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
/datum/hud/blobbernaut/New(mob/owner)
|
||||
..()
|
||||
|
||||
blobpwrdisplay = new /obj/screen/healths/blob/naut/core()
|
||||
infodisplay += blobpwrdisplay
|
||||
|
||||
healths = new /obj/screen/healths/blob/naut()
|
||||
infodisplay += healths
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/blobbernaut(src)
|
||||
@@ -0,0 +1,82 @@
|
||||
|
||||
//Soul counter is stored with the humans, it does weird when you place it here apparently...
|
||||
|
||||
|
||||
/datum/hud/devil/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drone_drop
|
||||
static_inventory += using
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_drone_pull
|
||||
static_inventory += pull_icon
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1_m"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.layer = HUD_LAYER
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.layer = HUD_LAYER
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.update_icon(mymob)
|
||||
|
||||
lingchemdisplay = new /obj/screen/ling/chems()
|
||||
devilsouldisplay = new /obj/screen/devil/soul_counter
|
||||
infodisplay += devilsouldisplay
|
||||
|
||||
|
||||
/datum/hud/devil/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/true_devil/D = mymob
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = ui_rhand
|
||||
D.client.screen += D.r_hand
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = ui_lhand
|
||||
D.client.screen += D.l_hand
|
||||
else
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = null
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = null
|
||||
|
||||
/mob/living/carbon/true_devil/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/devil(src, ui_style2icon(client.prefs.UI_style))
|
||||
@@ -0,0 +1,111 @@
|
||||
/datum/hud/drone/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drone_drop
|
||||
static_inventory += using
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_drone_pull
|
||||
static_inventory += pull_icon
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "internal storage"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "suit_storage"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_drone_storage
|
||||
inv_box.slot_id = slot_drone_storage
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "head/mask"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "mask"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_drone_head
|
||||
inv_box.slot_id = slot_head
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1_m"
|
||||
using.screen_loc = ui_swaphand1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.update_icon(mymob)
|
||||
|
||||
using = new /obj/screen/inventory/craft
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
|
||||
/datum/hud/drone/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/simple_animal/drone/D = mymob
|
||||
|
||||
if(hud_shown)
|
||||
if(D.internal_storage)
|
||||
D.internal_storage.screen_loc = ui_drone_storage
|
||||
D.client.screen += D.internal_storage
|
||||
if(D.head)
|
||||
D.head.screen_loc = ui_drone_head
|
||||
D.client.screen += D.head
|
||||
else
|
||||
if(D.internal_storage)
|
||||
D.internal_storage.screen_loc = null
|
||||
if(D.head)
|
||||
D.head.screen_loc = null
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = ui_rhand
|
||||
D.client.screen += D.r_hand
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = ui_lhand
|
||||
D.client.screen += D.l_hand
|
||||
else
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = null
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = null
|
||||
|
||||
/mob/living/simple_animal/drone/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/drone(src, ui_style2icon(client.prefs.UI_style))
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
/mob
|
||||
var/list/screens = list()
|
||||
|
||||
/mob/proc/overlay_fullscreen(category, type, severity)
|
||||
var/obj/screen/fullscreen/screen
|
||||
if(screens[category])
|
||||
screen = screens[category]
|
||||
if(screen.type != type)
|
||||
clear_fullscreen(category, FALSE)
|
||||
return .()
|
||||
else if(!severity || severity == screen.severity)
|
||||
return null
|
||||
else
|
||||
screen = PoolOrNew(type)
|
||||
|
||||
screen.icon_state = "[initial(screen.icon_state)][severity]"
|
||||
screen.severity = severity
|
||||
|
||||
screens[category] = screen
|
||||
if(client && stat != DEAD)
|
||||
client.screen += screen
|
||||
return screen
|
||||
|
||||
/mob/proc/clear_fullscreen(category, animated = 10)
|
||||
var/obj/screen/fullscreen/screen = screens[category]
|
||||
if(!screen)
|
||||
return
|
||||
|
||||
screens -= category
|
||||
|
||||
if(animated)
|
||||
spawn(0)
|
||||
animate(screen, alpha = 0, time = animated)
|
||||
sleep(animated)
|
||||
if(client)
|
||||
client.screen -= screen
|
||||
qdel(screen)
|
||||
else
|
||||
if(client)
|
||||
client.screen -= screen
|
||||
qdel(screen)
|
||||
|
||||
/mob/proc/clear_fullscreens()
|
||||
for(var/category in screens)
|
||||
clear_fullscreen(category)
|
||||
|
||||
/mob/proc/hide_fullscreens()
|
||||
if(client)
|
||||
for(var/category in screens)
|
||||
client.screen -= screens[category]
|
||||
|
||||
/mob/proc/reload_fullscreen()
|
||||
if(client && stat != DEAD) //dead mob do not see any of the fullscreen overlays that he has.
|
||||
for(var/category in screens)
|
||||
client.screen |= screens[category]
|
||||
|
||||
/obj/screen/fullscreen
|
||||
icon = 'icons/mob/screen_full.dmi'
|
||||
icon_state = "default"
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
layer = FULLSCREEN_LAYER
|
||||
mouse_opacity = 0
|
||||
var/severity = 0
|
||||
|
||||
/obj/screen/fullscreen/Destroy()
|
||||
..()
|
||||
severity = 0
|
||||
return QDEL_HINT_PUTINPOOL
|
||||
|
||||
/obj/screen/fullscreen/brute
|
||||
icon_state = "brutedamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
|
||||
/obj/screen/fullscreen/oxy
|
||||
icon_state = "oxydamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
|
||||
/obj/screen/fullscreen/crit
|
||||
icon_state = "passage"
|
||||
layer = CRIT_LAYER
|
||||
|
||||
/obj/screen/fullscreen/blind
|
||||
icon_state = "blackimageoverlay"
|
||||
layer = BLIND_LAYER
|
||||
|
||||
/obj/screen/fullscreen/impaired
|
||||
icon_state = "impairedoverlay"
|
||||
|
||||
/obj/screen/fullscreen/blurry
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "blurry"
|
||||
|
||||
/obj/screen/fullscreen/flash
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "flash"
|
||||
|
||||
/obj/screen/fullscreen/flash/noise
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "noise"
|
||||
|
||||
/obj/screen/fullscreen/high
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "druggy"
|
||||
@@ -0,0 +1,63 @@
|
||||
//Used for normal mobs that have hands.
|
||||
/datum/hud/dextrous/New(mob/living/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drone_drop
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1_m"
|
||||
using.screen_loc = ui_swaphand1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/dextrous/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/D = mymob
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = ui_rhand
|
||||
D.client.screen += D.r_hand
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = ui_lhand
|
||||
D.client.screen += D.l_hand
|
||||
else
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = null
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = null
|
||||
@@ -0,0 +1,74 @@
|
||||
/obj/screen/ghost
|
||||
icon = 'icons/mob/screen_ghost.dmi'
|
||||
|
||||
/obj/screen/ghost/MouseEntered()
|
||||
flick(icon_state + "_anim", src)
|
||||
|
||||
/obj/screen/ghost/jumptomob
|
||||
name = "Jump to mob"
|
||||
icon_state = "jumptomob"
|
||||
|
||||
/obj/screen/ghost/jumptomob/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.jumptomob()
|
||||
|
||||
/obj/screen/ghost/orbit
|
||||
name = "Orbit"
|
||||
icon_state = "orbit"
|
||||
|
||||
/obj/screen/ghost/orbit/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.follow()
|
||||
|
||||
/obj/screen/ghost/reenter_corpse
|
||||
name = "Reenter corpse"
|
||||
icon_state = "reenter_corpse"
|
||||
|
||||
/obj/screen/ghost/reenter_corpse/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.reenter_corpse()
|
||||
|
||||
/obj/screen/ghost/teleport
|
||||
name = "Teleport"
|
||||
icon_state = "teleport"
|
||||
|
||||
/obj/screen/ghost/teleport/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.dead_tele()
|
||||
|
||||
/datum/hud/ghost/New(mob/owner)
|
||||
..()
|
||||
var/mob/dead/observer/G = mymob
|
||||
if(!G.client.prefs.ghost_hud)
|
||||
mymob.client.screen = null
|
||||
return
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen/ghost/jumptomob()
|
||||
using.screen_loc = ui_ghost_jumptomob
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/orbit()
|
||||
using.screen_loc = ui_ghost_orbit
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/reenter_corpse()
|
||||
using.screen_loc = ui_ghost_reenter_corpse
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/teleport()
|
||||
using.screen_loc = ui_ghost_teleport
|
||||
static_inventory += using
|
||||
|
||||
|
||||
/datum/hud/ghost/show_hud()
|
||||
var/mob/dead/observer/G = mymob
|
||||
mymob.client.screen = list()
|
||||
if(!G.client.prefs.ghost_hud)
|
||||
return
|
||||
mymob.client.screen += static_inventory
|
||||
|
||||
/mob/dead/observer/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/ghost(src)
|
||||
@@ -0,0 +1,96 @@
|
||||
|
||||
/datum/hud/guardian/New(mob/living/simple_animal/hostile/guardian/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
healths = new /obj/screen/healths/guardian()
|
||||
infodisplay += healths
|
||||
|
||||
using = new /obj/screen/guardian/Manifest()
|
||||
using.screen_loc = ui_rhand
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/guardian/Recall()
|
||||
using.screen_loc = ui_lhand
|
||||
static_inventory += using
|
||||
|
||||
using = new owner.toggle_button_type()
|
||||
using.screen_loc = ui_storage1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/guardian/ToggleLight()
|
||||
using.screen_loc = ui_inventory
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/guardian/Communicate()
|
||||
using.screen_loc = ui_back
|
||||
static_inventory += using
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/guardian(src)
|
||||
|
||||
|
||||
/obj/screen/guardian
|
||||
icon = 'icons/mob/guardian.dmi'
|
||||
|
||||
/obj/screen/guardian/Manifest
|
||||
icon_state = "manifest"
|
||||
name = "Manifest"
|
||||
desc = "Spring forth into battle!"
|
||||
|
||||
/obj/screen/guardian/Manifest/Click()
|
||||
if(isguardian(usr))
|
||||
var/mob/living/simple_animal/hostile/guardian/G = usr
|
||||
G.Manifest()
|
||||
|
||||
|
||||
/obj/screen/guardian/Recall
|
||||
icon_state = "recall"
|
||||
name = "Recall"
|
||||
desc = "Return to your user."
|
||||
|
||||
/obj/screen/guardian/Recall/Click()
|
||||
if(isguardian(usr))
|
||||
var/mob/living/simple_animal/hostile/guardian/G = usr
|
||||
G.Recall()
|
||||
|
||||
/obj/screen/guardian/ToggleMode
|
||||
icon_state = "toggle"
|
||||
name = "Toggle Mode"
|
||||
desc = "Switch between ability modes."
|
||||
|
||||
/obj/screen/guardian/ToggleMode/Click()
|
||||
if(isguardian(usr))
|
||||
var/mob/living/simple_animal/hostile/guardian/G = usr
|
||||
G.ToggleMode()
|
||||
|
||||
/obj/screen/guardian/ToggleMode/Inactive
|
||||
icon_state = "notoggle" //greyed out so it doesn't look like it'll work
|
||||
|
||||
/obj/screen/guardian/ToggleMode/Assassin
|
||||
icon_state = "stealth"
|
||||
name = "Toggle Stealth"
|
||||
desc = "Enter or exit stealth."
|
||||
|
||||
/obj/screen/guardian/Communicate
|
||||
icon_state = "communicate"
|
||||
name = "Communicate"
|
||||
desc = "Communicate telepathically with your user."
|
||||
|
||||
/obj/screen/guardian/Communicate/Click()
|
||||
if(isguardian(usr))
|
||||
var/mob/living/simple_animal/hostile/guardian/G = usr
|
||||
G.Communicate()
|
||||
|
||||
|
||||
/obj/screen/guardian/ToggleLight
|
||||
icon_state = "light"
|
||||
name = "Toggle Light"
|
||||
desc = "Glow like star dust."
|
||||
|
||||
/obj/screen/guardian/ToggleLight/Click()
|
||||
if(isguardian(usr))
|
||||
var/mob/living/simple_animal/hostile/guardian/G = usr
|
||||
G.ToggleLight()
|
||||
@@ -0,0 +1,208 @@
|
||||
/*
|
||||
The hud datum
|
||||
Used to show and hide huds for all the different mob types,
|
||||
including inventories and item quick actions.
|
||||
*/
|
||||
|
||||
/datum/hud
|
||||
var/mob/mymob
|
||||
|
||||
var/hud_shown = 1 //Used for the HUD toggle (F12)
|
||||
var/hud_version = 1 //Current displayed version of the HUD
|
||||
var/inventory_shown = 1 //the inventory
|
||||
var/show_intent_icons = 0
|
||||
var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
|
||||
|
||||
var/obj/screen/ling/chems/lingchemdisplay
|
||||
var/obj/screen/ling/sting/lingstingdisplay
|
||||
|
||||
var/obj/screen/blobpwrdisplay
|
||||
|
||||
var/obj/screen/alien_plasma_display
|
||||
|
||||
var/obj/screen/devil/soul_counter/devilsouldisplay
|
||||
|
||||
var/obj/screen/deity_power_display
|
||||
var/obj/screen/deity_follower_display
|
||||
|
||||
var/obj/screen/nightvisionicon
|
||||
var/obj/screen/action_intent
|
||||
var/obj/screen/zone_select
|
||||
var/obj/screen/pull_icon
|
||||
var/obj/screen/throw_icon
|
||||
var/obj/screen/module_store_icon
|
||||
|
||||
var/list/static_inventory = list() //the screen objects which are static
|
||||
var/list/toggleable_inventory = list() //the screen objects which can be hidden
|
||||
var/list/obj/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys
|
||||
var/list/infodisplay = list() //the screen objects that display mob info (health, alien plasma, etc...)
|
||||
var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...)
|
||||
var/list/inv_slots[slots_amt] // /obj/screen/inventory objects, ordered by their slot ID.
|
||||
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = 0
|
||||
|
||||
var/obj/screen/healths
|
||||
var/obj/screen/healthdoll
|
||||
var/obj/screen/internals
|
||||
|
||||
/datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
hide_actions_toggle = new
|
||||
hide_actions_toggle.InitialiseIcon(mymob)
|
||||
|
||||
/datum/hud/Destroy()
|
||||
if(mymob.hud_used == src)
|
||||
mymob.hud_used = null
|
||||
|
||||
qdel(hide_actions_toggle)
|
||||
hide_actions_toggle = null
|
||||
|
||||
qdel(module_store_icon)
|
||||
module_store_icon = null
|
||||
|
||||
if(static_inventory.len)
|
||||
for(var/thing in static_inventory)
|
||||
qdel(thing)
|
||||
static_inventory.Cut()
|
||||
|
||||
inv_slots.Cut()
|
||||
action_intent = null
|
||||
zone_select = null
|
||||
pull_icon = null
|
||||
|
||||
if(toggleable_inventory.len)
|
||||
for(var/thing in toggleable_inventory)
|
||||
qdel(thing)
|
||||
toggleable_inventory.Cut()
|
||||
|
||||
if(hotkeybuttons.len)
|
||||
for(var/thing in hotkeybuttons)
|
||||
qdel(thing)
|
||||
hotkeybuttons.Cut()
|
||||
|
||||
throw_icon = null
|
||||
|
||||
if(infodisplay.len)
|
||||
for(var/thing in infodisplay)
|
||||
qdel(thing)
|
||||
infodisplay.Cut()
|
||||
|
||||
healths = null
|
||||
healthdoll = null
|
||||
internals = null
|
||||
lingchemdisplay = null
|
||||
devilsouldisplay = null
|
||||
lingstingdisplay = null
|
||||
blobpwrdisplay = null
|
||||
alien_plasma_display = null
|
||||
deity_power_display = null
|
||||
deity_follower_display = null
|
||||
nightvisionicon = null
|
||||
|
||||
if(screenoverlays.len)
|
||||
for(var/thing in screenoverlays)
|
||||
qdel(thing)
|
||||
screenoverlays.Cut()
|
||||
mymob = null
|
||||
return ..()
|
||||
|
||||
/mob/proc/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud(src)
|
||||
|
||||
//Version denotes which style should be displayed. blank or 0 means "next version"
|
||||
/datum/hud/proc/show_hud(version = 0)
|
||||
if(!ismob(mymob))
|
||||
return 0
|
||||
if(!mymob.client)
|
||||
return 0
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
var/display_hud_version = version
|
||||
if(!display_hud_version) //If 0 or blank, display the next hud version
|
||||
display_hud_version = hud_version + 1
|
||||
if(display_hud_version > HUD_VERSIONS) //If the requested version number is greater than the available versions, reset back to the first version
|
||||
display_hud_version = 1
|
||||
|
||||
switch(display_hud_version)
|
||||
if(HUD_STYLE_STANDARD) //Default HUD
|
||||
hud_shown = 1 //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
mymob.client.screen += static_inventory
|
||||
if(toggleable_inventory.len && inventory_shown)
|
||||
mymob.client.screen += toggleable_inventory
|
||||
if(hotkeybuttons.len && !hotkey_ui_hidden)
|
||||
mymob.client.screen += hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
mymob.client.screen += infodisplay
|
||||
|
||||
mymob.client.screen += hide_actions_toggle
|
||||
|
||||
if(action_intent)
|
||||
action_intent.screen_loc = initial(action_intent.screen_loc) //Restore intent selection to the original position
|
||||
|
||||
if(HUD_STYLE_REDUCED) //Reduced HUD
|
||||
hud_shown = 0 //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
mymob.client.screen -= static_inventory
|
||||
if(toggleable_inventory.len)
|
||||
mymob.client.screen -= toggleable_inventory
|
||||
if(hotkeybuttons.len)
|
||||
mymob.client.screen -= hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
mymob.client.screen += infodisplay
|
||||
|
||||
//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
|
||||
if(inv_slots[slot_l_hand])
|
||||
mymob.client.screen += inv_slots[slot_l_hand] //we want the hands to be visible
|
||||
if(inv_slots[slot_r_hand])
|
||||
mymob.client.screen += inv_slots[slot_r_hand] //we want the hands to be visible
|
||||
if(action_intent)
|
||||
mymob.client.screen += action_intent //we want the intent switcher visible
|
||||
action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
|
||||
|
||||
if(HUD_STYLE_NOHUD) //No HUD
|
||||
hud_shown = 0 //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
mymob.client.screen -= static_inventory
|
||||
if(toggleable_inventory.len)
|
||||
mymob.client.screen -= toggleable_inventory
|
||||
if(hotkeybuttons.len)
|
||||
mymob.client.screen -= hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
mymob.client.screen -= infodisplay
|
||||
|
||||
hud_version = display_hud_version
|
||||
persistant_inventory_update()
|
||||
mymob.update_action_buttons(1)
|
||||
reorganize_alerts()
|
||||
mymob.reload_fullscreen()
|
||||
|
||||
|
||||
/datum/hud/human/show_hud(version = 0)
|
||||
..()
|
||||
hidden_inventory_update()
|
||||
|
||||
/datum/hud/robot/show_hud(version = 0)
|
||||
..()
|
||||
update_robot_modules_display()
|
||||
|
||||
/datum/hud/proc/hidden_inventory_update()
|
||||
return
|
||||
|
||||
/datum/hud/proc/persistant_inventory_update()
|
||||
return
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12()
|
||||
set name = "F12"
|
||||
set hidden = 1
|
||||
|
||||
if(hud_used && client)
|
||||
hud_used.show_hud() //Shows the next hud preset
|
||||
usr << "<span class ='info'>Switched HUD mode. Press F12 to toggle.</span>"
|
||||
else
|
||||
usr << "<span class ='warning'>This mob type does not use a HUD.</span>"
|
||||
|
||||
@@ -0,0 +1,414 @@
|
||||
/obj/screen/human
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
|
||||
/obj/screen/human/toggle
|
||||
name = "toggle"
|
||||
icon_state = "toggle"
|
||||
|
||||
/obj/screen/human/toggle/Click()
|
||||
if(usr.hud_used.inventory_shown)
|
||||
usr.hud_used.inventory_shown = 0
|
||||
usr.client.screen -= usr.hud_used.toggleable_inventory
|
||||
else
|
||||
usr.hud_used.inventory_shown = 1
|
||||
usr.client.screen += usr.hud_used.toggleable_inventory
|
||||
|
||||
usr.hud_used.hidden_inventory_update()
|
||||
|
||||
/obj/screen/human/equip
|
||||
name = "equip"
|
||||
icon_state = "act_equip"
|
||||
|
||||
/obj/screen/human/equip/Click()
|
||||
if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 1
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.quick_equip()
|
||||
|
||||
/obj/screen/devil
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/obj/screen/devil/soul_counter
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
name = "souls owned"
|
||||
icon_state = "Devil-6"
|
||||
screen_loc = ui_devilsouldisplay
|
||||
|
||||
/obj/screen/devil/soul_counter/proc/update_counter(souls = 0)
|
||||
invisibility = 0
|
||||
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#FF0000'>[souls]</font></div>"
|
||||
switch(souls)
|
||||
if(0,null)
|
||||
icon_state = "Devil-1"
|
||||
if(1,2)
|
||||
icon_state = "Devil-2"
|
||||
if(3 to 5)
|
||||
icon_state = "Devil-3"
|
||||
if(6 to 8)
|
||||
icon_state = "Devil-4"
|
||||
if(9 to INFINITY)
|
||||
icon_state = "Devil-5"
|
||||
else
|
||||
icon_state = "Devil-6"
|
||||
|
||||
/obj/screen/devil/soul_counter/proc/clear()
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/obj/screen/ling
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/obj/screen/ling/sting
|
||||
name = "current sting"
|
||||
screen_loc = ui_lingstingdisplay
|
||||
|
||||
/obj/screen/ling/sting/Click()
|
||||
var/mob/living/carbon/U = usr
|
||||
U.unset_sting()
|
||||
|
||||
/obj/screen/ling/chems
|
||||
name = "chemical storage"
|
||||
icon_state = "power_display"
|
||||
screen_loc = ui_lingchemdisplay
|
||||
|
||||
/mob/living/carbon/human/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/human(src, ui_style2icon(client.prefs.UI_style))
|
||||
|
||||
|
||||
/datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/inventory/craft
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/act_intent()
|
||||
using.icon_state = mymob.a_intent
|
||||
static_inventory += using
|
||||
action_intent = using
|
||||
|
||||
using = new /obj/screen/mov_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "i_clothing"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.slot_id = slot_w_uniform
|
||||
inv_box.icon_state = "uniform"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_iclothing
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "o_clothing"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.slot_id = slot_wear_suit
|
||||
inv_box.icon_state = "suit"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_oclothing
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "id"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "id"
|
||||
// inv_box.icon_full = "template_small"
|
||||
inv_box.screen_loc = ui_id
|
||||
inv_box.slot_id = slot_wear_id
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "mask"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "mask"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_mask
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "back"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "back"
|
||||
// inv_box.icon_full = "template_small"
|
||||
inv_box.screen_loc = ui_back
|
||||
inv_box.slot_id = slot_back
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "storage1"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "pocket"
|
||||
// inv_box.icon_full = "template_small"
|
||||
inv_box.screen_loc = ui_storage1
|
||||
inv_box.slot_id = slot_l_store
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "storage2"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "pocket"
|
||||
// inv_box.icon_full = "template_small"
|
||||
inv_box.screen_loc = ui_storage2
|
||||
inv_box.slot_id = slot_r_store
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "suit storage"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "suit_storage"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_sstore1
|
||||
inv_box.slot_id = slot_s_store
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/resist()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += using
|
||||
|
||||
using = new /obj/screen/human/toggle()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_inventory
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/human/equip()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_equip
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "gloves"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "gloves"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_gloves
|
||||
inv_box.slot_id = slot_gloves
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "eyes"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "glasses"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_glasses
|
||||
inv_box.slot_id = slot_glasses
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "ears"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "ears"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_ears
|
||||
inv_box.slot_id = slot_ears
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "head"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_head
|
||||
inv_box.slot_id = slot_head
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "shoes"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "shoes"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_shoes
|
||||
inv_box.slot_id = slot_shoes
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "belt"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "belt"
|
||||
// inv_box.icon_full = "template_small"
|
||||
inv_box.screen_loc = ui_belt
|
||||
inv_box.slot_id = slot_belt
|
||||
static_inventory += inv_box
|
||||
|
||||
throw_icon = new /obj/screen/throw_catch()
|
||||
throw_icon.icon = ui_style
|
||||
throw_icon.screen_loc = ui_drop_throw
|
||||
hotkeybuttons += throw_icon
|
||||
|
||||
internals = new /obj/screen/internals()
|
||||
infodisplay += internals
|
||||
|
||||
healths = new /obj/screen/healths()
|
||||
infodisplay += healths
|
||||
|
||||
healthdoll = new /obj/screen/healthdoll()
|
||||
infodisplay += healthdoll
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
static_inventory += pull_icon
|
||||
|
||||
lingchemdisplay = new /obj/screen/ling/chems()
|
||||
infodisplay += lingchemdisplay
|
||||
|
||||
lingstingdisplay = new /obj/screen/ling/sting()
|
||||
infodisplay += lingstingdisplay
|
||||
|
||||
devilsouldisplay = new /obj/screen/devil/soul_counter
|
||||
infodisplay += devilsouldisplay
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
inventory_shown = 0
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/human/hidden_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/human/H = mymob
|
||||
if(inventory_shown && hud_shown)
|
||||
if(H.shoes)
|
||||
H.shoes.screen_loc = ui_shoes
|
||||
H.client.screen += H.shoes
|
||||
if(H.gloves)
|
||||
H.gloves.screen_loc = ui_gloves
|
||||
H.client.screen += H.gloves
|
||||
if(H.ears)
|
||||
H.ears.screen_loc = ui_ears
|
||||
H.client.screen += H.ears
|
||||
if(H.glasses)
|
||||
H.glasses.screen_loc = ui_glasses
|
||||
H.client.screen += H.glasses
|
||||
if(H.w_uniform)
|
||||
H.w_uniform.screen_loc = ui_iclothing
|
||||
H.client.screen += H.w_uniform
|
||||
if(H.wear_suit)
|
||||
H.wear_suit.screen_loc = ui_oclothing
|
||||
H.client.screen += H.wear_suit
|
||||
if(H.wear_mask)
|
||||
H.wear_mask.screen_loc = ui_mask
|
||||
H.client.screen += H.wear_mask
|
||||
if(H.head)
|
||||
H.head.screen_loc = ui_head
|
||||
H.client.screen += H.head
|
||||
else
|
||||
if(H.shoes) H.shoes.screen_loc = null
|
||||
if(H.gloves) H.gloves.screen_loc = null
|
||||
if(H.ears) H.ears.screen_loc = null
|
||||
if(H.glasses) H.glasses.screen_loc = null
|
||||
if(H.w_uniform) H.w_uniform.screen_loc = null
|
||||
if(H.wear_suit) H.wear_suit.screen_loc = null
|
||||
if(H.wear_mask) H.wear_mask.screen_loc = null
|
||||
if(H.head) H.head.screen_loc = null
|
||||
|
||||
/datum/hud/human/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/human/H = mymob
|
||||
if(hud_shown)
|
||||
if(H.s_store)
|
||||
H.s_store.screen_loc = ui_sstore1
|
||||
H.client.screen += H.s_store
|
||||
if(H.wear_id)
|
||||
H.wear_id.screen_loc = ui_id
|
||||
H.client.screen += H.wear_id
|
||||
if(H.belt)
|
||||
H.belt.screen_loc = ui_belt
|
||||
H.client.screen += H.belt
|
||||
if(H.back)
|
||||
H.back.screen_loc = ui_back
|
||||
H.client.screen += H.back
|
||||
if(H.l_store)
|
||||
H.l_store.screen_loc = ui_storage1
|
||||
H.client.screen += H.l_store
|
||||
if(H.r_store)
|
||||
H.r_store.screen_loc = ui_storage2
|
||||
H.client.screen += H.r_store
|
||||
else
|
||||
if(H.s_store)
|
||||
H.s_store.screen_loc = null
|
||||
if(H.wear_id)
|
||||
H.wear_id.screen_loc = null
|
||||
if(H.belt)
|
||||
H.belt.screen_loc = null
|
||||
if(H.back)
|
||||
H.back.screen_loc = null
|
||||
if(H.l_store)
|
||||
H.l_store.screen_loc = null
|
||||
if(H.r_store)
|
||||
H.r_store.screen_loc = null
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(H.r_hand)
|
||||
H.r_hand.screen_loc = ui_rhand
|
||||
H.client.screen += H.r_hand
|
||||
if(H.l_hand)
|
||||
H.l_hand.screen_loc = ui_lhand
|
||||
H.client.screen += H.l_hand
|
||||
else
|
||||
if(H.r_hand)
|
||||
H.r_hand.screen_loc = null
|
||||
if(H.l_hand)
|
||||
H.l_hand.screen_loc = null
|
||||
|
||||
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
|
||||
set category = "OOC"
|
||||
set name = "Toggle hotkey buttons"
|
||||
set desc = "This disables or enables the user interface buttons which can be used with hotkeys."
|
||||
|
||||
if(hud_used.hotkey_ui_hidden)
|
||||
client.screen += hud_used.hotkeybuttons
|
||||
hud_used.hotkey_ui_hidden = 0
|
||||
else
|
||||
client.screen -= hud_used.hotkeybuttons
|
||||
hud_used.hotkey_ui_hidden = 1
|
||||
@@ -0,0 +1,159 @@
|
||||
/datum/hud/monkey/New(mob/living/carbon/monkey/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/act_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = mymob.a_intent
|
||||
using.screen_loc = ui_acti
|
||||
static_inventory += using
|
||||
action_intent = using
|
||||
|
||||
using = new /obj/screen/mov_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1_m" //extra wide!
|
||||
using.screen_loc = ui_swaphand1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "mask"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "mask"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_mask
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "head"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_head
|
||||
inv_box.slot_id = slot_head
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "back"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "back"
|
||||
inv_box.icon_full = "template_small"
|
||||
inv_box.screen_loc = ui_back
|
||||
inv_box.slot_id = slot_back
|
||||
static_inventory += inv_box
|
||||
|
||||
throw_icon = new /obj/screen/throw_catch()
|
||||
throw_icon.icon = ui_style
|
||||
throw_icon.screen_loc = ui_drop_throw
|
||||
hotkeybuttons += throw_icon
|
||||
|
||||
internals = new /obj/screen/internals()
|
||||
infodisplay += internals
|
||||
|
||||
healths = new /obj/screen/healths()
|
||||
infodisplay += healths
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
static_inventory += pull_icon
|
||||
|
||||
lingchemdisplay = new /obj/screen/ling/chems()
|
||||
infodisplay += lingchemdisplay
|
||||
|
||||
lingstingdisplay = new /obj/screen/ling/sting()
|
||||
infodisplay += lingstingdisplay
|
||||
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
using = new /obj/screen/resist()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += using
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/monkey/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/monkey/M = mymob
|
||||
|
||||
if(hud_shown)
|
||||
if(M.back)
|
||||
M.back.screen_loc = ui_back
|
||||
M.client.screen += M.back
|
||||
if(M.wear_mask)
|
||||
M.wear_mask.screen_loc = ui_monkey_mask
|
||||
M.client.screen += M.wear_mask
|
||||
if(M.head)
|
||||
M.head.screen_loc = ui_monkey_head
|
||||
M.client.screen += M.head
|
||||
else
|
||||
if(M.back)
|
||||
M.back.screen_loc = null
|
||||
if(M.wear_mask)
|
||||
M.wear_mask.screen_loc = null
|
||||
if(M.head)
|
||||
M.head.screen_loc = null
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(M.r_hand)
|
||||
M.r_hand.screen_loc = ui_rhand
|
||||
M.client.screen += M.r_hand
|
||||
if(M.l_hand)
|
||||
M.l_hand.screen_loc = ui_lhand
|
||||
M.client.screen += M.l_hand
|
||||
else
|
||||
if(M.r_hand)
|
||||
M.r_hand.screen_loc = null
|
||||
if(M.l_hand)
|
||||
M.l_hand.screen_loc = null
|
||||
|
||||
/mob/living/carbon/monkey/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/monkey(src, ui_style2icon(client.prefs.UI_style))
|
||||
@@ -0,0 +1,85 @@
|
||||
|
||||
//////////////////////////
|
||||
//Movable Screen Objects//
|
||||
// By RemieRichards //
|
||||
//////////////////////////
|
||||
|
||||
|
||||
//Movable Screen Object
|
||||
//Not tied to the grid, places it's center where the cursor is
|
||||
|
||||
/obj/screen/movable
|
||||
var/snap2grid = FALSE
|
||||
var/moved = FALSE
|
||||
|
||||
//Snap Screen Object
|
||||
//Tied to the grid, snaps to the nearest turf
|
||||
|
||||
/obj/screen/movable/snap
|
||||
snap2grid = TRUE
|
||||
|
||||
|
||||
/obj/screen/movable/MouseDrop(over_object, src_location, over_location, src_control, over_control, params)
|
||||
var/list/PM = params2list(params)
|
||||
|
||||
//No screen-loc information? abort.
|
||||
if(!PM || !PM["screen-loc"])
|
||||
return
|
||||
|
||||
//Split screen-loc up into X+Pixel_X and Y+Pixel_Y
|
||||
var/list/screen_loc_params = splittext(PM["screen-loc"], ",")
|
||||
|
||||
//Split X+Pixel_X up into list(X, Pixel_X)
|
||||
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
|
||||
|
||||
//Split Y+Pixel_Y up into list(Y, Pixel_Y)
|
||||
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
|
||||
|
||||
if(snap2grid) //Discard Pixel Values
|
||||
screen_loc = "[screen_loc_X[1]],[screen_loc_Y[1]]"
|
||||
|
||||
else //Normalise Pixel Values (So the object drops at the center of the mouse, not 16 pixels off)
|
||||
var/pix_X = text2num(screen_loc_X[2]) - 16
|
||||
var/pix_Y = text2num(screen_loc_Y[2]) - 16
|
||||
screen_loc = "[screen_loc_X[1]]:[pix_X],[screen_loc_Y[1]]:[pix_Y]"
|
||||
|
||||
moved = screen_loc
|
||||
|
||||
|
||||
//Debug procs
|
||||
/client/proc/test_movable_UI()
|
||||
set category = "Debug"
|
||||
set name = "Spawn Movable UI Object"
|
||||
|
||||
var/obj/screen/movable/M = new()
|
||||
M.name = "Movable UI Object"
|
||||
M.icon_state = "block"
|
||||
M.maptext = "Movable"
|
||||
M.maptext_width = 64
|
||||
|
||||
var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object") as text
|
||||
if(!screen_l)
|
||||
return
|
||||
|
||||
M.screen_loc = screen_l
|
||||
|
||||
screen += M
|
||||
|
||||
|
||||
/client/proc/test_snap_UI()
|
||||
set category = "Debug"
|
||||
set name = "Spawn Snap UI Object"
|
||||
|
||||
var/obj/screen/movable/snap/S = new()
|
||||
S.name = "Snap UI Object"
|
||||
S.icon_state = "block"
|
||||
S.maptext = "Snap"
|
||||
S.maptext_width = 64
|
||||
|
||||
var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object") as text
|
||||
if(!screen_l)
|
||||
return
|
||||
|
||||
S.screen_loc = screen_l
|
||||
|
||||
screen += S
|
||||
@@ -0,0 +1,41 @@
|
||||
|
||||
/datum/hud/brain/show_hud(version = 0)
|
||||
if(!ismob(mymob))
|
||||
return 0
|
||||
if(!mymob.client)
|
||||
return 0
|
||||
mymob.client.screen = list()
|
||||
mymob.client.screen += mymob.client.void
|
||||
|
||||
/mob/living/carbon/brain/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/brain(src)
|
||||
|
||||
/datum/hud/hog_god/New(mob/owner)
|
||||
..()
|
||||
healths = new /obj/screen/healths/deity()
|
||||
infodisplay += healths
|
||||
|
||||
deity_power_display = new /obj/screen/deity_power_display()
|
||||
infodisplay += deity_power_display
|
||||
|
||||
deity_follower_display = new /obj/screen/deity_follower_display()
|
||||
infodisplay += deity_follower_display
|
||||
|
||||
|
||||
/mob/camera/god/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/hog_god(src)
|
||||
|
||||
/obj/screen/deity_power_display
|
||||
name = "Faith"
|
||||
icon_state = "deity_power"
|
||||
screen_loc = ui_deitypower
|
||||
layer = HUD_LAYER
|
||||
|
||||
/obj/screen/deity_follower_display
|
||||
name = "Followers"
|
||||
icon_state = "deity_followers"
|
||||
screen_loc = ui_deityfollowers
|
||||
layer = HUD_LAYER
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
/datum/hud/revenant/New(mob/owner)
|
||||
..()
|
||||
|
||||
healths = new /obj/screen/healths/revenant()
|
||||
infodisplay += healths
|
||||
|
||||
/mob/living/simple_animal/revenant/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/revenant(src)
|
||||
@@ -0,0 +1,242 @@
|
||||
/obj/screen/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
/obj/screen/robot/module
|
||||
name = "cyborg module"
|
||||
icon_state = "nomod"
|
||||
|
||||
/obj/screen/robot/module/Click()
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(R.module)
|
||||
R.hud_used.toggle_show_robot_modules()
|
||||
return 1
|
||||
R.pick_module()
|
||||
|
||||
/obj/screen/robot/module1
|
||||
name = "module1"
|
||||
icon_state = "inv1"
|
||||
|
||||
/obj/screen/robot/module1/Click()
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(1)
|
||||
|
||||
/obj/screen/robot/module2
|
||||
name = "module2"
|
||||
icon_state = "inv2"
|
||||
|
||||
/obj/screen/robot/module2/Click()
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(2)
|
||||
|
||||
/obj/screen/robot/module3
|
||||
name = "module3"
|
||||
icon_state = "inv3"
|
||||
|
||||
/obj/screen/robot/module3/Click()
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(3)
|
||||
|
||||
/obj/screen/robot/radio
|
||||
name = "radio"
|
||||
icon_state = "radio"
|
||||
|
||||
/obj/screen/robot/radio/Click()
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.radio.interact(R)
|
||||
|
||||
/obj/screen/robot/store
|
||||
name = "store"
|
||||
icon_state = "store"
|
||||
|
||||
/obj/screen/robot/store/Click()
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.uneq_active()
|
||||
|
||||
/obj/screen/robot/lamp
|
||||
name = "headlamp"
|
||||
icon_state = "lamp0"
|
||||
|
||||
/obj/screen/robot/lamp/Click()
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.control_headlamp()
|
||||
|
||||
/obj/screen/robot/thrusters
|
||||
name = "ion thrusters"
|
||||
icon_state = "ionpulse0"
|
||||
|
||||
/obj/screen/robot/thrusters/Click()
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_ionpulse()
|
||||
|
||||
/datum/hud/robot/New(mob/owner)
|
||||
..()
|
||||
var/mob/living/silicon/robot/mymobR = mymob
|
||||
var/obj/screen/using
|
||||
|
||||
//Radio
|
||||
using = new /obj/screen/robot/radio()
|
||||
using.screen_loc = ui_borg_radio
|
||||
static_inventory += using
|
||||
|
||||
//Module select
|
||||
using = new /obj/screen/robot/module1()
|
||||
using.screen_loc = ui_inv1
|
||||
static_inventory += using
|
||||
mymobR.inv1 = using
|
||||
|
||||
using = new /obj/screen/robot/module2()
|
||||
using.screen_loc = ui_inv2
|
||||
static_inventory += using
|
||||
mymobR.inv2 = using
|
||||
|
||||
using = new /obj/screen/robot/module3()
|
||||
using.screen_loc = ui_inv3
|
||||
static_inventory += using
|
||||
mymobR.inv3 = using
|
||||
|
||||
//End of module select
|
||||
|
||||
//Photography stuff
|
||||
using = new /obj/screen/ai/image_take()
|
||||
using.screen_loc = ui_borg_camera
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ai/image_view()
|
||||
using.screen_loc = ui_borg_album
|
||||
static_inventory += using
|
||||
|
||||
//Sec/Med HUDs
|
||||
using = new /obj/screen/ai/sensors()
|
||||
using.screen_loc = ui_borg_sensor
|
||||
static_inventory += using
|
||||
|
||||
//Headlamp control
|
||||
using = new /obj/screen/robot/lamp()
|
||||
using.screen_loc = ui_borg_lamp
|
||||
static_inventory += using
|
||||
mymobR.lamp_button = using
|
||||
|
||||
//Thrusters
|
||||
using = new /obj/screen/robot/thrusters()
|
||||
using.screen_loc = ui_borg_thrusters
|
||||
static_inventory += using
|
||||
mymobR.thruster_button = using
|
||||
|
||||
//Intent
|
||||
using = new /obj/screen/act_intent/robot()
|
||||
using.icon_state = mymob.a_intent
|
||||
static_inventory += using
|
||||
action_intent = using
|
||||
|
||||
//Health
|
||||
healths = new /obj/screen/healths/robot()
|
||||
infodisplay += healths
|
||||
|
||||
//Installed Module
|
||||
mymob.hands = new /obj/screen/robot/module()
|
||||
mymob.hands.screen_loc = ui_borg_module
|
||||
static_inventory += mymob.hands
|
||||
|
||||
//Store
|
||||
module_store_icon = new /obj/screen/robot/store()
|
||||
module_store_icon.screen_loc = ui_borg_store
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = 'icons/mob/screen_cyborg.dmi'
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_borg_pull
|
||||
hotkeybuttons += pull_icon
|
||||
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/robot()
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
|
||||
/datum/hud/proc/toggle_show_robot_modules()
|
||||
if(!isrobot(mymob)) return
|
||||
|
||||
var/mob/living/silicon/robot/r = mymob
|
||||
|
||||
r.shown_robot_modules = !r.shown_robot_modules
|
||||
update_robot_modules_display()
|
||||
|
||||
/datum/hud/proc/update_robot_modules_display()
|
||||
if(!isrobot(mymob)) return
|
||||
|
||||
var/mob/living/silicon/robot/r = mymob
|
||||
|
||||
if(!r.client)
|
||||
return
|
||||
|
||||
if(!r.module)
|
||||
return
|
||||
|
||||
if(r.shown_robot_modules && hud_shown)
|
||||
//Modules display is shown
|
||||
r.client.screen += module_store_icon //"store" icon
|
||||
|
||||
if(!r.module.modules)
|
||||
usr << "<span class='danger'>Selected module has no modules to select</span>"
|
||||
return
|
||||
|
||||
if(!r.robot_modules_background)
|
||||
return
|
||||
|
||||
var/display_rows = Ceiling(length(r.module.get_inactive_modules()) / 8)
|
||||
r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
|
||||
r.client.screen += r.robot_modules_background
|
||||
|
||||
var/x = -4 //Start at CENTER-4,SOUTH+1
|
||||
var/y = 1
|
||||
|
||||
for(var/atom/movable/A in r.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
r.client.screen += A
|
||||
if(x < 0)
|
||||
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
|
||||
else
|
||||
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
|
||||
A.layer = ABOVE_HUD_LAYER
|
||||
|
||||
x++
|
||||
if(x == 4)
|
||||
x = -4
|
||||
y++
|
||||
|
||||
else
|
||||
//Modules display is hidden
|
||||
r.client.screen -= module_store_icon //"store" icon
|
||||
|
||||
for(var/atom/A in r.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
r.client.screen -= A
|
||||
r.shown_robot_modules = 0
|
||||
r.client.screen -= r.robot_modules_background
|
||||
|
||||
/mob/living/silicon/robot/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/robot(src)
|
||||
|
||||
|
||||
/datum/hud/robot/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
if(hud_shown)
|
||||
if(R.module_state_1)
|
||||
R.module_state_1.screen_loc = ui_inv1
|
||||
R.client.screen += R.module_state_1
|
||||
if(R.module_state_2)
|
||||
R.module_state_2.screen_loc = ui_inv2
|
||||
R.client.screen += R.module_state_2
|
||||
if(R.module_state_3)
|
||||
R.module_state_3.screen_loc = ui_inv3
|
||||
R.client.screen += R.module_state_3
|
||||
else
|
||||
if(R.module_state_1)
|
||||
R.module_state_1.screen_loc = null
|
||||
if(R.module_state_2)
|
||||
R.module_state_2.screen_loc = null
|
||||
if(R.module_state_3)
|
||||
R.module_state_3.screen_loc = null
|
||||
@@ -0,0 +1,467 @@
|
||||
/*
|
||||
Screen objects
|
||||
Todo: improve/re-implement
|
||||
|
||||
Screen objects are only used for the hud and should not appear anywhere "in-game".
|
||||
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
|
||||
name = ""
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
layer = ABOVE_HUD_LAYER
|
||||
unacidable = 1
|
||||
appearance_flags = APPEARANCE_UI
|
||||
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
|
||||
var/datum/hud/hud = null // A reference to the owner HUD, if any.
|
||||
|
||||
/obj/screen/Destroy()
|
||||
master = null
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/screen/text
|
||||
icon = null
|
||||
icon_state = null
|
||||
mouse_opacity = 0
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
maptext_height = 480
|
||||
maptext_width = 480
|
||||
|
||||
/obj/screen/swap_hand
|
||||
layer = HUD_LAYER
|
||||
name = "swap hand"
|
||||
|
||||
/obj/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)
|
||||
return 1
|
||||
|
||||
if(usr.incapacitated())
|
||||
return 1
|
||||
|
||||
if(ismob(usr))
|
||||
var/mob/M = usr
|
||||
M.swap_hand()
|
||||
return 1
|
||||
|
||||
/obj/screen/inventory/craft
|
||||
name = "crafting menu"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "craft"
|
||||
screen_loc = ui_crafting
|
||||
|
||||
/obj/screen/inventory/craft/Click()
|
||||
var/mob/living/M = usr
|
||||
M.OpenCraftingMenu()
|
||||
|
||||
/obj/screen/inventory
|
||||
var/slot_id // The indentifier for the slot. It has nothing to do with ID cards.
|
||||
var/icon_empty // Icon when empty. For now used only by humans.
|
||||
var/icon_full // Icon when contains an item. For now used only by humans.
|
||||
layer = HUD_LAYER
|
||||
|
||||
/obj/screen/inventory/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)
|
||||
return 1
|
||||
|
||||
if(usr.incapacitated())
|
||||
return 1
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 1
|
||||
if(usr.attack_ui(slot_id))
|
||||
usr.update_inv_l_hand(0)
|
||||
usr.update_inv_r_hand(0)
|
||||
return 1
|
||||
|
||||
/obj/screen/inventory/update_icon()
|
||||
if(!icon_empty)
|
||||
icon_empty = icon_state
|
||||
|
||||
if(hud && hud.mymob && slot_id && icon_full)
|
||||
if(hud.mymob.get_item_by_slot(slot_id))
|
||||
icon_state = icon_full
|
||||
else
|
||||
icon_state = icon_empty
|
||||
|
||||
/obj/screen/inventory/hand
|
||||
var/image/active_overlay
|
||||
var/image/handcuff_overlay
|
||||
var/image/blocked_overlay
|
||||
|
||||
/obj/screen/inventory/hand/update_icon()
|
||||
..()
|
||||
if(!active_overlay)
|
||||
active_overlay = image("icon"=icon, "icon_state"="hand_active")
|
||||
if(!handcuff_overlay)
|
||||
var/state = (slot_id == slot_r_hand) ? "markus" : "gabrielle"
|
||||
handcuff_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"=state)
|
||||
if(!blocked_overlay)
|
||||
blocked_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"="blocked")
|
||||
|
||||
cut_overlays()
|
||||
|
||||
if(hud && hud.mymob)
|
||||
if(iscarbon(hud.mymob))
|
||||
var/mob/living/carbon/C = hud.mymob
|
||||
if(C.handcuffed)
|
||||
add_overlay(handcuff_overlay)
|
||||
if(slot_id == slot_r_hand)
|
||||
if(!C.has_right_hand())
|
||||
add_overlay(blocked_overlay)
|
||||
else if(slot_id == slot_l_hand)
|
||||
if(!C.has_left_hand())
|
||||
add_overlay(blocked_overlay)
|
||||
|
||||
if(slot_id == slot_l_hand && hud.mymob.hand)
|
||||
add_overlay(active_overlay)
|
||||
else if(slot_id == slot_r_hand && !hud.mymob.hand)
|
||||
add_overlay(active_overlay)
|
||||
|
||||
/obj/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)
|
||||
return 1
|
||||
if(usr.incapacitated())
|
||||
return 1
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 1
|
||||
|
||||
if(ismob(usr))
|
||||
var/mob/M = usr
|
||||
switch(name)
|
||||
if("right hand", "r_hand")
|
||||
M.activate_hand("r")
|
||||
if("left hand", "l_hand")
|
||||
M.activate_hand("l")
|
||||
return 1
|
||||
|
||||
/obj/screen/close
|
||||
name = "close"
|
||||
|
||||
/obj/screen/close/Click()
|
||||
if(istype(master, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = master
|
||||
S.close(usr)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/screen/drop
|
||||
name = "drop"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_drop"
|
||||
layer = HUD_LAYER
|
||||
|
||||
/obj/screen/drop/Click()
|
||||
usr.drop_item_v()
|
||||
|
||||
/obj/screen/act_intent
|
||||
name = "intent"
|
||||
icon_state = "help"
|
||||
screen_loc = ui_acti
|
||||
|
||||
/obj/screen/act_intent/Click(location, control, params)
|
||||
if(ishuman(usr) && (usr.client.prefs.toggles & INTENT_STYLE))
|
||||
|
||||
var/_x = text2num(params2list(params)["icon-x"])
|
||||
var/_y = text2num(params2list(params)["icon-y"])
|
||||
|
||||
if(_x<=16 && _y<=16)
|
||||
usr.a_intent_change("harm")
|
||||
|
||||
else if(_x<=16 && _y>=17)
|
||||
usr.a_intent_change("help")
|
||||
|
||||
else if(_x>=17 && _y<=16)
|
||||
usr.a_intent_change("grab")
|
||||
|
||||
else if(_x>=17 && _y>=17)
|
||||
usr.a_intent_change("disarm")
|
||||
|
||||
else
|
||||
usr.a_intent_change("right")
|
||||
|
||||
/obj/screen/act_intent/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
screen_loc = ui_movi
|
||||
|
||||
/obj/screen/act_intent/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
screen_loc = ui_borg_intents
|
||||
|
||||
/obj/screen/internals
|
||||
name = "toggle internals"
|
||||
icon_state = "internal0"
|
||||
screen_loc = ui_internal
|
||||
|
||||
/obj/screen/internals/Click()
|
||||
if(!iscarbon(usr))
|
||||
return
|
||||
var/mob/living/carbon/C = usr
|
||||
if(C.incapacitated())
|
||||
return
|
||||
|
||||
if(C.internal)
|
||||
C.internal = null
|
||||
C << "<span class='notice'>You are no longer running on internals.</span>"
|
||||
icon_state = "internal0"
|
||||
else
|
||||
if(!C.getorganslot("breathing_tube"))
|
||||
if(!istype(C.wear_mask, /obj/item/clothing/mask))
|
||||
C << "<span class='warning'>You are not wearing an internals mask!</span>"
|
||||
return 1
|
||||
else
|
||||
var/obj/item/clothing/mask/M = C.wear_mask
|
||||
if(M.mask_adjusted) // if mask on face but pushed down
|
||||
M.adjustmask(C) // adjust it back
|
||||
if( !(M.flags & MASKINTERNALS) )
|
||||
C << "<span class='warning'>You are not wearing an internals mask!</span>"
|
||||
return
|
||||
|
||||
if(istype(C.l_hand, /obj/item/weapon/tank))
|
||||
C << "<span class='notice'>You are now running on internals from the [C.l_hand] on your left hand.</span>"
|
||||
C.internal = C.l_hand
|
||||
else if(istype(C.r_hand, /obj/item/weapon/tank))
|
||||
C << "<span class='notice'>You are now running on internals from the [C.r_hand] on your right hand.</span>"
|
||||
C.internal = C.r_hand
|
||||
else if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(istype(H.s_store, /obj/item/weapon/tank))
|
||||
H << "<span class='notice'>You are now running on internals from the [H.s_store] on your [H.wear_suit].</span>"
|
||||
H.internal = H.s_store
|
||||
else if(istype(H.belt, /obj/item/weapon/tank))
|
||||
H << "<span class='notice'>You are now running on internals from the [H.belt] on your belt.</span>"
|
||||
H.internal = H.belt
|
||||
else if(istype(H.l_store, /obj/item/weapon/tank))
|
||||
H << "<span class='notice'>You are now running on internals from the [H.l_store] in your left pocket.</span>"
|
||||
H.internal = H.l_store
|
||||
else if(istype(H.r_store, /obj/item/weapon/tank))
|
||||
H << "<span class='notice'>You are now running on internals from the [H.r_store] in your right pocket.</span>"
|
||||
H.internal = H.r_store
|
||||
|
||||
//Seperate so CO2 jetpacks are a little less cumbersome.
|
||||
if(!C.internal && istype(C.back, /obj/item/weapon/tank))
|
||||
C << "<span class='notice'>You are now running on internals from the [C.back] on your back.</span>"
|
||||
C.internal = C.back
|
||||
|
||||
if(C.internal)
|
||||
icon_state = "internal1"
|
||||
else
|
||||
C << "<span class='warning'>You don't have an oxygen tank!</span>"
|
||||
return
|
||||
C.update_action_buttons_icon()
|
||||
|
||||
/obj/screen/mov_intent
|
||||
name = "run/walk toggle"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "running"
|
||||
|
||||
/obj/screen/mov_intent/Click()
|
||||
switch(usr.m_intent)
|
||||
if("run")
|
||||
usr.m_intent = "walk"
|
||||
icon_state = "walking"
|
||||
if("walk")
|
||||
usr.m_intent = "run"
|
||||
icon_state = "running"
|
||||
usr.update_icons()
|
||||
|
||||
/obj/screen/pull
|
||||
name = "stop pulling"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "pull"
|
||||
|
||||
/obj/screen/pull/Click()
|
||||
usr.stop_pulling()
|
||||
|
||||
/obj/screen/pull/update_icon(mob/mymob)
|
||||
if(!mymob) return
|
||||
if(mymob.pulling)
|
||||
icon_state = "pull"
|
||||
else
|
||||
icon_state = "pull0"
|
||||
|
||||
/obj/screen/resist
|
||||
name = "resist"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_resist"
|
||||
layer = HUD_LAYER
|
||||
|
||||
/obj/screen/resist/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.resist()
|
||||
|
||||
/obj/screen/storage
|
||||
name = "storage"
|
||||
|
||||
/obj/screen/storage/Click(location, control, params)
|
||||
if(world.time <= usr.next_move)
|
||||
return 1
|
||||
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened)
|
||||
return 1
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 1
|
||||
if(master)
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(I)
|
||||
master.attackby(I, usr, params)
|
||||
return 1
|
||||
|
||||
/obj/screen/throw_catch
|
||||
name = "throw/catch"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_throw_off"
|
||||
|
||||
/obj/screen/throw_catch/Click()
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.toggle_throw_mode()
|
||||
|
||||
/obj/screen/zone_sel
|
||||
name = "damage zone"
|
||||
icon_state = "zone_sel"
|
||||
screen_loc = ui_zonesel
|
||||
var/selecting = "chest"
|
||||
|
||||
/obj/screen/zone_sel/Click(location, control,params)
|
||||
var/list/PL = params2list(params)
|
||||
var/icon_x = text2num(PL["icon-x"])
|
||||
var/icon_y = text2num(PL["icon-y"])
|
||||
var/old_selecting = selecting //We're only going to update_icon() if there's been a change
|
||||
|
||||
switch(icon_y)
|
||||
if(1 to 9) //Legs
|
||||
switch(icon_x)
|
||||
if(10 to 15)
|
||||
selecting = "r_leg"
|
||||
if(17 to 22)
|
||||
selecting = "l_leg"
|
||||
else
|
||||
return 1
|
||||
if(10 to 13) //Hands and groin
|
||||
switch(icon_x)
|
||||
if(8 to 11)
|
||||
selecting = "r_arm"
|
||||
if(12 to 20)
|
||||
selecting = "groin"
|
||||
if(21 to 24)
|
||||
selecting = "l_arm"
|
||||
else
|
||||
return 1
|
||||
if(14 to 22) //Chest and arms to shoulders
|
||||
switch(icon_x)
|
||||
if(8 to 11)
|
||||
selecting = "r_arm"
|
||||
if(12 to 20)
|
||||
selecting = "chest"
|
||||
if(21 to 24)
|
||||
selecting = "l_arm"
|
||||
else
|
||||
return 1
|
||||
if(23 to 30) //Head, but we need to check for eye or mouth
|
||||
if(icon_x in 12 to 20)
|
||||
selecting = "head"
|
||||
switch(icon_y)
|
||||
if(23 to 24)
|
||||
if(icon_x in 15 to 17)
|
||||
selecting = "mouth"
|
||||
if(26) //Eyeline, eyes are on 15 and 17
|
||||
if(icon_x in 14 to 18)
|
||||
selecting = "eyes"
|
||||
if(25 to 27)
|
||||
if(icon_x in 15 to 17)
|
||||
selecting = "eyes"
|
||||
|
||||
if(old_selecting != selecting)
|
||||
update_icon(usr)
|
||||
return 1
|
||||
|
||||
/obj/screen/zone_sel/update_icon(mob/user)
|
||||
cut_overlays()
|
||||
add_overlay(image('icons/mob/screen_gen.dmi', "[selecting]"))
|
||||
user.zone_selected = selecting
|
||||
|
||||
/obj/screen/zone_sel/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
|
||||
/obj/screen/zone_sel/alien/update_icon(mob/user)
|
||||
cut_overlays()
|
||||
add_overlay(image('icons/mob/screen_alien.dmi', "[selecting]"))
|
||||
user.zone_selected = selecting
|
||||
|
||||
/obj/screen/zone_sel/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
|
||||
/obj/screen/flash
|
||||
name = "flash"
|
||||
icon_state = "blank"
|
||||
blend_mode = BLEND_ADD
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
layer = FLASH_LAYER
|
||||
|
||||
/obj/screen/damageoverlay
|
||||
icon = 'icons/mob/screen_full.dmi'
|
||||
icon_state = "oxydamageoverlay0"
|
||||
name = "dmg"
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
mouse_opacity = 0
|
||||
layer = UI_DAMAGE_LAYER
|
||||
|
||||
/obj/screen/healths
|
||||
name = "health"
|
||||
icon_state = "health0"
|
||||
screen_loc = ui_health
|
||||
|
||||
/obj/screen/healths/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
screen_loc = ui_alien_health
|
||||
|
||||
/obj/screen/healths/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
screen_loc = ui_borg_health
|
||||
|
||||
/obj/screen/healths/deity
|
||||
name = "Nexus Health"
|
||||
icon_state = "deity_nexus"
|
||||
screen_loc = ui_deityhealth
|
||||
|
||||
/obj/screen/healths/blob
|
||||
name = "blob health"
|
||||
icon_state = "block"
|
||||
screen_loc = ui_internal
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/screen/healths/blob/naut
|
||||
name = "health"
|
||||
icon = 'icons/mob/blob.dmi'
|
||||
icon_state = "nauthealth"
|
||||
|
||||
/obj/screen/healths/blob/naut/core
|
||||
name = "overmind health"
|
||||
screen_loc = ui_health
|
||||
icon_state = "corehealth"
|
||||
|
||||
/obj/screen/healths/guardian
|
||||
name = "summoner health"
|
||||
icon = 'icons/mob/guardian.dmi'
|
||||
icon_state = "base"
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/screen/healths/revenant
|
||||
name = "essence"
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon_state = "bg_revenant"
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/screen/healthdoll
|
||||
name = "health doll"
|
||||
screen_loc = ui_healthdoll
|
||||
@@ -0,0 +1,97 @@
|
||||
|
||||
|
||||
/obj/screen/swarmer
|
||||
icon = 'icons/mob/swarmer.dmi'
|
||||
|
||||
/obj/screen/swarmer/FabricateTrap
|
||||
icon_state = "ui_trap"
|
||||
name = "Create trap (Costs 5 Resources)"
|
||||
desc = "Creates a trap that will nonlethally shock any non-swarmer that attempts to cross it. (Costs 5 resources)"
|
||||
|
||||
/obj/screen/swarmer/FabricateTrap/Click()
|
||||
if(isswarmer(usr))
|
||||
var/mob/living/simple_animal/hostile/swarmer/S = usr
|
||||
S.CreateTrap()
|
||||
|
||||
/obj/screen/swarmer/Barricade
|
||||
icon_state = "ui_barricade"
|
||||
name = "Create barricade (Costs 5 Resources)"
|
||||
desc = "Creates a destructible barricade that will stop any non swarmer from passing it. Also allows disabler beams to pass through. (Costs 5 resources)"
|
||||
|
||||
/obj/screen/swarmer/Barricade/Click()
|
||||
if(isswarmer(usr))
|
||||
var/mob/living/simple_animal/hostile/swarmer/S = usr
|
||||
S.CreateBarricade()
|
||||
|
||||
/obj/screen/swarmer/Replicate
|
||||
icon_state = "ui_replicate"
|
||||
name = "Replicate (Costs 50 Resources)"
|
||||
desc = "Creates a another of our kind."
|
||||
|
||||
/obj/screen/swarmer/Replicate/Click()
|
||||
if(isswarmer(usr))
|
||||
var/mob/living/simple_animal/hostile/swarmer/S = usr
|
||||
S.CreateSwarmer()
|
||||
|
||||
/obj/screen/swarmer/RepairSelf
|
||||
icon_state = "ui_self_repair"
|
||||
name = "Repair self"
|
||||
desc = "Repairs damage to our body."
|
||||
|
||||
/obj/screen/swarmer/RepairSelf/Click()
|
||||
if(isswarmer(usr))
|
||||
var/mob/living/simple_animal/hostile/swarmer/S = usr
|
||||
S.RepairSelf()
|
||||
|
||||
/obj/screen/swarmer/ToggleLight
|
||||
icon_state = "ui_light"
|
||||
name = "Toggle light"
|
||||
desc = "Toggles our inbuilt light on or off."
|
||||
|
||||
/obj/screen/swarmer/ToggleLight/Click()
|
||||
if(isswarmer(usr))
|
||||
var/mob/living/simple_animal/hostile/swarmer/S = usr
|
||||
S.ToggleLight()
|
||||
|
||||
/obj/screen/swarmer/ContactSwarmers
|
||||
icon_state = "ui_contact_swarmers"
|
||||
name = "Contact swarmers"
|
||||
desc = "Sends a message to all other swarmers, should they exist."
|
||||
|
||||
/obj/screen/swarmer/ContactSwarmers/Click()
|
||||
if(isswarmer(usr))
|
||||
var/mob/living/simple_animal/hostile/swarmer/S = usr
|
||||
S.ContactSwarmers()
|
||||
|
||||
/datum/hud/swarmer/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen/swarmer/FabricateTrap()
|
||||
using.screen_loc = ui_rhand
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swarmer/Barricade()
|
||||
using.screen_loc = ui_lhand
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swarmer/Replicate()
|
||||
using.screen_loc = ui_zonesel
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swarmer/RepairSelf()
|
||||
using.screen_loc = ui_storage1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swarmer/ToggleLight()
|
||||
using.screen_loc = ui_back
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swarmer/ContactSwarmers()
|
||||
using.screen_loc = ui_inventory
|
||||
static_inventory += using
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/swarmer(src)
|
||||
Reference in New Issue
Block a user