Revert "12/21 modernizations from TG live"
This commit is contained in:
+6
-13
@@ -34,13 +34,6 @@
|
||||
if(control_disabled || stat)
|
||||
return
|
||||
|
||||
var/turf/pixel_turf = get_turf_pixel(A)
|
||||
if(pixel_turf && !cameranet.checkTurfVis(pixel_turf))
|
||||
log_admin("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)])")
|
||||
message_admins("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))")
|
||||
send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)]))")
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
@@ -135,7 +128,7 @@
|
||||
Topic("aiEnable=4", list("aiEnable"="4"), 1)// 1 meaning no window (consistency!)
|
||||
else
|
||||
Topic("aiDisable=4", list("aiDisable"="4"), 1)
|
||||
|
||||
return
|
||||
/obj/machinery/door/airlock/AIAltClick() // Eletrifies doors.
|
||||
if(emagged)
|
||||
return
|
||||
@@ -145,7 +138,7 @@
|
||||
else
|
||||
// disable/6 is not in Topic; disable/5 disables both temporary and permenant shock
|
||||
Topic("aiDisable=5", list("aiDisable"="5"), 1)
|
||||
|
||||
return
|
||||
/obj/machinery/door/airlock/AIShiftClick() // Opens and closes doors!
|
||||
if(emagged)
|
||||
return
|
||||
@@ -153,7 +146,7 @@
|
||||
Topic("aiEnable=7", list("aiEnable"="7"), 1) // 1 meaning no window (consistency!)
|
||||
else
|
||||
Topic("aiDisable=7", list("aiDisable"="7"), 1)
|
||||
|
||||
return
|
||||
/obj/machinery/door/airlock/AICtrlShiftClick() // Sets/Unsets Emergency Access Override
|
||||
if(emagged)
|
||||
return
|
||||
@@ -161,12 +154,12 @@
|
||||
Topic("aiEnable=11", list("aiEnable"="11"), 1) // 1 meaning no window (consistency!)
|
||||
else
|
||||
Topic("aiDisable=11", list("aiDisable"="11"), 1)
|
||||
return
|
||||
|
||||
/* APC */
|
||||
/obj/machinery/power/apc/AICtrlClick() // turns off/on APCs.
|
||||
if(can_use(usr, 1))
|
||||
toggle_breaker()
|
||||
add_fingerprint(usr)
|
||||
toggle_breaker()
|
||||
add_fingerprint(usr)
|
||||
|
||||
/* AI Turrets */
|
||||
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/mob/living/carbon/CanMobAutoclick(atom/object, location, params)
|
||||
if(!object.IsAutoclickable())
|
||||
return
|
||||
var/obj/item/h = get_active_held_item()
|
||||
var/obj/item/h = get_active_hand()
|
||||
if(h)
|
||||
. = h.CanItemAutoclick(object, location, params)
|
||||
|
||||
|
||||
+16
-32
@@ -98,16 +98,19 @@
|
||||
throw_item(A)
|
||||
return
|
||||
|
||||
var/obj/item/W = get_active_held_item()
|
||||
var/obj/item/W = get_active_hand()
|
||||
|
||||
|
||||
if(W == A)
|
||||
W.attack_self(src)
|
||||
update_inv_hands()
|
||||
if(hand)
|
||||
update_inv_l_hand(0)
|
||||
else
|
||||
update_inv_r_hand(0)
|
||||
return
|
||||
|
||||
// operate three levels deep here (item in backpack in src; item in box in backpack in src, not any deeper)
|
||||
if(A.ClickAccessible(src, depth=INVENTORY_DEPTH))
|
||||
if(!isturf(A) && A == loc || (A in contents) || (A.loc in contents) || (A.loc && (A.loc.loc in contents)))
|
||||
// No adjacency needed
|
||||
if(W)
|
||||
var/resolved = A.attackby(W,src)
|
||||
@@ -219,7 +222,6 @@
|
||||
Ctrl click
|
||||
For most objects, pull
|
||||
*/
|
||||
|
||||
/mob/proc/CtrlClickOn(atom/A)
|
||||
A.CtrlClick(src)
|
||||
return
|
||||
@@ -229,13 +231,6 @@
|
||||
if(istype(ML))
|
||||
ML.pulled(src)
|
||||
|
||||
/mob/living/carbon/human/CtrlClick(mob/user)
|
||||
if(ishuman(user) && Adjacent(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.dna.species.grab(H, src, H.martial_art)
|
||||
H.next_click = world.time + CLICK_CD_MELEE
|
||||
else
|
||||
..()
|
||||
/*
|
||||
Alt click
|
||||
Unused except for AI
|
||||
@@ -279,21 +274,6 @@
|
||||
/atom/proc/CtrlShiftClick(mob/user)
|
||||
return
|
||||
|
||||
/*
|
||||
Helper to check can the mob click/access an item.
|
||||
Used by mob inventory and storage items.
|
||||
*/
|
||||
/atom/proc/ClickAccessible(mob/user, depth=1)
|
||||
if(src == user.loc || (src in user.contents))
|
||||
return TRUE
|
||||
|
||||
if(loc && depth > 1)
|
||||
return loc.ClickAccessible(user, depth-1)
|
||||
|
||||
/turf/ClickAccessible(mob/user, depth=1)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Misc helpers
|
||||
|
||||
@@ -354,11 +334,15 @@
|
||||
icon_state = "click_catcher"
|
||||
plane = CLICKCATCHER_PLANE
|
||||
mouse_opacity = 2
|
||||
screen_loc = "CENTER"
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
|
||||
/obj/screen/click_catcher/New()
|
||||
..()
|
||||
transform = matrix(200, 0, 0, 0, 200, 0)
|
||||
/obj/screen/click_catcher/proc/MakeGreed()
|
||||
. = list()
|
||||
for(var/i = 0, i<15, i++)
|
||||
for(var/j = 0, j<15, j++)
|
||||
var/obj/screen/click_catcher/CC = new()
|
||||
CC.screen_loc = "NORTH-[i],EAST-[j]"
|
||||
. += CC
|
||||
|
||||
/obj/screen/click_catcher/Click(location, control, params)
|
||||
var/list/modifiers = params2list(params)
|
||||
@@ -366,7 +350,7 @@
|
||||
var/mob/living/carbon/C = usr
|
||||
C.swap_hand()
|
||||
else
|
||||
var/turf/T = params2turf(modifiers["screen-loc"], get_turf(usr))
|
||||
var/turf/T = screen_loc2turf(screen_loc, get_turf(usr))
|
||||
if(T)
|
||||
T.Click(location, control, params)
|
||||
. = 1
|
||||
. = 1
|
||||
@@ -51,7 +51,7 @@
|
||||
aicamera.captureimage(A, usr)
|
||||
return
|
||||
|
||||
var/obj/item/W = get_active_held_item()
|
||||
var/obj/item/W = get_active_hand()
|
||||
|
||||
// Cyborgs have no range-checking unless there is item use
|
||||
if(!W)
|
||||
|
||||
@@ -17,67 +17,53 @@
|
||||
Therefore, the top right corner (except during admin shenanigans) is at "15,15"
|
||||
*/
|
||||
|
||||
//Lower left, persistent menu
|
||||
//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_building "12:-10,1:21"
|
||||
|
||||
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"
|
||||
|
||||
//Lower center, persistent menu
|
||||
//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"
|
||||
|
||||
/proc/ui_hand_position(i) //values based on old hand ui positions (CENTER:-/+16,SOUTH:5)
|
||||
var/x_off = -(!(i % 2))
|
||||
var/y_off = round((i-1) / 2)
|
||||
return"CENTER+[x_off]:16,SOUTH+[y_off]:5"
|
||||
|
||||
/proc/ui_equip_position(mob/M)
|
||||
var/y_off = round((M.held_items.len-1) / 2) //values based on old equip ui position (CENTER: +/-16,SOUTH+1:5)
|
||||
return "CENTER:-16,SOUTH+[y_off+1]:5"
|
||||
|
||||
/proc/ui_swaphand_position(mob/M, which = 1) //values based on old swaphand ui positions (CENTER: +/-16,SOUTH+1:5)
|
||||
var/x_off = which == 1 ? -1 : 0
|
||||
var/y_off = round((M.held_items.len-1) / 2)
|
||||
return "CENTER+[x_off]:16,SOUTH+[y_off+1]: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" //borgs
|
||||
#define ui_borg_thrusters "CENTER-5:16, SOUTH:5" //borgs
|
||||
#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" //borgs
|
||||
#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_borg_talk_wheel "CENTER+4:21,SOUTH+1:5" //borgs
|
||||
#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_neck "CENTER-2:15,SOUTH:5" //monkey
|
||||
#define ui_monkey_back "CENTER-1:16,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_alien_talk_wheel "EAST-3:26,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, persistent menu
|
||||
//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"
|
||||
@@ -108,7 +94,6 @@
|
||||
#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"
|
||||
#define ui_alien_queen_finder "EAST-1:28,CENTER-3:15"
|
||||
|
||||
// AI
|
||||
|
||||
@@ -135,19 +120,18 @@
|
||||
#define ui_oclothing "WEST+1:8,SOUTH+1:7"
|
||||
#define ui_gloves "WEST+2:10,SOUTH+1:7"
|
||||
|
||||
#define ui_glasses "WEST:6,SOUTH+3:11"
|
||||
#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_neck "WEST:6,SOUTH+2:9"
|
||||
|
||||
#define ui_head "WEST+1:8,SOUTH+3:11"
|
||||
|
||||
//Ghosts
|
||||
|
||||
#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:24"
|
||||
#define ui_ghost_orbit "SOUTH:6,CENTER-1:24"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:24"
|
||||
#define ui_ghost_teleport "SOUTH:6,CENTER+1:24"
|
||||
#define ui_ghost_pai "SOUTH: 6, CENTER+2:24"
|
||||
#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
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#define ACTION_BUTTON_DEFAULT_BACKGROUND "default"
|
||||
|
||||
/obj/screen/movable/action_button
|
||||
var/datum/action/linked_action
|
||||
var/actiontooltipstyle = ""
|
||||
screen_loc = null
|
||||
|
||||
/obj/screen/movable/action_button/Click(location,control,params)
|
||||
@@ -22,9 +20,6 @@
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon_state = "bg_default"
|
||||
var/hidden = 0
|
||||
var/hide_icon = 'icons/mob/actions.dmi'
|
||||
var/hide_state = "hide"
|
||||
var/show_state = "show"
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
|
||||
var/list/modifiers = params2list(params)
|
||||
@@ -42,39 +37,28 @@
|
||||
usr.update_action_buttons()
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(datum/hud/owner_hud)
|
||||
var settings = owner_hud.get_action_buttons_icons()
|
||||
icon = settings["bg_icon"]
|
||||
icon_state = settings["bg_state"]
|
||||
hide_icon = settings["toggle_icon"]
|
||||
hide_state = settings["toggle_hide"]
|
||||
show_state = settings["toggle_show"]
|
||||
/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(hide_icon, src, hidden ? show_state : hide_state)
|
||||
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,theme = actiontooltipstyle)
|
||||
openToolTip(usr,src,params,title = name,content = desc)
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/MouseExited()
|
||||
closeToolTip(usr)
|
||||
|
||||
/datum/hud/proc/get_action_buttons_icons()
|
||||
. = list()
|
||||
.["bg_icon"] = ui_style_icon
|
||||
.["bg_state"] = "template"
|
||||
|
||||
//TODO : Make these fit theme
|
||||
.["toggle_icon"] = 'icons/mob/actions.dmi'
|
||||
.["toggle_hide"] = "hide"
|
||||
.["toggle_show"] = "show"
|
||||
|
||||
//see human and alien hud for specific implementations.
|
||||
|
||||
/mob/proc/update_action_buttons_icon()
|
||||
for(var/X in actions)
|
||||
@@ -99,7 +83,7 @@
|
||||
else
|
||||
for(var/datum/action/A in actions)
|
||||
button_number++
|
||||
A.UpdateButtonIcon(hud_used)
|
||||
A.UpdateButtonIcon()
|
||||
var/obj/screen/movable/action_button/B = A.button
|
||||
if(!B.moved)
|
||||
B.screen_loc = hud_used.ButtonNumberToScreenCoords(button_number)
|
||||
|
||||
+3
-34
@@ -1,17 +1,11 @@
|
||||
/obj/screen/ai
|
||||
icon = 'icons/mob/screen_ai.dmi'
|
||||
|
||||
/obj/screen/ai/Click()
|
||||
if(isobserver(usr))
|
||||
return 1
|
||||
|
||||
/obj/screen/ai/aicore
|
||||
name = "AI core"
|
||||
icon_state = "ai_core"
|
||||
|
||||
/obj/screen/ai/aicore/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.view_core()
|
||||
|
||||
@@ -29,8 +23,6 @@
|
||||
icon_state = "track"
|
||||
|
||||
/obj/screen/ai/camera_track/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs()
|
||||
AI.ai_camera_track(target_name)
|
||||
@@ -40,8 +32,6 @@
|
||||
icon_state = "camera_light"
|
||||
|
||||
/obj/screen/ai/camera_light/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.toggle_camera_light()
|
||||
|
||||
@@ -50,8 +40,6 @@
|
||||
icon_state = "crew_monitor"
|
||||
|
||||
/obj/screen/ai/crew_monitor/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
crewmonitor.show(AI)
|
||||
|
||||
@@ -60,8 +48,6 @@
|
||||
icon_state = "manifest"
|
||||
|
||||
/obj/screen/ai/crew_manifest/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.ai_roster()
|
||||
|
||||
@@ -70,8 +56,6 @@
|
||||
icon_state = "alerts"
|
||||
|
||||
/obj/screen/ai/alerts/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.ai_alerts()
|
||||
|
||||
@@ -80,8 +64,6 @@
|
||||
icon_state = "announcement"
|
||||
|
||||
/obj/screen/ai/announcement/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.announcement()
|
||||
|
||||
@@ -90,8 +72,6 @@
|
||||
icon_state = "call_shuttle"
|
||||
|
||||
/obj/screen/ai/call_shuttle/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.ai_call_shuttle()
|
||||
|
||||
@@ -100,8 +80,6 @@
|
||||
icon_state = "state_laws"
|
||||
|
||||
/obj/screen/ai/state_laws/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.checklaws()
|
||||
|
||||
@@ -110,8 +88,6 @@
|
||||
icon_state = "pda_send"
|
||||
|
||||
/obj/screen/ai/pda_msg_send/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.cmd_send_pdamesg(usr)
|
||||
|
||||
@@ -120,8 +96,6 @@
|
||||
icon_state = "pda_receive"
|
||||
|
||||
/obj/screen/ai/pda_msg_show/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.cmd_show_message_log(usr)
|
||||
|
||||
@@ -133,7 +107,7 @@
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.aicamera.toggle_camera_mode()
|
||||
else if(iscyborg(usr))
|
||||
else if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.aicamera.toggle_camera_mode()
|
||||
|
||||
@@ -145,7 +119,7 @@
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.aicamera.viewpictures()
|
||||
else if(iscyborg(usr))
|
||||
else if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.aicamera.viewpictures()
|
||||
|
||||
@@ -154,16 +128,11 @@
|
||||
icon_state = "ai_sensor"
|
||||
|
||||
/obj/screen/ai/sensors/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/S = usr
|
||||
S.sensor_mode()
|
||||
|
||||
|
||||
/datum/hud/ai
|
||||
ui_style_icon = 'icons/mob/screen_ai.dmi'
|
||||
|
||||
/datum/hud/ai/New(mob/owner, ui_style = 'icons/mob/screen_ai.dmi')
|
||||
/datum/hud/ai/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
|
||||
@@ -37,12 +37,9 @@
|
||||
|
||||
if(new_master)
|
||||
var/old_layer = new_master.layer
|
||||
var/old_plane = new_master.plane
|
||||
new_master.layer = FLOAT_LAYER
|
||||
new_master.plane = FLOAT_PLANE
|
||||
alert.overlays += new_master
|
||||
new_master.layer = old_layer
|
||||
new_master.plane = old_plane
|
||||
alert.icon_state = "template" // We'll set the icon to the client's ui pref in reorganize_alerts()
|
||||
alert.master = new_master
|
||||
else
|
||||
@@ -243,163 +240,6 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
icon_state = "blobbernaut_nofactory"
|
||||
alerttooltipstyle = "blob"
|
||||
|
||||
// CLOCKCULT
|
||||
/obj/screen/alert/clockwork
|
||||
alerttooltipstyle = "clockcult"
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs
|
||||
name = "Next Tier Requirements"
|
||||
desc = "You shouldn't be seeing this description unless you're very fast. If you're very fast, good job!"
|
||||
icon_state = "no-servants-caches"
|
||||
var/static/list/scripture_states = list(SCRIPTURE_DRIVER = TRUE, SCRIPTURE_SCRIPT = FALSE, SCRIPTURE_APPLICATION = FALSE, SCRIPTURE_REVENANT = FALSE, SCRIPTURE_JUDGEMENT = FALSE)
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs/New()
|
||||
..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
process()
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs/process()
|
||||
if(clockwork_gateway_activated)
|
||||
qdel(src)
|
||||
return
|
||||
var/current_state
|
||||
scripture_states = scripture_unlock_check()
|
||||
for(var/i in scripture_states)
|
||||
if(!scripture_states[i])
|
||||
current_state = i
|
||||
break
|
||||
icon_state = "no"
|
||||
if(!current_state)
|
||||
name = "Current Objective"
|
||||
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in all_clockwork_objects)
|
||||
var/area/gate_area = get_area(G)
|
||||
desc = "<b>Protect the Ark at [gate_area.map_name]!</b>"
|
||||
return
|
||||
desc = "<b>All tiers of Scripture are unlocked.<br>\
|
||||
Acquire components and summon the Ark.</b>"
|
||||
else
|
||||
name = "Next Tier Requirements"
|
||||
var/validservants = 0
|
||||
var/unconverted_ais_exist = FALSE
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
if(is_servant_of_ratvar(L) && (ishuman(L) || issilicon(L)))
|
||||
validservants++
|
||||
else if(isAI(L))
|
||||
unconverted_ais_exist++
|
||||
var/req_servants = 0
|
||||
var/req_caches = 0
|
||||
var/req_cv = 0
|
||||
var/req_ai = FALSE
|
||||
desc = "Requirements for <b>[current_state] Scripture:</b>"
|
||||
switch(current_state) //get our requirements based on the tier
|
||||
if(SCRIPTURE_SCRIPT)
|
||||
req_servants = SCRIPT_SERVANT_REQ
|
||||
req_caches = SCRIPT_CACHE_REQ
|
||||
if(SCRIPTURE_APPLICATION)
|
||||
req_servants = APPLICATION_SERVANT_REQ
|
||||
req_caches = APPLICATION_CACHE_REQ
|
||||
req_cv = APPLICATION_CV_REQ
|
||||
if(SCRIPTURE_REVENANT)
|
||||
req_servants = REVENANT_SERVANT_REQ
|
||||
req_caches = REVENANT_CACHE_REQ
|
||||
req_cv = REVENANT_CV_REQ
|
||||
if(SCRIPTURE_JUDGEMENT)
|
||||
req_servants = JUDGEMENT_SERVANT_REQ
|
||||
req_caches = JUDGEMENT_CACHE_REQ
|
||||
req_cv = JUDGEMENT_CV_REQ
|
||||
req_ai = TRUE
|
||||
desc += "<br><b>[validservants]/[req_servants]</b> Servants"
|
||||
if(validservants < req_servants)
|
||||
icon_state += "-servants" //in this manner, generate an icon key based on what we're missing
|
||||
else
|
||||
desc += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
|
||||
desc += "<br><b>[clockwork_caches]/[req_caches]</b> Tinkerer's Caches"
|
||||
if(clockwork_caches < req_caches)
|
||||
icon_state += "-caches"
|
||||
else
|
||||
desc += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
|
||||
if(req_cv) //cv only shows up if the tier requires it
|
||||
desc += "<br><b>[clockwork_construction_value]/[req_cv]</b> Construction Value"
|
||||
if(clockwork_construction_value < req_cv)
|
||||
icon_state += "-cv"
|
||||
else
|
||||
desc += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
|
||||
if(req_ai) //same for ai
|
||||
if(unconverted_ais_exist)
|
||||
if(unconverted_ais_exist > 1)
|
||||
desc += "<br><b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"
|
||||
else
|
||||
desc += "<br><b>An unconverted AI exists!</b>"
|
||||
icon_state += "-ai"
|
||||
else
|
||||
desc += "<br>No unconverted AIs exist: <b><font color=#5A6068>\[CHECK\]</font></b>"
|
||||
|
||||
/obj/screen/alert/clockwork/infodump
|
||||
name = "Global Records"
|
||||
desc = "You shouldn't be seeing this description, because it should be dynamically generated."
|
||||
icon_state = "clockinfo"
|
||||
|
||||
/obj/screen/alert/clockwork/infodump/MouseEntered(location,control,params)
|
||||
if(ratvar_awakens)
|
||||
desc = "<font size=3><b>CHETR<br>NYY<br>HAGEHUGF-NAQ-UBABE<br>RATVAR.</b></font>"
|
||||
else
|
||||
var/servants = 0
|
||||
var/validservants = 0
|
||||
var/unconverted_ais_exist = FALSE
|
||||
var/list/scripture_states = scripture_unlock_check()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
if(is_servant_of_ratvar(L))
|
||||
servants++
|
||||
if(ishuman(L) || issilicon(L))
|
||||
validservants++
|
||||
else if(isAI(L))
|
||||
unconverted_ais_exist++
|
||||
if(servants > 1)
|
||||
if(validservants > 1)
|
||||
desc = "<b>[servants]</b> Servants, <b>[validservants]</b> of which count towards scripture.<br>"
|
||||
else
|
||||
desc = "<b>[servants]</b> Servants, [validservants ? "<b>[validservants]</b> of which counts":"none of which count"] towards scripture.<br>"
|
||||
else
|
||||
desc = "<b>[servants]</b> Servant, who [validservants ? "counts":"does not count"] towards scripture.<br>"
|
||||
desc += "<b>[clockwork_caches ? "[clockwork_caches]</b> Tinkerer's Caches.":"No Tinkerer's Caches, construct one!</b>"]<br>\
|
||||
<b>[clockwork_construction_value]</b> Construction Value.<br>"
|
||||
if(clockwork_daemons)
|
||||
desc += "<b>[clockwork_daemons]</b> Tinkerer's Daemons: <b>[servants * 0.2 < clockwork_daemons ? "DISABLED":"ACTIVE"]</b><br>"
|
||||
else
|
||||
desc += "No Tinkerer's Daemons.<br>"
|
||||
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in all_clockwork_objects)
|
||||
var/area/gate_area = get_area(G)
|
||||
desc += "Ark Location: <b>[uppertext(gate_area.map_name)]</b><br>"
|
||||
if(G.ratvar_portal)
|
||||
desc += "Seconds until Ratvar's arrival: <b>[G.get_arrival_text(TRUE)]</b><br>"
|
||||
else
|
||||
desc += "Seconds until Proselytization: <b>[G.get_arrival_text(TRUE)]</b><br>"
|
||||
if(unconverted_ais_exist)
|
||||
if(unconverted_ais_exist > 1)
|
||||
desc += "<b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"
|
||||
else
|
||||
desc += "<b>An unconverted AI exists!</b><br>"
|
||||
if(scripture_states[SCRIPTURE_REVENANT])
|
||||
var/inathneq_available = clockwork_generals_invoked["inath-neq"] <= world.time
|
||||
var/sevtug_available = clockwork_generals_invoked["sevtug"] <= world.time
|
||||
var/nezbere_available = clockwork_generals_invoked["nezbere"] <= world.time
|
||||
var/nezcrentr_available = clockwork_generals_invoked["nzcrentr"] <= world.time
|
||||
if(inathneq_available || sevtug_available || nezbere_available || nezcrentr_available)
|
||||
desc += "Generals available:<b>[inathneq_available ? "<br><font color=#1E8CE1>INATH-NEQ</font>":""][sevtug_available ? "<br><font color=#AF0AAF>SEVTUG</font>":""]\
|
||||
[nezbere_available ? "<br><font color=#5A6068>NEZBERE</font>":""][nezcrentr_available ? "<br><font color=#DAAA18>NZCRENTR</font>":""]</b><br>"
|
||||
else
|
||||
desc += "Generals available: <b>NONE</b><br>"
|
||||
else
|
||||
desc += "Generals available: <b>NONE</b><br>"
|
||||
for(var/i in scripture_states)
|
||||
if(i != SCRIPTURE_DRIVER) //ignore the always-unlocked stuff
|
||||
desc += "[i] Scripture: <b>[scripture_states[i] ? "UNLOCKED":"LOCKED"]</b><br>"
|
||||
..()
|
||||
|
||||
//GUARDIANS
|
||||
|
||||
/obj/screen/alert/cancharge
|
||||
@@ -457,23 +297,6 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
icon_state = "newlaw"
|
||||
timeout = 300
|
||||
|
||||
/obj/screen/alert/hackingapc
|
||||
name = "Hacking APC"
|
||||
desc = "An Area Power Controller is being hacked. When the process is \
|
||||
complete, you will have exclusive control of it, and you will gain \
|
||||
additional processing time to unlock more malfunction abilities."
|
||||
icon_state = "hackingapc"
|
||||
timeout = 600
|
||||
var/atom/target = null
|
||||
|
||||
/obj/screen/alert/hackingapc/Click()
|
||||
if(!usr || !usr.client) return
|
||||
if(!target) return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
var/turf/T = get_turf(target)
|
||||
if(T)
|
||||
AI.eyeobj.setLoc(T)
|
||||
|
||||
//MECHS
|
||||
|
||||
/obj/screen/alert/low_mech_integrity
|
||||
@@ -536,7 +359,6 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
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
|
||||
|
||||
+37
-38
@@ -21,46 +21,50 @@
|
||||
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
|
||||
|
||||
|
||||
/obj/screen/alien/alien_queen_finder
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
icon_state = "queen_finder"
|
||||
name = "queen sense"
|
||||
desc = "Allows you to sense the general direction of your Queen."
|
||||
screen_loc = ui_alien_queen_finder
|
||||
|
||||
|
||||
/datum/hud/alien
|
||||
ui_style_icon = 'icons/mob/screen_alien.dmi'
|
||||
|
||||
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner, ui_style = 'icons/mob/screen_alien.dmi')
|
||||
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner)
|
||||
..()
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
//equippable shit
|
||||
|
||||
//hands
|
||||
build_hand_slots(ui_style)
|
||||
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 = ui_style
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.icon_state = "swap_1"
|
||||
using.screen_loc = ui_swaphand_position(owner,1)
|
||||
using.screen_loc = ui_swaphand1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand_position(owner,2)
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/act_intent/alien()
|
||||
@@ -74,28 +78,23 @@
|
||||
H.leap_icon.screen_loc = ui_alien_storage_r
|
||||
static_inventory += H.leap_icon
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.screen_loc = ui_alien_talk_wheel
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/resist()
|
||||
using.icon = ui_style
|
||||
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 = ui_style
|
||||
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 = ui_style
|
||||
pull_icon.icon = 'icons/mob/screen_alien.dmi'
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
static_inventory += pull_icon
|
||||
@@ -111,10 +110,6 @@
|
||||
alien_plasma_display = new /obj/screen/alien/plasma_display()
|
||||
infodisplay += alien_plasma_display
|
||||
|
||||
if(!istype(mymob, /mob/living/carbon/alien/humanoid/royal/queen))
|
||||
alien_queen_finder = new /obj/screen/alien/alien_queen_finder
|
||||
infodisplay += alien_queen_finder
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/alien()
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
@@ -125,18 +120,22 @@
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/alien/persistent_inventory_update()
|
||||
/datum/hud/alien/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/alien/humanoid/H = mymob
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
for(var/obj/item/I in H.held_items)
|
||||
I.screen_loc = ui_hand_position(H.get_held_index_of_item(I))
|
||||
H.client.screen += I
|
||||
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
|
||||
for(var/obj/item/I in H.held_items)
|
||||
I.screen_loc = null
|
||||
H.client.screen -= I
|
||||
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)
|
||||
|
||||
@@ -13,19 +13,13 @@
|
||||
nightvisionicon = new /obj/screen/alien/nightvision()
|
||||
nightvisionicon.screen_loc = ui_alien_nightvision
|
||||
infodisplay += nightvisionicon
|
||||
alien_queen_finder = new /obj/screen/alien/alien_queen_finder()
|
||||
infodisplay += alien_queen_finder
|
||||
|
||||
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
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.screen_loc = ui_alien_talk_wheel
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/alien()
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
@@ -34,15 +34,12 @@
|
||||
desc = "Moves your camera to your blob core."
|
||||
|
||||
/obj/screen/blob/JumpToCore/MouseEntered(location,control,params)
|
||||
if(hud && hud.mymob && isovermind(hud.mymob))
|
||||
var/mob/camera/blob/B = hud.mymob
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
if(!B.placed)
|
||||
name = "Place Blob Core"
|
||||
desc = "Attempt to place your blob core at this location."
|
||||
openToolTip(usr,src,params,title = "Place Blob Core",content = "Attempt to place your blob core at this location.", theme = "blob")
|
||||
else
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/screen/blob/JumpToCore/Click()
|
||||
if(isovermind(usr))
|
||||
@@ -54,7 +51,7 @@
|
||||
/obj/screen/blob/Blobbernaut
|
||||
icon_state = "ui_blobbernaut"
|
||||
name = "Produce Blobbernaut (40)"
|
||||
desc = "Produces a strong, smart blobbernaut from a factory blob for 40 resources.<br>The factory blob used will become fragile and unable to produce spores."
|
||||
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))
|
||||
@@ -64,7 +61,7 @@
|
||||
/obj/screen/blob/ResourceBlob
|
||||
icon_state = "ui_resource"
|
||||
name = "Produce Resource Blob (40)"
|
||||
desc = "Produces a resource blob for 40 resources.<br>Resource blobs will give you resources every few seconds."
|
||||
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))
|
||||
@@ -73,8 +70,8 @@
|
||||
|
||||
/obj/screen/blob/NodeBlob
|
||||
icon_state = "ui_node"
|
||||
name = "Produce Node Blob (50)"
|
||||
desc = "Produces a node blob for 50 resources.<br>Node blobs will expand and activate nearby resource and factory blobs."
|
||||
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))
|
||||
@@ -84,7 +81,7 @@
|
||||
/obj/screen/blob/FactoryBlob
|
||||
icon_state = "ui_factory"
|
||||
name = "Produce Factory Blob (60)"
|
||||
desc = "Produces a factory blob for 60 resources.<br>Factory blobs will produce spores every few seconds."
|
||||
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))
|
||||
@@ -94,18 +91,15 @@
|
||||
/obj/screen/blob/ReadaptChemical
|
||||
icon_state = "ui_chemswap"
|
||||
name = "Readapt Chemical (40)"
|
||||
desc = "Randomly rerolls your chemical for 40 resources."
|
||||
desc = "Randomly rerolls your chemical for 40 points."
|
||||
|
||||
/obj/screen/blob/ReadaptChemical/MouseEntered(location,control,params)
|
||||
if(hud && hud.mymob && isovermind(hud.mymob))
|
||||
var/mob/camera/blob/B = hud.mymob
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
if(B.free_chem_rerolls)
|
||||
name = "Readapt Chemical (FREE)"
|
||||
desc = "Randomly rerolls your chemical for free."
|
||||
openToolTip(usr,src,params,title = "Readapt Chemical (FREE)",content = "Randomly rerolls your chemical for free.", theme = "blob")
|
||||
else
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/screen/blob/ReadaptChemical/Click()
|
||||
if(isovermind(usr))
|
||||
@@ -115,7 +109,7 @@
|
||||
/obj/screen/blob/RelocateCore
|
||||
icon_state = "ui_swap"
|
||||
name = "Relocate Core (80)"
|
||||
desc = "Swaps a node and your core for 80 resources."
|
||||
desc = "Swaps a node and your core for 80 points."
|
||||
|
||||
/obj/screen/blob/RelocateCore/Click()
|
||||
if(isovermind(usr))
|
||||
@@ -132,7 +126,6 @@
|
||||
blobpwrdisplay.screen_loc = ui_health
|
||||
blobpwrdisplay.mouse_opacity = 0
|
||||
blobpwrdisplay.layer = ABOVE_HUD_LAYER
|
||||
blobpwrdisplay.plane = ABOVE_HUD_PLANE
|
||||
infodisplay += blobpwrdisplay
|
||||
|
||||
healths = new /obj/screen/healths/blob()
|
||||
@@ -148,7 +141,6 @@
|
||||
|
||||
using = new /obj/screen/blob/JumpToCore()
|
||||
using.screen_loc = ui_zonesel
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/Blobbernaut()
|
||||
@@ -160,16 +152,15 @@
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/NodeBlob()
|
||||
using.screen_loc = ui_hand_position(2)
|
||||
using.screen_loc = ui_lhand
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/FactoryBlob()
|
||||
using.screen_loc = ui_hand_position(1)
|
||||
using.screen_loc = ui_rhand
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/ReadaptChemical()
|
||||
using.screen_loc = ui_storage1
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/RelocateCore()
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
/datum/hud/marauder
|
||||
var/obj/screen/hosthealth
|
||||
var/obj/screen/blockchance
|
||||
var/obj/screen/counterchance
|
||||
|
||||
/datum/hud/marauder/New(mob/living/simple_animal/hostile/guardian/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
healths = new /obj/screen/healths/clock()
|
||||
infodisplay += healths
|
||||
|
||||
hosthealth = new /obj/screen/healths/clock()
|
||||
hosthealth.screen_loc = ui_internal
|
||||
infodisplay += hosthealth
|
||||
|
||||
using = new /obj/screen/marauder/emerge()
|
||||
using.screen_loc = ui_zonesel
|
||||
static_inventory += using
|
||||
|
||||
blockchance = new /obj/screen/marauder/blockchance()
|
||||
blockchance.screen_loc = ui_hand_position(2)
|
||||
infodisplay += blockchance
|
||||
|
||||
counterchance = new /obj/screen/marauder/counterchance()
|
||||
counterchance.screen_loc = ui_hand_position(1)
|
||||
infodisplay += counterchance
|
||||
|
||||
/datum/hud/marauder/Destroy()
|
||||
blockchance = null
|
||||
counterchance = null
|
||||
hosthealth = null
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/marauder/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/marauder(src, ui_style2icon(client.prefs.UI_style))
|
||||
|
||||
|
||||
/obj/screen/marauder
|
||||
icon = 'icons/mob/clockwork_mobs.dmi'
|
||||
|
||||
/obj/screen/marauder/emerge
|
||||
icon_state = "marauder_emerge"
|
||||
name = "Emerge/Return"
|
||||
desc = "Emerge or Return."
|
||||
|
||||
/obj/screen/marauder/emerge/Click()
|
||||
if(istype(usr, /mob/living/simple_animal/hostile/clockwork/marauder))
|
||||
var/mob/living/simple_animal/hostile/clockwork/marauder/M = usr
|
||||
if(M.is_in_host())
|
||||
M.try_emerge()
|
||||
else
|
||||
M.return_to_host()
|
||||
|
||||
/obj/screen/marauder/blockchance
|
||||
icon_state = "marauder_block"
|
||||
name = "Block Chance"
|
||||
desc = "Clang."
|
||||
|
||||
/obj/screen/marauder/counterchance
|
||||
icon_state = "marauder_counter"
|
||||
name = "Counter Chance"
|
||||
desc = "Slash."
|
||||
+29
-12
@@ -5,6 +5,7 @@
|
||||
/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
|
||||
@@ -17,24 +18,36 @@
|
||||
pull_icon.screen_loc = ui_drone_pull
|
||||
static_inventory += pull_icon
|
||||
|
||||
build_hand_slots(ui_style)
|
||||
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_swaphand_position(owner,1)
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.layer = HUD_LAYER
|
||||
using.plane = HUD_PLANE
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand_position(owner,2)
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.layer = HUD_LAYER
|
||||
using.plane = HUD_PLANE
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
@@ -46,19 +59,23 @@
|
||||
infodisplay += devilsouldisplay
|
||||
|
||||
|
||||
/datum/hud/devil/persistent_inventory_update()
|
||||
/datum/hud/devil/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/true_devil/D = mymob
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
for(var/obj/item/I in D.held_items)
|
||||
I.screen_loc = ui_hand_position(D.get_held_index_of_item(I))
|
||||
D.client.screen += I
|
||||
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
|
||||
for(var/obj/item/I in D.held_items)
|
||||
I.screen_loc = null
|
||||
D.client.screen -= I
|
||||
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)
|
||||
|
||||
@@ -1,14 +1,42 @@
|
||||
/datum/hud/dextrous/drone/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/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_generic_dextrous_storage
|
||||
inv_box.slot_id = slot_drone_storage
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -20,6 +48,26 @@
|
||||
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
|
||||
@@ -27,7 +75,7 @@
|
||||
inv.update_icon()
|
||||
|
||||
|
||||
/datum/hud/dextrous/drone/persistent_inventory_update()
|
||||
/datum/hud/drone/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/simple_animal/drone/D = mymob
|
||||
@@ -45,4 +93,19 @@
|
||||
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))
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
icon_state = "default"
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
layer = FULLSCREEN_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
mouse_opacity = 0
|
||||
var/severity = 0
|
||||
|
||||
@@ -72,22 +71,18 @@
|
||||
/obj/screen/fullscreen/brute
|
||||
icon_state = "brutedamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/oxy
|
||||
icon_state = "oxydamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/crit
|
||||
icon_state = "passage"
|
||||
layer = CRIT_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/blind
|
||||
icon_state = "blackimageoverlay"
|
||||
layer = BLIND_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/impaired
|
||||
icon_state = "impairedoverlay"
|
||||
@@ -102,7 +97,7 @@
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "flash"
|
||||
|
||||
/obj/screen/fullscreen/flash/static
|
||||
/obj/screen/fullscreen/flash/noise
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "noise"
|
||||
@@ -111,18 +106,3 @@
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "druggy"
|
||||
|
||||
/obj/screen/fullscreen/color_vision
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "flash"
|
||||
alpha = 80
|
||||
|
||||
/obj/screen/fullscreen/color_vision/green
|
||||
color = "#00ff00"
|
||||
|
||||
/obj/screen/fullscreen/color_vision/red
|
||||
color = "#ff0000"
|
||||
|
||||
/obj/screen/fullscreen/color_vision/blue
|
||||
color = "#0000ff"
|
||||
@@ -2,42 +2,39 @@
|
||||
/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
|
||||
|
||||
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
|
||||
|
||||
build_hand_slots(ui_style)
|
||||
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_swaphand_position(owner,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_swaphand_position(owner,2)
|
||||
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
|
||||
|
||||
using = new /obj/screen/inventory/area_creator
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
mymob.client.screen = list()
|
||||
@@ -48,24 +45,19 @@
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/dextrous/persistent_inventory_update()
|
||||
/datum/hud/dextrous/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/D = mymob
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
for(var/obj/item/I in D.held_items)
|
||||
I.screen_loc = ui_hand_position(D.get_held_index_of_item(I))
|
||||
D.client.screen += I
|
||||
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
|
||||
for(var/obj/item/I in D.held_items)
|
||||
I.screen_loc = null
|
||||
D.client.screen -= I
|
||||
|
||||
|
||||
//Dextrous simple mobs can use hands!
|
||||
/mob/living/simple_animal/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
if(dextrous)
|
||||
hud_used = new dextrous_hud_type(src, ui_style2icon(client.prefs.UI_style))
|
||||
else
|
||||
..()
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = null
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = null
|
||||
|
||||
@@ -36,15 +36,7 @@
|
||||
var/mob/dead/observer/G = usr
|
||||
G.dead_tele()
|
||||
|
||||
/obj/screen/ghost/pai
|
||||
name = "pAI Candidate"
|
||||
icon_state = "pai"
|
||||
|
||||
/obj/screen/ghost/pai/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.register_pai()
|
||||
|
||||
/datum/hud/ghost/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/ghost/New(mob/owner)
|
||||
..()
|
||||
var/mob/dead/observer/G = mymob
|
||||
if(!G.client.prefs.ghost_hud)
|
||||
@@ -69,19 +61,14 @@
|
||||
using.screen_loc = ui_ghost_teleport
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/pai()
|
||||
using.screen_loc = ui_ghost_pai
|
||||
static_inventory += using
|
||||
|
||||
|
||||
/datum/hud/ghost/show_hud()
|
||||
var/mob/dead/observer/G = mymob
|
||||
mymob.client.screen = list()
|
||||
create_parallax()
|
||||
if(G.client.prefs.ghost_hud)
|
||||
mymob.client.screen += static_inventory
|
||||
|
||||
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, ui_style2icon(client.prefs.UI_style))
|
||||
hud_used = new /datum/hud/ghost(src)
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
infodisplay += healths
|
||||
|
||||
using = new /obj/screen/guardian/Manifest()
|
||||
using.screen_loc = ui_hand_position(2)
|
||||
using.screen_loc = ui_rhand
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/guardian/Recall()
|
||||
using.screen_loc = ui_hand_position(1)
|
||||
using.screen_loc = ui_lhand
|
||||
static_inventory += using
|
||||
|
||||
using = new owner.toggle_button_type()
|
||||
@@ -29,69 +29,8 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
if(dextrous)
|
||||
..()
|
||||
else
|
||||
hud_used = new /datum/hud/guardian(src, ui_style2icon(client.prefs.UI_style))
|
||||
hud_used = new /datum/hud/guardian(src)
|
||||
|
||||
/datum/hud/dextrous/guardian/New(mob/living/simple_animal/hostile/guardian/owner, ui_style = 'icons/mob/screen_midnight.dmi') //for a dextrous guardian
|
||||
..()
|
||||
var/obj/screen/using
|
||||
if(istype(owner, /mob/living/simple_animal/hostile/guardian/dextrous))
|
||||
var/obj/screen/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.screen_loc = ui_id
|
||||
inv_box.slot_id = slot_generic_dextrous_storage
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/guardian/Communicate()
|
||||
using.screen_loc = ui_sstore1
|
||||
static_inventory += using
|
||||
|
||||
else
|
||||
|
||||
using = new /obj/screen/guardian/Communicate()
|
||||
using.screen_loc = ui_id
|
||||
static_inventory += using
|
||||
|
||||
healths = new /obj/screen/healths/guardian()
|
||||
infodisplay += healths
|
||||
|
||||
using = new /obj/screen/guardian/Manifest()
|
||||
using.screen_loc = ui_belt
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/guardian/Recall()
|
||||
using.screen_loc = ui_back
|
||||
static_inventory += using
|
||||
|
||||
using = new owner.toggle_button_type()
|
||||
using.screen_loc = ui_storage2
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/guardian/ToggleLight()
|
||||
using.screen_loc = ui_inventory
|
||||
static_inventory += using
|
||||
|
||||
/datum/hud/dextrous/guardian/persistent_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
if(istype(mymob, /mob/living/simple_animal/hostile/guardian/dextrous))
|
||||
var/mob/living/simple_animal/hostile/guardian/dextrous/D = mymob
|
||||
|
||||
if(hud_shown)
|
||||
if(D.internal_storage)
|
||||
D.internal_storage.screen_loc = ui_id
|
||||
D.client.screen += D.internal_storage
|
||||
else
|
||||
if(D.internal_storage)
|
||||
D.internal_storage.screen_loc = null
|
||||
|
||||
..()
|
||||
|
||||
/obj/screen/guardian
|
||||
icon = 'icons/mob/guardian.dmi'
|
||||
|
||||
+29
-101
@@ -9,7 +9,7 @@
|
||||
|
||||
var/hud_shown = 1 //Used for the HUD toggle (F12)
|
||||
var/hud_version = 1 //Current displayed version of the HUD
|
||||
var/inventory_shown = 0 //Equipped item inventory
|
||||
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)
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
var/obj/screen/blobpwrdisplay
|
||||
|
||||
var/obj/screen/alien_plasma_display
|
||||
var/obj/screen/alien_queen_finder
|
||||
|
||||
var/obj/screen/devil/soul_counter/devilsouldisplay
|
||||
|
||||
@@ -33,16 +32,12 @@
|
||||
var/obj/screen/throw_icon
|
||||
var/obj/screen/module_store_icon
|
||||
|
||||
var/list/wheels = list() //list of the wheel screen objects
|
||||
|
||||
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/list/hand_slots // /obj/screen/inventory/hand objects, assoc list of "[held_index]" = object
|
||||
var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
|
||||
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = 0
|
||||
@@ -51,21 +46,10 @@
|
||||
var/obj/screen/healthdoll
|
||||
var/obj/screen/internals
|
||||
|
||||
var/ui_style_icon = 'icons/mob/screen_midnight.dmi'
|
||||
|
||||
/datum/hud/New(mob/owner , ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
|
||||
ui_style_icon = ui_style
|
||||
|
||||
hide_actions_toggle = new
|
||||
hide_actions_toggle.InitialiseIcon(src)
|
||||
|
||||
hand_slots = list()
|
||||
|
||||
for(var/mytype in subtypesof(/obj/screen/plane_master))
|
||||
var/obj/screen/plane_master/instance = new mytype()
|
||||
plane_masters["[instance.plane]"] = instance
|
||||
hide_actions_toggle.InitialiseIcon(mymob)
|
||||
|
||||
/datum/hud/Destroy()
|
||||
if(mymob.hud_used == src)
|
||||
@@ -77,8 +61,6 @@
|
||||
qdel(module_store_icon)
|
||||
module_store_icon = null
|
||||
|
||||
wheels = null //all wheels are also in static_inventory
|
||||
|
||||
if(static_inventory.len)
|
||||
for(var/thing in static_inventory)
|
||||
qdel(thing)
|
||||
@@ -114,16 +96,10 @@
|
||||
lingstingdisplay = null
|
||||
blobpwrdisplay = null
|
||||
alien_plasma_display = null
|
||||
alien_queen_finder = null
|
||||
deity_power_display = null
|
||||
deity_follower_display = null
|
||||
nightvisionicon = null
|
||||
|
||||
if(plane_masters.len)
|
||||
for(var/thing in plane_masters)
|
||||
qdel(plane_masters[thing])
|
||||
plane_masters.Cut()
|
||||
|
||||
if(screenoverlays.len)
|
||||
for(var/thing in screenoverlays)
|
||||
qdel(thing)
|
||||
@@ -136,15 +112,13 @@
|
||||
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,mob/viewmob)
|
||||
/datum/hud/proc/show_hud(version = 0)
|
||||
if(!ismob(mymob))
|
||||
return 0
|
||||
if(!mymob.client)
|
||||
return 0
|
||||
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
|
||||
screenmob.client.screen = list()
|
||||
mymob.client.screen = list()
|
||||
|
||||
var/display_hud_version = version
|
||||
if(!display_hud_version) //If 0 or blank, display the next hud version
|
||||
@@ -156,13 +130,13 @@
|
||||
if(HUD_STYLE_STANDARD) //Default HUD
|
||||
hud_shown = 1 //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
screenmob.client.screen += static_inventory
|
||||
if(toggleable_inventory.len && screenmob.hud_used && screenmob.hud_used.inventory_shown)
|
||||
screenmob.client.screen += toggleable_inventory
|
||||
mymob.client.screen += static_inventory
|
||||
if(toggleable_inventory.len && inventory_shown)
|
||||
mymob.client.screen += toggleable_inventory
|
||||
if(hotkeybuttons.len && !hotkey_ui_hidden)
|
||||
screenmob.client.screen += hotkeybuttons
|
||||
mymob.client.screen += hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen += infodisplay
|
||||
mymob.client.screen += infodisplay
|
||||
|
||||
mymob.client.screen += hide_actions_toggle
|
||||
|
||||
@@ -172,48 +146,45 @@
|
||||
if(HUD_STYLE_REDUCED) //Reduced HUD
|
||||
hud_shown = 0 //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
screenmob.client.screen -= static_inventory
|
||||
mymob.client.screen -= static_inventory
|
||||
if(toggleable_inventory.len)
|
||||
screenmob.client.screen -= toggleable_inventory
|
||||
mymob.client.screen -= toggleable_inventory
|
||||
if(hotkeybuttons.len)
|
||||
screenmob.client.screen -= hotkeybuttons
|
||||
mymob.client.screen -= hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen += infodisplay
|
||||
mymob.client.screen += infodisplay
|
||||
|
||||
//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
|
||||
for(var/h in hand_slots)
|
||||
var/obj/screen/hand = hand_slots[h]
|
||||
if(hand)
|
||||
screenmob.client.screen += hand
|
||||
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)
|
||||
screenmob.client.screen += action_intent //we want the intent switcher visible
|
||||
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)
|
||||
screenmob.client.screen -= static_inventory
|
||||
mymob.client.screen -= static_inventory
|
||||
if(toggleable_inventory.len)
|
||||
screenmob.client.screen -= toggleable_inventory
|
||||
mymob.client.screen -= toggleable_inventory
|
||||
if(hotkeybuttons.len)
|
||||
screenmob.client.screen -= hotkeybuttons
|
||||
mymob.client.screen -= hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen -= infodisplay
|
||||
mymob.client.screen -= infodisplay
|
||||
|
||||
if(plane_masters.len)
|
||||
for(var/thing in plane_masters)
|
||||
screenmob.client.screen += plane_masters[thing]
|
||||
hud_version = display_hud_version
|
||||
persistent_inventory_update(screenmob)
|
||||
persistant_inventory_update()
|
||||
mymob.update_action_buttons(1)
|
||||
reorganize_alerts()
|
||||
mymob.reload_fullscreen()
|
||||
create_parallax()
|
||||
update_parallax_existence()
|
||||
|
||||
|
||||
/datum/hud/human/show_hud(version = 0,mob/viewmob)
|
||||
/datum/hud/human/show_hud(version = 0)
|
||||
..()
|
||||
hidden_inventory_update(viewmob)
|
||||
hidden_inventory_update()
|
||||
|
||||
/datum/hud/robot/show_hud(version = 0)
|
||||
..()
|
||||
@@ -222,19 +193,8 @@
|
||||
/datum/hud/proc/hidden_inventory_update()
|
||||
return
|
||||
|
||||
/datum/hud/proc/persistent_inventory_update(mob/viewer)
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/L = mymob
|
||||
|
||||
var/mob/screenmob = viewer || L
|
||||
|
||||
for(var/X in wheels)
|
||||
var/obj/screen/wheel/W = X
|
||||
if(W.toggled)
|
||||
screenmob.client.screen |= W.buttons_list
|
||||
else
|
||||
screenmob.client.screen -= W.buttons_list
|
||||
/datum/hud/proc/persistant_inventory_update()
|
||||
return
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12()
|
||||
@@ -246,35 +206,3 @@
|
||||
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>"
|
||||
|
||||
|
||||
//(re)builds the hand ui slots, throwing away old ones
|
||||
//not really worth jugglying existing ones so we just scrap+rebuild
|
||||
//9/10 this is only called once per mob and only for 2 hands
|
||||
/datum/hud/proc/build_hand_slots(ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
for(var/h in hand_slots)
|
||||
var/obj/screen/inventory/hand/H = hand_slots[h]
|
||||
if(H)
|
||||
static_inventory -= H
|
||||
hand_slots = list()
|
||||
var/obj/screen/inventory/hand/hand_box
|
||||
for(var/i in 1 to mymob.held_items.len)
|
||||
hand_box = new /obj/screen/inventory/hand()
|
||||
hand_box.name = mymob.get_held_index_name(i)
|
||||
hand_box.icon = ui_style
|
||||
hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]"
|
||||
hand_box.screen_loc = ui_hand_position(i)
|
||||
hand_box.held_index = i
|
||||
hand_slots["[i]"] = hand_box
|
||||
hand_box.hud = src
|
||||
static_inventory += hand_box
|
||||
hand_box.update_icon()
|
||||
|
||||
var/i = 1
|
||||
for(var/obj/screen/swap_hand/SH in static_inventory)
|
||||
SH.screen_loc = ui_swaphand_position(mymob,!(i % 2) ? 2: 1)
|
||||
i++
|
||||
for(var/obj/screen/human/equip/E in static_inventory)
|
||||
E.screen_loc = ui_equip_position(mymob)
|
||||
if(mymob.hud_used)
|
||||
show_hud(HUD_STYLE_STANDARD,mymob)
|
||||
+87
-109
@@ -6,22 +6,14 @@
|
||||
icon_state = "toggle"
|
||||
|
||||
/obj/screen/human/toggle/Click()
|
||||
|
||||
var/mob/targetmob = usr
|
||||
|
||||
if(isobserver(usr))
|
||||
if(ishuman(usr.client.eye) && (usr.client.eye != usr))
|
||||
var/mob/M = usr.client.eye
|
||||
targetmob = M
|
||||
|
||||
if(usr.hud_used.inventory_shown && targetmob.hud_used)
|
||||
if(usr.hud_used.inventory_shown)
|
||||
usr.hud_used.inventory_shown = 0
|
||||
usr.client.screen -= targetmob.hud_used.toggleable_inventory
|
||||
usr.client.screen -= usr.hud_used.toggleable_inventory
|
||||
else
|
||||
usr.hud_used.inventory_shown = 1
|
||||
usr.client.screen += targetmob.hud_used.toggleable_inventory
|
||||
usr.client.screen += usr.hud_used.toggleable_inventory
|
||||
|
||||
targetmob.hud_used.hidden_inventory_update(usr)
|
||||
usr.hud_used.hidden_inventory_update()
|
||||
|
||||
/obj/screen/human/equip
|
||||
name = "equip"
|
||||
@@ -70,8 +62,6 @@
|
||||
screen_loc = ui_lingstingdisplay
|
||||
|
||||
/obj/screen/ling/sting/Click()
|
||||
if(isobserver(usr))
|
||||
return
|
||||
var/mob/living/carbon/U = usr
|
||||
U.unset_sting()
|
||||
|
||||
@@ -87,6 +77,7 @@
|
||||
|
||||
/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
|
||||
|
||||
@@ -94,15 +85,6 @@
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.icon = ui_style
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/inventory/area_creator
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/act_intent()
|
||||
using.icon_state = mymob.a_intent
|
||||
static_inventory += using
|
||||
@@ -110,7 +92,7 @@
|
||||
|
||||
using = new /obj/screen/mov_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
@@ -137,18 +119,32 @@
|
||||
inv_box.screen_loc = ui_oclothing
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
build_hand_slots(ui_style)
|
||||
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_swaphand_position(owner,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_swaphand_position(owner,2)
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -169,15 +165,6 @@
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "neck"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "neck"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_neck
|
||||
inv_box.slot_id = slot_neck
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "back"
|
||||
inv_box.icon = ui_style
|
||||
@@ -226,7 +213,7 @@
|
||||
|
||||
using = new /obj/screen/human/equip()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_equip_position(mymob)
|
||||
using.screen_loc = ui_equip
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -317,111 +304,102 @@
|
||||
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(mob/viewer)
|
||||
/datum/hud/human/hidden_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/human/H = mymob
|
||||
|
||||
var/mob/screenmob = viewer || H
|
||||
|
||||
if(screenmob.hud_used.inventory_shown && screenmob.hud_used.hud_shown)
|
||||
if(inventory_shown && hud_shown)
|
||||
if(H.shoes)
|
||||
H.shoes.screen_loc = ui_shoes
|
||||
screenmob.client.screen += H.shoes
|
||||
H.client.screen += H.shoes
|
||||
if(H.gloves)
|
||||
H.gloves.screen_loc = ui_gloves
|
||||
screenmob.client.screen += H.gloves
|
||||
H.client.screen += H.gloves
|
||||
if(H.ears)
|
||||
H.ears.screen_loc = ui_ears
|
||||
screenmob.client.screen += H.ears
|
||||
H.client.screen += H.ears
|
||||
if(H.glasses)
|
||||
H.glasses.screen_loc = ui_glasses
|
||||
screenmob.client.screen += H.glasses
|
||||
H.client.screen += H.glasses
|
||||
if(H.w_uniform)
|
||||
H.w_uniform.screen_loc = ui_iclothing
|
||||
screenmob.client.screen += H.w_uniform
|
||||
H.client.screen += H.w_uniform
|
||||
if(H.wear_suit)
|
||||
H.wear_suit.screen_loc = ui_oclothing
|
||||
screenmob.client.screen += H.wear_suit
|
||||
H.client.screen += H.wear_suit
|
||||
if(H.wear_mask)
|
||||
H.wear_mask.screen_loc = ui_mask
|
||||
screenmob.client.screen += H.wear_mask
|
||||
if(H.wear_neck)
|
||||
H.wear_neck.screen_loc = ui_neck
|
||||
screenmob.client.screen += H.wear_neck
|
||||
H.client.screen += H.wear_mask
|
||||
if(H.head)
|
||||
H.head.screen_loc = ui_head
|
||||
screenmob.client.screen += H.head
|
||||
H.client.screen += H.head
|
||||
else
|
||||
if(H.shoes) screenmob.client.screen -= H.shoes
|
||||
if(H.gloves) screenmob.client.screen -= H.gloves
|
||||
if(H.ears) screenmob.client.screen -= H.ears
|
||||
if(H.glasses) screenmob.client.screen -= H.glasses
|
||||
if(H.w_uniform) screenmob.client.screen -= H.w_uniform
|
||||
if(H.wear_suit) screenmob.client.screen -= H.wear_suit
|
||||
if(H.wear_mask) screenmob.client.screen -= H.wear_mask
|
||||
if(H.wear_neck) screenmob.client.screen -= H.wear_neck
|
||||
if(H.head) screenmob.client.screen -= H.head
|
||||
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/persistent_inventory_update(mob/viewer)
|
||||
/datum/hud/human/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
..()
|
||||
var/mob/living/carbon/human/H = mymob
|
||||
|
||||
var/mob/screenmob = viewer || H
|
||||
|
||||
if(screenmob.hud_used)
|
||||
if(screenmob.hud_used.hud_shown)
|
||||
if(H.s_store)
|
||||
H.s_store.screen_loc = ui_sstore1
|
||||
screenmob.client.screen += H.s_store
|
||||
if(H.wear_id)
|
||||
H.wear_id.screen_loc = ui_id
|
||||
screenmob.client.screen += H.wear_id
|
||||
if(H.belt)
|
||||
H.belt.screen_loc = ui_belt
|
||||
screenmob.client.screen += H.belt
|
||||
if(H.back)
|
||||
H.back.screen_loc = ui_back
|
||||
screenmob.client.screen += H.back
|
||||
if(H.l_store)
|
||||
H.l_store.screen_loc = ui_storage1
|
||||
screenmob.client.screen += H.l_store
|
||||
if(H.r_store)
|
||||
H.r_store.screen_loc = ui_storage2
|
||||
screenmob.client.screen += H.r_store
|
||||
else
|
||||
if(H.s_store)
|
||||
screenmob.client.screen -= H.s_store
|
||||
if(H.wear_id)
|
||||
screenmob.client.screen -= H.wear_id
|
||||
if(H.belt)
|
||||
screenmob.client.screen -= H.belt
|
||||
if(H.back)
|
||||
screenmob.client.screen -= H.back
|
||||
if(H.l_store)
|
||||
screenmob.client.screen -= H.l_store
|
||||
if(H.r_store)
|
||||
screenmob.client.screen -= H.r_store
|
||||
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)
|
||||
for(var/obj/item/I in H.held_items)
|
||||
I.screen_loc = ui_hand_position(H.get_held_index_of_item(I))
|
||||
screenmob.client.screen += I
|
||||
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
|
||||
for(var/obj/item/I in H.held_items)
|
||||
I.screen_loc = null
|
||||
screenmob.client.screen -= I
|
||||
|
||||
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"
|
||||
|
||||
+29
-28
@@ -12,32 +12,41 @@
|
||||
|
||||
using = new /obj/screen/mov_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.icon = ui_style
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
build_hand_slots(ui_style)
|
||||
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_swaphand_position(owner,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_swaphand_position(owner,2)
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -49,15 +58,6 @@
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "neck"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "neck"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_neck
|
||||
inv_box.slot_id = slot_neck
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = ui_style
|
||||
@@ -118,7 +118,7 @@
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/monkey/persistent_inventory_update()
|
||||
/datum/hud/monkey/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/monkey/M = mymob
|
||||
@@ -130,9 +130,6 @@
|
||||
if(M.wear_mask)
|
||||
M.wear_mask.screen_loc = ui_monkey_mask
|
||||
M.client.screen += M.wear_mask
|
||||
if(M.wear_neck)
|
||||
M.wear_neck.screen_loc = ui_monkey_neck
|
||||
M.client.screen += M.wear_neck
|
||||
if(M.head)
|
||||
M.head.screen_loc = ui_monkey_head
|
||||
M.client.screen += M.head
|
||||
@@ -145,13 +142,17 @@
|
||||
M.head.screen_loc = null
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
for(var/obj/item/I in M.held_items)
|
||||
I.screen_loc = ui_hand_position(M.get_held_index_of_item(I))
|
||||
M.client.screen += I
|
||||
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
|
||||
for(var/obj/item/I in M.held_items)
|
||||
I.screen_loc = null
|
||||
M.client.screen -= I
|
||||
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)
|
||||
|
||||
@@ -7,7 +7,35 @@
|
||||
mymob.client.screen = list()
|
||||
mymob.client.screen += mymob.client.void
|
||||
|
||||
/mob/living/brain/create_mob_hud()
|
||||
/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
|
||||
|
||||
|
||||
+218
-232
@@ -1,268 +1,254 @@
|
||||
/*
|
||||
* This file handles all parallax-related business once the parallax itself is initialized with the rest of the HUD
|
||||
*/
|
||||
#define PARALLAX_IMAGE_WIDTH 15
|
||||
#define PARALLAX_IMAGE_TILES (PARALLAX_IMAGE_WIDTH**2)
|
||||
|
||||
/client
|
||||
var/list/parallax_layers
|
||||
var/list/parallax_layers_cached
|
||||
var/static/list/parallax_static_layers_tail = newlist(/obj/screen/parallax_pmaster, /obj/screen/parallax_space_whitifier)
|
||||
var/atom/movable/movingmob
|
||||
var/turf/previous_turf
|
||||
var/dont_animate_parallax //world.time of when we can state animate()ing parallax again
|
||||
var/last_parallax_shift //world.time of last update
|
||||
var/parallax_throttle = 0 //ds between updates
|
||||
var/parallax_movedir = 0
|
||||
var/parallax_layers_max = 3
|
||||
var/parallax_animate_timer
|
||||
var/list/parallax_on_clients = list()
|
||||
|
||||
/datum/hud/proc/create_parallax()
|
||||
var/client/C = mymob.client
|
||||
if (!apply_parallax_pref())
|
||||
/obj/screen/parallax
|
||||
var/base_offset_x = 0
|
||||
var/base_offset_y = 0
|
||||
mouse_opacity = 0
|
||||
icon = 'icons/turf/space.dmi'
|
||||
icon_state = "blank"
|
||||
name = "space parallax"
|
||||
screen_loc = "CENTER,CENTER"
|
||||
blend_mode = BLEND_ADD
|
||||
layer = AREA_LAYER
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
var/parallax_speed = 0
|
||||
|
||||
/obj/screen/plane_master
|
||||
appearance_flags = PLANE_MASTER
|
||||
screen_loc = "CENTER,CENTER"
|
||||
|
||||
/obj/screen/plane_master/parallax_master
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
color = list(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,0,
|
||||
0,0,0,1)
|
||||
|
||||
/obj/screen/plane_master/parallax_spacemaster //Turns space white, causing the parallax to only show in areas with opacity. Somehow
|
||||
plane = PLANE_SPACE_BACKGROUND
|
||||
color = list(
|
||||
0,0,0,0,
|
||||
0,0,0,0,
|
||||
0,0,0,0,
|
||||
1,1,1,1,
|
||||
0,0,0,0)
|
||||
|
||||
/obj/screen/plane_master/parallax_spacemaster/New()
|
||||
..()
|
||||
overlays += image(icon = 'icons/mob/screen1.dmi', icon_state = "blank")
|
||||
|
||||
/obj/screen/plane_master/parallax_dustmaster
|
||||
plane = PLANE_SPACE_DUST
|
||||
color = list(0,0,0,0)
|
||||
|
||||
/datum/hud/proc/update_parallax_existence()
|
||||
if(!parallax_initialized)
|
||||
return
|
||||
initialize_parallax()
|
||||
update_parallax()
|
||||
update_parallax_values()
|
||||
|
||||
if(!length(C.parallax_layers_cached))
|
||||
C.parallax_layers_cached = list()
|
||||
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_1(null, C.view)
|
||||
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_2(null, C.view)
|
||||
|
||||
C.parallax_layers = C.parallax_layers_cached.Copy()
|
||||
|
||||
if (length(C.parallax_layers) > C.parallax_layers_max)
|
||||
C.parallax_layers.len = C.parallax_layers_max
|
||||
|
||||
C.screen |= (C.parallax_layers + C.parallax_static_layers_tail)
|
||||
|
||||
/datum/hud/proc/remove_parallax()
|
||||
/datum/hud/proc/initialize_parallax()
|
||||
var/client/C = mymob.client
|
||||
C.screen -= (C.parallax_layers_cached + C.parallax_static_layers_tail)
|
||||
C.parallax_layers = null
|
||||
|
||||
/datum/hud/proc/apply_parallax_pref()
|
||||
var/client/C = mymob.client
|
||||
switch(C.prefs.parallax)
|
||||
if (PARALLAX_INSANE)
|
||||
C.parallax_throttle = FALSE
|
||||
C.parallax_layers_max = 4
|
||||
return TRUE
|
||||
if(!C.parallax_master)
|
||||
C.parallax_master = PoolOrNew(/obj/screen/plane_master/parallax_master)
|
||||
if(!C.parallax_spacemaster)
|
||||
C.parallax_spacemaster = PoolOrNew(/obj/screen/plane_master/parallax_spacemaster)
|
||||
if(!C.parallax_dustmaster)
|
||||
C.parallax_dustmaster = PoolOrNew(/obj/screen/plane_master/parallax_dustmaster)
|
||||
|
||||
if (PARALLAX_MED)
|
||||
C.parallax_throttle = PARALLAX_DELAY_MED
|
||||
C.parallax_layers_max = 2
|
||||
return TRUE
|
||||
if(!C.parallax.len)
|
||||
for(var/obj/screen/parallax/bgobj in parallax_icon)
|
||||
var/obj/screen/parallax/parallax_layer = PoolOrNew(/obj/screen/parallax)
|
||||
parallax_layer.appearance = bgobj.appearance
|
||||
parallax_layer.base_offset_x = bgobj.base_offset_x
|
||||
parallax_layer.base_offset_y = bgobj.base_offset_y
|
||||
parallax_layer.parallax_speed = bgobj.parallax_speed
|
||||
parallax_layer.screen_loc = bgobj.screen_loc
|
||||
C.parallax += parallax_layer
|
||||
if(bgobj.parallax_speed)
|
||||
C.parallax_movable += parallax_layer
|
||||
|
||||
if (PARALLAX_LOW)
|
||||
C.parallax_throttle = PARALLAX_DELAY_LOW
|
||||
C.parallax_layers_max = 1
|
||||
return TRUE
|
||||
if(!C.parallax_offset.len)
|
||||
C.parallax_offset["horizontal"] = 0
|
||||
C.parallax_offset["vertical"] = 0
|
||||
|
||||
if (PARALLAX_DISABLE)
|
||||
return FALSE
|
||||
|
||||
else
|
||||
C.parallax_throttle = PARALLAX_DELAY_DEFAULT
|
||||
C.parallax_layers_max = 3
|
||||
return TRUE
|
||||
|
||||
/datum/hud/proc/update_parallax_pref()
|
||||
remove_parallax()
|
||||
create_parallax()
|
||||
|
||||
// This sets which way the current shuttle is moving (returns true if the shuttle has stopped moving so the caller can append their animation)
|
||||
/datum/hud/proc/set_parallax_movedir(new_parallax_movedir)
|
||||
. = FALSE
|
||||
var/client/C = mymob.client
|
||||
if(new_parallax_movedir == C.parallax_movedir)
|
||||
return
|
||||
var/animatedir = new_parallax_movedir
|
||||
if(new_parallax_movedir == FALSE)
|
||||
var/animate_time = 0
|
||||
for(var/thing in C.parallax_layers)
|
||||
var/obj/screen/parallax_layer/L = thing
|
||||
L.icon_state = initial(L.icon_state)
|
||||
L.update_o(C.view)
|
||||
var/T = PARALLAX_LOOP_TIME / L.speed
|
||||
if (T > animate_time)
|
||||
animate_time = T
|
||||
C.dont_animate_parallax = world.time + min(animate_time, PARALLAX_LOOP_TIME)
|
||||
animatedir = C.parallax_movedir
|
||||
|
||||
var/matrix/newtransform
|
||||
switch(animatedir)
|
||||
if(NORTH)
|
||||
newtransform = matrix(1, 0, 0, 0, 1, 480)
|
||||
if(SOUTH)
|
||||
newtransform = matrix(1, 0, 0, 0, 1,-480)
|
||||
if(EAST)
|
||||
newtransform = matrix(1, 0, 480, 0, 1, 0)
|
||||
if(WEST)
|
||||
newtransform = matrix(1, 0,-480, 0, 1, 0)
|
||||
|
||||
var/shortesttimer
|
||||
for(var/thing in C.parallax_layers)
|
||||
var/obj/screen/parallax_layer/L = thing
|
||||
|
||||
var/T = PARALLAX_LOOP_TIME / L.speed
|
||||
if (isnull(shortesttimer))
|
||||
shortesttimer = T
|
||||
if (T < shortesttimer)
|
||||
shortesttimer = T
|
||||
L.transform = newtransform
|
||||
animate(L, transform = matrix(), time = T, easing = QUAD_EASING | (new_parallax_movedir ? EASE_IN : EASE_OUT), flags = ANIMATION_END_NOW)
|
||||
if (new_parallax_movedir)
|
||||
L.transform = newtransform
|
||||
animate(transform = matrix(), time = T) //queue up another animate so lag doesn't create a shutter
|
||||
|
||||
C.parallax_movedir = new_parallax_movedir
|
||||
if (C.parallax_animate_timer)
|
||||
deltimer(C.parallax_animate_timer)
|
||||
C.parallax_animate_timer = addtimer(src, .update_parallax_motionblur, min(shortesttimer, PARALLAX_LOOP_TIME), TIMER_NORMAL, C, animatedir, new_parallax_movedir, newtransform)
|
||||
|
||||
/datum/hud/proc/update_parallax_motionblur(client/C, animatedir, new_parallax_movedir, matrix/newtransform)
|
||||
C.parallax_animate_timer = FALSE
|
||||
for(var/thing in C.parallax_layers)
|
||||
var/obj/screen/parallax_layer/L = thing
|
||||
if (!new_parallax_movedir)
|
||||
animate(L)
|
||||
continue
|
||||
|
||||
var/newstate = initial(L.icon_state)
|
||||
if (animatedir)
|
||||
if(animatedir == NORTH || animatedir == SOUTH)
|
||||
newstate += "_vertical"
|
||||
else
|
||||
newstate += "_horizontal"
|
||||
|
||||
var/T = PARALLAX_LOOP_TIME / L.speed
|
||||
|
||||
if (newstate in icon_states(L.icon))
|
||||
L.icon_state = newstate
|
||||
L.update_o(C.view)
|
||||
|
||||
L.transform = newtransform
|
||||
|
||||
animate(L, transform = matrix(), time = T, loop = -1, flags = ANIMATION_END_NOW)
|
||||
C.screen |= C.parallax_dustmaster
|
||||
|
||||
/datum/hud/proc/update_parallax()
|
||||
var/client/C = mymob.client
|
||||
if(C.prefs.space_parallax)
|
||||
parallax_on_clients |= C
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax)
|
||||
C.screen |= bgobj
|
||||
C.screen |= C.parallax_master
|
||||
C.screen |= C.parallax_spacemaster
|
||||
if(C.prefs.space_dust)
|
||||
C.parallax_dustmaster.color = list(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1)
|
||||
else
|
||||
C.parallax_dustmaster.color = list(0,0,0,0)
|
||||
else
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax)
|
||||
C.screen -= bgobj
|
||||
parallax_on_clients -= C
|
||||
C.screen -= C.parallax_master
|
||||
C.screen -= C.parallax_spacemaster
|
||||
C.parallax_dustmaster.color = list(0,0,0,0)
|
||||
|
||||
/datum/hud/proc/update_parallax_values()
|
||||
var/client/C = mymob.client
|
||||
if(!parallax_initialized)
|
||||
return
|
||||
|
||||
if(!(locate(/turf/open/space) in trange(C.view,get_turf(C.eye))))
|
||||
return
|
||||
|
||||
//ACTUALLY MOVING THE PARALLAX
|
||||
var/turf/posobj = get_turf(C.eye)
|
||||
var/area/areaobj = posobj.loc
|
||||
|
||||
// Update the movement direction of the parallax if necessary (for shuttles)
|
||||
set_parallax_movedir(areaobj.parallax_movedir)
|
||||
|
||||
var/force
|
||||
if(!C.previous_turf || (C.previous_turf.z != posobj.z))
|
||||
C.previous_turf = posobj
|
||||
force = TRUE
|
||||
|
||||
if (!force && world.time < C.last_parallax_shift+C.parallax_throttle)
|
||||
return
|
||||
|
||||
//Doing it this way prevents parallax layers from "jumping" when you change Z-Levels.
|
||||
var/offset_x = posobj.x - C.previous_turf.x
|
||||
var/offset_y = posobj.y - C.previous_turf.y
|
||||
var/offsetx = C.parallax_offset["horizontal"] + posobj.x - C.previous_turf.x
|
||||
var/offsety = C.parallax_offset["vertical"] + posobj.y - C.previous_turf.y
|
||||
C.parallax_offset["horizontal"] = offsetx
|
||||
C.parallax_offset["vertical"] = offsety
|
||||
|
||||
if(!offset_x && !offset_y && !force)
|
||||
return
|
||||
|
||||
var/last_delay = world.time - C.last_parallax_shift
|
||||
last_delay = min(last_delay, C.parallax_throttle)
|
||||
C.previous_turf = posobj
|
||||
C.last_parallax_shift = world.time
|
||||
|
||||
for(var/thing in C.parallax_layers)
|
||||
var/obj/screen/parallax_layer/L = thing
|
||||
if (L.view_sized != C.view)
|
||||
L.update_o(C.view)
|
||||
var/change_x = offset_x * L.speed
|
||||
L.offset_x -= change_x
|
||||
var/change_y = offset_y * L.speed
|
||||
L.offset_y -= change_y
|
||||
if(L.offset_x > 240)
|
||||
L.offset_x -= 480
|
||||
if(L.offset_x < -240)
|
||||
L.offset_x += 480
|
||||
if(L.offset_y > 240)
|
||||
L.offset_y -= 480
|
||||
if(L.offset_y < -240)
|
||||
L.offset_y += 480
|
||||
var/maxoffset = 480 //480 = (15 tiles * 32 icon_size * 3 grid size / 2) - (15 tiles * 32 icon size / 2) for centering
|
||||
var/minoffset = -960 //960 = (15 tiles * 32 icon_size * 3 grid size / 2) + (15 tiles * 32 icon size / 2) for centering
|
||||
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax_movable)
|
||||
var/accumulated_offset_x = bgobj.base_offset_x - round(offsetx * bgobj.parallax_speed * C.prefs.parallax_speed)
|
||||
var/accumulated_offset_y = bgobj.base_offset_y - round(offsety * bgobj.parallax_speed * C.prefs.parallax_speed)
|
||||
|
||||
if(!areaobj.parallax_movedir && C.dont_animate_parallax <= world.time && (offset_x || offset_y) && abs(offset_x) <= max(C.parallax_throttle/world.tick_lag+1,1) && abs(offset_y) <= max(C.parallax_throttle/world.tick_lag+1,1) && (round(abs(change_x)) > 1 || round(abs(change_y)) > 1))
|
||||
L.transform = matrix(1, 0, offset_x*L.speed, 0, 1, offset_y*L.speed)
|
||||
animate(L, transform=matrix(), time = last_delay)
|
||||
if(accumulated_offset_x > maxoffset)
|
||||
accumulated_offset_x -= 1440 //3x3 grid, 15 tiles * 32 icon_size * 3 grid size
|
||||
if(accumulated_offset_x < minoffset)
|
||||
accumulated_offset_x += 1440
|
||||
|
||||
L.screen_loc = "CENTER-7:[round(L.offset_x,1)],CENTER-7:[round(L.offset_y,1)]"
|
||||
if(accumulated_offset_y > maxoffset)
|
||||
accumulated_offset_y -= 1440
|
||||
if(accumulated_offset_y < minoffset)
|
||||
accumulated_offset_y += 1440
|
||||
|
||||
/atom/movable/proc/update_parallax_contents()
|
||||
if(length(client_mobs_in_contents))
|
||||
for(var/thing in client_mobs_in_contents)
|
||||
var/mob/M = thing
|
||||
if(M && M.client && M.hud_used && length(M.client.parallax_layers))
|
||||
M.hud_used.update_parallax()
|
||||
bgobj.screen_loc = "CENTER:[accumulated_offset_x],CENTER:[accumulated_offset_y]"
|
||||
|
||||
/obj/screen/parallax_layer
|
||||
icon = 'icons/effects/parallax.dmi'
|
||||
var/speed = 1
|
||||
var/offset_x = 0
|
||||
var/offset_y = 0
|
||||
var/view_sized
|
||||
blend_mode = BLEND_ADD
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
mouse_opacity = 0
|
||||
//Parallax generation code below
|
||||
|
||||
#define PARALLAX4_ICON_NUMBER 20
|
||||
#define PARALLAX3_ICON_NUMBER 14
|
||||
#define PARALLAX2_ICON_NUMBER 10
|
||||
|
||||
/obj/screen/parallax_layer/New(view)
|
||||
..()
|
||||
if (!view)
|
||||
view = world.view
|
||||
update_o(view)
|
||||
/datum/subsystem/parallax/proc/create_global_parallax_icons()
|
||||
var/list/plane1 = list()
|
||||
var/list/plane2 = list()
|
||||
var/list/plane3 = list()
|
||||
var/list/pixel_x = list()
|
||||
var/list/pixel_y = list()
|
||||
var/index = 1
|
||||
for(var/i = 0 to (PARALLAX_IMAGE_TILES-1))
|
||||
for(var/j = 1 to 9)
|
||||
plane1 += rand(1,26)
|
||||
plane2 += rand(1,26)
|
||||
plane3 += rand(1,26)
|
||||
pixel_x += world.icon_size * (i%PARALLAX_IMAGE_WIDTH)
|
||||
pixel_y += world.icon_size * round(i/PARALLAX_IMAGE_WIDTH)
|
||||
|
||||
/obj/screen/parallax_layer/proc/update_o(view)
|
||||
if (!view)
|
||||
view = world.view
|
||||
var/list/new_overlays = list()
|
||||
var/count = Ceiling(view/(480/world.icon_size))+1
|
||||
for(var/x in -count to count)
|
||||
for(var/y in -count to count)
|
||||
if(x == 0 && y == 0)
|
||||
continue
|
||||
var/image/I = image(icon, null, icon_state)
|
||||
I.transform = matrix(1, 0, x*480, 0, 1, y*480)
|
||||
new_overlays += I
|
||||
for(var/i in 0 to 8)
|
||||
var/obj/screen/parallax/parallax_layer = PoolOrNew(/obj/screen/parallax)
|
||||
|
||||
overlays = new_overlays
|
||||
view_sized = view
|
||||
var/list/L = list()
|
||||
for(var/j in 1 to PARALLAX_IMAGE_TILES)
|
||||
if(plane1[j+i*PARALLAX_IMAGE_TILES] <= PARALLAX4_ICON_NUMBER)
|
||||
var/image/I = image('icons/turf/space_parallax4.dmi',"[plane1[j+i*PARALLAX_IMAGE_TILES]]")
|
||||
I.pixel_x = pixel_x[j]
|
||||
I.pixel_y = pixel_y[j]
|
||||
L += I
|
||||
|
||||
/obj/screen/parallax_layer/layer_1
|
||||
icon_state = "layer1"
|
||||
speed = 0.6
|
||||
layer = 1
|
||||
parallax_layer.overlays = L
|
||||
parallax_layer.parallax_speed = 0
|
||||
parallax_layer.calibrate_parallax(i+1)
|
||||
parallax_icon[index] = parallax_layer
|
||||
index++
|
||||
|
||||
/obj/screen/parallax_layer/layer_2
|
||||
icon_state = "layer2"
|
||||
speed = 1
|
||||
layer = 2
|
||||
for(var/i in 0 to 8)
|
||||
var/obj/screen/parallax/parallax_layer = PoolOrNew(/obj/screen/parallax)
|
||||
|
||||
/obj/screen/parallax_pmaster
|
||||
appearance_flags = PLANE_MASTER
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
mouse_opacity = FALSE
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
var/list/L = list()
|
||||
for(var/j in 1 to PARALLAX_IMAGE_TILES)
|
||||
if(plane2[j+i*PARALLAX_IMAGE_TILES] <= PARALLAX3_ICON_NUMBER)
|
||||
var/image/I = image('icons/turf/space_parallax3.dmi',"[plane2[j+i*PARALLAX_IMAGE_TILES]]")
|
||||
I.pixel_x = pixel_x[j]
|
||||
I.pixel_y = pixel_y[j]
|
||||
L += I
|
||||
|
||||
/obj/screen/parallax_space_whitifier
|
||||
appearance_flags = PLANE_MASTER
|
||||
plane = PLANE_SPACE
|
||||
color = list(
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
1, 1, 1, 1,
|
||||
0, 0, 0, 0
|
||||
)
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
parallax_layer.overlays = L
|
||||
parallax_layer.parallax_speed = 0.5
|
||||
parallax_layer.calibrate_parallax(i+1)
|
||||
parallax_icon[index] = parallax_layer
|
||||
index++
|
||||
|
||||
for(var/i in 0 to 8)
|
||||
var/obj/screen/parallax/parallax_layer = PoolOrNew(/obj/screen/parallax)
|
||||
var/list/L = list()
|
||||
for(var/j in 1 to PARALLAX_IMAGE_TILES)
|
||||
if(plane3[j+i*PARALLAX_IMAGE_TILES] <= PARALLAX2_ICON_NUMBER)
|
||||
var/image/I = image('icons/turf/space_parallax2.dmi',"[plane3[j+i*PARALLAX_IMAGE_TILES]]")
|
||||
I.pixel_x = pixel_x[j]
|
||||
I.pixel_y = pixel_y[j]
|
||||
L += I
|
||||
|
||||
#undef LOOP_NONE
|
||||
#undef LOOP_NORMAL
|
||||
#undef LOOP_REVERSE
|
||||
#undef LOOP_TIME
|
||||
parallax_layer.overlays = L
|
||||
parallax_layer.parallax_speed = 1
|
||||
parallax_layer.calibrate_parallax(i+1)
|
||||
parallax_icon[index] = parallax_layer
|
||||
index++
|
||||
|
||||
parallax_initialized = 1
|
||||
|
||||
/obj/screen/parallax/proc/calibrate_parallax(var/i)
|
||||
if(!i) return
|
||||
|
||||
/* Placement of screen objects
|
||||
1 2 3
|
||||
4 5 6
|
||||
7 8 9
|
||||
*/
|
||||
base_offset_x = -PARALLAX_IMAGE_WIDTH*world.icon_size/2
|
||||
base_offset_y = -PARALLAX_IMAGE_WIDTH*world.icon_size/2
|
||||
|
||||
switch(i)
|
||||
if(1,4,7)
|
||||
base_offset_x -= world.icon_size*PARALLAX_IMAGE_WIDTH
|
||||
if(3,6,9)
|
||||
base_offset_x += world.icon_size*PARALLAX_IMAGE_WIDTH
|
||||
switch(i)
|
||||
if(1,2,3)
|
||||
base_offset_y += world.icon_size*PARALLAX_IMAGE_WIDTH
|
||||
if(7,8,9)
|
||||
base_offset_y -= world.icon_size*PARALLAX_IMAGE_WIDTH
|
||||
|
||||
screen_loc = "CENTER:[base_offset_x],CENTER:[base_offset_y]"
|
||||
|
||||
#undef PARALLAX4_ICON_NUMBER
|
||||
#undef PARALLAX3_ICON_NUMBER
|
||||
#undef PARALLAX2_ICON_NUMBER
|
||||
#undef PARALLAX_IMAGE_WIDTH
|
||||
#undef PARALLAX_IMAGE_TILES
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
/obj/screen/plane_master
|
||||
screen_loc = "CENTER"
|
||||
icon_state = "blank"
|
||||
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
/obj/screen/plane_master/New()
|
||||
if(blend_mode == BLEND_MULTIPLY)
|
||||
//What is this? Read http://www.byond.com/forum/?post=2141928
|
||||
var/image/backdrop = image('icons/mob/screen_gen.dmi', "black")
|
||||
backdrop.transform = matrix(200, 0, 0, 0, 200, 0)
|
||||
backdrop.layer = BACKGROUND_LAYER
|
||||
backdrop.blend_mode = BLEND_OVERLAY
|
||||
overlays += backdrop
|
||||
..()
|
||||
|
||||
/obj/screen/plane_master/game_world
|
||||
name = "game world plane master"
|
||||
plane = GAME_PLANE
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
/obj/screen/plane_master/lighting
|
||||
name = "lighting plane master"
|
||||
plane = LIGHTING_PLANE
|
||||
blend_mode = BLEND_OVERLAY
|
||||
// blend_mode = BLEND_MULTIPLY
|
||||
// color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0.1,0.1,0.1,0)
|
||||
mouse_opacity = 0
|
||||
+45
-80
@@ -5,15 +5,9 @@
|
||||
name = "cyborg module"
|
||||
icon_state = "nomod"
|
||||
|
||||
/obj/screen/robot/Click()
|
||||
if(isobserver(usr))
|
||||
return 1
|
||||
|
||||
/obj/screen/robot/module/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(R.module.type != /obj/item/weapon/robot_module)
|
||||
if(R.module)
|
||||
R.hud_used.toggle_show_robot_modules()
|
||||
return 1
|
||||
R.pick_module()
|
||||
@@ -23,8 +17,6 @@
|
||||
icon_state = "inv1"
|
||||
|
||||
/obj/screen/robot/module1/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(1)
|
||||
|
||||
@@ -33,8 +25,6 @@
|
||||
icon_state = "inv2"
|
||||
|
||||
/obj/screen/robot/module2/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(2)
|
||||
|
||||
@@ -43,8 +33,6 @@
|
||||
icon_state = "inv3"
|
||||
|
||||
/obj/screen/robot/module3/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(3)
|
||||
|
||||
@@ -53,8 +41,6 @@
|
||||
icon_state = "radio"
|
||||
|
||||
/obj/screen/robot/radio/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.radio.interact(R)
|
||||
|
||||
@@ -63,8 +49,6 @@
|
||||
icon_state = "store"
|
||||
|
||||
/obj/screen/robot/store/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.uneq_active()
|
||||
|
||||
@@ -73,8 +57,6 @@
|
||||
icon_state = "lamp0"
|
||||
|
||||
/obj/screen/robot/lamp/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.control_headlamp()
|
||||
|
||||
@@ -83,24 +65,14 @@
|
||||
icon_state = "ionpulse0"
|
||||
|
||||
/obj/screen/robot/thrusters/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_ionpulse()
|
||||
|
||||
/datum/hud/robot
|
||||
ui_style_icon = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
/datum/hud/robot/New(mob/owner, ui_style = 'icons/mob/screen_cyborg.dmi')
|
||||
/datum/hud/robot/New(mob/owner)
|
||||
..()
|
||||
var/mob/living/silicon/robot/mymobR = mymob
|
||||
var/obj/screen/using
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.screen_loc = ui_borg_talk_wheel
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
//Radio
|
||||
using = new /obj/screen/robot/radio()
|
||||
using.screen_loc = ui_borg_radio
|
||||
@@ -161,9 +133,9 @@
|
||||
infodisplay += healths
|
||||
|
||||
//Installed Module
|
||||
mymobR.hands = new /obj/screen/robot/module()
|
||||
mymobR.hands.screen_loc = ui_borg_module
|
||||
static_inventory += mymobR.hands
|
||||
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()
|
||||
@@ -182,53 +154,50 @@
|
||||
|
||||
|
||||
/datum/hud/proc/toggle_show_robot_modules()
|
||||
if(!iscyborg(mymob)) return
|
||||
if(!isrobot(mymob)) return
|
||||
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
var/mob/living/silicon/robot/r = mymob
|
||||
|
||||
R.shown_robot_modules = !R.shown_robot_modules
|
||||
r.shown_robot_modules = !r.shown_robot_modules
|
||||
update_robot_modules_display()
|
||||
|
||||
/datum/hud/proc/update_robot_modules_display(mob/viewer)
|
||||
if(!iscyborg(mymob)) return
|
||||
/datum/hud/proc/update_robot_modules_display()
|
||||
if(!isrobot(mymob)) return
|
||||
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
var/mob/living/silicon/robot/r = mymob
|
||||
|
||||
var/mob/screenmob = viewer || R
|
||||
|
||||
if(!R.module)
|
||||
if(!r.client)
|
||||
return
|
||||
|
||||
if(!R.client)
|
||||
if(!r.module)
|
||||
return
|
||||
|
||||
if(R.shown_robot_modules && screenmob.hud_used.hud_shown)
|
||||
if(r.shown_robot_modules && hud_shown)
|
||||
//Modules display is shown
|
||||
screenmob.client.screen += module_store_icon //"store" icon
|
||||
r.client.screen += module_store_icon //"store" icon
|
||||
|
||||
if(!R.module.modules)
|
||||
if(!r.module.modules)
|
||||
usr << "<span class='danger'>Selected module has no modules to select</span>"
|
||||
return
|
||||
|
||||
if(!R.robot_modules_background)
|
||||
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"
|
||||
screenmob.client.screen += R.robot_modules_background
|
||||
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())
|
||||
for(var/atom/movable/A in r.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
screenmob.client.screen += A
|
||||
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
|
||||
A.plane = ABOVE_HUD_PLANE
|
||||
|
||||
x++
|
||||
if(x == 4)
|
||||
@@ -237,41 +206,37 @@
|
||||
|
||||
else
|
||||
//Modules display is hidden
|
||||
screenmob.client.screen -= module_store_icon //"store" icon
|
||||
r.client.screen -= module_store_icon //"store" icon
|
||||
|
||||
for(var/atom/A in R.module.get_inactive_modules())
|
||||
for(var/atom/A in r.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
screenmob.client.screen -= A
|
||||
R.shown_robot_modules = 0
|
||||
screenmob.client.screen -= R.robot_modules_background
|
||||
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/persistent_inventory_update(mob/viewer)
|
||||
/datum/hud/robot/persistant_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
|
||||
var/mob/screenmob = viewer || R
|
||||
|
||||
if(screenmob.hud_used)
|
||||
if(screenmob.hud_used.hud_shown)
|
||||
for(var/i in 1 to R.held_items.len)
|
||||
var/obj/item/I = R.held_items[i]
|
||||
if(I)
|
||||
switch(i)
|
||||
if(1)
|
||||
I.screen_loc = ui_inv1
|
||||
if(2)
|
||||
I.screen_loc = ui_inv2
|
||||
if(3)
|
||||
I.screen_loc = ui_inv3
|
||||
else
|
||||
return
|
||||
screenmob.client.screen += I
|
||||
else
|
||||
for(var/obj/item/I in R.held_items)
|
||||
screenmob.client.screen -= I
|
||||
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
|
||||
@@ -10,15 +10,11 @@
|
||||
name = ""
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
layer = ABOVE_HUD_LAYER
|
||||
plane = ABOVE_HUD_PLANE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
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/take_damage()
|
||||
return
|
||||
|
||||
/obj/screen/Destroy()
|
||||
master = null
|
||||
return ..()
|
||||
@@ -34,7 +30,6 @@
|
||||
|
||||
/obj/screen/swap_hand
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
name = "swap hand"
|
||||
|
||||
/obj/screen/swap_hand/Click()
|
||||
@@ -59,31 +54,13 @@
|
||||
|
||||
/obj/screen/inventory/craft/Click()
|
||||
var/mob/living/M = usr
|
||||
if(isobserver(usr))
|
||||
return
|
||||
M.OpenCraftingMenu()
|
||||
|
||||
/obj/screen/inventory/area_creator
|
||||
name = "create new area"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "area_edit"
|
||||
screen_loc = ui_building
|
||||
|
||||
/obj/screen/inventory/area_creator/Click()
|
||||
if(usr.incapacitated())
|
||||
return 1
|
||||
var/area/A = get_area(usr)
|
||||
if(!A.outdoors)
|
||||
usr << "<span class='warning'>There is already a defined structure here.</span>"
|
||||
return 1
|
||||
create_area(usr)
|
||||
|
||||
/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
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/inventory/Click()
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
@@ -96,7 +73,8 @@
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 1
|
||||
if(usr.attack_ui(slot_id))
|
||||
usr.update_inv_hands()
|
||||
usr.update_inv_l_hand(0)
|
||||
usr.update_inv_r_hand(0)
|
||||
return 1
|
||||
|
||||
/obj/screen/inventory/update_icon()
|
||||
@@ -113,15 +91,13 @@
|
||||
var/image/active_overlay
|
||||
var/image/handcuff_overlay
|
||||
var/image/blocked_overlay
|
||||
var/held_index = 0
|
||||
|
||||
/obj/screen/inventory/hand/update_icon()
|
||||
..()
|
||||
|
||||
if(!active_overlay)
|
||||
active_overlay = image("icon"=icon, "icon_state"="hand_active")
|
||||
if(!handcuff_overlay)
|
||||
var/state = (!(held_index % 2)) ? "markus" : "gabrielle"
|
||||
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")
|
||||
@@ -133,14 +109,17 @@
|
||||
var/mob/living/carbon/C = hud.mymob
|
||||
if(C.handcuffed)
|
||||
add_overlay(handcuff_overlay)
|
||||
|
||||
if(held_index)
|
||||
if(!C.has_hand_for_held_index(held_index))
|
||||
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(held_index == hud.mymob.active_hand_index)
|
||||
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
|
||||
@@ -154,7 +133,11 @@
|
||||
|
||||
if(ismob(usr))
|
||||
var/mob/M = usr
|
||||
M.swap_hand(held_index)
|
||||
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
|
||||
@@ -172,7 +155,6 @@
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_drop"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/drop/Click()
|
||||
usr.drop_item_v()
|
||||
@@ -189,19 +171,19 @@
|
||||
var/_y = text2num(params2list(params)["icon-y"])
|
||||
|
||||
if(_x<=16 && _y<=16)
|
||||
usr.a_intent_change(INTENT_HARM)
|
||||
usr.a_intent_change("harm")
|
||||
|
||||
else if(_x<=16 && _y>=17)
|
||||
usr.a_intent_change(INTENT_HELP)
|
||||
usr.a_intent_change("help")
|
||||
|
||||
else if(_x>=17 && _y<=16)
|
||||
usr.a_intent_change(INTENT_GRAB)
|
||||
usr.a_intent_change("grab")
|
||||
|
||||
else if(_x>=17 && _y>=17)
|
||||
usr.a_intent_change(INTENT_DISARM)
|
||||
usr.a_intent_change("disarm")
|
||||
|
||||
else
|
||||
usr.a_intent_change(INTENT_HOTKEY_RIGHT)
|
||||
usr.a_intent_change("right")
|
||||
|
||||
/obj/screen/act_intent/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
@@ -240,10 +222,12 @@
|
||||
C << "<span class='warning'>You are not wearing an internals mask!</span>"
|
||||
return
|
||||
|
||||
var/obj/item/I = C.is_holding_item_of_type(/obj/item/weapon/tank)
|
||||
if(I)
|
||||
C << "<span class='notice'>You are now running on internals from the [I] on your [C.get_held_index_name(C.get_held_index_of_item(I))].</span>"
|
||||
C.internal = I
|
||||
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))
|
||||
@@ -277,19 +261,14 @@
|
||||
icon_state = "running"
|
||||
|
||||
/obj/screen/mov_intent/Click()
|
||||
toggle(usr)
|
||||
|
||||
/obj/screen/mov_intent/proc/toggle(mob/user)
|
||||
if(isobserver(user))
|
||||
return
|
||||
switch(user.m_intent)
|
||||
switch(usr.m_intent)
|
||||
if("run")
|
||||
user.m_intent = MOVE_INTENT_WALK
|
||||
usr.m_intent = "walk"
|
||||
icon_state = "walking"
|
||||
if("walk")
|
||||
user.m_intent = MOVE_INTENT_RUN
|
||||
usr.m_intent = "run"
|
||||
icon_state = "running"
|
||||
user.update_icons()
|
||||
usr.update_icons()
|
||||
|
||||
/obj/screen/pull
|
||||
name = "stop pulling"
|
||||
@@ -297,8 +276,6 @@
|
||||
icon_state = "pull"
|
||||
|
||||
/obj/screen/pull/Click()
|
||||
if(isobserver(usr))
|
||||
return
|
||||
usr.stop_pulling()
|
||||
|
||||
/obj/screen/pull/update_icon(mob/mymob)
|
||||
@@ -313,7 +290,6 @@
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_resist"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/resist/Click()
|
||||
if(isliving(usr))
|
||||
@@ -331,7 +307,7 @@
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 1
|
||||
if(master)
|
||||
var/obj/item/I = usr.get_active_held_item()
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(I)
|
||||
master.attackby(I, usr, params)
|
||||
return 1
|
||||
@@ -353,65 +329,55 @@
|
||||
var/selecting = "chest"
|
||||
|
||||
/obj/screen/zone_sel/Click(location, control,params)
|
||||
if(isobserver(usr))
|
||||
return
|
||||
|
||||
var/list/PL = params2list(params)
|
||||
var/icon_x = text2num(PL["icon-x"])
|
||||
var/icon_y = text2num(PL["icon-y"])
|
||||
var/choice
|
||||
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)
|
||||
choice = "r_leg"
|
||||
selecting = "r_leg"
|
||||
if(17 to 22)
|
||||
choice = "l_leg"
|
||||
selecting = "l_leg"
|
||||
else
|
||||
return 1
|
||||
if(10 to 13) //Hands and groin
|
||||
switch(icon_x)
|
||||
if(8 to 11)
|
||||
choice = "r_arm"
|
||||
selecting = "r_arm"
|
||||
if(12 to 20)
|
||||
choice = "groin"
|
||||
selecting = "groin"
|
||||
if(21 to 24)
|
||||
choice = "l_arm"
|
||||
selecting = "l_arm"
|
||||
else
|
||||
return 1
|
||||
if(14 to 22) //Chest and arms to shoulders
|
||||
switch(icon_x)
|
||||
if(8 to 11)
|
||||
choice = "r_arm"
|
||||
selecting = "r_arm"
|
||||
if(12 to 20)
|
||||
choice = "chest"
|
||||
selecting = "chest"
|
||||
if(21 to 24)
|
||||
choice = "l_arm"
|
||||
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)
|
||||
choice = "head"
|
||||
selecting = "head"
|
||||
switch(icon_y)
|
||||
if(23 to 24)
|
||||
if(icon_x in 15 to 17)
|
||||
choice = "mouth"
|
||||
selecting = "mouth"
|
||||
if(26) //Eyeline, eyes are on 15 and 17
|
||||
if(icon_x in 14 to 18)
|
||||
choice = "eyes"
|
||||
selecting = "eyes"
|
||||
if(25 to 27)
|
||||
if(icon_x in 15 to 17)
|
||||
choice = "eyes"
|
||||
selecting = "eyes"
|
||||
|
||||
return set_selected_zone(choice, usr)
|
||||
|
||||
/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
|
||||
if(isobserver(user))
|
||||
return
|
||||
|
||||
if(choice != selecting)
|
||||
selecting = choice
|
||||
if(old_selecting != selecting)
|
||||
update_icon(usr)
|
||||
return 1
|
||||
|
||||
@@ -438,7 +404,6 @@
|
||||
blend_mode = BLEND_ADD
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
layer = FLASH_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/damageoverlay
|
||||
icon = 'icons/mob/screen_full.dmi'
|
||||
@@ -448,7 +413,6 @@
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
mouse_opacity = 0
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/healths
|
||||
name = "health"
|
||||
@@ -491,17 +455,6 @@
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/screen/healths/clock
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon_state = "bg_clock"
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/screen/healths/clock/gear
|
||||
icon = 'icons/mob/clockwork_mobs.dmi'
|
||||
icon_state = "bg_gear"
|
||||
screen_loc = ui_internal
|
||||
|
||||
/obj/screen/healths/revenant
|
||||
name = "essence"
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
@@ -512,140 +465,3 @@
|
||||
/obj/screen/healthdoll
|
||||
name = "health doll"
|
||||
screen_loc = ui_healthdoll
|
||||
|
||||
|
||||
|
||||
/obj/screen/wheel
|
||||
name = "wheel"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
icon_state = ""
|
||||
screen_loc = null //if you make a new wheel, remember to give it a screen_loc
|
||||
var/list/buttons_names = list() //list of the names for each button, its length is the amount of buttons.
|
||||
var/toggled = 0 //wheel is hidden/shown
|
||||
var/wheel_buttons_type //the type of buttons used with this wheel.
|
||||
var/list/buttons_list = list()
|
||||
|
||||
/obj/screen/wheel/New()
|
||||
..()
|
||||
build_options()
|
||||
|
||||
|
||||
//we create the buttons for the wheel and place them in a square spiral fashion.
|
||||
/obj/screen/wheel/proc/build_options()
|
||||
var/obj/screen/wheel_button/close_wheel/CW = new ()
|
||||
buttons_list += CW //the close option
|
||||
CW.wheel = src
|
||||
|
||||
var/list/offset_x_list = list()
|
||||
var/list/offset_y_list = list()
|
||||
var/num = 1
|
||||
var/N = 1
|
||||
var/M = 0
|
||||
var/sign = -1
|
||||
my_loop:
|
||||
while(offset_y_list.len < buttons_names.len)
|
||||
for(var/i=1, i<=num, i++)
|
||||
offset_y_list += N
|
||||
offset_x_list += M
|
||||
if(offset_y_list.len == buttons_names.len)
|
||||
break my_loop
|
||||
if(N != 0)
|
||||
N = 0
|
||||
M = -sign
|
||||
else
|
||||
N = sign
|
||||
M = 0
|
||||
sign = -sign
|
||||
num++
|
||||
|
||||
var/screenx = 8
|
||||
var/screeny = 8
|
||||
for(var/i = 1, i <= buttons_names.len, i++)
|
||||
var/obj/screen/wheel_button/WB = new wheel_buttons_type()
|
||||
WB.wheel = src
|
||||
buttons_list += WB
|
||||
screenx += offset_x_list[i]
|
||||
screeny += offset_y_list[i]
|
||||
WB.screen_loc = "[screenx], [screeny]"
|
||||
set_button(WB, i)
|
||||
|
||||
/obj/screen/wheel/proc/set_button(obj/screen/wheel_button/WB, button_number)
|
||||
WB.name = buttons_names[button_number]
|
||||
return
|
||||
|
||||
/obj/screen/wheel/Destroy()
|
||||
for(var/obj/screen/S in buttons_list)
|
||||
qdel(S)
|
||||
return ..()
|
||||
|
||||
/obj/screen/wheel/Click()
|
||||
if(world.time <= usr.next_move)
|
||||
return
|
||||
if(usr.stat)
|
||||
return
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
if(toggled)
|
||||
L.client.screen -= buttons_list
|
||||
else
|
||||
L.client.screen |= buttons_list
|
||||
toggled = !toggled
|
||||
|
||||
|
||||
/obj/screen/wheel/talk
|
||||
name = "talk wheel"
|
||||
icon_state = "talk_wheel"
|
||||
screen_loc = "11:6,2:-11"
|
||||
wheel_buttons_type = /obj/screen/wheel_button/talk
|
||||
buttons_names = list("help","hello","bye","stop","thanks","come","out", "yes", "no")
|
||||
var/list/word_messages = list(list("Help!","Help me!"), list("Hello.", "Hi."), list("Bye.", "Goodbye."),\
|
||||
list("Stop!", "Halt!"), list("Thanks.", "Thanks!", "Thank you."), \
|
||||
list("Come.", "Follow me."), list("Out!", "Go away!", "Get out!"), \
|
||||
list("Yes.", "Affirmative."), list("No.", "Negative"))
|
||||
|
||||
/obj/screen/wheel/talk/set_button(obj/screen/wheel_button/WB, button_number)
|
||||
..()
|
||||
var/obj/screen/wheel_button/talk/T = WB //we already know what type the button is exactly.
|
||||
T.icon_state = "talk_[T.name]"
|
||||
T.word_messages = word_messages[button_number]
|
||||
|
||||
|
||||
/obj/screen/wheel_button
|
||||
name = "default wheel button"
|
||||
screen_loc = "8,8"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
mouse_opacity = 2
|
||||
var/obj/screen/wheel/wheel
|
||||
|
||||
/obj/screen/wheel_button/Destroy()
|
||||
wheel = null
|
||||
return ..()
|
||||
|
||||
/obj/screen/wheel_button/close_wheel
|
||||
name = "close wheel"
|
||||
icon_state = "x3"
|
||||
|
||||
/obj/screen/wheel_button/close_wheel/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.client.screen -= wheel.buttons_list
|
||||
wheel.toggled = !wheel.toggled
|
||||
|
||||
|
||||
/obj/screen/wheel_button/talk
|
||||
name = "talk option"
|
||||
icon_state = "talk_help"
|
||||
var/talk_cooldown = 0
|
||||
var/list/word_messages = list()
|
||||
|
||||
/obj/screen/wheel_button/talk/Click(location, control,params)
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
if(L.stat)
|
||||
return
|
||||
|
||||
if(word_messages.len && talk_cooldown < world.time)
|
||||
talk_cooldown = world.time + 10
|
||||
L.say(pick(word_messages))
|
||||
|
||||
@@ -68,11 +68,11 @@
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen/swarmer/FabricateTrap()
|
||||
using.screen_loc = ui_hand_position(2)
|
||||
using.screen_loc = ui_rhand
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swarmer/Barricade()
|
||||
using.screen_loc = ui_hand_position(1)
|
||||
using.screen_loc = ui_lhand
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swarmer/Replicate()
|
||||
|
||||
@@ -8,14 +8,11 @@
|
||||
return
|
||||
|
||||
/obj/attackby(obj/item/I, mob/living/user, params)
|
||||
if(unique_rename && istype(I, /obj/item/weapon/pen))
|
||||
rewrite(user)
|
||||
else
|
||||
return I.attack_obj(src, user)
|
||||
return I.attack_obj(src, user)
|
||||
|
||||
/mob/living/attackby(obj/item/I, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(user.a_intent == INTENT_HARM && stat == DEAD && butcher_results) //can we butcher it?
|
||||
if(user.a_intent == "harm" && stat == DEAD && butcher_results) //can we butcher it?
|
||||
var/sharpness = I.is_sharp()
|
||||
if(sharpness)
|
||||
user << "<span class='notice'>You begin to butcher [src]...</span>"
|
||||
@@ -37,7 +34,6 @@
|
||||
user.lastattacked = M
|
||||
M.lastattacker = user
|
||||
|
||||
user.do_attack_animation(M)
|
||||
M.attacked_by(src, user)
|
||||
|
||||
add_logs(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
@@ -52,33 +48,29 @@
|
||||
user.do_attack_animation(O)
|
||||
O.attacked_by(src, user)
|
||||
|
||||
|
||||
|
||||
/atom/movable/proc/attacked_by()
|
||||
return
|
||||
|
||||
/obj/attacked_by(obj/item/I, mob/living/user)
|
||||
if(I.force)
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
//only witnesses close by and the victim see a hit message.
|
||||
take_damage(I.force, I.damtype, "melee", 1)
|
||||
user.visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>", "<span class='danger'>You hit [src] with [I]!</span>")
|
||||
|
||||
/mob/living/attacked_by(obj/item/I, mob/living/user)
|
||||
send_item_attack_message(I, user)
|
||||
if(I.force)
|
||||
apply_damage(I.force, I.damtype)
|
||||
if(I.damtype == BRUTE)
|
||||
if(prob(33))
|
||||
I.add_mob_blood(src)
|
||||
var/turf/location = get_turf(src)
|
||||
add_splatter_floor(location)
|
||||
if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood
|
||||
user.add_mob_blood(src)
|
||||
return TRUE //successful attack
|
||||
if(user != src)
|
||||
user.do_attack_animation(src)
|
||||
if(send_item_attack_message(I, user))
|
||||
if(apply_damage(I.force, I.damtype))
|
||||
if(I.damtype == BRUTE)
|
||||
if(prob(33))
|
||||
I.add_mob_blood(src)
|
||||
var/turf/location = get_turf(src)
|
||||
add_splatter_floor(location)
|
||||
if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood
|
||||
user.add_mob_blood(src)
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/attacked_by(obj/item/I, mob/living/user)
|
||||
if(I.force < force_threshold || I.damtype == STAMINA)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', I.get_clamped_volume(), 1, -1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person.
|
||||
// Click parameters is the params string from byond Click() code, see that documentation.
|
||||
@@ -95,17 +87,27 @@
|
||||
|
||||
/mob/living/proc/send_item_attack_message(obj/item/I, mob/living/user, hit_area)
|
||||
var/message_verb = "attacked"
|
||||
if(I.attack_verb && I.attack_verb.len)
|
||||
if(I.attack_verb.len)
|
||||
message_verb = "[pick(I.attack_verb)]"
|
||||
else if(!I.force)
|
||||
return
|
||||
return 0
|
||||
var/message_hit_area = ""
|
||||
if(hit_area)
|
||||
message_hit_area = " in the [hit_area]"
|
||||
|
||||
var/attack_message = "[src] has been [message_verb][message_hit_area] with [I]."
|
||||
if(user in viewers(src, null))
|
||||
attack_message = "[user] has [message_verb] [src][message_hit_area] with [I]!"
|
||||
visible_message("<span class='danger'>[attack_message]</span>", \
|
||||
"<span class='userdanger'>[attack_message]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
visible_message("<span class='danger'>[attack_message]</span>",
|
||||
"<span class='userdanger'>[attack_message]</span>")
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/send_item_attack_message(obj/item/I, mob/living/user, hit_area)
|
||||
if(!I.force)
|
||||
user.visible_message("<span class='warning'>[user] gently taps [src] with [I].</span>",\
|
||||
"<span class='warning'>This weapon is ineffective, it does no damage!</span>")
|
||||
else if(I.force < force_threshold || I.damtype == STAMINA)
|
||||
visible_message("<span class='warning'>[I] bounces harmlessly off of [src].</span>",\
|
||||
"<span class='warning'>[I] bounces harmlessly off of [src]!</span>")
|
||||
else
|
||||
return ..()
|
||||
@@ -15,7 +15,6 @@
|
||||
// Otherwise jump
|
||||
else if(A.loc)
|
||||
loc = get_turf(A)
|
||||
update_parallax_contents()
|
||||
|
||||
/mob/dead/observer/ClickOn(var/atom/A, var/params)
|
||||
if(client.click_intercept)
|
||||
|
||||
+10
-67
@@ -20,7 +20,7 @@
|
||||
var/override = 0
|
||||
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
override += HM.on_attack_hand(src, A, proximity)
|
||||
override += HM.on_attack_hand(src, A)
|
||||
|
||||
if(override)
|
||||
return
|
||||
@@ -50,8 +50,9 @@
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
HM.on_ranged_attack(src, A)
|
||||
|
||||
if(isturf(A) && get_dist(src,A) <= 1)
|
||||
src.Move_Pulled(A)
|
||||
var/turf/T = A
|
||||
if(istype(T) && get_dist(src,T) <= 1)
|
||||
src.Move_Pulled(T)
|
||||
|
||||
/*
|
||||
Animals & All Unspecified
|
||||
@@ -59,6 +60,10 @@
|
||||
/mob/living/UnarmedAttack(atom/A)
|
||||
A.attack_animal(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||
target = A
|
||||
AttackingTarget()
|
||||
|
||||
/atom/proc/attack_animal(mob/user)
|
||||
return
|
||||
/mob/living/RestrainedClickOn(atom/A)
|
||||
@@ -82,7 +87,7 @@
|
||||
/mob/living/carbon/monkey/RestrainedClickOn(atom/A)
|
||||
if(..())
|
||||
return
|
||||
if(a_intent != INTENT_HARM || !ismob(A))
|
||||
if(a_intent != "harm" || !ismob(A))
|
||||
return
|
||||
if(is_muzzled())
|
||||
return
|
||||
@@ -110,7 +115,7 @@
|
||||
*/
|
||||
/mob/living/carbon/alien/UnarmedAttack(atom/A)
|
||||
A.attack_alien(src)
|
||||
/atom/proc/attack_alien(mob/living/carbon/alien/user)
|
||||
/atom/proc/attack_alien(mob/user)
|
||||
attack_paw(user)
|
||||
return
|
||||
/mob/living/carbon/alien/RestrainedClickOn(atom/A)
|
||||
@@ -134,68 +139,6 @@
|
||||
/mob/living/simple_animal/slime/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Drones
|
||||
*/
|
||||
/mob/living/simple_animal/drone/UnarmedAttack(atom/A)
|
||||
A.attack_drone(src)
|
||||
|
||||
/atom/proc/attack_drone(mob/living/simple_animal/drone/user)
|
||||
attack_hand(user) //defaults to attack_hand. Override it when you don't want drones to do same stuff as humans.
|
||||
|
||||
/mob/living/simple_animal/slime/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
True Devil
|
||||
*/
|
||||
|
||||
/mob/living/carbon/true_devil/UnarmedAttack(atom/A, proximity)
|
||||
A.attack_hand(src)
|
||||
|
||||
/*
|
||||
Brain
|
||||
*/
|
||||
|
||||
/mob/living/brain/UnarmedAttack(atom/A)//Stops runtimes due to attack_animal being the default
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
pAI
|
||||
*/
|
||||
|
||||
/mob/living/silicon/pai/UnarmedAttack(atom/A)//Stops runtimes due to attack_animal being the default
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Simple animals
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/UnarmedAttack(atom/A, proximity)
|
||||
if(!dextrous)
|
||||
return ..()
|
||||
if(!ismob(A))
|
||||
A.attack_hand(src)
|
||||
update_inv_hands()
|
||||
|
||||
|
||||
/*
|
||||
Hostile animals
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||
target = A
|
||||
if(dextrous && !is_type_in_typecache(A, environment_target_typecache) && !ismob(A))
|
||||
..()
|
||||
else
|
||||
AttackingTarget()
|
||||
|
||||
|
||||
|
||||
/*
|
||||
New Players:
|
||||
Have no reason to click on anything at all.
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
/*
|
||||
Telekinesis
|
||||
|
||||
This needs more thinking out, but I might as well.
|
||||
*/
|
||||
var/const/tk_maxrange = 15
|
||||
|
||||
/*
|
||||
Telekinetic attack:
|
||||
|
||||
By default, emulate the user's unarmed attack
|
||||
*/
|
||||
/atom/proc/attack_tk(mob/user)
|
||||
@@ -19,7 +17,6 @@ var/const/tk_maxrange = 15
|
||||
/*
|
||||
This is similar to item attack_self, but applies to anything
|
||||
that you can grab with a telekinetic grab.
|
||||
|
||||
It is used for manipulating things at range, for example, opening and closing closets.
|
||||
There are not a lot of defaults at this time, add more where appropriate.
|
||||
*/
|
||||
@@ -57,7 +54,6 @@ var/const/tk_maxrange = 15
|
||||
|
||||
/*
|
||||
TK Grab Item (the workhorse of old TK)
|
||||
|
||||
* If you have not grabbed something, do a normal tk attack
|
||||
* If you have something, throw it at the target. If it is already adjacent, do a normal attackby()
|
||||
* If you click what you are holding, or attack_self(), do an attack_self_tk() on it.
|
||||
@@ -70,9 +66,8 @@ var/const/tk_maxrange = 15
|
||||
icon_state = "2"
|
||||
flags = NOBLUDGEON | ABSTRACT | DROPDEL
|
||||
//item_state = null
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
w_class = 10
|
||||
layer = ABOVE_HUD_LAYER
|
||||
plane = ABOVE_HUD_PLANE
|
||||
|
||||
var/last_throw = 0
|
||||
var/atom/movable/focus = null
|
||||
@@ -87,7 +82,7 @@ var/const/tk_maxrange = 15
|
||||
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
/obj/item/tk_grab/equipped(mob/user, slot)
|
||||
if(slot == slot_hands)
|
||||
if( (slot == slot_l_hand) || (slot== slot_r_hand) )
|
||||
return
|
||||
qdel(src)
|
||||
return
|
||||
@@ -190,7 +185,7 @@ var/const/tk_maxrange = 15
|
||||
return
|
||||
|
||||
/obj/item/tk_grab/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is using [user.p_their()] telekinesis to choke [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
user.visible_message("<span class='suicide'>[user] is using \his telekinesis to choke \himself! It looks like \he's trying to commit suicide.</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/*Not quite done likely needs to use something thats not get_step_to
|
||||
@@ -218,5 +213,4 @@ var/const/tk_maxrange = 15
|
||||
var/X = source:x
|
||||
var/Y = source:y
|
||||
var/Z = source:z
|
||||
|
||||
*/
|
||||
*/
|
||||
Reference in New Issue
Block a user