mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-29 08:09:34 +01:00
Sleeping verb is now a toggle.
This commit is contained in:
@@ -10,9 +10,7 @@
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
..()
|
||||
|
||||
handle_viruses()
|
||||
|
||||
// Increase germ_level regularly
|
||||
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
|
||||
germ_level++
|
||||
@@ -393,16 +391,6 @@
|
||||
return method ? ">250" : "extremely weak and fast, patient's artery feels like a thread"
|
||||
// output for machines^ ^^^^^^^output for people^^^^^^^^^
|
||||
|
||||
/mob/living/carbon/verb/mob_sleep()
|
||||
set name = "Sleep"
|
||||
set category = "IC"
|
||||
|
||||
if(usr.sleeping)
|
||||
to_chat(usr, "<font color='red'>You are already sleeping</font>")
|
||||
return
|
||||
if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
|
||||
usr.AdjustSleeping(20)
|
||||
|
||||
/mob/living/carbon/Bump(atom/A)
|
||||
if(now_pushing)
|
||||
return
|
||||
|
||||
@@ -16,14 +16,13 @@
|
||||
handle_light()
|
||||
|
||||
if(stat != DEAD)
|
||||
|
||||
//Breathing, if applicable
|
||||
handle_breathing()
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
|
||||
|
||||
//Blood
|
||||
handle_blood()
|
||||
|
||||
@@ -123,6 +122,8 @@
|
||||
handle_confused()
|
||||
|
||||
/mob/living/proc/handle_sleeping()
|
||||
if(stat != DEAD && toggled_sleeping)
|
||||
Sleeping(2)
|
||||
if(sleeping)
|
||||
AdjustSleeping(-1)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
|
||||
@@ -1150,3 +1150,16 @@
|
||||
|
||||
/mob/living/proc/empty_stomach()
|
||||
return
|
||||
|
||||
/mob/living
|
||||
var/toggled_sleeping = FALSE
|
||||
|
||||
/mob/living/verb/mob_sleep()
|
||||
set name = "Sleep"
|
||||
set category = "IC"
|
||||
if(!toggled_sleeping && alert(src, "Are you sure you wish to go to sleep? You will snooze until using the Sleep verb again.", "Sleepy Time", "No", "Yes") == "No")
|
||||
return
|
||||
toggled_sleeping = !toggled_sleeping
|
||||
to_chat(src, SPAN_NOTICE("You are [toggled_sleeping ? "now voluntarily sleeping. Use the Sleep verb again to wake up." : "no longer voluntarily sleeping"]."))
|
||||
if(toggled_sleeping)
|
||||
Sleeping(1)
|
||||
|
||||
Reference in New Issue
Block a user