diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index cb170ffbf0a..326a9878209 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -77,7 +77,8 @@ //Lower right, persistent menu #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_acti "EAST-3:24,SOUTH:5" #define ui_zonesel "EAST-1:28,SOUTH:5" diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index 81dcbf0fdf1..47450fce8a8 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -73,7 +73,7 @@ using = new /obj/screen/resist() using.icon = ui_style - using.screen_loc = ui_pull_resist + using.screen_loc = ui_above_movement hotkeybuttons += using throw_icon = new /obj/screen/throw_catch() @@ -84,7 +84,7 @@ pull_icon = new /obj/screen/pull() pull_icon.icon = ui_style pull_icon.update_icon(mymob) - pull_icon.screen_loc = ui_pull_resist + pull_icon.screen_loc = ui_above_movement static_inventory += pull_icon //begin indicators diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index 38dddb92c67..4cb2506d74c 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -18,7 +18,7 @@ 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 + pull_icon.screen_loc = ui_above_movement hotkeybuttons += pull_icon using = new/obj/screen/language_menu diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index b5b42e06e1d..ea967c1d158 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -38,6 +38,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list( var/obj/screen/action_intent var/obj/screen/zone_select var/obj/screen/pull_icon + var/obj/screen/rest_icon var/obj/screen/throw_icon var/obj/screen/module_store_icon diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 58d84c6678d..80b8b15b1c0 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -207,7 +207,7 @@ using = new /obj/screen/resist() using.icon = ui_style - using.screen_loc = ui_pull_resist + using.screen_loc = ui_above_intent hotkeybuttons += using using = new /obj/screen/human/toggle() @@ -274,6 +274,11 @@ throw_icon.screen_loc = ui_drop_throw 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() infodisplay += internals @@ -290,7 +295,7 @@ pull_icon = new /obj/screen/pull() pull_icon.icon = ui_style pull_icon.update_icon(mymob) - pull_icon.screen_loc = ui_pull_resist + pull_icon.screen_loc = ui_above_intent static_inventory += pull_icon lingchemdisplay = new /obj/screen/ling/chems() diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm index 479fd59dae2..134fb28c54a 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -87,7 +87,7 @@ pull_icon = new /obj/screen/pull() pull_icon.icon = ui_style pull_icon.update_icon(mymob) - pull_icon.screen_loc = ui_pull_resist + pull_icon.screen_loc = ui_above_movement static_inventory += pull_icon lingchemdisplay = new /obj/screen/ling/chems() @@ -106,7 +106,7 @@ using = new /obj/screen/resist() using.icon = ui_style - using.screen_loc = ui_pull_resist + using.screen_loc = ui_above_intent hotkeybuttons += using for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory)) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index d2ac10a83f6..8c2e00029bf 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -352,6 +352,27 @@ var/mob/living/L = usr 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 name = "storage" icon_state = "block" diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 49b5d1968ff..d64650eb996 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -338,9 +338,19 @@ set name = "Rest" set category = "IC" - resting = !resting - to_chat(src, "You are now [resting ? "resting" : "getting up"].") - update_canmove() + if(!resting) + resting = TRUE + to_chat(src, "You are now resting.") + update_rest_hud_icon() + update_canmove() + else + if(do_after(src, 10, target = src)) + to_chat(src, "You get up.") + resting = FALSE + update_rest_hud_icon() + update_canmove() + else + to_chat(src, "You fail to get up.") //Recursive function to find everything a mob is holding. Really shitty proc tbh. /mob/living/get_contents() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6161f846457..0f7f03f611f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -352,6 +352,11 @@ if(hud_used.pull_icon) 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() set name = "Activate Held Object" set category = "Object" diff --git a/icons/mob/screen_clockwork.dmi b/icons/mob/screen_clockwork.dmi index ad314fa3b1e..268fed40949 100644 Binary files a/icons/mob/screen_clockwork.dmi and b/icons/mob/screen_clockwork.dmi differ diff --git a/icons/mob/screen_midnight.dmi b/icons/mob/screen_midnight.dmi index b8002561f2d..3d895042721 100644 Binary files a/icons/mob/screen_midnight.dmi and b/icons/mob/screen_midnight.dmi differ diff --git a/icons/mob/screen_operative.dmi b/icons/mob/screen_operative.dmi index eea5c662e0a..d51022b98a1 100644 Binary files a/icons/mob/screen_operative.dmi and b/icons/mob/screen_operative.dmi differ diff --git a/icons/mob/screen_plasmafire.dmi b/icons/mob/screen_plasmafire.dmi index 81fae8e0d09..f251b8b167e 100644 Binary files a/icons/mob/screen_plasmafire.dmi and b/icons/mob/screen_plasmafire.dmi differ diff --git a/icons/mob/screen_retro.dmi b/icons/mob/screen_retro.dmi index 0a7e2e549cd..e57cefa83e3 100644 Binary files a/icons/mob/screen_retro.dmi and b/icons/mob/screen_retro.dmi differ diff --git a/icons/mob/screen_slimecore.dmi b/icons/mob/screen_slimecore.dmi index f28d73a2854..01831250b80 100644 Binary files a/icons/mob/screen_slimecore.dmi and b/icons/mob/screen_slimecore.dmi differ