Adds Dustself, dust smite, divine smites (#89973)

## About The Pull Request

- Adds `dustself` admin verb

- Adds Dust admin smite 
   - Does what it says on the tin

- Adds Divine smites
- Variations of smites that come with the prayer sound and special
effects - so you can get the message across that this is a punishment
from god.


https://github.com/user-attachments/assets/1cf89ece-3e89-4135-a984-79ca10c278a6

## Why It's Good For The Game

- Request. Parity for `gibself`
- Request. Parity with "Gib"
- Request. Someone wanted to add some more flair to smites so I obliged.

## Changelog

🆑 Melbert
admin: Adds "Dustself"
admin: Adds "Dust" smite. Does what it says on the tin
admin: Adds "Divine" smites. They are variations of normal smites themed
around divine intervention.
/🆑
This commit is contained in:
MrMelbert
2025-03-17 14:23:46 +01:00
committed by GitHub
parent 471b88e044
commit 5d3519b9cf
12 changed files with 89 additions and 8 deletions
+22 -1
View File
@@ -2,7 +2,8 @@
/datum/smite
/// The name of the smite, shown in the menu
var/name
/// Flags which modify how the smite fires
var/smite_flags = NONE
/// Should this smite write to logs?
var/should_log = TRUE
@@ -11,6 +12,26 @@
/// Return FALSE if the smite should not be used.
/datum/smite/proc/configure(client/user)
/// Invoked externally to actually perform the smite
/datum/smite/proc/do_effect(client/user, mob/living/target)
if(smite_flags & SMITE_DIVINE)
playsound(target, 'sound/effects/pray.ogg', 50, FALSE, -1)
target.add_overlay(mutable_appearance('icons/mob/effects/genetics.dmi', "servitude", -MUTATIONS_LAYER))
target.apply_status_effect(/datum/status_effect/spotlight_light/divine)
if(smite_flags & SMITE_STUN)
target.Stun(3 SECONDS, ignore_canstun = TRUE)
if(smite_flags & SMITE_DELAY)
addtimer(CALLBACK(src, PROC_REF(delayed_effect), user, target), 2 SECONDS, TIMER_UNIQUE)
else
effect(user, target)
/// Called after a delay if the smite has the SMITE_DELAY flag
/datum/smite/proc/delayed_effect(client/user, mob/living/target)
if(QDELETED(target))
return
effect(user, target)
/// The effect of the smite, make sure to call this in your own smites
/datum/smite/proc/effect(client/user, mob/living/target)
if (should_log)
@@ -40,3 +40,7 @@
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(objectify), target, transform_path), OBJECTIFY_TIME)
#undef OBJECTIFY_TIME
/datum/smite/objectify/divine
name = "Become Object (Divine)"
smite_flags = SMITE_DIVINE|SMITE_STUN
+4
View File
@@ -51,3 +51,7 @@
shots_this_limb += 1
if (shots_this_limb > shots_per_limb_per_rep)
break
/datum/smite/berforate/divine
name = ":B:erforate (Divine)"
smite_flags = SMITE_DIVINE
+10
View File
@@ -0,0 +1,10 @@
/datum/smite/dust
name = "Dust"
/datum/smite/dust/effect(client/user, mob/living/target)
. = ..()
target.dust(just_ash = FALSE, drop_items = TRUE, force = TRUE)
/datum/smite/dust/divine
name = "Dust (Divine)"
smite_flags = SMITE_DIVINE|SMITE_DELAY|SMITE_STUN
+4
View File
@@ -5,3 +5,7 @@
/datum/smite/gib/effect(client/user, mob/living/target)
. = ..()
target.gib(DROP_ORGANS|DROP_BODYPARTS)
/datum/smite/gib/divine
name = "Gib (Divine)"
smite_flags = SMITE_DIVINE|SMITE_DELAY|SMITE_STUN
+5 -1
View File
@@ -1,6 +1,6 @@
/// Strikes the target with a lightning bolt
/datum/smite/lightning
name = "Lightning bolt"
name = "Lightning Bolt"
/datum/smite/lightning/effect(client/user, mob/living/target)
. = ..()
@@ -16,3 +16,7 @@
if(ishuman(user))
var/mob/living/carbon/human/human_target = user
human_target.electrocution_animation(LIGHTNING_BOLT_ELECTROCUTION_ANIMATION_LENGTH)
/datum/smite/lightning/divine
name = "Lightning Bolt (Divine)"
smite_flags = SMITE_DIVINE
+4
View File
@@ -10,3 +10,7 @@
return
var/mob/living/carbon/human/human_target = target
human_target.petrify(statue_timer = INFINITY, save_brain = FALSE)
/datum/smite/petrify/divine
name = "Petrify (Divine)"
smite_flags = SMITE_DIVINE|SMITE_DELAY|SMITE_STUN
+13 -1
View File
@@ -76,6 +76,18 @@ ADMIN_VERB(gib_self, R_ADMIN, "Gibself", "Give yourself the same treatment you g
if (istype(ourself))
ourself.gib()
ADMIN_VERB(dust_self, R_ADMIN, "Dustself", "Give yourself the same treatment you give others.", ADMIN_CATEGORY_FUN)
var/confirm = tgui_alert(user, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes")
return
log_admin("[key_name(user)] used dustself.")
message_admins(span_adminnotice("[key_name_admin(user)] used dustself."))
BLACKBOX_LOG_ADMIN_VERB("Dust Self")
var/mob/living/ourself = user.mob
if (istype(ourself))
ourself.dust(just_ash = FALSE, drop_items = FALSE, force = TRUE)
ADMIN_VERB(everyone_random, R_SERVER, "Make Everyone Random", "Make everyone have a random appearance.", ADMIN_CATEGORY_FUN)
if(SSticker.HasRoundStarted())
to_chat(user, "Nope you can't do this, the game's already started. This only works before rounds!", confidential = TRUE)
@@ -164,7 +176,7 @@ ADMIN_VERB_AND_CONTEXT_MENU(admin_smite, R_ADMIN|R_FUN, "Smite", "Smite a player
var/configuration_success = smite.configure(user)
if (configuration_success == FALSE)
return
smite.effect(user, target)
smite.do_effect(user, target)
/// "Turns" people into objects. Really, we just add them to the contents of the item.
/proc/objectify(atom/movable/target, path_or_instance)