Adds Rest hud button, adds small delay to getting up (#39052)
* Adds Rest hud button, adds small delay to getting up * icons and icon code
@@ -77,7 +77,8 @@
|
|||||||
|
|
||||||
//Lower right, persistent menu
|
//Lower right, persistent menu
|
||||||
#define ui_drop_throw "EAST-1:28,SOUTH+1:7"
|
#define ui_drop_throw "EAST-1:28,SOUTH+1:7"
|
||||||
#define ui_pull_resist "EAST-2:26,SOUTH+1:7"
|
#define ui_above_movement "EAST-2:26,SOUTH+1:7"
|
||||||
|
#define ui_above_intent "EAST-3:24, SOUTH+1:7"
|
||||||
#define ui_movi "EAST-2:26,SOUTH:5"
|
#define ui_movi "EAST-2:26,SOUTH:5"
|
||||||
#define ui_acti "EAST-3:24,SOUTH:5"
|
#define ui_acti "EAST-3:24,SOUTH:5"
|
||||||
#define ui_zonesel "EAST-1:28,SOUTH:5"
|
#define ui_zonesel "EAST-1:28,SOUTH:5"
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
using = new /obj/screen/resist()
|
using = new /obj/screen/resist()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.screen_loc = ui_pull_resist
|
using.screen_loc = ui_above_movement
|
||||||
hotkeybuttons += using
|
hotkeybuttons += using
|
||||||
|
|
||||||
throw_icon = new /obj/screen/throw_catch()
|
throw_icon = new /obj/screen/throw_catch()
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
pull_icon = new /obj/screen/pull()
|
pull_icon = new /obj/screen/pull()
|
||||||
pull_icon.icon = ui_style
|
pull_icon.icon = ui_style
|
||||||
pull_icon.update_icon(mymob)
|
pull_icon.update_icon(mymob)
|
||||||
pull_icon.screen_loc = ui_pull_resist
|
pull_icon.screen_loc = ui_above_movement
|
||||||
static_inventory += pull_icon
|
static_inventory += pull_icon
|
||||||
|
|
||||||
//begin indicators
|
//begin indicators
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
pull_icon = new /obj/screen/pull()
|
pull_icon = new /obj/screen/pull()
|
||||||
pull_icon.icon = 'icons/mob/screen_alien.dmi'
|
pull_icon.icon = 'icons/mob/screen_alien.dmi'
|
||||||
pull_icon.update_icon(mymob)
|
pull_icon.update_icon(mymob)
|
||||||
pull_icon.screen_loc = ui_pull_resist
|
pull_icon.screen_loc = ui_above_movement
|
||||||
hotkeybuttons += pull_icon
|
hotkeybuttons += pull_icon
|
||||||
|
|
||||||
using = new/obj/screen/language_menu
|
using = new/obj/screen/language_menu
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
|||||||
var/obj/screen/action_intent
|
var/obj/screen/action_intent
|
||||||
var/obj/screen/zone_select
|
var/obj/screen/zone_select
|
||||||
var/obj/screen/pull_icon
|
var/obj/screen/pull_icon
|
||||||
|
var/obj/screen/rest_icon
|
||||||
var/obj/screen/throw_icon
|
var/obj/screen/throw_icon
|
||||||
var/obj/screen/module_store_icon
|
var/obj/screen/module_store_icon
|
||||||
|
|
||||||
|
|||||||
@@ -207,7 +207,7 @@
|
|||||||
|
|
||||||
using = new /obj/screen/resist()
|
using = new /obj/screen/resist()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.screen_loc = ui_pull_resist
|
using.screen_loc = ui_above_intent
|
||||||
hotkeybuttons += using
|
hotkeybuttons += using
|
||||||
|
|
||||||
using = new /obj/screen/human/toggle()
|
using = new /obj/screen/human/toggle()
|
||||||
@@ -274,6 +274,11 @@
|
|||||||
throw_icon.screen_loc = ui_drop_throw
|
throw_icon.screen_loc = ui_drop_throw
|
||||||
hotkeybuttons += throw_icon
|
hotkeybuttons += throw_icon
|
||||||
|
|
||||||
|
rest_icon = new /obj/screen/rest()
|
||||||
|
rest_icon.icon = ui_style
|
||||||
|
rest_icon.screen_loc = ui_above_movement
|
||||||
|
static_inventory += rest_icon
|
||||||
|
|
||||||
internals = new /obj/screen/internals()
|
internals = new /obj/screen/internals()
|
||||||
infodisplay += internals
|
infodisplay += internals
|
||||||
|
|
||||||
@@ -290,7 +295,7 @@
|
|||||||
pull_icon = new /obj/screen/pull()
|
pull_icon = new /obj/screen/pull()
|
||||||
pull_icon.icon = ui_style
|
pull_icon.icon = ui_style
|
||||||
pull_icon.update_icon(mymob)
|
pull_icon.update_icon(mymob)
|
||||||
pull_icon.screen_loc = ui_pull_resist
|
pull_icon.screen_loc = ui_above_intent
|
||||||
static_inventory += pull_icon
|
static_inventory += pull_icon
|
||||||
|
|
||||||
lingchemdisplay = new /obj/screen/ling/chems()
|
lingchemdisplay = new /obj/screen/ling/chems()
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
pull_icon = new /obj/screen/pull()
|
pull_icon = new /obj/screen/pull()
|
||||||
pull_icon.icon = ui_style
|
pull_icon.icon = ui_style
|
||||||
pull_icon.update_icon(mymob)
|
pull_icon.update_icon(mymob)
|
||||||
pull_icon.screen_loc = ui_pull_resist
|
pull_icon.screen_loc = ui_above_movement
|
||||||
static_inventory += pull_icon
|
static_inventory += pull_icon
|
||||||
|
|
||||||
lingchemdisplay = new /obj/screen/ling/chems()
|
lingchemdisplay = new /obj/screen/ling/chems()
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
|
|
||||||
using = new /obj/screen/resist()
|
using = new /obj/screen/resist()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.screen_loc = ui_pull_resist
|
using.screen_loc = ui_above_intent
|
||||||
hotkeybuttons += using
|
hotkeybuttons += using
|
||||||
|
|
||||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||||
|
|||||||
@@ -352,6 +352,27 @@
|
|||||||
var/mob/living/L = usr
|
var/mob/living/L = usr
|
||||||
L.resist()
|
L.resist()
|
||||||
|
|
||||||
|
/obj/screen/rest
|
||||||
|
name = "rest"
|
||||||
|
icon = 'icons/mob/screen_midnight.dmi'
|
||||||
|
icon_state = "act_rest"
|
||||||
|
layer = HUD_LAYER
|
||||||
|
plane = HUD_PLANE
|
||||||
|
|
||||||
|
/obj/screen/rest/Click()
|
||||||
|
if(isliving(usr))
|
||||||
|
var/mob/living/L = usr
|
||||||
|
L.lay_down()
|
||||||
|
|
||||||
|
/obj/screen/rest/update_icon(mob/mymob)
|
||||||
|
if(!isliving(mymob))
|
||||||
|
return
|
||||||
|
var/mob/living/L = mymob
|
||||||
|
if(!L.resting)
|
||||||
|
icon_state = "act_rest"
|
||||||
|
else
|
||||||
|
icon_state = "act_rest0"
|
||||||
|
|
||||||
/obj/screen/storage
|
/obj/screen/storage
|
||||||
name = "storage"
|
name = "storage"
|
||||||
icon_state = "block"
|
icon_state = "block"
|
||||||
|
|||||||
@@ -338,9 +338,19 @@
|
|||||||
set name = "Rest"
|
set name = "Rest"
|
||||||
set category = "IC"
|
set category = "IC"
|
||||||
|
|
||||||
resting = !resting
|
if(!resting)
|
||||||
to_chat(src, "<span class='notice'>You are now [resting ? "resting" : "getting up"].</span>")
|
resting = TRUE
|
||||||
update_canmove()
|
to_chat(src, "<span class='notice'>You are now resting.</span>")
|
||||||
|
update_rest_hud_icon()
|
||||||
|
update_canmove()
|
||||||
|
else
|
||||||
|
if(do_after(src, 10, target = src))
|
||||||
|
to_chat(src, "<span class='notice'>You get up.</span>")
|
||||||
|
resting = FALSE
|
||||||
|
update_rest_hud_icon()
|
||||||
|
update_canmove()
|
||||||
|
else
|
||||||
|
to_chat(src, "<span class='notice'>You fail to get up.</span>")
|
||||||
|
|
||||||
//Recursive function to find everything a mob is holding. Really shitty proc tbh.
|
//Recursive function to find everything a mob is holding. Really shitty proc tbh.
|
||||||
/mob/living/get_contents()
|
/mob/living/get_contents()
|
||||||
|
|||||||
@@ -352,6 +352,11 @@
|
|||||||
if(hud_used.pull_icon)
|
if(hud_used.pull_icon)
|
||||||
hud_used.pull_icon.update_icon(src)
|
hud_used.pull_icon.update_icon(src)
|
||||||
|
|
||||||
|
/mob/proc/update_rest_hud_icon()
|
||||||
|
if(hud_used)
|
||||||
|
if(hud_used.rest_icon)
|
||||||
|
hud_used.rest_icon.update_icon(src)
|
||||||
|
|
||||||
/mob/verb/mode()
|
/mob/verb/mode()
|
||||||
set name = "Activate Held Object"
|
set name = "Activate Held Object"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |