From a003e7947d8a3bd0d1cbf08543b7b7d6c8f65304 Mon Sep 17 00:00:00 2001
From: Metis <100518708+sheepishgoat@users.noreply.github.com>
Date: Thu, 24 Oct 2024 20:24:20 -0400
Subject: [PATCH] admin smites
---
.../code/__HELPERS/transformation.dm | 57 +++++++++++++++++++
GainStation13/code/mechanics/fatness.dm | 3 +
code/__DEFINES/admin.dm | 5 ++
code/__DEFINES/misc.dm | 1 +
code/modules/admin/verbs/randomverbs.dm | 35 ++++++++++++
tgstation.dme | 1 +
6 files changed, 102 insertions(+)
create mode 100644 GainStation13/code/__HELPERS/transformation.dm
diff --git a/GainStation13/code/__HELPERS/transformation.dm b/GainStation13/code/__HELPERS/transformation.dm
new file mode 100644
index 0000000000..9b34efdd74
--- /dev/null
+++ b/GainStation13/code/__HELPERS/transformation.dm
@@ -0,0 +1,57 @@
+/client/proc/breadify(atom/movable/target)
+ var/obj/item/reagent_containers/food/snacks/store/bread/plain/funnyBread = new(get_turf(target))
+ target.forceMove(funnyBread)
+
+GLOBAL_LIST_EMPTY(transformation_animation_objects)
+/*
+ * Creates animation that turns current icon into result appearance from top down.
+ *
+ * result_appearance - End result appearance/atom/image
+ * time - Animation duration
+ * transform_overlay - Appearance/atom/image of effect that moves along the animation - should be horizonatally centered
+ * reset_after - If FALSE, filters won't be reset and helper vis_objects will not be removed after animation duration expires. Cleanup must be handled by the caller!
+ */
+/atom/movable/proc/transformation_animation(result_appearance,time = 3 SECONDS,transform_overlay,reset_after=TRUE)
+ var/list/transformation_objects = GLOB.transformation_animation_objects[src] || list()
+ //Disappearing part
+ var/top_part_filter = filter(type="alpha",icon=icon('icons/effects/alphacolors.dmi',"white"),y=0)
+ filters += top_part_filter
+ var/filter_index = length(filters)
+ animate(filters[filter_index],y=-32,time=time)
+ //Appearing part
+ var/obj/effect/overlay/appearing_part = new
+ appearing_part.appearance = result_appearance
+ appearing_part.appearance_flags |= KEEP_TOGETHER | KEEP_APART
+ appearing_part.vis_flags = VIS_INHERIT_ID
+ appearing_part.filters = filter(type="alpha",icon=icon('icons/effects/alphacolors.dmi',"white"),y=0,flags=MASK_INVERSE)
+ animate(appearing_part.filters[1],y=-32,time=time)
+ transformation_objects += appearing_part
+ //Transform effect thing - todo make appearance passed in
+ if(transform_overlay)
+ var/obj/transform_effect = new
+ transform_effect.appearance = transform_overlay
+ transform_effect.vis_flags = VIS_INHERIT_ID
+ transform_effect.pixel_y = 16
+ transform_effect.alpha = 255
+ transformation_objects += transform_effect
+ animate(transform_effect,pixel_y=-16,time=time)
+ animate(alpha=0)
+ GLOB.transformation_animation_objects[src] = transformation_objects
+ for(var/A in transformation_objects)
+ vis_contents += A
+ if(reset_after)
+ addtimer(CALLBACK(src,.proc/_reset_transformation_animation,filter_index),time)
+/*
+ * Resets filters and removes transformation animations helper objects from vis contents.
+*/
+/atom/movable/proc/_reset_transformation_animation(filter_index)
+ var/list/transformation_objects = GLOB.transformation_animation_objects[src]
+ for(var/A in transformation_objects)
+ vis_contents -= A
+ qdel(A)
+ transformation_objects.Cut()
+ GLOB.transformation_animation_objects -= src
+ if(filters && length(filters) >= filter_index)
+ filters -= filters[filter_index]
+ //else
+ // filters = null
diff --git a/GainStation13/code/mechanics/fatness.dm b/GainStation13/code/mechanics/fatness.dm
index 95cda6e4f3..f845f50b68 100644
--- a/GainStation13/code/mechanics/fatness.dm
+++ b/GainStation13/code/mechanics/fatness.dm
@@ -93,6 +93,9 @@ GLOBAL_LIST_INIT(uncapped_resize_areas, list(/area/command/bridge, /area/mainten
return FALSE
switch(type_of_fattening)
+ if(FATTENING_TYPE_ALMIGHTY)
+ return TRUE
+
if(FATTENING_TYPE_ITEM)
if(!client?.prefs?.weight_gain_items)
return FALSE
diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm
index c58e111f26..ae5ba7bd15 100644
--- a/code/__DEFINES/admin.dm
+++ b/code/__DEFINES/admin.dm
@@ -87,6 +87,11 @@
#define ADMIN_PUNISHMENT_FRY "Fry"
#define ADMIN_PUNISHMENT_PERFORATE ":B:erforate"
#define ADMIN_PUNISHMENT_CLUWNE "Cluwne"
+// GS13 PUNISHMENTS
+#define ADMIN_PUNISHMENT_BONK "Bonk"
+#define ADMIN_PUNISHMENT_BREADIFY "Breadify"
+#define ADMIN_PUNISHMENT_FATTEN "Fatten"
+#define ADMIN_PUNISHMENT_FATTEN_EVIL "Fatten (Permafat)"
#define AHELP_ACTIVE 1
#define AHELP_CLOSED 2
diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index 3933856d4d..a6d3686fa8 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -588,5 +588,6 @@ GLOBAL_LIST_INIT(pda_reskins, list(
#define FATTENING_TYPE_NANITES "nanites"
#define FATTENING_TYPE_RADIATIONS "radiations"
#define FATTENING_TYPE_WEIGHT_LOSS "weight_loss"
+#define FATTENING_TYPE_ALMIGHTY "almighty" //This ignores prefs, please only use this for smites and other admin controlled instances.
#define FATNESS_TO_WEIGHT_RATIO 0.25
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index bf296f0aeb..2c72ebd446 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -1335,6 +1335,12 @@ Traitors and the like can also be revived with the previous role mostly intact.
ADMIN_PUNISHMENT_FRY,
ADMIN_PUNISHMENT_CRACK,
ADMIN_PUNISHMENT_BLEED,
+ //GS13 EDIT START
+ ADMIN_PUNISHMENT_BONK,
+ ADMIN_PUNISHMENT_BREADIFY,
+ ADMIN_PUNISHMENT_FATTEN,
+ ADMIN_PUNISHMENT_FATTEN_EVIL,
+ //GS13 EDIT END
ADMIN_PUNISHMENT_SCARIFY,
ADMIN_PUNISHMENT_CLUWNE)
@@ -1507,6 +1513,35 @@ Traitors and the like can also be revived with the previous role mostly intact.
to_chat(usr,"This must be used on a carbon mob.")
return
target.cluwneify()
+ // GS13 EDIT START
+ if(ADMIN_PUNISHMENT_BONK)
+ playsound(target, 'hyperstation/sound/misc/bonk.ogg', 100, 1)
+ target.AddElement(/datum/element/squish, 60 SECONDS)
+ to_chat(target, "Bonk.")
+ if(ADMIN_PUNISHMENT_BREADIFY)
+ #define BREADIFY_TIME (5 SECONDS)
+ var/mutable_appearance/bread_appearance = mutable_appearance('icons/obj/food/burgerbread.dmi', "bread")
+ var/mutable_appearance/transform_scanline = mutable_appearance('icons/effects/effects.dmi', "transform_effect")
+ target.transformation_animation(bread_appearance, time = BREADIFY_TIME, transform_overlay=transform_scanline, reset_after=TRUE)
+ addtimer(CALLBACK(src, PROC_REF(breadify), target), BREADIFY_TIME)
+ #undef BREADIFY_TIME
+ if(ADMIN_PUNISHMENT_FATTEN)
+ var/mob/living/carbon/human/human_target = target
+ if(!istype(human_target))
+ to_chat(usr,"This must be used on a carbon mob.")
+ return
+ human_target.adjust_fatness(10000, FATTENING_TYPE_ALMIGHTY, TRUE) // MR ELECTRIC, SEND HIM TO THE ADMIN JAIL AND HAVE HIM FATTENED!
+ to_chat(target, span_boldwarning("You suddenly feel incredibly fat."))
+ if(ADMIN_PUNISHMENT_FATTEN_EVIL)
+ var/mob/living/carbon/human/human_target = target
+ if(!istype(human_target))
+ to_chat(usr,"This must be used on a carbon mob.")
+ return
+ if(!human_target?.client?.prefs?.weight_gain_permanent)
+ return FALSE
+ human_target.fatness_perma += 10000 // Good luck getting this off, fatass.
+ to_chat(target, span_boldwarning("You suddenly feel incredibly fat."))
+ // GS13 EDIT END
punish_log(target, punishment)
diff --git a/tgstation.dme b/tgstation.dme
index 9a03dfd2cd..146bbc947f 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -3904,6 +3904,7 @@
#include "code\modules\zombie\items.dm"
#include "code\modules\zombie\organs.dm"
#include "GainStation13\code\__HELPERS\global_lists.dm"
+#include "GainStation13\code\__HELPERS\transformation.dm"
#include "GainStation13\code\clothing\accessory.dm"
#include "GainStation13\code\clothing\backpacks.dm"
#include "GainStation13\code\clothing\calorite_collar.dm"