From 7ec9e65dcf67c0ee2ffccb940a9932d2f32c9ff4 Mon Sep 17 00:00:00 2001 From: SandPoot Date: Fri, 5 Apr 2024 18:39:33 -0300 Subject: [PATCH] cease those screams --- code/datums/action.dm | 3 ++- code/modules/admin/verbs/adminhelp.dm | 4 +-- code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/antagonists/swarmer/swarmer.dm | 2 +- code/modules/events/wizard/ghost.dm | 4 +-- code/modules/mob/dead/observer/observer.dm | 12 ++++----- code/modules/mob/living/carbon/human/human.dm | 6 ++--- .../friendly/drone/extra_drone_types.dm | 4 +-- .../simple_animal/hostile/jungle/leaper.dm | 2 +- .../hostile/megafauna/colossus.dm | 6 ++--- .../code/modules/mentor/mentorhelp.dm | 2 +- .../code/modules/mob/living/carbon/carbon.dm | 26 ------------------- .../code/modules/mob/living/living.dm | 24 +++++++++++++++++ 13 files changed, 48 insertions(+), 49 deletions(-) diff --git a/code/datums/action.dm b/code/datums/action.dm index f27c1fcabb..d9a9fe5a30 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -64,7 +64,8 @@ if(!hud.mymob) continue HideFrom(hud.mymob) - LAZYREMOVE(M.actions, src) // We aren't always properly inserted into the viewers list, gotta make sure that action's cleared + if(M) + LAZYREMOVE(M.actions, src) // We aren't always properly inserted into the viewers list, gotta make sure that action's cleared viewers = list() if(owner) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 55bc46f269..4aba4fda00 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -230,7 +230,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) //Removes the ahelp verb and returns it after 2 minutes /datum/admin_help/proc/TimeoutVerb() - remove_verb(initiator, TYPE_VERB_REF(/client, adminhelp)) + remove_verb(initiator, /client/verb/adminhelp) initiator.adminhelptimerid = addtimer(CALLBACK(initiator, TYPE_PROC_REF(/client, giveadminhelpverb)), 1200, TIMER_STOPPABLE) //2 minute cooldown of admin helps //private @@ -502,7 +502,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) // /client/proc/giveadminhelpverb() - add_verb(src, TYPE_VERB_REF(/client, adminhelp)) + add_verb(src, /client/verb/adminhelp) deltimer(adminhelptimerid) adminhelptimerid = 0 diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index d96733c5f6..574bb08ea7 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1527,7 +1527,7 @@ Traitors and the like can also be revived with the previous role mostly intact. to_chat(usr, "[C] is dead!") return else - C.pregoodbye(C) //sandstorm punish and ends here. + C.goodbye() //sandstorm punish and ends here. punish_log(target, punishment) diff --git a/code/modules/antagonists/swarmer/swarmer.dm b/code/modules/antagonists/swarmer/swarmer.dm index 84c83c9774..0eac4678d7 100644 --- a/code/modules/antagonists/swarmer/swarmer.dm +++ b/code/modules/antagonists/swarmer/swarmer.dm @@ -108,7 +108,7 @@ /mob/living/simple_animal/hostile/swarmer/Initialize(mapload) . = ..() - remove_verb(src, TYPE_VERB_REF(/mob/living, pulled)) + remove_verb(src, /mob/living/verb/pulled) for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) diag_hud.add_to_hud(src) AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS) diff --git a/code/modules/events/wizard/ghost.dm b/code/modules/events/wizard/ghost.dm index 87def0c76a..5a11616b8f 100644 --- a/code/modules/events/wizard/ghost.dm +++ b/code/modules/events/wizard/ghost.dm @@ -23,6 +23,6 @@ /datum/round_event/wizard/possession/start() for(var/mob/dead/observer/G in GLOB.player_list) - add_verb(G, TYPE_VERB_REF(/mob/dead/observer, boo)) - add_verb(G, TYPE_VERB_REF(/mob/dead/observer, possess)) + add_verb(G, /mob/dead/observer/verb/boo) + add_verb(G, /mob/dead/observer/verb/possess) to_chat(G, "You suddenly feel a welling of new spooky powers...") diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index ada1662c4f..bec324fba8 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -118,8 +118,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) real_name = name if(!fun_verbs) - remove_verb(src, TYPE_VERB_REF(/mob/dead/observer, boo)) - remove_verb(src, TYPE_VERB_REF(/mob/dead/observer, possess)) + remove_verb(src, /mob/dead/observer/verb/boo) + remove_verb(src, /mob/dead/observer/verb/possess) animate(src, pixel_z = 2, time = 10, loop = -1, flags = ANIMATION_RELATIVE) animate(pixel_z = -4, time = 10, loop = -1, flags = ANIMATION_RELATIVE) @@ -852,11 +852,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp ghostimage_simple.icon_state = icon_state if(NAMEOF(src, fun_verbs)) if(fun_verbs) - add_verb(src, TYPE_VERB_REF(/mob/dead/observer, boo)) - add_verb(src, TYPE_VERB_REF(/mob/dead/observer, possess)) + add_verb(src, /mob/dead/observer/verb/boo) + add_verb(src, /mob/dead/observer/verb/possess) else - remove_verb(src, TYPE_VERB_REF(/mob/dead/observer, boo)) - remove_verb(src, TYPE_VERB_REF(/mob/dead/observer, possess)) + remove_verb(src, /mob/dead/observer/verb/boo) + remove_verb(src, /mob/dead/observer/verb/possess) /mob/dead/observer/reset_perspective(atom/A) if(client) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index c626fb0829..eaed5bb6c6 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -8,9 +8,9 @@ /mob/living/carbon/human/Initialize(mapload) add_verb(src, /mob/living/proc/mob_sleep) add_verb(src, /mob/living/proc/lay_down) - add_verb(src, TYPE_VERB_REF(/mob/living/carbon/human, underwear_toggle)) - add_verb(src, TYPE_VERB_REF(/mob/living, subtle)) - add_verb(src, TYPE_VERB_REF(/mob/living, subtler)) + add_verb(src, /mob/living/carbon/human/verb/underwear_toggle) + add_verb(src, /mob/living/verb/subtle) + add_verb(src, /mob/living/verb/subtler) add_verb(src, /mob/living/proc/surrender) // Sandstorm change //initialize limbs first create_bodyparts() diff --git a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm index 542c91d520..e983335a22 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm @@ -141,8 +141,8 @@ set_light(2, 0.5) qdel(access_card) //we don't have free access access_card = null - remove_verb(src, TYPE_VERB_REF(/mob/living/simple_animal/drone, check_laws)) - remove_verb(src, TYPE_VERB_REF(/mob/living/simple_animal/drone, drone_ping)) + remove_verb(src, /mob/living/simple_animal/drone/verb/check_laws) + remove_verb(src, /mob/living/simple_animal/drone/verb/drone_ping) /mob/living/simple_animal/drone/cogscarab/Login() ..() diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm index b0a2f836cc..68f3ce92b4 100644 --- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm +++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm @@ -128,7 +128,7 @@ /mob/living/simple_animal/hostile/jungle/leaper/Initialize(mapload) . = ..() - remove_verb(src, TYPE_VERB_REF(/mob/living, pulled)) + remove_verb(src, /mob/living/verb/pulled) /mob/living/simple_animal/hostile/jungle/leaper/CtrlClickOn(atom/A) face_atom(A) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 390d155752..6c7a24dc06 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -633,8 +633,8 @@ Difficulty: Very Hard /mob/living/simple_animal/hostile/lightgeist/Initialize(mapload) . = ..() - remove_verb(src, TYPE_VERB_REF(/mob/living, pulled)) - remove_verb(src, TYPE_VERB_REF(/mob, me_verb)) + remove_verb(src, /mob/living/verb/pulled) + remove_verb(src, /mob/verb/me_verb) var/datum/atom_hud/medsensor = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] medsensor.add_hud_to(src) AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS) @@ -724,7 +724,7 @@ Difficulty: Very Hard L.mind.transfer_to(holder_animal) var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession holder_animal.mind.AddSpell(P) - remove_verb(holder_animal, TYPE_VERB_REF(/mob/living, pulled)) + remove_verb(holder_animal, /mob/living/verb/pulled) /obj/structure/closet/stasis/dump_contents(override = TRUE, kill = 1) STOP_PROCESSING(SSobj, src) diff --git a/modular_citadel/code/modules/mentor/mentorhelp.dm b/modular_citadel/code/modules/mentor/mentorhelp.dm index 7c774a9ae5..f93dee3160 100644 --- a/modular_citadel/code/modules/mentor/mentorhelp.dm +++ b/modular_citadel/code/modules/mentor/mentorhelp.dm @@ -7,7 +7,7 @@ return //remove out mentorhelp verb temporarily to prevent spamming of mentors. - remove_verb(src, TYPE_VERB_REF(/client, mentorhelp)) + remove_verb(src, /client/verb/mentorhelp) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(add_verb), src, /client/verb/mentorhelp), 30 SECONDS) msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN)) diff --git a/modular_sand/code/modules/mob/living/carbon/carbon.dm b/modular_sand/code/modules/mob/living/carbon/carbon.dm index 11251e980a..2ef2c9e493 100644 --- a/modular_sand/code/modules/mob/living/carbon/carbon.dm +++ b/modular_sand/code/modules/mob/living/carbon/carbon.dm @@ -25,29 +25,3 @@ hud_used.thirst.icon_state = "hydration3" if(0 to THIRST_LEVEL_PARCHED) hud_used.thirst.icon_state = "hydration4" - -//It's here so it doesn't make a big mess on randomverbs.dm, -//also because of this you can proccall it, why would you if you have smite? -/mob/living/proc/pregoodbye(C) - if(isanimal(C)) - var/mob/living/simple_animal/D = C - D.toggle_ai(AI_OFF) - AllImmobility(900, TRUE, TRUE) // Complete 15 minutes of stun, hopefully they shouldn't take that long - playsound(C, "modular_sand/sound/effects/admin_punish/changetheworld.ogg", 100, FALSE) - say("Change the world") - stoplag(20) - playsound(C, "modular_sand/sound/effects/admin_punish/myfinalmessage.ogg", 100, FALSE) - say("My final message") - stoplag(20) - playsound(C, "modular_sand/sound/effects/admin_punish/goodbye.ogg", 100, FALSE) - say("Goodbye.") - stoplag(20) - playsound(C, "modular_sand/sound/effects/admin_punish/endjingle.ogg", 100, FALSE) - goodbye() - -/mob/living/proc/goodbye() //this must be separate because it's a loop! - while(alpha >= 10) - alpha = alpha - 7 - stoplag(1) - stoplag(2) - Destroy() diff --git a/modular_sand/code/modules/mob/living/living.dm b/modular_sand/code/modules/mob/living/living.dm index 4932a028ad..4ec488211d 100644 --- a/modular_sand/code/modules/mob/living/living.dm +++ b/modular_sand/code/modules/mob/living/living.dm @@ -34,3 +34,27 @@ mob_size = MOB_SIZE_HUMAN if(1.21 to INFINITY) mob_size = MOB_SIZE_LARGE + +// It's here so it doesn't make a big mess on randomverbs.dm, +// also because of this you can proccall it, why would you if you have smite? +// This code was bad. For future reference, stoplag() and sleep() are very different and not at all interchangeable. +// You can also use animate() to cleanly animate variables like alpha. +// Finally, NEVER call Destroy() directly. +/mob/living/proc/goodbye() + set waitfor = FALSE + if(isanimal(src)) + var/mob/living/simple_animal/simple_animal = src + simple_animal.toggle_ai(AI_OFF) + AllImmobility(INFINITY, TRUE, TRUE) + playsound(src, "modular_sand/sound/effects/admin_punish/changetheworld.ogg", 100, FALSE) + say("Change the world") + sleep(20) + playsound(src, "modular_sand/sound/effects/admin_punish/myfinalmessage.ogg", 100, FALSE) + say("My final message") + sleep(20) + playsound(src, "modular_sand/sound/effects/admin_punish/goodbye.ogg", 100, FALSE) + say("Goodbye.") + sleep(20) + playsound(src, "modular_sand/sound/effects/admin_punish/endjingle.ogg", 100, FALSE) + QDEL_IN(src, 3.5 SECONDS) + animate(src, alpha = 10, 3.5 SECONDS)