forked from SPLURT-Station/S.P.L.U.R.T-Station-13
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
modular_bluemoon/code/modules/mob/living/carbon/human/self_gulp_size.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/mob/living/carbon/human | ||
var/self_gulp_size = 5 //количество выпиваемого за раз при самоличном потреблении | ||
|
||
/mob/living/carbon/human/verb/self_gulp_size() | ||
set name = "Set Drink Amount" | ||
set category = "IC" | ||
set waitfor = FALSE | ||
var/N = input("Amount self drink per gulp (1-10):","Self Drinking Control") as null|num | ||
if(N) | ||
N = floor(N) | ||
N = clamp(N, 1, 10) | ||
self_gulp_size = N | ||
to_chat(usr, "<span class='notice'>Amount self drink per gulp is now [self_gulp_size] units.</span>") | ||
|
||
/obj/item/reagent_containers/food/drinks/verb/self_gulp_size() | ||
set src in view(1) | ||
set category = "Object" | ||
set name = "Set Drink Amount" | ||
|
||
if(ishuman(usr)) | ||
var/mob/living/carbon/human/H = usr | ||
H.self_gulp_size() | ||
|
||
/obj/item/reagent_containers/food/drinks/CtrlShiftClick(mob/user) | ||
..() | ||
if(Adjacent(user)) | ||
self_gulp_size() | ||
|
||
/obj/item/reagent_containers/food/drinks/examine(mob/user) | ||
. = ..() | ||
. += "<span class='notice'>Ctrl-Shift-click to set own gulp size amount.</span>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters