Skip to content

Commit

Permalink
Removes an extra arg and formats set_sleeping proc name correctly (sh…
Browse files Browse the repository at this point in the history
…iptest-ss13#4050)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
See above
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
consistency with other set_# and following the proc naming standard. And
that extra arg did nothing
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
refactor: SetSleeping to set_sleeping
refactor: Removed redundant arg from set_sleeping call
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
FalloutFalcon authored Jan 24, 2025
1 parent a229eeb commit 8df3884
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion code/datums/martial/boxing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"<span class='userdanger'>You're knocked unconscious by [A]!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, A)
to_chat(A, "<span class='danger'>You knock [D] out with a haymaker!</span>")
D.apply_effect(200,EFFECT_KNOCKDOWN,armor_block)
D.SetSleeping(100)
D.set_sleeping(100)
log_combat(A, D, "knocked out (boxing) ")
return 1

Expand Down
4 changes: 2 additions & 2 deletions code/datums/martial/cqc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"<span class='userdanger'>You're knocked unconscious by [A]!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", null, A)
to_chat(A, "<span class='danger'>You kick [D]'s head, knocking [D.p_them()] out!</span>")
playsound(get_turf(A), 'sound/weapons/genhit1.ogg', 50, TRUE, -1)
D.SetSleeping(300)
D.set_sleeping(300)
D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 150)
return TRUE

Expand Down Expand Up @@ -199,7 +199,7 @@
D.visible_message("<span class='danger'>[A] puts [D] into a chokehold!</span>", \
"<span class='userdanger'>You're put into a chokehold by [A]!</span>", "<span class='hear'>You hear shuffling and a muffled groan!</span>", null, A)
to_chat(A, "<span class='danger'>You put [D] into a chokehold!</span>")
D.SetSleeping(400)
D.set_sleeping(400)
restraining = FALSE
if(A.grab_state < GRAB_NECK && !HAS_TRAIT(A, TRAIT_PACIFISM))
A.setGrabState(GRAB_NECK)
Expand Down
6 changes: 3 additions & 3 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/cryopod/retro, 17)
playsound(src, close_sound, 40)

/obj/machinery/cryopod/proc/apply_effects_to_mob(mob/living/carbon/sleepyhead)
sleepyhead.SetSleeping(50)
sleepyhead.set_sleeping(50)
to_chat(sleepyhead, "<span class='boldnotice'>You begin to wake from cryosleep...</span>")

/obj/machinery/cryopod/open_machine()
Expand Down Expand Up @@ -443,7 +443,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/cryopod/retro, 17)
/obj/machinery/cryopod/apply_effects_to_mob(mob/living/carbon/sleepyhead)
//it always sucks a little to get up
sleepyhead.set_nutrition(200)
sleepyhead.SetSleeping(60)
sleepyhead.set_sleeping(60)

var/wakeupmessage = "The cryopod shudders as the pneumatic seals separating you and the waking world let out a hiss."
if(prob(60))
Expand All @@ -463,7 +463,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/cryopod/retro, 17)

/obj/machinery/cryopod/poor/apply_effects_to_mob(mob/living/carbon/sleepyhead)
sleepyhead.set_nutrition(200)
sleepyhead.SetSleeping(80)
sleepyhead.set_sleeping(80)
if(prob(90)) //suffer
sleepyhead.apply_effect(rand(5,15), EFFECT_DROWSY)
if(prob(75))
Expand Down
2 changes: 1 addition & 1 deletion code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@

/obj/mecha/Destroy()
if(occupant && iscarbon(occupant))
occupant.SetSleeping(destruction_sleep_duration)
occupant.set_sleeping(destruction_sleep_duration)
go_out()
var/mob/living/silicon/ai/AI
for(var/mob/M in src) //Let's just be ultra sure
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/hot_potato.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
var/mob/living/L = loc
L.SetStun(0)
L.SetKnockdown(0)
L.SetSleeping(0)
L.set_sleeping(0)
L.SetImmobilized(0)
L.SetParalyzed(0)
L.SetUnconscious(0)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/changeling/powers/adrenaline.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/datum/action/changeling/adrenaline/sting_action(mob/living/user)
..()
to_chat(user, "<span class='notice'>Energy rushes through us.[(!(user.mobility_flags & MOBILITY_STAND)) ? " We arise." : ""]</span>")
user.SetSleeping(0)
user.set_sleeping(0)
user.SetUnconscious(0)
user.SetStun(0)
user.SetKnockdown(0)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/flufftext/Hallucination.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(

/datum/hallucination/proc/wake_and_restore()
target.set_screwyhud(SCREWYHUD_NONE)
target.SetSleeping(0)
target.set_sleeping(0)

/datum/hallucination/Destroy()
target.investigate_log("was afflicted with a hallucination of type [type] by [natural?"hallucination status":"an external source"]. [feedback_details]", INVESTIGATE_HALLUCINATIONS)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mining/fulton.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
var/mob/living/carbon/human/L = A
L.SetUnconscious(0)
L.drowsyness = 0
L.SetSleeping(0)
L.set_sleeping(0)
sleep(30)
var/list/flooring_near_beacon = list()
for(var/turf/open/floor in orange(1, beacon))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
add_to_dead_mob_list()
set_drugginess(0)
set_disgust(0)
SetSleeping(0, 0)
set_sleeping(0)
reset_perspective(null)
reload_fullscreen()
update_action_buttons_icon()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
. = ..()
if(. && isliving(user))
var/mob/living/L = user
L.SetSleeping(200)
L.set_sleeping(200)

/datum/emote/living/flap
key = "flap"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
return
else
if(alert(src, "You sure you want to sleep for a while?", "Sleep", "Yes", "No") == "Yes")
SetSleeping(400) //Short nap
set_sleeping(400) //Short nap


/mob/proc/get_contents()
Expand Down Expand Up @@ -673,7 +673,7 @@
SetKnockdown(0)
SetImmobilized(0)
SetParalyzed(0)
SetSleeping(0)
set_sleeping(0)
setStaminaLoss(0)
SetUnconscious(0)

Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount)
return S

/mob/living/proc/SetSleeping(amount) //Sets remaining duration
/mob/living/proc/set_sleeping(amount) //Sets remaining duration
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount) & COMPONENT_NO_STUN)
return
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
Expand All @@ -329,7 +329,7 @@
S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount)
return S

///Allows us to set a permanent sleep on a player (use with caution and remember to unset it with SetSleeping() after the effect is over)
///Allows us to set a permanent sleep on a player (use with caution and remember to unset it with set_sleeping() after the effect is over)
/mob/living/proc/PermaSleeping()
if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, -1) & COMPONENT_NO_STUN)
return
Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/chemistry/reagents/drink_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@
/datum/reagent/consumable/soy_latte/on_mob_life(mob/living/carbon/M)
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
M.SetSleeping(0)
M.set_sleeping(0)
M.adjust_bodytemperature(1 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal(), FALSE)
if(M.getBruteLoss() && prob(20))
M.heal_bodypart_damage(1,0, 0)
Expand All @@ -663,7 +663,7 @@
/datum/reagent/consumable/cafe_latte/on_mob_life(mob/living/carbon/M)
M.dizziness = max(0,M.dizziness-5)
M.drowsyness = max(0,M.drowsyness-3)
M.SetSleeping(0)
M.set_sleeping(0)
M.adjust_bodytemperature(1 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal(), FALSE)
if(M.getBruteLoss() && prob(20))
M.heal_bodypart_damage(1,0, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
M.stuttering = 0
M.slurring = 0
M.confused = 0
M.SetSleeping(0)
M.set_sleeping(0)
M.jitteriness = 0
if(M.blood_volume < BLOOD_VOLUME_NORMAL)
M.blood_volume = BLOOD_VOLUME_NORMAL
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/chemistry/reagents/other_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2352,7 +2352,7 @@
worthy = TRUE
L.visible_message("<span class='danger'><font size = 6>Grips their head and dances around, collapsing to the floor!</font></span>", \
"<span class='danger'><font size = 6>Visions of a realm BYOND your own flash across your eyes, before it all goes black...</font></span>")
addtimer(CALLBACK(L, TYPE_PROC_REF(/mob/living, SetSleeping), 40 SECONDS), 10 SECONDS)
addtimer(CALLBACK(L, TYPE_PROC_REF(/mob/living, set_sleeping), 40 SECONDS), 10 SECONDS)
addtimer(CALLBACK(L.reagents, TYPE_PROC_REF(/datum/reagents, remove_reagent), src.type, src.volume,), 10 SECONDS)
return

Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/organs/vocal_cords.dm
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
cooldown = COOLDOWN_DAMAGE
for(var/V in listeners)
var/mob/living/L = V
L.SetSleeping(0)
L.set_sleeping(0)

//HEAL
else if((findtext(message, heal_words)))
Expand Down

0 comments on commit 8df3884

Please sign in to comment.