diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index d549afab56e..2121a6bfa88 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -104,6 +104,7 @@ #define ADMIN_PUNISHMENT_SCARIFY "Scarify" #define ADMIN_PUNISHMENT_SHOES "Knot Shoes" #define ADMIN_PUNISHMENT_DOCK "Dock Pay" +#define ADMIN_PUNISHMENT_BREAD "Bread" #define AHELP_ACTIVE 1 #define AHELP_CLOSED 2 diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index 884c8efe0c5..9554767c720 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -1220,3 +1220,46 @@ GLOBAL_DATUM_INIT(dummySave, /savefile, new("tmp/dummySave.sav")) //Cache of ico var/icon/I = getFlatIcon(thing) return icon2html(I, target) + +GLOBAL_LIST_EMPTY(transformation_animation_objects) + +/atom/movable/proc/transformation_animation(result_appearance,time = 3 SECONDS,transform_overlay=FALSE,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 + animate(filters[length(filters)],y=-32,time=time) + //Appearing part + var/obj/effect/overlay/ugh = new + ugh.appearance = result_appearance + ugh.appearance_flags |= KEEP_TOGETHER | KEEP_APART + ugh.vis_flags = VIS_INHERIT_ID + ugh.filters = filter(type="alpha",icon=icon('icons/effects/alphacolors.dmi',"white"),y=0,flags=MASK_INVERSE) + animate(ugh.filters[1],y=-32,time=time) + transformation_objects += ugh + //Transform effect thing - todo make appearance passed in + if(transform_overlay) + var/obj/transform_effect = new + transform_effect.icon ='icons/effects/effects.dmi' + transform_effect.icon_state = "transform_effect" + 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),time) + +/atom/movable/proc/reset_transformation_animation() + 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 + filters = null diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index fd0b3a4b5ac..ee8d1c1329d 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1072,7 +1072,8 @@ Traitors and the like can also be revived with the previous role mostly intact. ADMIN_PUNISHMENT_PERFORATE, ADMIN_PUNISHMENT_SCARIFY, ADMIN_PUNISHMENT_SHOES, - ADMIN_PUNISHMENT_DOCK + ADMIN_PUNISHMENT_DOCK, + ADMIN_PUNISHMENT_BREAD ) var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in sortList(punishment_list) @@ -1265,9 +1266,17 @@ Traitors and the like can also be revived with the previous role mostly intact. card.registered_account.account_balance = card.registered_account.account_balance - new_cost card.registered_account.bank_card_talk("[new_cost] credits deducted from your account based on performance review.") SEND_SOUND(target, 'sound/machines/buzz-sigh.ogg') + if(ADMIN_PUNISHMENT_BREAD) + var/mutable_appearance/bread_appearance = mutable_appearance('icons/obj/food/burgerbread.dmi',"bread") + target.transformation_animation(bread_appearance,time= 5 SECONDS,transform_overlay=TRUE,reset_after=TRUE) + addtimer(CALLBACK(GLOBAL_PROC, .proc/breadify, target), 5 SECONDS) punish_log(target, punishment) +/proc/breadify(atom/movable/target) + var/obj/item/food/bread/plain/bread = new(get_turf(target)) + target.forceMove(bread) + /** * firing_squad is a proc for the :B:erforate smite to shoot each individual bullet at them, so that we can add actual delays without sleep() nonsense * diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index a8d64492796..f306db41934 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ