mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-27 17:41:50 +00:00
## 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. /🆑
47 lines
1.8 KiB
Plaintext
47 lines
1.8 KiB
Plaintext
#define OBJECTIFY_TIME (5 SECONDS)
|
|
|
|
/// Turns the target into an object (for instance bread)
|
|
/datum/smite/objectify
|
|
name = "Become Object"
|
|
/// What are we going to turn them into?
|
|
var/atom/transform_path = /obj/item/food/bread/plain
|
|
|
|
/datum/smite/objectify/configure(client/user)
|
|
var/attempted_target_path = input(
|
|
user,
|
|
"Enter typepath of an atom you'd like to turn your victim into.",
|
|
"Typepath",
|
|
"[/obj/item/food/bread/plain]",
|
|
) as null|text
|
|
|
|
if (isnull(attempted_target_path))
|
|
return FALSE //The user pressed "Cancel"
|
|
|
|
var/desired_object = text2path(attempted_target_path)
|
|
if(!ispath(desired_object))
|
|
desired_object = pick_closest_path(attempted_target_path, get_fancy_list_of_atom_types())
|
|
if(isnull(desired_object) || !ispath(desired_object))
|
|
return FALSE //The user pressed "Cancel"
|
|
if(!ispath(desired_object, /atom))
|
|
tgui_alert(user, "ERROR: Incorrect / improper path given.")
|
|
return FALSE
|
|
transform_path = desired_object
|
|
|
|
/datum/smite/objectify/effect(client/user, mob/living/target)
|
|
if (!isliving(target))
|
|
return // This doesn't work on ghosts
|
|
. = ..()
|
|
var/mutable_appearance/objectified_player = mutable_appearance(initial(transform_path.icon), initial(transform_path.icon_state))
|
|
objectified_player.pixel_x = initial(transform_path.pixel_x)
|
|
objectified_player.pixel_y = initial(transform_path.pixel_y)
|
|
var/mutable_appearance/transform_scanline = mutable_appearance('icons/effects/effects.dmi', "transform_effect")
|
|
target.transformation_animation(objectified_player, OBJECTIFY_TIME, transform_scanline.appearance)
|
|
target.Immobilize(OBJECTIFY_TIME, ignore_canstun = TRUE)
|
|
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
|